summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2017-05-18 17:21:33 +0300
committerEric Koegel <eric.koegel@gmail.com>2017-05-18 18:13:42 +0300
commit2314496430b09a6234b37bdab79a3c5ef0866f99 (patch)
treedfd230b3d29263f1e79c63f614ead3edce9e94ce /src
parent151595041137edf33e30e4fc6a77db50397fc4b7 (diff)
downloadConsoleKit2-2314496430b09a6234b37bdab79a3c5ef0866f99.tar.gz
feat: document session types allowed
Using the same ones logind does for compatibility. Additionally, default to "unspecified" if no type is set instead of an empty string.
Diffstat (limited to 'src')
-rw-r--r--src/ck-session.c7
-rw-r--r--src/org.freedesktop.ConsoleKit.Session.xml14
2 files changed, 13 insertions, 8 deletions
diff --git a/src/ck-session.c b/src/ck-session.c
index 9a632ab..f8913cd 100644
--- a/src/ck-session.c
+++ b/src/ck-session.c
@@ -250,6 +250,9 @@ register_session (CkSession *session, GDBusConnection *connection)
g_error_free (error);
}
+ /* default to unspecified for the session type on startup */
+ console_kit_session_set_session_type (CONSOLE_KIT_SESSION (session), "unspecified");
+
return TRUE;
}
@@ -526,8 +529,8 @@ dbus_get_session_type (ConsoleKitSession *cksession,
TRACE ();
if (session_type == NULL) {
- /* GDBus/GVariant doesn't like NULL strings */
- session_type = "";
+ /* default to unspecified */
+ session_type = "unspecified";
}
console_kit_session_complete_get_session_type (cksession, context, session_type);
diff --git a/src/org.freedesktop.ConsoleKit.Session.xml b/src/org.freedesktop.ConsoleKit.Session.xml
index 962c38d..6fb8129 100644
--- a/src/org.freedesktop.ConsoleKit.Session.xml
+++ b/src/org.freedesktop.ConsoleKit.Session.xml
@@ -45,10 +45,13 @@
</arg>
<doc:doc>
<doc:description>
- <doc:para>Returns the type of the session.</doc:para>
- <doc:para>Warning: we haven't yet defined the allowed values for this property.
- It is probably best to avoid this until we do.
- </doc:para>
+ <doc:para>Returns the display type of the provided session. The following type may be returned:</doc:para>
+ <doc:para>"x11" - An X11/Xorg based session</doc:para>
+ <doc:para>"wayland" - A Wayland based session</doc:para>
+ <doc:para>"tty" - A text console based session</doc:para>
+ <doc:para>"mir" - A session using the Mir display server</doc:para>
+ <doc:para>"unspecified" - Unknown session type.</doc:para>
+ <doc:para>Note: Additional types may be added in the future.</doc:para>
</doc:description>
<doc:seealso><doc:ref type="property" to="Session:session-type">session-type</doc:ref></doc:seealso>
</doc:doc>
@@ -546,8 +549,7 @@
<doc:doc>
<doc:description>
<doc:para>Emitted in response to a call to the <doc:ref type="method" to="Session.Unlock">Unlock()</doc:ref> method.</doc:para>
- <doc:para>It is intended that the screensaver for the session should unlock the screen in response to this signal.
- Which may involve showing the password unlock dialog, depending on the screensaver policy.</doc:para>
+ <doc:para>It is intended that the screensaver for the session should unlock the screen in response to this signal.</doc:para>
</doc:description>
</doc:doc>
</signal>