From e54095996b9066120ebf20011eba199d25422c2f Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 23 Jul 2008 23:22:36 -0400 Subject: 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. --- configure.ac | 6 + doc/Makefile.am | 6 +- doc/dbus-introspect-docs.dtd | 32 --- doc/spec/ck-manager.xml | 343 ----------------------- doc/spec/ck-seat.xml | 163 ----------- doc/spec/ck-session.xml | 435 ---------------------------- doc/tools/spec-strip-docs | 34 --- doc/tools/spec-strip-docs.xsl | 36 --- doc/tools/spec-to-docbook | 34 --- doc/tools/spec-to-docbook.xsl | 436 ----------------------------- doc/tools/update-from-spec | 25 -- doc/xml/dbus-introspect-docs.dtd | 32 +++ doc/xml/ref-ck-manager.xml | 199 ------------- doc/xml/ref-ck-seat.xml | 87 ------ doc/xml/ref-ck-session.xml | 258 ----------------- doc/xml/spec-to-docbook.xsl | 436 +++++++++++++++++++++++++++++ src/Makefile.am | 23 +- src/ck-manager.xml | 70 ----- src/ck-seat.xml | 39 --- src/ck-session.xml | 81 ------ src/org.freedesktop.ConsoleKit.Manager.xml | 343 +++++++++++++++++++++++ src/org.freedesktop.ConsoleKit.Seat.xml | 163 +++++++++++ src/org.freedesktop.ConsoleKit.Session.xml | 435 ++++++++++++++++++++++++++++ 23 files changed, 1432 insertions(+), 2284 deletions(-) delete mode 100644 doc/dbus-introspect-docs.dtd delete mode 100644 doc/spec/ck-manager.xml delete mode 100644 doc/spec/ck-seat.xml delete mode 100644 doc/spec/ck-session.xml delete mode 100755 doc/tools/spec-strip-docs delete mode 100644 doc/tools/spec-strip-docs.xsl delete mode 100755 doc/tools/spec-to-docbook delete mode 100644 doc/tools/spec-to-docbook.xsl delete mode 100755 doc/tools/update-from-spec create mode 100644 doc/xml/dbus-introspect-docs.dtd delete mode 100644 doc/xml/ref-ck-manager.xml delete mode 100644 doc/xml/ref-ck-seat.xml delete mode 100644 doc/xml/ref-ck-session.xml create mode 100644 doc/xml/spec-to-docbook.xsl delete mode 100644 src/ck-manager.xml delete mode 100644 src/ck-seat.xml delete mode 100644 src/ck-session.xml create mode 100644 src/org.freedesktop.ConsoleKit.Manager.xml create mode 100644 src/org.freedesktop.ConsoleKit.Seat.xml create mode 100644 src/org.freedesktop.ConsoleKit.Session.xml diff --git a/configure.ac b/configure.ac index e9fe6be..b55a3d5 100644 --- a/configure.ac +++ b/configure.ac @@ -274,6 +274,11 @@ fi AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes) AC_MSG_RESULT(yes) +dnl --------------------------------------------------------------------------- +dnl Check for xsltproc +dnl --------------------------------------------------------------------------- +AC_PATH_PROG([XSLTPROC], [xsltproc]) + dnl --------------------------------------------------------------------------- dnl check for inotify dnl --------------------------------------------------------------------------- @@ -392,6 +397,7 @@ tools/solaris/Makefile data/Makefile doc/Makefile doc/ConsoleKit.xml +doc/xml/Makefile libck-connector/Makefile libck-connector/ck-connector.pc pam-ck-connector/Makefile diff --git a/doc/Makefile.am b/doc/Makefile.am index 43802fe..a222ece 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -5,9 +5,9 @@ SPEC_XML_FILES = \ xml/ck-introduction.xml \ xml/ck-terms.xml \ xml/ck-design.xml \ - xml/ref-ck-manager.xml \ - xml/ref-ck-seat.xml \ - xml/ref-ck-session.xml \ + xml/org.freedesktop.ConsoleKit.Manager.ref.xml \ + xml/org.freedesktop.ConsoleKit.Seat.ref.xml \ + xml/org.freedesktop.ConsoleKit.Session.ref.xml \ $(NULL) if DOCBOOK_DOCS_ENABLED diff --git a/doc/dbus-introspect-docs.dtd b/doc/dbus-introspect-docs.dtd deleted file mode 100644 index 5fe508e..0000000 --- a/doc/dbus-introspect-docs.dtd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/spec/ck-manager.xml b/doc/spec/ck-manager.xml deleted file mode 100644 index f405c25..0000000 --- a/doc/spec/ck-manager.xml +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - This method initiates a request to restart (ie. reboot) the computer system. - - - - - - - - - This method initiates a request to stop (ie. shutdown) the computer system. - - - - - - - - - The secret cookie that is used to identify the new session - - - - - This method requests that a new Session - be created for the calling process. The properties of this new Session are set automatically - from information collected about the calling process. - - This new session exists until the calling process disconnects from the system bus or - calls CloseSession(). - - 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. - - See this simple example: - - 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 (&error); - reply = dbus_connection_send_with_reply_and_block (connector->connection, - message, - -1, - &error); - if (reply == NULL) { - goto out; - } - - dbus_error_init (&error); - if (! dbus_message_get_args (reply, - &error, - DBUS_TYPE_STRING, &cookie, - DBUS_TYPE_INVALID)) { - goto out; - } - - - - OpenSessionWithParameters() - - - - - - - An array of sets of property names and values - - - - - The secret cookie that is used to identify the new session - - - - - This method requests that a new Session - be created for the calling process. The properties of this new Session are from the - parameters provided. - - This new session exists until the calling process disconnects from the system bus or - calls CloseSession(). - - 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. - - See the Session properties for a list of valid parameters. - - org.freedesktop.ConsoleKit.Session - This method is restricted to privileged users by D-Bus policy. - - - - - - - The secret cookie that is used to identify the session - - - - - Whether the session was successfully closed - - - - - This method is used to close the session identified by the supplied cookie. - - The session can only be closed by the same process that opened the session. - - - - - - - - - an array of Seat IDs - - - - - This gets a list of all the Seats - that are currently present on the system. - Each Seat ID is an D-Bus object path for the object that implements the - Seat interface. - - org.freedesktop.ConsoleKit.Seat - - - - - - - an array of Session IDs - - - - - This gets a list of all the Sessions - that are currently present on the system. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - - org.freedesktop.ConsoleKit.Session - - - - - - - - The secret cookie that is used to identify the session - - - - - The object identifier for the current session - - - - - Returns the session ID that is associated with the specified cookie. - - - - - - - - - The POSIX process ID - - - - - The object identifier for the current session - - - - - Attempts to determine the session ID for the specified - POSIX process ID (pid). - - - - - - - - - The object identifier for the current session - - - - - Attempts to determine the session ID that the caller belongs to. - - See this example of using dbus-send: - - dbus-send --system --dest=org.freedesktop.ConsoleKit \ - --type=method_call --print-reply --reply-timeout=2000 \ - /org/freedesktop/ConsoleKit/Manager \ - org.freedesktop.ConsoleKit.Manager.GetCurrentSession - - - - - - - - - POSIX User identification - - - - - an array of Session IDs - - - - - This gets a list of all the Sessions - that are currently open for the specified user. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - - - - - - - - User identification - - - - - an array of Session IDs - - - - - This gets a list of all the Sessions - that are currently open for the specified user. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - - - - - - - - - The value of the system-idle-hint - - - - - Returns TRUE if the idle-hint - property of every open session is TRUE or if there are no open sessions. - - - - - - - - An ISO 8601 format date-type string - - - - - Returns an ISO 8601 date-time string that corresponds to - the time of the last change of the system-idle-hint. - - - - - - - - - The Seat ID for the added seat - - - - - Emitted when a Seat has been added to the system. - - - - - - - - The Seat ID for the removed seat - - - - - Emitted when a Seat has been removed from the system. - - - - - - - - The value of the system-idle-hint - - - - - Emitted when the value of the system-idle-hint has changed. - - - - - - diff --git a/doc/spec/ck-seat.xml b/doc/spec/ck-seat.xml deleted file mode 100644 index 0e13a0f..0000000 --- a/doc/spec/ck-seat.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - 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. - - - - - - - Seat ID - - - - Returns the ID for Seat. - - - - - - - - an array of Session IDs - - - - - This gets a list of all the Sessions - that are currently attached to this seat. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - - - - - - - - an array of devices - - - - - This gets a list of all the devices - that are currently associated with this seat. - Each device is an D-Bus structure that represents - the device type and the device id. - - - - - - - - - Session ID - - - - - Gets the Session ID that is currently active on this Seat. - Returns NULL if there is no active session. - - - - - - - - TRUE if seat supports session activation - - - - Used to determine whether the seat supports session activation. - - - - - - - - - Session ID - - - - - 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. - - Activate() - - - - - - - Session ID - - - - - Emitted when the active session has changed. - - - - - - - Session ID - - - - - Emitted when a session has been added to the seat. - - - - - - - Session ID - - - - - Emitted when a session has been removed from the seat. - - - - - - - Device structure - - - - - Emitted when a device has been associated with the seat. - - - - - - - Device structure - - - - - Emitted when a device has been dissociated from the seat. - - - - - diff --git a/doc/spec/ck-session.xml b/doc/spec/ck-session.xml deleted file mode 100644 index b6e1cdb..0000000 --- a/doc/spec/ck-session.xml +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - Session objects represent and store information - related to a user session. - - The properties associated with the Session - specifically refer to the properties of the "session leader". - - - - - - - Session ID - - - - Returns the ID for Session. - - - - - - - Seat ID - - - - Returns the ID for the Seat the Session is - attached to. - - org.freedesktop.ConsoleKit.Seat - - - - - - Session type - - - - - Returns the type of the session. - Warning: we haven't yet defined the allowed values for this property. - It is probably best to avoid this until we do. - - - session-type - - - - - - User ID - - - - Returns the user that the session belongs to. - - - user - - - - - - POSIX User ID - - - - Returns the POSIX user ID that the session belongs to. - - unix-user - - - - - - The value of the X11 display - - - - Returns the value of the X11 DISPLAY for this session - if one is present. - - x11-display - - - - - - The value of the X11 display device - - - - 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. - - x11-display-device - - - - - - The value of the display device - - - - Returns the value of the display device (aka TTY) that the - session is connected to. - - display-device - - - - - - The remote host name - - - - Returns the value of the remote host name for the session. - - - remote-host-name - - - - - - The value of the native system login session ID - - - - 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. - - - - - - - TRUE if the session is active, otherwise FALSE - - - - Returns whether the session is active on the Seat that - it is attached to. - If the session is not attached to a seat this value is undefined. - - - active - - - - - - TRUE if the session is local, otherwise FALSE - - - - Returns whether the session is local - 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. - - - is-local - - - - - - An ISO 8601 format date-type string - - - - - Returns an ISO 8601 date-time string that corresponds to - the time that the session was opened. - - - - - - - - - - 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. - - Seat.ActivateSession() - - - - - - - This will cause a Lock - signal to be emitted for this session. - - - This method is restricted to privileged users by D-Bus policy. - Lock signal - - - - - - - This will cause an Unlock - signal to be emitted for this session. - - This can be used by login managers to unlock a session before it is - re-activated during fast-user-switching. - - - This method is restricted to privileged users by D-Bus policy. - Unlock signal - - - - - - - The value of the idle-hint - - - - - Gets the value of the idle-hint - property. - - - idle-hint - - - - - - An ISO 8601 format date-type string - - - - - Returns an ISO 8601 date-time string that corresponds to - the time of the last change of the idle-hint. - - - - - - - - - boolean value to set the idle-hint to - - - - - This may be used by the session to indicate that - it is idle. - - Use of this method is restricted to the user - that owns the session. - - - - - - - - TRUE if the session is active, otherwise FALSE - - - - - Emitted when the active property has changed. - - - - - - - the new value of idle-hint - - - - - Emitted when the idle-hint property has changed. - - - - - - - Emitted in response to a call to the Lock() method. - It is intended that the screensaver for the session should lock the screen in response to this signal. - - - - - - - Emitted in response to a call to the Unlock() method. - It is intended that the screensaver for the session should unlock the screen in response to this signal. - - - - - - - - The user assigned to the session. - - - - - - - The user assigned to the session. - - - - - - - - The type of the session. - Warning: we haven't yet defined the allowed values for this property. - It is probably best to avoid this until we do. - - - - - - - - The remote host name for the session. - - This will be set in situations where the session is - opened and controlled from a remote system. - - For example, this value will be set when the - session is created from an SSH or XDMCP connection. - - - - - - - - The display device (aka TTY) that the - session is connected to. - - - - - - - - Value of the X11 DISPLAY for this session - if one is present. - - - - - - - - - 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. - - - - - - - - - Whether the session is active on the Seat that - it is attached to. - If the session is not attached to a seat this value is undefined. - - - - - - - - - Whether the session is local - 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. - - - - - - - - - This is a hint used to indicate that the session may be idle. - - - For sessions with a x11-display set (ie. graphical - sessions), it is up to each session to delegate the - responsibility for updating this value. Typically, the - screensaver will set this. - - However, for non-graphical sessions with a display-device set - the Session object itself will periodically update this value based - on the activity detected on the display-device itself. - - - This should not be considered authoritative. - - - - - - - diff --git a/doc/tools/spec-strip-docs b/doc/tools/spec-strip-docs deleted file mode 100755 index 52d84bc..0000000 --- a/doc/tools/spec-strip-docs +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -DIST_BIN=`dirname "$0"` - -CMD=xsltproc -XSL=${DIST_BIN}/spec-strip-docs.xsl - -if test "x$1" = "x" -o "x$1" = "x-h" -o "x$1" = "x--help"; then - echo "usage: $0 [file] ..." - exit 1 -fi - -if [ ! -r ${XSL} ]; then - echo "Cannot find XSLT file" - exit 1 -fi - -FILES="$@" -for FILE in $FILES; do - echo "${FILE}" | grep ".xml$" > /dev/null - if [ $? -ne 0 ]; then - echo "Skipping non-xml file: ${FILE}" - continue - fi - - d=`dirname ${FILE}` - b=`basename ${FILE} .xml` - - outfile="${b}-no-docs.xml" - echo "Creating: ${outfile}" - ${CMD} ${XSL} ${FILE} | tail -n +2 > ${outfile} -done - -exit 0 diff --git a/doc/tools/spec-strip-docs.xsl b/doc/tools/spec-strip-docs.xsl deleted file mode 100644 index 21ad558..0000000 --- a/doc/tools/spec-strip-docs.xsl +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/tools/spec-to-docbook b/doc/tools/spec-to-docbook deleted file mode 100755 index 883e2ba..0000000 --- a/doc/tools/spec-to-docbook +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -DIST_BIN=`dirname "$0"` - -CMD=xsltproc -XSL=${DIST_BIN}/spec-to-docbook.xsl - -if test "x$1" = "x" -o "x$1" = "x-h" -o "x$1" = "x--help"; then - echo "usage: $0 [file] ..." - exit 1 -fi - -if [ ! -r ${XSL} ]; then - echo "Cannot find XSLT file" - exit 1 -fi - -FILES="$@" -for FILE in $FILES; do - echo "${FILE}" | grep ".xml$" > /dev/null - if [ $? -ne 0 ]; then - echo "Skipping non-xml file: ${FILE}" - continue - fi - - d=`dirname ${FILE}` - b=`basename ${FILE} .xml` - - outfile="ref-${b}.xml" - echo "Creating: ${outfile}" - ${CMD} ${XSL} ${FILE} | tail -n +2 > ${outfile} -done - -exit 0 diff --git a/doc/tools/spec-to-docbook.xsl b/doc/tools/spec-to-docbook.xsl deleted file mode 100644 index fccf887..0000000 --- a/doc/tools/spec-to-docbook.xsl +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - interface - - - - Methods - - - - - - - - - Signals - - - - - - - - - Implemented Interfaces - - implements - org.freedesktop.DBus.Introspectable, - org.freedesktop.DBus.Properties - - - - - Properties - - - - - - - - - Description - - - - - - - Details - - - - - - - Signal Details - - - - - - - Property Details - - - - - - - - - - - - - - -: - - - - - - - - - - - - - - - - - - - - - - <anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>:<xsl:value-of select="@name"/></xsl:attribute></anchor>The "<xsl:value-of select="@name"/>" property - -'' - - - - - - - - - - - - - -: - - - - - - - - - - - - - - - - - - - - - <anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>::<xsl:value-of select="@name"/></xsl:attribute></anchor>The <xsl:value-of select="@name"/> signal - - () - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Since - - - - - - - - /> - - - - - - - is deprecated since version and should not be used in newly-written code. Use - - - - - : - - - :: - - - . - - - - - - - - - - - - - - - -instead. - - - - - - - - - - - -See also: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -: - - - - - - - - - - - - - - - - - - - - - <anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>.<xsl:value-of select="@name"/></xsl:attribute></anchor><xsl:value-of select="@name"/> () - - () - - - - - - - - - - - - - - - - -:'' - - - - - - - - - - - - -::() - - - - - - - - - - - - -.() - - - - - -'' -, - - - - - -'' -, - - - - - - -'' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/tools/update-from-spec b/doc/tools/update-from-spec deleted file mode 100755 index b20e875..0000000 --- a/doc/tools/update-from-spec +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -DIST_BIN=`dirname "$0"` - -cd ${DIST_BIN} -cd ../xml -../tools/spec-to-docbook ../spec/*.xml -if [ $? -ne 0 ]; then - exit 1 -fi - -cd ../../src -../doc/tools/spec-strip-docs ../doc/spec/*.xml -if [ $? -ne 0 ]; then - exit 1 -fi - -for name in session seat manager; do - mv ck-${name}-no-docs.xml ck-${name}.xml - if [ $? -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/doc/xml/dbus-introspect-docs.dtd b/doc/xml/dbus-introspect-docs.dtd new file mode 100644 index 0000000..5fe508e --- /dev/null +++ b/doc/xml/dbus-introspect-docs.dtd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/xml/ref-ck-manager.xml b/doc/xml/ref-ck-manager.xml deleted file mode 100644 index 3eb3a92..0000000 --- a/doc/xml/ref-ck-manager.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - org.freedesktop.ConsoleKit.Manager - - - org.freedesktop.ConsoleKit.Manager - Manager interface - - - Methods - Restart () -Stop () -OpenSession (out 's' cookie) -OpenSessionWithParameters (in 'a(sv)' parameters, - out 's' cookie) -CloseSession (in 's' cookie, - out 'b' result) -GetSeats (out 'ao' seats) -GetSessions (out 'ao' sessions) -GetSessionForCookie (in 's' cookie, - out 'o' ssid) -GetSessionForUnixProcess (in 'u' pid, - out 'o' ssid) -GetCurrentSession (out 'o' ssid) -GetSessionsForUnixUser (in 'u' uid, - out 'ao' sessions) -GetSessionsForUser (in 'u' uid, - out 'ao' sessions) -GetSystemIdleHint (out 'b' idle_hint) -GetSystemIdleSinceHint (out 's' iso8601_datetime) - - - - Signals - SeatAdded ('o' sid) -SeatRemoved ('o' sid) -SystemIdleHintChanged ('b' hint) - - - - Implemented Interfaces - org.freedesktop.ConsoleKit.Manager implements - org.freedesktop.DBus.Introspectable, - org.freedesktop.DBus.Properties - - - - Properties - - - - Description - - - Details<anchor role="function" id="Manager.Restart"/>Restart ()RestartManagerRestart () - This method initiates a request to restart (ie. reboot) the computer system. - <anchor role="function" id="Manager.Stop"/>Stop ()StopManagerStop () - This method initiates a request to stop (ie. shutdown) the computer system. - <anchor role="function" id="Manager.OpenSession"/>OpenSession ()OpenSessionManagerOpenSession (out 's' cookie) - This method requests that a new Session - be created for the calling process. The properties of this new Session are set automatically - from information collected about the calling process. - - This new session exists until the calling process disconnects from the system bus or - calls CloseSession(). - - 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. - - See this simple example: - - 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 (&error); - reply = dbus_connection_send_with_reply_and_block (connector->connection, - message, - -1, - &error); - if (reply == NULL) { - goto out; - } - - dbus_error_init (&error); - if (! dbus_message_get_args (reply, - &error, - DBUS_TYPE_STRING, &cookie, - DBUS_TYPE_INVALID)) { - goto out; - } - - - cookie:The secret cookie that is used to identify the new session -See also: -OpenSessionWithParameters()<anchor role="function" id="Manager.OpenSessionWithParameters"/>OpenSessionWithParameters ()OpenSessionWithParametersManagerOpenSessionWithParameters (in 'a(sv)' parameters, - out 's' cookie) - This method requests that a new Session - be created for the calling process. The properties of this new Session are from the - parameters provided. - - This new session exists until the calling process disconnects from the system bus or - calls CloseSession(). - - 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. - - See the Session properties for a list of valid parameters. - parameters:An array of sets of property names and valuescookie:The secret cookie that is used to identify the new sessionThis method is restricted to privileged users by D-Bus policy. -See also: -org.freedesktop.ConsoleKit.Session<anchor role="function" id="Manager.CloseSession"/>CloseSession ()CloseSessionManagerCloseSession (in 's' cookie, - out 'b' result) - This method is used to close the session identified by the supplied cookie. - - The session can only be closed by the same process that opened the session. - - cookie:The secret cookie that is used to identify the sessionresult:Whether the session was successfully closed<anchor role="function" id="Manager.GetSeats"/>GetSeats ()GetSeatsManagerGetSeats (out 'ao' seats) - This gets a list of all the Seats - that are currently present on the system. - Each Seat ID is an D-Bus object path for the object that implements the - Seat interface. - seats:an array of Seat IDs -See also: -org.freedesktop.ConsoleKit.Seat<anchor role="function" id="Manager.GetSessions"/>GetSessions ()GetSessionsManagerGetSessions (out 'ao' sessions) - This gets a list of all the Sessions - that are currently present on the system. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - sessions:an array of Session IDs -See also: -org.freedesktop.ConsoleKit.Session<anchor role="function" id="Manager.GetSessionForCookie"/>GetSessionForCookie ()GetSessionForCookieManagerGetSessionForCookie (in 's' cookie, - out 'o' ssid) - Returns the session ID that is associated with the specified cookie. - - cookie:The secret cookie that is used to identify the sessionssid:The object identifier for the current session<anchor role="function" id="Manager.GetSessionForUnixProcess"/>GetSessionForUnixProcess ()GetSessionForUnixProcessManagerGetSessionForUnixProcess (in 'u' pid, - out 'o' ssid) - Attempts to determine the session ID for the specified - POSIX process ID (pid). - - pid:The POSIX process IDssid:The object identifier for the current session<anchor role="function" id="Manager.GetCurrentSession"/>GetCurrentSession ()GetCurrentSessionManagerGetCurrentSession (out 'o' ssid) - Attempts to determine the session ID that the caller belongs to. - - See this example of using dbus-send: - - dbus-send --system --dest=org.freedesktop.ConsoleKit \ - --type=method_call --print-reply --reply-timeout=2000 \ - /org/freedesktop/ConsoleKit/Manager \ - org.freedesktop.ConsoleKit.Manager.GetCurrentSession - - ssid:The object identifier for the current session<anchor role="function" id="Manager.GetSessionsForUnixUser"/>GetSessionsForUnixUser ()GetSessionsForUnixUserManagerGetSessionsForUnixUser (in 'u' uid, - out 'ao' sessions) - This gets a list of all the Sessions - that are currently open for the specified user. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - uid:POSIX User identificationsessions:an array of Session IDs<anchor role="function" id="Manager.GetSessionsForUser"/>GetSessionsForUser ()GetSessionsForUserManagerGetSessionsForUser (in 'u' uid, - out 'ao' sessions) - This gets a list of all the Sessions - that are currently open for the specified user. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - uid:User identificationsessions:an array of Session IDsGetSessionsForUser is deprecated since version 0.1.3 and should not be used in newly-written code. Use - - GetSessionsForUnixUser -instead.<anchor role="function" id="Manager.GetSystemIdleHint"/>GetSystemIdleHint ()GetSystemIdleHintManagerGetSystemIdleHint (out 'b' idle_hint) - Returns TRUE if the idle-hint - property of every open session is TRUE or if there are no open sessions. - - idle_hint:The value of the system-idle-hint<anchor role="function" id="Manager.GetSystemIdleSinceHint"/>GetSystemIdleSinceHint ()GetSystemIdleSinceHintManagerGetSystemIdleSinceHint (out 's' iso8601_datetime) - Returns an ISO 8601 date-time string that corresponds to - the time of the last change of the system-idle-hint. - - iso8601_datetime:An ISO 8601 format date-type string - Signal Details<anchor role="function" id="Manager::SeatAdded"/>The SeatAdded signalSeatAddedManagerSeatAdded ('o' sid) - Emitted when a Seat has been added to the system. - - sid:The Seat ID for the added seat<anchor role="function" id="Manager::SeatRemoved"/>The SeatRemoved signalSeatRemovedManagerSeatRemoved ('o' sid) - Emitted when a Seat has been removed from the system. - - sid:The Seat ID for the removed seat<anchor role="function" id="Manager::SystemIdleHintChanged"/>The SystemIdleHintChanged signalSystemIdleHintChangedManagerSystemIdleHintChanged ('b' hint) - Emitted when the value of the system-idle-hint has changed. - - hint:The value of the system-idle-hint - - Property Details - - diff --git a/doc/xml/ref-ck-seat.xml b/doc/xml/ref-ck-seat.xml deleted file mode 100644 index 16d86b2..0000000 --- a/doc/xml/ref-ck-seat.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - org.freedesktop.ConsoleKit.Seat - - - org.freedesktop.ConsoleKit.Seat - Seat interface - - - Methods - GetId (out 'o' sid) -GetSessions (out 'ao' sessions) -GetDevices (out 'a(ss)' devices) -GetActiveSession (out 'o' ssid) -CanActivateSessions (out 'b' can_activate) -ActivateSession (in 'o' ssid) - - - - Signals - ActiveSessionChanged ('o' ssid) -SessionAdded ('o' ssid) -SessionRemoved ('o' ssid) -DeviceAdded ('(ss)' device) -DeviceRemoved ('(ss)' device) - - - - Implemented Interfaces - org.freedesktop.ConsoleKit.Seat implements - org.freedesktop.DBus.Introspectable, - org.freedesktop.DBus.Properties - - - - Properties - - - - Description - - - 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. - - - - Details<anchor role="function" id="Seat.GetId"/>GetId ()GetIdSeatGetId (out 'o' sid)Returns the ID for Seat. - sid:Seat ID<anchor role="function" id="Seat.GetSessions"/>GetSessions ()GetSessionsSeatGetSessions (out 'ao' sessions) - This gets a list of all the Sessions - that are currently attached to this seat. - Each Session ID is an D-Bus object path for the object that implements the - Session interface. - sessions:an array of Session IDs<anchor role="function" id="Seat.GetDevices"/>GetDevices ()GetDevicesSeatGetDevices (out 'a(ss)' devices) - This gets a list of all the devices - that are currently associated with this seat. - Each device is an D-Bus structure that represents - the device type and the device id. - - devices:an array of devices<anchor role="function" id="Seat.GetActiveSession"/>GetActiveSession ()GetActiveSessionSeatGetActiveSession (out 'o' ssid) - Gets the Session ID that is currently active on this Seat. - Returns NULL if there is no active session. - ssid:Session ID<anchor role="function" id="Seat.CanActivateSessions"/>CanActivateSessions ()CanActivateSessionsSeatCanActivateSessions (out 'b' can_activate)Used to determine whether the seat supports session activation. - can_activate:TRUE if seat supports session activation<anchor role="function" id="Seat.ActivateSession"/>ActivateSession ()ActivateSessionSeatActivateSession (in 'o' ssid) - 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. - ssid:Session ID -See also: -Activate() - Signal Details<anchor role="function" id="Seat::ActiveSessionChanged"/>The ActiveSessionChanged signalActiveSessionChangedSeatActiveSessionChanged ('o' ssid) - Emitted when the active session has changed. - ssid:Session ID<anchor role="function" id="Seat::SessionAdded"/>The SessionAdded signalSessionAddedSeatSessionAdded ('o' ssid) - Emitted when a session has been added to the seat. - ssid:Session ID<anchor role="function" id="Seat::SessionRemoved"/>The SessionRemoved signalSessionRemovedSeatSessionRemoved ('o' ssid) - Emitted when a session has been removed from the seat. - ssid:Session ID<anchor role="function" id="Seat::DeviceAdded"/>The DeviceAdded signalDeviceAddedSeatDeviceAdded ('(ss)' device) - Emitted when a device has been associated with the seat. - device:Device structure<anchor role="function" id="Seat::DeviceRemoved"/>The DeviceRemoved signalDeviceRemovedSeatDeviceRemoved ('(ss)' device) - Emitted when a device has been dissociated from the seat. - device:Device structure - - Property Details - - diff --git a/doc/xml/ref-ck-session.xml b/doc/xml/ref-ck-session.xml deleted file mode 100644 index 2b50ed2..0000000 --- a/doc/xml/ref-ck-session.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - org.freedesktop.ConsoleKit.Session - - - org.freedesktop.ConsoleKit.Session - Session interface - - - Methods - GetId (out 'o' ssid) -GetSeatId (out 'o' sid) -GetSessionType (out 's' type) -GetUser (out 'u' uid) -GetUnixUser (out 'u' uid) -GetX11Display (out 's' display) -GetX11DisplayDevice (out 's' x11_display_device) -GetDisplayDevice (out 's' display_device) -GetRemoteHostName (out 's' remote_host_name) -GetLoginSessionId (out 's' login_session_id) -IsActive (out 'b' active) -IsLocal (out 'b' local) -GetCreationTime (out 's' iso8601_datetime) -Activate () -Lock () -Unlock () -GetIdleHint (out 'b' idle_hint) -GetIdleSinceHint (out 's' iso8601_datetime) -SetIdleHint (in 'b' idle_hint) - - - - Signals - ActiveChanged ('b' is_active) -IdleHintChanged ('b' hint) -Lock () -Unlock () - - - - Implemented Interfaces - org.freedesktop.ConsoleKit.Session implements - org.freedesktop.DBus.Introspectable, - org.freedesktop.DBus.Properties - - - - Properties - 'unix-user' readwrite 'u' -'user' readwrite 'u' -'session-type' readwrite 's' -'remote-host-name' readwrite 's' -'display-device' readwrite 's' -'x11-display' readwrite 's' -'x11-display-device' readwrite 's' -'active' readwrite 'b' -'is-local' readwrite 'b' -'idle-hint' readwrite 'b' - - - - Description - - - Session objects represent and store information - related to a user session. - - The properties associated with the Session - specifically refer to the properties of the "session leader". - - - - - Details<anchor role="function" id="Session.GetId"/>GetId ()GetIdSessionGetId (out 'o' ssid)Returns the ID for Session. - ssid:Session ID<anchor role="function" id="Session.GetSeatId"/>GetSeatId ()GetSeatIdSessionGetSeatId (out 'o' sid)Returns the ID for the Seat the Session is - attached to. - sid:Seat ID -See also: -org.freedesktop.ConsoleKit.Seat<anchor role="function" id="Session.GetSessionType"/>GetSessionType ()GetSessionTypeSessionGetSessionType (out 's' type) - Returns the type of the session. - Warning: we haven't yet defined the allowed values for this property. - It is probably best to avoid this until we do. - - type:Session type -See also: -session-type<anchor role="function" id="Session.GetUser"/>GetUser ()GetUserSessionGetUser (out 'u' uid)Returns the user that the session belongs to. - uid:User IDGetUser is deprecated since version 0.1.3 and should not be used in newly-written code. Use - - GetUnixUser -instead. -See also: -user<anchor role="function" id="Session.GetUnixUser"/>GetUnixUser ()GetUnixUserSessionGetUnixUser (out 'u' uid)Returns the POSIX user ID that the session belongs to. - uid:POSIX User ID -See also: -unix-user<anchor role="function" id="Session.GetX11Display"/>GetX11Display ()GetX11DisplaySessionGetX11Display (out 's' display)Returns the value of the X11 DISPLAY for this session - if one is present. - display:The value of the X11 display -See also: -x11-display<anchor role="function" id="Session.GetX11DisplayDevice"/>GetX11DisplayDevice ()GetX11DisplayDeviceSessionGetX11DisplayDevice (out 's' x11_display_device)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. - x11_display_device:The value of the X11 display device -See also: -x11-display-device<anchor role="function" id="Session.GetDisplayDevice"/>GetDisplayDevice ()GetDisplayDeviceSessionGetDisplayDevice (out 's' display_device)Returns the value of the display device (aka TTY) that the - session is connected to. - display_device:The value of the display device -See also: -display-device<anchor role="function" id="Session.GetRemoteHostName"/>GetRemoteHostName ()GetRemoteHostNameSessionGetRemoteHostName (out 's' remote_host_name)Returns the value of the remote host name for the session. - - remote_host_name:The remote host name -See also: -remote-host-name<anchor role="function" id="Session.GetLoginSessionId"/>GetLoginSessionId ()GetLoginSessionIdSessionGetLoginSessionId (out 's' login_session_id)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. - login_session_id:The value of the native system login session ID<anchor role="function" id="Session.IsActive"/>IsActive ()IsActiveSessionIsActive (out 'b' active)Returns whether the session is active on the Seat that - it is attached to. - If the session is not attached to a seat this value is undefined. - - active:TRUE if the session is active, otherwise FALSE -See also: -active<anchor role="function" id="Session.IsLocal"/>IsLocal ()IsLocalSessionIsLocal (out 'b' local)Returns whether the session is local - 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. - - local:TRUE if the session is local, otherwise FALSE -See also: -is-local<anchor role="function" id="Session.GetCreationTime"/>GetCreationTime ()GetCreationTimeSessionGetCreationTime (out 's' iso8601_datetime) - Returns an ISO 8601 date-time string that corresponds to - the time that the session was opened. - - iso8601_datetime:An ISO 8601 format date-type string<anchor role="function" id="Session.Activate"/>Activate ()ActivateSessionActivate () - 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. - -See also: -Seat.ActivateSession()<anchor role="function" id="Session.Lock"/>Lock ()LockSessionLock () - This will cause a Lock - signal to be emitted for this session. - - This method is restricted to privileged users by D-Bus policy. -See also: -Lock signal<anchor role="function" id="Session.Unlock"/>Unlock ()UnlockSessionUnlock () - This will cause an Unlock - signal to be emitted for this session. - - This can be used by login managers to unlock a session before it is - re-activated during fast-user-switching. - - This method is restricted to privileged users by D-Bus policy. -See also: -Unlock signal<anchor role="function" id="Session.GetIdleHint"/>GetIdleHint ()GetIdleHintSessionGetIdleHint (out 'b' idle_hint) - Gets the value of the idle-hint - property. - - idle_hint:The value of the idle-hint -See also: -idle-hint<anchor role="function" id="Session.GetIdleSinceHint"/>GetIdleSinceHint ()GetIdleSinceHintSessionGetIdleSinceHint (out 's' iso8601_datetime) - Returns an ISO 8601 date-time string that corresponds to - the time of the last change of the idle-hint. - - iso8601_datetime:An ISO 8601 format date-type string<anchor role="function" id="Session.SetIdleHint"/>SetIdleHint ()SetIdleHintSessionSetIdleHint (in 'b' idle_hint) - This may be used by the session to indicate that - it is idle. - - Use of this method is restricted to the user - that owns the session. - idle_hint:boolean value to set the idle-hint to - Signal Details<anchor role="function" id="Session::ActiveChanged"/>The ActiveChanged signalActiveChangedSessionActiveChanged ('b' is_active) - Emitted when the active property has changed. - is_active:TRUE if the session is active, otherwise FALSE<anchor role="function" id="Session::IdleHintChanged"/>The IdleHintChanged signalIdleHintChangedSessionIdleHintChanged ('b' hint) - Emitted when the idle-hint property has changed. - hint:the new value of idle-hint<anchor role="function" id="Session::Lock"/>The Lock signalLockSessionLock () - Emitted in response to a call to the Lock() method. - It is intended that the screensaver for the session should lock the screen in response to this signal. - <anchor role="function" id="Session::Unlock"/>The Unlock signalUnlockSessionUnlock () - Emitted in response to a call to the Unlock() method. - It is intended that the screensaver for the session should unlock the screen in response to this signal. - - Property Details<anchor role="function" id="Session:unix-user"/>The "unix-user" propertyunix-userSession'unix-user' readwrite 'u' - - The user assigned to the session. - <anchor role="function" id="Session:user"/>The "user" propertyuserSession'user' readwrite 'u' - - The user assigned to the session. - user is deprecated since version 0.1.3 and should not be used in newly-written code. Use - - unix-user -instead.<anchor role="function" id="Session:session-type"/>The "session-type" propertysession-typeSession'session-type' readwrite 's' - - The type of the session. - Warning: we haven't yet defined the allowed values for this property. - It is probably best to avoid this until we do. - - <anchor role="function" id="Session:remote-host-name"/>The "remote-host-name" propertyremote-host-nameSession'remote-host-name' readwrite 's' - - The remote host name for the session. - - This will be set in situations where the session is - opened and controlled from a remote system. - - For example, this value will be set when the - session is created from an SSH or XDMCP connection. - - <anchor role="function" id="Session:display-device"/>The "display-device" propertydisplay-deviceSession'display-device' readwrite 's' - - The display device (aka TTY) that the - session is connected to. - - <anchor role="function" id="Session:x11-display"/>The "x11-display" propertyx11-displaySession'x11-display' readwrite 's' - - Value of the X11 DISPLAY for this session - if one is present. - - <anchor role="function" id="Session:x11-display-device"/>The "x11-display-device" propertyx11-display-deviceSession'x11-display-device' readwrite 's' - - - 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. - - <anchor role="function" id="Session:active"/>The "active" propertyactiveSession'active' readwrite 'b' - - - Whether the session is active on the Seat that - it is attached to. - If the session is not attached to a seat this value is undefined. - - <anchor role="function" id="Session:is-local"/>The "is-local" propertyis-localSession'is-local' readwrite 'b' - - - Whether the session is local - 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. - - <anchor role="function" id="Session:idle-hint"/>The "idle-hint" propertyidle-hintSession'idle-hint' readwrite 'b' - - - This is a hint used to indicate that the session may be idle. - - - For sessions with a x11-display set (ie. graphical - sessions), it is up to each session to delegate the - responsibility for updating this value. Typically, the - screensaver will set this. - - However, for non-graphical sessions with a display-device set - the Session object itself will periodically update this value based - on the activity detected on the display-device itself. - - - This should not be considered authoritative. - - - diff --git a/doc/xml/spec-to-docbook.xsl b/doc/xml/spec-to-docbook.xsl new file mode 100644 index 0000000..fccf887 --- /dev/null +++ b/doc/xml/spec-to-docbook.xsl @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + + + + + interface + + + + Methods + + + + + + + + + Signals + + + + + + + + + Implemented Interfaces + + implements + org.freedesktop.DBus.Introspectable, + org.freedesktop.DBus.Properties + + + + + Properties + + + + + + + + + Description + + + + + + + Details + + + + + + + Signal Details + + + + + + + Property Details + + + + + + + + + + + + + + +: + + + + + + + + + + + + + + + + + + + + + + <anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>:<xsl:value-of select="@name"/></xsl:attribute></anchor>The "<xsl:value-of select="@name"/>" property + +'' + + + + + + + + + + + + + +: + + + + + + + + + + + + + + + + + + + + + <anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>::<xsl:value-of select="@name"/></xsl:attribute></anchor>The <xsl:value-of select="@name"/> signal + + () + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Since + + + + + + + + /> + + + + + + + is deprecated since version and should not be used in newly-written code. Use + + + + + : + + + :: + + + . + + + + + + + + + + + + + + + +instead. + + + + + + + + + + + +See also: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +: + + + + + + + + + + + + + + + + + + + + + <anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>.<xsl:value-of select="@name"/></xsl:attribute></anchor><xsl:value-of select="@name"/> () + + () + + + + + + + + + + + + + + + + +:'' + + + + + + + + + + + + +::() + + + + + + + + + + + + +.() + + + + + +'' +, + + + + + +'' +, + + + + + + +'' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 @@ + + + + + + + + + This method initiates a request to restart (ie. reboot) the computer system. + + + + + + + + + This method initiates a request to stop (ie. shutdown) the computer system. + + + + + + + + + The secret cookie that is used to identify the new session + + + + + This method requests that a new Session + be created for the calling process. The properties of this new Session are set automatically + from information collected about the calling process. + + This new session exists until the calling process disconnects from the system bus or + calls CloseSession(). + + 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. + + See this simple example: + + 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 (&error); + reply = dbus_connection_send_with_reply_and_block (connector->connection, + message, + -1, + &error); + if (reply == NULL) { + goto out; + } + + dbus_error_init (&error); + if (! dbus_message_get_args (reply, + &error, + DBUS_TYPE_STRING, &cookie, + DBUS_TYPE_INVALID)) { + goto out; + } + + + + OpenSessionWithParameters() + + + + + + + An array of sets of property names and values + + + + + The secret cookie that is used to identify the new session + + + + + This method requests that a new Session + be created for the calling process. The properties of this new Session are from the + parameters provided. + + This new session exists until the calling process disconnects from the system bus or + calls CloseSession(). + + 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. + + See the Session properties for a list of valid parameters. + + org.freedesktop.ConsoleKit.Session + This method is restricted to privileged users by D-Bus policy. + + + + + + + The secret cookie that is used to identify the session + + + + + Whether the session was successfully closed + + + + + This method is used to close the session identified by the supplied cookie. + + The session can only be closed by the same process that opened the session. + + + + + + + + + an array of Seat IDs + + + + + This gets a list of all the Seats + that are currently present on the system. + Each Seat ID is an D-Bus object path for the object that implements the + Seat interface. + + org.freedesktop.ConsoleKit.Seat + + + + + + + an array of Session IDs + + + + + This gets a list of all the Sessions + that are currently present on the system. + Each Session ID is an D-Bus object path for the object that implements the + Session interface. + + org.freedesktop.ConsoleKit.Session + + + + + + + + The secret cookie that is used to identify the session + + + + + The object identifier for the current session + + + + + Returns the session ID that is associated with the specified cookie. + + + + + + + + + The POSIX process ID + + + + + The object identifier for the current session + + + + + Attempts to determine the session ID for the specified + POSIX process ID (pid). + + + + + + + + + The object identifier for the current session + + + + + Attempts to determine the session ID that the caller belongs to. + + See this example of using dbus-send: + + dbus-send --system --dest=org.freedesktop.ConsoleKit \ + --type=method_call --print-reply --reply-timeout=2000 \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.GetCurrentSession + + + + + + + + + POSIX User identification + + + + + an array of Session IDs + + + + + This gets a list of all the Sessions + that are currently open for the specified user. + Each Session ID is an D-Bus object path for the object that implements the + Session interface. + + + + + + + + User identification + + + + + an array of Session IDs + + + + + This gets a list of all the Sessions + that are currently open for the specified user. + Each Session ID is an D-Bus object path for the object that implements the + Session interface. + + + + + + + + + The value of the system-idle-hint + + + + + Returns TRUE if the idle-hint + property of every open session is TRUE or if there are no open sessions. + + + + + + + + An ISO 8601 format date-type string + + + + + Returns an ISO 8601 date-time string that corresponds to + the time of the last change of the system-idle-hint. + + + + + + + + + The Seat ID for the added seat + + + + + Emitted when a Seat has been added to the system. + + + + + + + + The Seat ID for the removed seat + + + + + Emitted when a Seat has been removed from the system. + + + + + + + + The value of the system-idle-hint + + + + + Emitted when the value of the system-idle-hint has changed. + + + + + + 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 @@ + + + + + + + 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. + + + + + + + Seat ID + + + + Returns the ID for Seat. + + + + + + + + an array of Session IDs + + + + + This gets a list of all the Sessions + that are currently attached to this seat. + Each Session ID is an D-Bus object path for the object that implements the + Session interface. + + + + + + + + an array of devices + + + + + This gets a list of all the devices + that are currently associated with this seat. + Each device is an D-Bus structure that represents + the device type and the device id. + + + + + + + + + Session ID + + + + + Gets the Session ID that is currently active on this Seat. + Returns NULL if there is no active session. + + + + + + + + TRUE if seat supports session activation + + + + Used to determine whether the seat supports session activation. + + + + + + + + + Session ID + + + + + 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. + + Activate() + + + + + + + Session ID + + + + + Emitted when the active session has changed. + + + + + + + Session ID + + + + + Emitted when a session has been added to the seat. + + + + + + + Session ID + + + + + Emitted when a session has been removed from the seat. + + + + + + + Device structure + + + + + Emitted when a device has been associated with the seat. + + + + + + + Device structure + + + + + Emitted when a device has been dissociated from the seat. + + + + + 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 @@ + + + + + + + Session objects represent and store information + related to a user session. + + The properties associated with the Session + specifically refer to the properties of the "session leader". + + + + + + + Session ID + + + + Returns the ID for Session. + + + + + + + Seat ID + + + + Returns the ID for the Seat the Session is + attached to. + + org.freedesktop.ConsoleKit.Seat + + + + + + Session type + + + + + Returns the type of the session. + Warning: we haven't yet defined the allowed values for this property. + It is probably best to avoid this until we do. + + + session-type + + + + + + User ID + + + + Returns the user that the session belongs to. + + + user + + + + + + POSIX User ID + + + + Returns the POSIX user ID that the session belongs to. + + unix-user + + + + + + The value of the X11 display + + + + Returns the value of the X11 DISPLAY for this session + if one is present. + + x11-display + + + + + + The value of the X11 display device + + + + 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. + + x11-display-device + + + + + + The value of the display device + + + + Returns the value of the display device (aka TTY) that the + session is connected to. + + display-device + + + + + + The remote host name + + + + Returns the value of the remote host name for the session. + + + remote-host-name + + + + + + The value of the native system login session ID + + + + 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. + + + + + + + TRUE if the session is active, otherwise FALSE + + + + Returns whether the session is active on the Seat that + it is attached to. + If the session is not attached to a seat this value is undefined. + + + active + + + + + + TRUE if the session is local, otherwise FALSE + + + + Returns whether the session is local + 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. + + + is-local + + + + + + An ISO 8601 format date-type string + + + + + Returns an ISO 8601 date-time string that corresponds to + the time that the session was opened. + + + + + + + + + + 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. + + Seat.ActivateSession() + + + + + + + This will cause a Lock + signal to be emitted for this session. + + + This method is restricted to privileged users by D-Bus policy. + Lock signal + + + + + + + This will cause an Unlock + signal to be emitted for this session. + + This can be used by login managers to unlock a session before it is + re-activated during fast-user-switching. + + + This method is restricted to privileged users by D-Bus policy. + Unlock signal + + + + + + + The value of the idle-hint + + + + + Gets the value of the idle-hint + property. + + + idle-hint + + + + + + An ISO 8601 format date-type string + + + + + Returns an ISO 8601 date-time string that corresponds to + the time of the last change of the idle-hint. + + + + + + + + + boolean value to set the idle-hint to + + + + + This may be used by the session to indicate that + it is idle. + + Use of this method is restricted to the user + that owns the session. + + + + + + + + TRUE if the session is active, otherwise FALSE + + + + + Emitted when the active property has changed. + + + + + + + the new value of idle-hint + + + + + Emitted when the idle-hint property has changed. + + + + + + + Emitted in response to a call to the Lock() method. + It is intended that the screensaver for the session should lock the screen in response to this signal. + + + + + + + Emitted in response to a call to the Unlock() method. + It is intended that the screensaver for the session should unlock the screen in response to this signal. + + + + + + + + The user assigned to the session. + + + + + + + The user assigned to the session. + + + + + + + + The type of the session. + Warning: we haven't yet defined the allowed values for this property. + It is probably best to avoid this until we do. + + + + + + + + The remote host name for the session. + + This will be set in situations where the session is + opened and controlled from a remote system. + + For example, this value will be set when the + session is created from an SSH or XDMCP connection. + + + + + + + + The display device (aka TTY) that the + session is connected to. + + + + + + + + Value of the X11 DISPLAY for this session + if one is present. + + + + + + + + + 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. + + + + + + + + + Whether the session is active on the Seat that + it is attached to. + If the session is not attached to a seat this value is undefined. + + + + + + + + + Whether the session is local + 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. + + + + + + + + + This is a hint used to indicate that the session may be idle. + + + For sessions with a x11-display set (ie. graphical + sessions), it is up to each session to delegate the + responsibility for updating this value. Typically, the + screensaver will set this. + + However, for non-graphical sessions with a display-device set + the Session object itself will periodically update this value based + on the activity detected on the display-device itself. + + + This should not be considered authoritative. + + + + + + + -- cgit