summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2008-07-23 23:22:36 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2008-07-23 23:22:36 -0400
commite54095996b9066120ebf20011eba199d25422c2f (patch)
tree6d88da2ce0137fed1ece3bf610690e66809f76b0 /src
parent34cefc96f7661ed92927bffa1cf7cbc79a84e5ab (diff)
use spec files directly as introspection xml and try to generate docs on the fly
At one point we had to strip out the docs because dbus-glib didn't support unknown tags. Apparently this is now fixed. Also install the xml to /usr/share/dbus-1/interfaces.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am23
-rw-r--r--src/ck-manager.xml70
-rw-r--r--src/ck-seat.xml39
-rw-r--r--src/ck-session.xml81
-rw-r--r--src/org.freedesktop.ConsoleKit.Manager.xml343
-rw-r--r--src/org.freedesktop.ConsoleKit.Seat.xml163
-rw-r--r--src/org.freedesktop.ConsoleKit.Session.xml435
7 files changed, 955 insertions, 199 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b5b8f08..cbe8a09 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,12 +75,19 @@ BUILT_SOURCES = \
ck-marshal.h \
$(NULL)
-ck-manager-glue.h: ck-manager.xml Makefile.am
- dbus-binding-tool --prefix=ck_manager --mode=glib-server --output=ck-manager-glue.h ck-manager.xml
-ck-seat-glue.h: ck-seat.xml Makefile.am
- dbus-binding-tool --prefix=ck_seat --mode=glib-server --output=ck-seat-glue.h ck-seat.xml
-ck-session-glue.h: ck-session.xml Makefile.am
- dbus-binding-tool --prefix=ck_session --mode=glib-server --output=ck-session-glue.h ck-session.xml
+dbusifdir = $(datadir)/dbus-1/interfaces
+dbusif_DATA = \
+ org.freedesktop.ConsoleKit.Manager.xml \
+ org.freedesktop.ConsoleKit.Seat.xml \
+ org.freedesktop.ConsoleKit.Session.xml \
+ $(NULL)
+
+ck-manager-glue.h: org.freedesktop.ConsoleKit.Manager.xml Makefile.am
+ dbus-binding-tool --prefix=ck_manager --mode=glib-server --output=ck-manager-glue.h org.freedesktop.ConsoleKit.Manager.xml
+ck-seat-glue.h: org.freedesktop.ConsoleKit.Seat.xml Makefile.am
+ dbus-binding-tool --prefix=ck_seat --mode=glib-server --output=ck-seat-glue.h org.freedesktop.ConsoleKit.Seat.xml
+ck-session-glue.h: org.freedesktop.ConsoleKit.Session.xml Makefile.am
+ dbus-binding-tool --prefix=ck_session --mode=glib-server --output=ck-session-glue.h org.freedesktop.ConsoleKit.Session.xml
ck-marshal.c: ck-marshal.list
echo "#include \"ck-marshal.h\"" > $@ && \
@@ -183,9 +190,7 @@ test_tty_idle_monitor_LDADD = \
EXTRA_DIST = \
ck-marshal.list \
- ck-manager.xml \
- ck-seat.xml \
- ck-session.xml \
+ $(dbusif_DATA) \
valgrind.sh \
test-open-session \
test-open-session-with-parameters \
diff --git a/src/ck-manager.xml b/src/ck-manager.xml
deleted file mode 100644
index 0ca74fa..0000000
--- a/src/ck-manager.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node name="/org/freedesktop/ConsoleKit/Manager">
- <interface name="org.freedesktop.ConsoleKit.Manager">
- <method name="Restart">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- </method>
- <method name="Stop">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- </method>
- <method name="OpenSession">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="cookie" direction="out" type="s"/>
- </method>
- <method name="OpenSessionWithParameters">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="parameters" direction="in" type="a(sv)"/>
- <arg name="cookie" direction="out" type="s"/>
- </method>
- <method name="CloseSession">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="cookie" direction="in" type="s"/>
- <arg name="result" direction="out" type="b"/>
- </method>
- <method name="GetSeats">
- <arg name="seats" direction="out" type="ao"/>
- </method>
- <method name="GetSessions">
- <arg name="sessions" direction="out" type="ao"/>
- </method>
- <method name="GetSessionForCookie">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="cookie" direction="in" type="s"/>
- <arg name="ssid" direction="out" type="o"/>
- </method>
- <method name="GetSessionForUnixProcess">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="pid" direction="in" type="u"/>
- <arg name="ssid" direction="out" type="o"/>
- </method>
- <method name="GetCurrentSession">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="ssid" direction="out" type="o"/>
- </method>
- <method name="GetSessionsForUnixUser">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="uid" direction="in" type="u"/>
- <arg name="sessions" direction="out" type="ao"/>
- </method>
- <method name="GetSessionsForUser">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="uid" direction="in" type="u"/>
- <arg name="sessions" direction="out" type="ao"/>
- </method>
- <method name="GetSystemIdleHint">
- <arg name="idle_hint" type="b" direction="out"/>
- </method>
- <method name="GetSystemIdleSinceHint">
- <arg name="iso8601_datetime" type="s" direction="out"/>
- </method>
- <signal name="SeatAdded">
- <arg name="sid" type="o"/>
- </signal>
- <signal name="SeatRemoved">
- <arg name="sid" type="o"/>
- </signal>
- <signal name="SystemIdleHintChanged">
- <arg name="hint" type="b"/>
- </signal>
- </interface>
-</node>
diff --git a/src/ck-seat.xml b/src/ck-seat.xml
deleted file mode 100644
index b66fcaa..0000000
--- a/src/ck-seat.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node>
- <interface name="org.freedesktop.ConsoleKit.Seat">
- <method name="GetId">
- <arg name="sid" direction="out" type="o"/>
- </method>
- <method name="GetSessions">
- <arg name="sessions" direction="out" type="ao"/>
- </method>
- <method name="GetDevices">
- <arg name="devices" direction="out" type="a(ss)"/>
- </method>
- <method name="GetActiveSession">
- <arg name="ssid" direction="out" type="o"/>
- </method>
- <method name="CanActivateSessions">
- <arg name="can_activate" direction="out" type="b"/>
- </method>
- <method name="ActivateSession">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="ssid" direction="in" type="o"/>
- </method>
- <signal name="ActiveSessionChanged">
- <arg name="ssid" type="o"/>
- </signal>
- <signal name="SessionAdded">
- <arg name="ssid" type="o"/>
- </signal>
- <signal name="SessionRemoved">
- <arg name="ssid" type="o"/>
- </signal>
- <signal name="DeviceAdded">
- <arg name="device" type="(ss)"/>
- </signal>
- <signal name="DeviceRemoved">
- <arg name="device" type="(ss)"/>
- </signal>
- </interface>
-</node>
diff --git a/src/ck-session.xml b/src/ck-session.xml
deleted file mode 100644
index f2c1ef2..0000000
--- a/src/ck-session.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node>
- <interface name="org.freedesktop.ConsoleKit.Session">
- <method name="GetId">
- <arg name="ssid" direction="out" type="o"/>
- </method>
- <method name="GetSeatId">
- <arg name="sid" direction="out" type="o"/>
- </method>
- <method name="GetSessionType">
- <arg name="type" direction="out" type="s"/>
- </method>
- <method name="GetUser">
- <arg name="uid" direction="out" type="u"/>
- </method>
- <method name="GetUnixUser">
- <arg name="uid" direction="out" type="u"/>
- </method>
- <method name="GetX11Display">
- <arg name="display" direction="out" type="s"/>
- </method>
- <method name="GetX11DisplayDevice">
- <arg name="x11_display_device" direction="out" type="s"/>
- </method>
- <method name="GetDisplayDevice">
- <arg name="display_device" direction="out" type="s"/>
- </method>
- <method name="GetRemoteHostName">
- <arg name="remote_host_name" direction="out" type="s"/>
- </method>
- <method name="GetLoginSessionId">
- <arg name="login_session_id" direction="out" type="s"/>
- </method>
- <method name="IsActive">
- <arg name="active" direction="out" type="b"/>
- </method>
- <method name="IsLocal">
- <arg name="local" direction="out" type="b"/>
- </method>
- <method name="GetCreationTime">
- <arg name="iso8601_datetime" type="s" direction="out"/>
- </method>
- <method name="Activate">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- </method>
- <method name="Lock">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- </method>
- <method name="Unlock">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- </method>
- <method name="GetIdleHint">
- <arg name="idle_hint" type="b" direction="out"/>
- </method>
- <method name="GetIdleSinceHint">
- <arg name="iso8601_datetime" type="s" direction="out"/>
- </method>
- <method name="SetIdleHint">
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
- <arg name="idle_hint" type="b" direction="in"/>
- </method>
- <signal name="ActiveChanged">
- <arg name="is_active" type="b"/>
- </signal>
- <signal name="IdleHintChanged">
- <arg name="hint" type="b"/>
- </signal>
- <signal name="Lock"/>
- <signal name="Unlock"/>
- <property name="unix-user" type="u" access="readwrite"/>
- <property name="user" type="u" access="readwrite"/>
- <property name="session-type" type="s" access="readwrite"/>
- <property name="remote-host-name" type="s" access="readwrite"/>
- <property name="display-device" type="s" access="readwrite"/>
- <property name="x11-display" type="s" access="readwrite"/>
- <property name="x11-display-device" type="s" access="readwrite"/>
- <property name="active" type="b" access="readwrite"/>
- <property name="is-local" type="b" access="readwrite"/>
- <property name="idle-hint" type="b" access="readwrite"/>
- </interface>
-</node>
diff --git a/src/org.freedesktop.ConsoleKit.Manager.xml b/src/org.freedesktop.ConsoleKit.Manager.xml
new file mode 100644
index 0000000..f405c25
--- /dev/null
+++ b/src/org.freedesktop.ConsoleKit.Manager.xml
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/org/freedesktop/ConsoleKit/Manager"
+ xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"
+>
+
+ <interface name="org.freedesktop.ConsoleKit.Manager">
+ <method name="Restart">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This method initiates a request to restart (ie. reboot) the computer system.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="Stop">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This method initiates a request to stop (ie. shutdown) the computer system.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="OpenSession">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="cookie" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>The secret cookie that is used to identify the new session</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This method requests that a new <doc:ref type="interface" to="Session">Session</doc:ref>
+ be created for the calling process. The properties of this new Session are set automatically
+ from information collected about the calling process.
+ </doc:para>
+ <doc:para>This new session exists until the calling process disconnects from the system bus or
+ calls <doc:ref type="method" to="Manager.CloseSession">CloseSession()</doc:ref>.
+ </doc:para>
+ <doc:para>It is the responsibility of the calling process to set the environment variable
+ XDG_SESSION_COOKIE to the value of the returned cookie. This cookie should only
+ be made available to child processes of the caller so that they may be identified
+ as members of this session.
+ </doc:para>
+ <doc:para>See this simple example:
+ <doc:example language="c" title="simple example"><doc:code>
+ DBusError error;
+ DBusMessage *message;
+ DBusMessage *reply;
+
+ message = dbus_message_new_method_call ("org.freedesktop.ConsoleKit",
+ "/org/freedesktop/ConsoleKit/Manager",
+ "org.freedesktop.ConsoleKit.Manager",
+ "OpenSession");
+ if (message == NULL) {
+ goto out;
+ }
+
+ dbus_error_init (&amp;error);
+ reply = dbus_connection_send_with_reply_and_block (connector->connection,
+ message,
+ -1,
+ &amp;error);
+ if (reply == NULL) {
+ goto out;
+ }
+
+ dbus_error_init (&amp;error);
+ if (! dbus_message_get_args (reply,
+ &amp;error,
+ DBUS_TYPE_STRING, &amp;cookie,
+ DBUS_TYPE_INVALID)) {
+ goto out;
+ }
+
+ </doc:code></doc:example></doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="method" to="Manager.OpenSessionWithParameters">OpenSessionWithParameters()</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="OpenSessionWithParameters">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="parameters" direction="in" type="a(sv)">
+ <doc:doc>
+ <doc:summary>An array of sets of property names and values</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="cookie" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>The secret cookie that is used to identify the new session</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This method requests that a new <doc:ref type="interface" to="Session">Session</doc:ref>
+ be created for the calling process. The properties of this new Session are from the
+ parameters provided.
+ </doc:para>
+ <doc:para>This new session exists until the calling process disconnects from the system bus or
+ calls <doc:ref type="method" to="Manager.CloseSession">CloseSession()</doc:ref>.
+ </doc:para>
+ <doc:para>It is the responsibility of the calling process to set the environment variable
+ XDG_SESSION_COOKIE to the value of the returned cookie. This cookie should only
+ be made available to child processes of the caller so that they may be identified
+ as members of this session.
+ </doc:para>
+ <doc:para>See the <doc:ref type="interface" to="Session">Session</doc:ref> properties for a list of valid parameters.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="interface" to="Session">org.freedesktop.ConsoleKit.Session</doc:ref></doc:seealso>
+ <doc:permission>This method is restricted to privileged users by D-Bus policy.</doc:permission>
+ </doc:doc>
+ </method>
+ <method name="CloseSession">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="cookie" direction="in" type="s">
+ <doc:doc>
+ <doc:summary>The secret cookie that is used to identify the session</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="result" direction="out" type="b">
+ <doc:doc>
+ <doc:summary>Whether the session was successfully closed</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This method is used to close the session identified by the supplied cookie.
+ </doc:para>
+ <doc:para>The session can only be closed by the same process that opened the session.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="GetSeats">
+ <arg name="seats" direction="out" type="ao">
+ <doc:doc>
+ <doc:summary>an array of Seat IDs</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="Seat">Seats</doc:ref>
+ that are currently present on the system.</doc:para>
+ <doc:para>Each Seat ID is an D-Bus object path for the object that implements the
+ <doc:ref type="interface" to="Seat">Seat</doc:ref> interface.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="interface" to="Seat">org.freedesktop.ConsoleKit.Seat</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+
+ <method name="GetSessions">
+ <arg name="sessions" direction="out" type="ao">
+ <doc:doc>
+ <doc:summary>an array of Session IDs</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="Sessions">Sessions</doc:ref>
+ that are currently present on the system.</doc:para>
+ <doc:para>Each Session ID is an D-Bus object path for the object that implements the
+ <doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="interface" to="Session">org.freedesktop.ConsoleKit.Session</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+
+ <method name="GetSessionForCookie">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="cookie" direction="in" type="s">
+ <doc:doc>
+ <doc:summary>The secret cookie that is used to identify the session</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="ssid" direction="out" type="o">
+ <doc:doc>
+ <doc:summary>The object identifier for the current session</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Returns the session ID that is associated with the specified cookie.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetSessionForUnixProcess">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="pid" direction="in" type="u">
+ <doc:doc>
+ <doc:summary>The POSIX process ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="ssid" direction="out" type="o">
+ <doc:doc>
+ <doc:summary>The object identifier for the current session</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Attempts to determine the session ID for the specified
+ POSIX process ID (pid).
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetCurrentSession">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="ssid" direction="out" type="o">
+ <doc:doc>
+ <doc:summary>The object identifier for the current session</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Attempts to determine the session ID that the caller belongs to.
+ </doc:para>
+ <doc:para>See this example of using dbus-send:
+ <doc:example language="shell" title="shell example"><doc:code>
+ dbus-send --system --dest=org.freedesktop.ConsoleKit \
+ --type=method_call --print-reply --reply-timeout=2000 \
+ /org/freedesktop/ConsoleKit/Manager \
+ org.freedesktop.ConsoleKit.Manager.GetCurrentSession
+ </doc:code></doc:example></doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetSessionsForUnixUser">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="uid" direction="in" type="u">
+ <doc:doc>
+ <doc:summary>POSIX User identification</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="sessions" direction="out" type="ao">
+ <doc:doc>
+ <doc:summary>an array of Session IDs</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="Session">Sessions</doc:ref>
+ that are currently open for the specified user.</doc:para>
+ <doc:para>Each Session ID is an D-Bus object path for the object that implements the
+ <doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetSessionsForUser">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="uid" direction="in" type="u">
+ <doc:doc>
+ <doc:summary>User identification</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="sessions" direction="out" type="ao">
+ <doc:doc>
+ <doc:summary>an array of Session IDs</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="Session">Sessions</doc:ref>
+ that are currently open for the specified user.</doc:para>
+ <doc:para>Each Session ID is an D-Bus object path for the object that implements the
+ <doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
+ </doc:description>
+ <doc:deprecated version="0.1.3" instead="GetSessionsForUnixUser"/>
+ </doc:doc>
+ </method>
+
+ <method name="GetSystemIdleHint">
+ <arg name="idle_hint" type="b" direction="out">
+ <doc:doc>
+ <doc:summary>The value of the system-idle-hint</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Returns TRUE if the <doc:ref type="property" to="Session:idle-hint">idle-hint</doc:ref>
+ property of every open session is TRUE or if there are no open sessions.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetSystemIdleSinceHint">
+ <arg name="iso8601_datetime" type="s" direction="out">
+ <doc:doc>
+ <doc:summary>An ISO 8601 format date-type string</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Returns an ISO 8601 date-time string that corresponds to
+ the time of the last change of the system-idle-hint.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <signal name="SeatAdded">
+ <arg name="sid" type="o">
+ <doc:doc>
+ <doc:summary>The Seat ID for the added seat</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a Seat has been added to the system.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="SeatRemoved">
+ <arg name="sid" type="o">
+ <doc:doc>
+ <doc:summary>The Seat ID for the removed seat</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a Seat has been removed from the system.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="SystemIdleHintChanged">
+ <arg name="hint" type="b">
+ <doc:doc>
+ <doc:summary>The value of the system-idle-hint</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when the value of the system-idle-hint has changed.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ </interface>
+</node>
diff --git a/src/org.freedesktop.ConsoleKit.Seat.xml b/src/org.freedesktop.ConsoleKit.Seat.xml
new file mode 100644
index 0000000..0e13a0f
--- /dev/null
+++ b/src/org.freedesktop.ConsoleKit.Seat.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+
+ <interface name="org.freedesktop.ConsoleKit.Seat">
+ <doc:doc>
+ <doc:description>
+ <doc:para>A seat is a collection of sessions and a set of hardware (usually at
+least a keyboard and mouse). Only one session may be active on a
+seat at a time.</doc:para>
+ </doc:description>
+ </doc:doc>
+
+ <method name="GetId">
+ <arg name="sid" direction="out" type="o">
+ <doc:doc>
+ <doc:summary>Seat ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>Returns the ID for Seat.
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="GetSessions">
+ <arg name="sessions" direction="out" type="ao">
+ <doc:doc>
+ <doc:summary>an array of Session IDs</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="Session">Sessions</doc:ref>
+ that are currently attached to this seat.</doc:para>
+ <doc:para>Each Session ID is an D-Bus object path for the object that implements the
+ <doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="GetDevices">
+ <arg name="devices" direction="out" type="a(ss)">
+ <doc:doc>
+ <doc:summary>an array of devices</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the devices
+ that are currently associated with this seat.</doc:para>
+ <doc:para>Each device is an D-Bus structure that represents
+ the device type and the device id.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="GetActiveSession">
+ <arg name="ssid" direction="out" type="o">
+ <doc:doc>
+ <doc:summary>Session ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Gets the Session ID that is currently active on this Seat.</doc:para>
+ <doc:para>Returns NULL if there is no active session.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="CanActivateSessions">
+ <arg name="can_activate" direction="out" type="b">
+ <doc:doc>
+ <doc:summary>TRUE if seat supports session activation</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>Used to determine whether the seat supports session activation.
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="ActivateSession">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="ssid" direction="in" type="o">
+ <doc:doc>
+ <doc:summary>Session ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Attempt to activate the specified session. In most
+ cases, if successful, this will cause the session to
+ become visible and take control of the hardware that is
+ associated with this seat.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="method" to="Session.Activate">Activate()</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+
+ <signal name="ActiveSessionChanged">
+ <arg name="ssid" type="o">
+ <doc:doc>
+ <doc:summary>Session ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when the active session has changed.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="SessionAdded">
+ <arg name="ssid" type="o">
+ <doc:doc>
+ <doc:summary>Session ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a session has been added to the seat.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="SessionRemoved">
+ <arg name="ssid" type="o">
+ <doc:doc>
+ <doc:summary>Session ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a session has been removed from the seat.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="DeviceAdded">
+ <arg name="device" type="(ss)">
+ <doc:doc>
+ <doc:summary>Device structure</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a device has been associated with the seat.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="DeviceRemoved">
+ <arg name="device" type="(ss)">
+ <doc:doc>
+ <doc:summary>Device structure</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a device has been dissociated from the seat.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ </interface>
+</node>
diff --git a/src/org.freedesktop.ConsoleKit.Session.xml b/src/org.freedesktop.ConsoleKit.Session.xml
new file mode 100644
index 0000000..b6e1cdb
--- /dev/null
+++ b/src/org.freedesktop.ConsoleKit.Session.xml
@@ -0,0 +1,435 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+
+ <interface name="org.freedesktop.ConsoleKit.Session">
+ <doc:doc>
+ <doc:description>
+ <doc:para>Session objects represent and store information
+ related to a user session.
+ </doc:para>
+ <doc:para>The properties associated with the Session
+ specifically refer to the properties of the "session leader".
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <method name="GetId">
+ <arg name="ssid" direction="out" type="o">
+ <doc:doc>
+ <doc:summary>Session ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the ID for Session.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetSeatId">
+ <arg name="sid" direction="out" type="o">
+ <doc:doc>
+ <doc:summary>Seat ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the ID for the Seat the Session is
+ attached to.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="interface" to="Seat">org.freedesktop.ConsoleKit.Seat</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetSessionType">
+ <arg name="type" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>Session type</doc:summary>
+ </doc:doc>
+ </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:description>
+ <doc:seealso><doc:ref type="property" to="Session:session-type">session-type</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetUser">
+ <arg name="uid" direction="out" type="u">
+ <doc:doc>
+ <doc:summary>User ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the user that the session belongs to.</doc:para>
+ </doc:description>
+ <doc:deprecated version="0.1.3" instead="GetUnixUser"/>
+ <doc:seealso><doc:ref type="property" to="Session:user">user</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetUnixUser">
+ <arg name="uid" direction="out" type="u">
+ <doc:doc>
+ <doc:summary>POSIX User ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the POSIX user ID that the session belongs to.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:unix-user">unix-user</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetX11Display">
+ <arg name="display" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>The value of the X11 display</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the value of the X11 DISPLAY for this session
+ if one is present.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:x11-display">x11-display</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetX11DisplayDevice">
+ <arg name="x11_display_device" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>The value of the X11 display device</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the value of the display device (aka TTY) that the
+ X11 display for the session is connected to. If there is no x11-display set then this value
+ is undefined.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:x11-display-device">x11-display-device</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetDisplayDevice">
+ <arg name="display_device" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>The value of the display device</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the value of the display device (aka TTY) that the
+ session is connected to.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:display-device">display-device</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetRemoteHostName">
+ <arg name="remote_host_name" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>The remote host name</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the value of the remote host name for the session.
+ </doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:remote-host-name">remote-host-name</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetLoginSessionId">
+ <arg name="login_session_id" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>The value of the native system login session ID</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns the value of the login session ID that the
+ underlying system uses to enforce session boundaries. If there is no login session ID
+ set then this value is an empty string.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="IsActive">
+ <arg name="active" direction="out" type="b">
+ <doc:doc>
+ <doc:summary>TRUE if the session is active, otherwise FALSE</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns whether the session is active on the Seat that
+ it is attached to.</doc:para>
+ <doc:para>If the session is not attached to a seat this value is undefined.
+ </doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:active">active</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="IsLocal">
+ <arg name="local" direction="out" type="b">
+ <doc:doc>
+ <doc:summary>TRUE if the session is local, otherwise FALSE</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description><doc:para>Returns whether the session is local</doc:para>
+ <doc:para>FIXME: we need to come up with a concrete definition for this value.
+ It was originally used as a way to identify XDMCP sessions that originate
+ from a remote system.
+ </doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:is-local">is-local</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetCreationTime">
+ <arg name="iso8601_datetime" type="s" direction="out">
+ <doc:doc>
+ <doc:summary>An ISO 8601 format date-type string</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Returns an ISO 8601 date-time string that corresponds to
+ the time that the session was opened.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="Activate">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Attempt to activate the this session. In most
+ cases, if successful, this will cause the session to
+ become visible and become active on the seat that it
+ is attached to.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="method" to="Seat.ActivateSession">Seat.ActivateSession()</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="Lock">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This will cause a <doc:ref type="signal" to="Session::Lock">Lock</doc:ref>
+ signal to be emitted for this session.
+ </doc:para>
+ </doc:description>
+ <doc:permission>This method is restricted to privileged users by D-Bus policy.</doc:permission>
+ <doc:seealso><doc:ref type="signal" to="Session::Lock">Lock signal</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="Unlock">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This will cause an <doc:ref type="signal" to="Session::Unlock">Unlock</doc:ref>
+ signal to be emitted for this session.
+ </doc:para>
+ <doc:para>This can be used by login managers to unlock a session before it is
+ re-activated during fast-user-switching.
+ </doc:para>
+ </doc:description>
+ <doc:permission>This method is restricted to privileged users by D-Bus policy.</doc:permission>
+ <doc:seealso><doc:ref type="signal" to="Session::Unlock">Unlock signal</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+
+ <method name="GetIdleHint">
+ <arg name="idle_hint" type="b" direction="out">
+ <doc:doc>
+ <doc:summary>The value of the idle-hint</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Gets the value of the <doc:ref type="property" to="Session:idle-hint">idle-hint</doc:ref>
+ property.
+ </doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="property" to="Session:idle-hint">idle-hint</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+ <method name="GetIdleSinceHint">
+ <arg name="iso8601_datetime" type="s" direction="out">
+ <doc:doc>
+ <doc:summary>An ISO 8601 format date-type string</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Returns an ISO 8601 date-time string that corresponds to
+ the time of the last change of the idle-hint.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="SetIdleHint">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="idle_hint" type="b" direction="in">
+ <doc:doc>
+ <doc:summary>boolean value to set the idle-hint to</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This may be used by the session to indicate that
+ it is idle.
+ </doc:para>
+ <doc:para>Use of this method is restricted to the user
+ that owns the session.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <signal name="ActiveChanged">
+ <arg name="is_active" type="b">
+ <doc:doc>
+ <doc:summary>TRUE if the session is active, otherwise FALSE</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when the active property has changed.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="IdleHintChanged">
+ <arg name="hint" type="b">
+ <doc:doc>
+ <doc:summary>the new value of idle-hint</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when the idle-hint property has changed.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="Lock">
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted in response to a call to the <doc:ref type="method" to="Session.Lock">Lock()</doc:ref> method.</doc:para>
+ <doc:para>It is intended that the screensaver for the session should lock the screen in response to this signal.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="Unlock">
+ <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.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <property name="unix-user" type="u" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>The user assigned to the session.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="user" type="u" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>The user assigned to the session.</doc:para>
+ </doc:description>
+ <doc:deprecated version="0.1.3" instead="unix-user"/>
+ </doc:doc>
+ </property>
+ <property name="session-type" type="s" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>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:description>
+ </doc:doc>
+ </property>
+ <property name="remote-host-name" type="s" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>The remote host name for the session.
+ </doc:para>
+ <doc:para>This will be set in situations where the session is
+ opened and controlled from a remote system.
+ </doc:para>
+ <doc:para>For example, this value will be set when the
+ session is created from an SSH or XDMCP connection.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="display-device" type="s" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>The display device (aka TTY) that the
+ session is connected to.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="x11-display" type="s" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>Value of the X11 DISPLAY for this session
+ if one is present.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="x11-display-device" type="s" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The display device (aka TTY) that the X11 display for the
+ session is connected to. If there is no x11-display set then
+ this value is undefined.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="active" type="b" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Whether the session is active on the Seat that
+ it is attached to.</doc:para>
+ <doc:para>If the session is not attached to a seat this value is undefined.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="is-local" type="b" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Whether the session is local</doc:para>
+ <doc:para>FIXME: we need to come up with a concrete definition for this value.
+ It was originally used as a way to identify XDMCP sessions that originate
+ from a remote system.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="idle-hint" type="b" access="readwrite">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ This is a hint used to indicate that the session may be idle.
+ </doc:para>
+ <doc:para>
+ For sessions with a <doc:ref type="property" to="Session:x11-display">x11-display</doc:ref> set (ie. graphical
+ sessions), it is up to each session to delegate the
+ responsibility for updating this value. Typically, the
+ screensaver will set this.
+ </doc:para>
+ <doc:para>However, for non-graphical sessions with a <doc:ref type="property" to="Session:display-device">display-device</doc:ref> set
+ the Session object itself will periodically update this value based
+ on the activity detected on the display-device itself.
+ </doc:para>
+ <doc:para>
+ This should not be considered authoritative.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ </interface>
+</node>