summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ck-session.c11
-rw-r--r--src/org.freedesktop.ConsoleKit.Session.xml14
2 files changed, 25 insertions, 0 deletions
diff --git a/src/ck-session.c b/src/ck-session.c
index f8913cd..64c3847 100644
--- a/src/ck-session.c
+++ b/src/ck-session.c
@@ -1279,6 +1279,16 @@ dbus_get_login_session_id (ConsoleKitSession *cksession,
return TRUE;
}
+static gboolean
+dbus_get_vtnr (ConsoleKitSession *cksession,
+ GDBusMethodInvocation *context)
+{
+ TRACE ();
+
+ console_kit_session_complete_get_vtnr (cksession, context, console_kit_session_get_vtnr (cksession));
+ return TRUE;
+}
+
gboolean
ck_session_set_login_session_id (CkSession *session,
const char *login_session_id,
@@ -1978,6 +1988,7 @@ ck_session_iface_init (ConsoleKitSessionIface *iface)
iface->handle_get_unix_user = dbus_get_unix_user;
iface->handle_get_seat_id = dbus_get_seat_id;
iface->handle_get_login_session_id = dbus_get_login_session_id;
+ iface->handle_get_vtnr = dbus_get_vtnr;
iface->handle_get_session_type = dbus_get_session_type;
iface->handle_get_x11_display_device = dbus_get_x11_display_device;
iface->handle_get_display_device = dbus_get_display_device;
diff --git a/src/org.freedesktop.ConsoleKit.Session.xml b/src/org.freedesktop.ConsoleKit.Session.xml
index 6fb8129..a94e771 100644
--- a/src/org.freedesktop.ConsoleKit.Session.xml
+++ b/src/org.freedesktop.ConsoleKit.Session.xml
@@ -162,6 +162,20 @@
</doc:description>
</doc:doc>
</method>
+ <method name="GetVTNr">
+ <arg name="VTNr" direction="out" type="u">
+ <doc:doc>
+ <doc:summary>The virtual terminal the session runs on, if any, 0 otherwise</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the value of the virtual terminal that the
+ underlying session runs on. If the seat doesn't support VTs, then this will always
+ return 0.</doc:para>
+ <doc:para>Since 1.1.2</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
<method name="IsActive">
<arg name="active" direction="out" type="b">
<doc:doc>