summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/SessionManagement.h
diff options
context:
space:
mode:
authorPeter Elliott <pelliott@ualberta.ca>2022-09-05 22:10:46 -0600
committerAndreas Kling <kling@serenityos.org>2022-10-03 11:11:29 +0200
commit2c3caa7e176bc846a4b399c8b4a0bb67e48aa79c (patch)
tree070436c752080bcef568a887dccaf4f533bcad6c /Userland/Libraries/LibCore/SessionManagement.h
parent76c67b7ae958897c7485247306dc24d3c7335e66 (diff)
downloadserenity-2c3caa7e176bc846a4b399c8b4a0bb67e48aa79c.zip
LibCore: Create Core::SessionManagement for session management
Diffstat (limited to 'Userland/Libraries/LibCore/SessionManagement.h')
-rw-r--r--Userland/Libraries/LibCore/SessionManagement.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/SessionManagement.h b/Userland/Libraries/LibCore/SessionManagement.h
new file mode 100644
index 0000000000..eb744a058a
--- /dev/null
+++ b/Userland/Libraries/LibCore/SessionManagement.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2022, Peter Elliott <pelliott@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/Error.h>
+#include <AK/Types.h>
+
+namespace Core::SessionManagement {
+
+ErrorOr<pid_t> root_session_id(Optional<pid_t> force_sid = {});
+ErrorOr<void> logout(Optional<pid_t> force_sid = {});
+
+ErrorOr<String> parse_path_with_sid(StringView general_path, Optional<pid_t> force_sid = {});
+ErrorOr<void> create_session_temporary_directory_if_needed(uid_t uid, gid_t gid, Optional<pid_t> force_sid = {});
+
+}