diff options
Diffstat (limited to 'doc/xml')
-rw-r--r-- | doc/xml/ck-introduction.xml | 20 | ||||
-rw-r--r-- | doc/xml/ref-ck-manager.xml | 174 | ||||
-rw-r--r-- | doc/xml/ref-ck-seat.xml | 72 | ||||
-rw-r--r-- | doc/xml/ref-ck-session.xml | 240 |
4 files changed, 506 insertions, 0 deletions
diff --git a/doc/xml/ck-introduction.xml b/doc/xml/ck-introduction.xml new file mode 100644 index 0000000..4f6acbd --- /dev/null +++ b/doc/xml/ck-introduction.xml @@ -0,0 +1,20 @@ +<chapter id="introduction"> + <title>Introduction</title> + + <sect1> + <title>About</title> + <para> + ConsoleKit is a framework for keeping track of the various + users, sessions, and seats present on a system. It + provides a mechanism for software to react to changes of any of + these items or of any of the metadata associated with them. + </para> + </sect1> + + <sect1> + <title>Defining the Problem</title> + <para> + </para> + </sect1> + +</chapter> diff --git a/doc/xml/ref-ck-manager.xml b/doc/xml/ref-ck-manager.xml new file mode 100644 index 0000000..dc01375 --- /dev/null +++ b/doc/xml/ref-ck-manager.xml @@ -0,0 +1,174 @@ +<refentry id="Manager"> + <refmeta> + <refentrytitle role="top_of_page">org.freedesktop.ConsoleKit.Manager</refentrytitle> + </refmeta> + <refnamediv> + <refname>org.freedesktop.ConsoleKit.Manager</refname> + <refpurpose>Manager interface</refpurpose> + </refnamediv> + <refsynopsisdiv role="synopsis"> + <title role="synopsis.title">Methods</title> + <synopsis><link linkend="Manager.OpenSession">OpenSession</link> (out 's' cookie) +<link linkend="Manager.OpenSessionWithParameters">OpenSessionWithParameters</link> (in 'a(sv)' parameters, + out 's' cookie) +<link linkend="Manager.CloseSession">CloseSession</link> (in 's' cookie, + out 'b' result) +<link linkend="Manager.GetSeats">GetSeats</link> (out 'ao' seats) +<link linkend="Manager.GetSessionForCookie">GetSessionForCookie</link> (in 's' cookie, + out 'o' ssid) +<link linkend="Manager.GetSessionForUnixProcess">GetSessionForUnixProcess</link> (in 'u' pid, + out 'o' ssid) +<link linkend="Manager.GetCurrentSession">GetCurrentSession</link> (out 'o' ssid) +<link linkend="Manager.GetSessionsForUser">GetSessionsForUser</link> (in 'u' uid, + out 'ao' sessions) +<link linkend="Manager.GetSystemIdleHint">GetSystemIdleHint</link> (out 'b' idle_hint) +<link linkend="Manager.GetSystemIdleSinceHint">GetSystemIdleSinceHint</link> (out 's' iso8601_datetime) +</synopsis> + </refsynopsisdiv> + <refsect1 role="signal_proto"> + <title role="signal_proto.title">Signals</title> + <synopsis><link linkend="Manager::SeatAdded">SeatAdded</link> ('o' sid) +<link linkend="Manager::SeatRemoved">SeatRemoved</link> ('o' sid) +<link linkend="Manager::SystemIdleHintChanged">SystemIdleHintChanged</link> ('b' hint) +</synopsis> + </refsect1> + <refsect1 role="impl_interfaces"> + <title role="impl_interfaces.title">Implemented Interfaces</title> + <para>org.freedesktop.ConsoleKit.Manager implements + org.freedesktop.DBus.Introspectable, + org.freedesktop.DBus.Properties + </para> + </refsect1> + <refsect1 role="properties"> + <title role="properties.title">Properties</title> + <synopsis/> + </refsect1> + <refsect1 role="desc"> + <title role="desc.title">Description</title> + <para/> + </refsect1> + <refsect1 role="details"><title role="details.title">Details</title><refsect2><title><anchor role="function" id="Manager.OpenSession"/>OpenSession ()</title><indexterm><primary>OpenSession</primary><secondary>Manager</secondary></indexterm><programlisting>OpenSession (out 's' cookie)</programlisting></refsect2> + <para>This method requests that a new <link linkend="Session">Session</link> + be created for the calling process. The properties of this new Session are set automatically + from information collected about the calling process. + </para> + <para>This new session exists until the calling process disconnects from the system bus or + calls <link linkend="Manager.CloseSession"><function>CloseSession()</function></link>. + </para> + <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. + </para> + <para>See this simple example: + <informalexample><programlisting> + 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; + } + + </programlisting></informalexample></para> + <variablelist role="params"><varlistentry><term><parameter>cookie</parameter>:</term><listitem><simpara>The secret cookie that is used to identify the new session</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Manager.OpenSessionWithParameters"><function>OpenSessionWithParameters()</function></link></para><refsect2><title><anchor role="function" id="Manager.OpenSessionWithParameters"/>OpenSessionWithParameters ()</title><indexterm><primary>OpenSessionWithParameters</primary><secondary>Manager</secondary></indexterm><programlisting>OpenSessionWithParameters (in 'a(sv)' parameters, + out 's' cookie)</programlisting></refsect2> + <para>This method requests that a new <link linkend="Session">Session</link> + be created for the calling process. The properties of this new Session are from the + parameters provided. + </para> + <para>This new session exists until the calling process disconnects from the system bus or + calls <link linkend="Manager.CloseSession"><function>CloseSession()</function></link>. + </para> + <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. + </para> + <para>See the <link linkend="Session">Session</link> properties for a list of valid parameters.</para> + <variablelist role="params"><varlistentry><term><parameter>parameters</parameter>:</term><listitem><simpara>An array of sets of property names and values</simpara></listitem></varlistentry><varlistentry><term><parameter>cookie</parameter>:</term><listitem><simpara>The secret cookie that is used to identify the new session</simpara></listitem></varlistentry></variablelist><para role="permission">This method is restricted to privileged users by D-Bus policy.</para><para> +See also: +<link linkend="Session">org.freedesktop.ConsoleKit.Session</link></para><refsect2><title><anchor role="function" id="Manager.CloseSession"/>CloseSession ()</title><indexterm><primary>CloseSession</primary><secondary>Manager</secondary></indexterm><programlisting>CloseSession (in 's' cookie, + out 'b' result)</programlisting></refsect2> + <para>This method is used to close the session identified by the supplied cookie. + </para> + <para>The session can only be closed by the same process that opened the session. + </para> + <variablelist role="params"><varlistentry><term><parameter>cookie</parameter>:</term><listitem><simpara>The secret cookie that is used to identify the session</simpara></listitem></varlistentry><varlistentry><term><parameter>result</parameter>:</term><listitem><simpara>Whether the session was successfully closed</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager.GetSeats"/>GetSeats ()</title><indexterm><primary>GetSeats</primary><secondary>Manager</secondary></indexterm><programlisting>GetSeats (out 'ao' seats)</programlisting></refsect2> + <para>This gets a list of all the <link linkend="Seat">Seats</link> + that are currently present on the system.</para> + <para>Each Seat ID is an D-Bus object path for the object that implements the + <link linkend="Seat">Seat</link> interface.</para> + <variablelist role="params"><varlistentry><term><parameter>seats</parameter>:</term><listitem><simpara>an array of Seat IDs</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Seat">org.freedesktop.ConsoleKit.Seat</link></para><refsect2><title><anchor role="function" id="Manager.GetSessionForCookie"/>GetSessionForCookie ()</title><indexterm><primary>GetSessionForCookie</primary><secondary>Manager</secondary></indexterm><programlisting>GetSessionForCookie (in 's' cookie, + out 'o' ssid)</programlisting></refsect2> + <para>Returns the session ID that is associated with the specified cookie. + </para> + <variablelist role="params"><varlistentry><term><parameter>cookie</parameter>:</term><listitem><simpara>The secret cookie that is used to identify the session</simpara></listitem></varlistentry><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>The object identifier for the current session</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager.GetSessionForUnixProcess"/>GetSessionForUnixProcess ()</title><indexterm><primary>GetSessionForUnixProcess</primary><secondary>Manager</secondary></indexterm><programlisting>GetSessionForUnixProcess (in 'u' pid, + out 'o' ssid)</programlisting></refsect2> + <para>Attempts to determine the session ID for the specified + POSIX process ID (pid). + </para> + <variablelist role="params"><varlistentry><term><parameter>pid</parameter>:</term><listitem><simpara>The POSIX process ID</simpara></listitem></varlistentry><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>The object identifier for the current session</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager.GetCurrentSession"/>GetCurrentSession ()</title><indexterm><primary>GetCurrentSession</primary><secondary>Manager</secondary></indexterm><programlisting>GetCurrentSession (out 'o' ssid)</programlisting></refsect2> + <para>Attempts to determine the session ID that the caller belongs to. + </para> + <para>See this example of using dbus-send: + <informalexample><programlisting> + dbus-send --system --dest=org.freedesktop.ConsoleKit \ + --type=method_call --print-reply --reply-timeout=2000 \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.GetCurrentSession + </programlisting></informalexample></para> + <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>The object identifier for the current session</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager.GetSessionsForUser"/>GetSessionsForUser ()</title><indexterm><primary>GetSessionsForUser</primary><secondary>Manager</secondary></indexterm><programlisting>GetSessionsForUser (in 'u' uid, + out 'ao' sessions)</programlisting></refsect2> + <para>This gets a list of all the <link linkend="Session">Sessions</link> + that are currently open for the specified user.</para> + <para>Each Session ID is an D-Bus object path for the object that implements the + <link linkend="Session">Session</link> interface.</para> + <variablelist role="params"><varlistentry><term><parameter>uid</parameter>:</term><listitem><simpara>User identification</simpara></listitem></varlistentry><varlistentry><term><parameter>sessions</parameter>:</term><listitem><simpara>an array of Session IDs</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager.GetSystemIdleHint"/>GetSystemIdleHint ()</title><indexterm><primary>GetSystemIdleHint</primary><secondary>Manager</secondary></indexterm><programlisting>GetSystemIdleHint (out 'b' idle_hint)</programlisting></refsect2> + <para>Returns TRUE if the <link linkend="Session:idle-hint"><literal>idle-hint</literal></link> + property of every open session is TRUE or if there are no open sessions. + </para> + <variablelist role="params"><varlistentry><term><parameter>idle_hint</parameter>:</term><listitem><simpara>The value of the system-idle-hint</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager.GetSystemIdleSinceHint"/>GetSystemIdleSinceHint ()</title><indexterm><primary>GetSystemIdleSinceHint</primary><secondary>Manager</secondary></indexterm><programlisting>GetSystemIdleSinceHint (out 's' iso8601_datetime)</programlisting></refsect2> + <para>Returns an ISO 8601 date-time string that corresponds to + the time of the last change of the system-idle-hint. + </para> + <variablelist role="params"><varlistentry><term><parameter>iso8601_datetime</parameter>:</term><listitem><simpara>An ISO 8601 format date-type string</simpara></listitem></varlistentry></variablelist></refsect1> + <refsect1 role="signals"><title role="signals.title">Signal Details</title><refsect2><title><anchor role="function" id="Manager::SeatAdded"/>The SeatAdded signal</title><indexterm><primary>SeatAdded</primary><secondary>Manager</secondary></indexterm><programlisting>SeatAdded ('o' sid)</programlisting></refsect2> + <para>Emitted when a Seat has been added to the system. + </para> + <variablelist role="params"><varlistentry><term><parameter>sid</parameter>:</term><listitem><simpara>The Seat ID for the added seat</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager::SeatRemoved"/>The SeatRemoved signal</title><indexterm><primary>SeatRemoved</primary><secondary>Manager</secondary></indexterm><programlisting>SeatRemoved ('o' sid)</programlisting></refsect2> + <para>Emitted when a Seat has been removed from the system. + </para> + <variablelist role="params"><varlistentry><term><parameter>sid</parameter>:</term><listitem><simpara>The Seat ID for the removed seat</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Manager::SystemIdleHintChanged"/>The SystemIdleHintChanged signal</title><indexterm><primary>SystemIdleHintChanged</primary><secondary>Manager</secondary></indexterm><programlisting>SystemIdleHintChanged ('b' hint)</programlisting></refsect2> + <para>Emitted when the value of the system-idle-hint has changed. + </para> + <variablelist role="params"><varlistentry><term><parameter>hint</parameter>:</term><listitem><simpara>The value of the system-idle-hint</simpara></listitem></varlistentry></variablelist></refsect1> + <refsect1 role="property_details"> + <title role="property_details.title">Property Details</title> + </refsect1> +</refentry> diff --git a/doc/xml/ref-ck-seat.xml b/doc/xml/ref-ck-seat.xml new file mode 100644 index 0000000..6161207 --- /dev/null +++ b/doc/xml/ref-ck-seat.xml @@ -0,0 +1,72 @@ +<refentry id="Seat"> + <refmeta> + <refentrytitle role="top_of_page">org.freedesktop.ConsoleKit.Seat</refentrytitle> + </refmeta> + <refnamediv> + <refname>org.freedesktop.ConsoleKit.Seat</refname> + <refpurpose>Seat interface</refpurpose> + </refnamediv> + <refsynopsisdiv role="synopsis"> + <title role="synopsis.title">Methods</title> + <synopsis><link linkend="Seat.GetId">GetId</link> (out 'o' sid) +<link linkend="Seat.GetSessions">GetSessions</link> (out 'ao' sessions) +<link linkend="Seat.GetActiveSession">GetActiveSession</link> (out 'o' ssid) +<link linkend="Seat.ActivateSession">ActivateSession</link> (in 'o' ssid) +</synopsis> + </refsynopsisdiv> + <refsect1 role="signal_proto"> + <title role="signal_proto.title">Signals</title> + <synopsis><link linkend="Seat::ActiveSessionChanged">ActiveSessionChanged</link> ('o' ssid) +<link linkend="Seat::SessionAdded">SessionAdded</link> ('o' ssid) +<link linkend="Seat::SessionRemoved">SessionRemoved</link> ('o' ssid) +</synopsis> + </refsect1> + <refsect1 role="impl_interfaces"> + <title role="impl_interfaces.title">Implemented Interfaces</title> + <para>org.freedesktop.ConsoleKit.Seat implements + org.freedesktop.DBus.Introspectable, + org.freedesktop.DBus.Properties + </para> + </refsect1> + <refsect1 role="properties"> + <title role="properties.title">Properties</title> + <synopsis/> + </refsect1> + <refsect1 role="desc"> + <title role="desc.title">Description</title> + <para> + + <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.</para> + + </para> + </refsect1> + <refsect1 role="details"><title role="details.title">Details</title><refsect2><title><anchor role="function" id="Seat.GetId"/>GetId ()</title><indexterm><primary>GetId</primary><secondary>Seat</secondary></indexterm><programlisting>GetId (out 'o' sid)</programlisting></refsect2>Returns the ID for Seat. + <variablelist role="params"><varlistentry><term><parameter>sid</parameter>:</term><listitem><simpara>Seat ID</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Seat.GetSessions"/>GetSessions ()</title><indexterm><primary>GetSessions</primary><secondary>Seat</secondary></indexterm><programlisting>GetSessions (out 'ao' sessions)</programlisting></refsect2> + <para>This gets a list of all the <link linkend="Session">Sessions</link> + that are currently attached to this seat.</para> + <para>Each Session ID is an D-Bus object path for the object that implements the + <link linkend="Session">Session</link> interface.</para> + <variablelist role="params"><varlistentry><term><parameter>sessions</parameter>:</term><listitem><simpara>an array of Session IDs</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Seat.GetActiveSession"/>GetActiveSession ()</title><indexterm><primary>GetActiveSession</primary><secondary>Seat</secondary></indexterm><programlisting>GetActiveSession (out 'o' ssid)</programlisting></refsect2> + <para>Gets the Session ID that is currently active on this Seat.</para> + <para>Returns NULL if there is no active session.</para> + <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Seat.ActivateSession"/>ActivateSession ()</title><indexterm><primary>ActivateSession</primary><secondary>Seat</secondary></indexterm><programlisting>ActivateSession (in 'o' ssid)</programlisting></refsect2> + <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.</para> + <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session.Activate"><function>Activate()</function></link></para></refsect1> + <refsect1 role="signals"><title role="signals.title">Signal Details</title><refsect2><title><anchor role="function" id="Seat::ActiveSessionChanged"/>The ActiveSessionChanged signal</title><indexterm><primary>ActiveSessionChanged</primary><secondary>Seat</secondary></indexterm><programlisting>ActiveSessionChanged ('o' ssid)</programlisting></refsect2> + <para>Emitted when the active session has changed.</para> + <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Seat::SessionAdded"/>The SessionAdded signal</title><indexterm><primary>SessionAdded</primary><secondary>Seat</secondary></indexterm><programlisting>SessionAdded ('o' ssid)</programlisting></refsect2> + <para>Emitted when a session has been added to the seat.</para> + <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Seat::SessionRemoved"/>The SessionRemoved signal</title><indexterm><primary>SessionRemoved</primary><secondary>Seat</secondary></indexterm><programlisting>SessionRemoved ('o' ssid)</programlisting></refsect2> + <para>Emitted when a session has been removed from the seat.</para> + <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist></refsect1> + <refsect1 role="property_details"> + <title role="property_details.title">Property Details</title> + </refsect1> +</refentry> diff --git a/doc/xml/ref-ck-session.xml b/doc/xml/ref-ck-session.xml new file mode 100644 index 0000000..2c5d369 --- /dev/null +++ b/doc/xml/ref-ck-session.xml @@ -0,0 +1,240 @@ +<refentry id="Session"> + <refmeta> + <refentrytitle role="top_of_page">org.freedesktop.ConsoleKit.Session</refentrytitle> + </refmeta> + <refnamediv> + <refname>org.freedesktop.ConsoleKit.Session</refname> + <refpurpose>Session interface</refpurpose> + </refnamediv> + <refsynopsisdiv role="synopsis"> + <title role="synopsis.title">Methods</title> + <synopsis><link linkend="Session.GetId">GetId</link> (out 'o' ssid) +<link linkend="Session.GetSeatId">GetSeatId</link> (out 'o' sid) +<link linkend="Session.GetSessionType">GetSessionType</link> (out 's' type) +<link linkend="Session.GetUser">GetUser</link> (out 'i' uid) +<link linkend="Session.GetX11Display">GetX11Display</link> (out 's' display) +<link linkend="Session.GetX11DisplayDevice">GetX11DisplayDevice</link> (out 's' x11_display_device) +<link linkend="Session.GetDisplayDevice">GetDisplayDevice</link> (out 's' display_device) +<link linkend="Session.GetRemoteHostName">GetRemoteHostName</link> (out 's' remote_host_name) +<link linkend="Session.IsActive">IsActive</link> (out 'b' active) +<link linkend="Session.IsLocal">IsLocal</link> (out 'b' local) +<link linkend="Session.GetCreationTime">GetCreationTime</link> (out 's' iso8601_datetime) +<link linkend="Session.Activate">Activate</link> () +<link linkend="Session.Lock">Lock</link> () +<link linkend="Session.Unlock">Unlock</link> () +<link linkend="Session.GetIdleHint">GetIdleHint</link> (out 'b' idle_hint) +<link linkend="Session.GetIdleSinceHint">GetIdleSinceHint</link> (out 's' iso8601_datetime) +<link linkend="Session.SetIdleHint">SetIdleHint</link> (in 'b' idle_hint) +</synopsis> + </refsynopsisdiv> + <refsect1 role="signal_proto"> + <title role="signal_proto.title">Signals</title> + <synopsis><link linkend="Session::ActiveChanged">ActiveChanged</link> ('b' is_active) +<link linkend="Session::IdleHintChanged">IdleHintChanged</link> ('b' hint) +<link linkend="Session::Lock">Lock</link> () +<link linkend="Session::Unlock">Unlock</link> () +</synopsis> + </refsect1> + <refsect1 role="impl_interfaces"> + <title role="impl_interfaces.title">Implemented Interfaces</title> + <para>org.freedesktop.ConsoleKit.Session implements + org.freedesktop.DBus.Introspectable, + org.freedesktop.DBus.Properties + </para> + </refsect1> + <refsect1 role="properties"> + <title role="properties.title">Properties</title> + <synopsis><link linkend="Session:user">'user'</link> readwrite 'u' +<link linkend="Session:session-type">'session-type'</link> readwrite 's' +<link linkend="Session:remote-host-name">'remote-host-name'</link> readwrite 's' +<link linkend="Session:display-device">'display-device'</link> readwrite 's' +<link linkend="Session:x11-display">'x11-display'</link> readwrite 's' +<link linkend="Session:x11-display-device">'x11-display-device'</link> readwrite 's' +<link linkend="Session:active">'active'</link> readwrite 'b' +<link linkend="Session:is-local">'is-local'</link> readwrite 'b' +<link linkend="Session:idle-hint">'idle-hint'</link> readwrite 'b' +</synopsis> + </refsect1> + <refsect1 role="desc"> + <title role="desc.title">Description</title> + <para> + + <para>Session objects represent and store information + related to a user session. + </para> + <para>The properties associated with the Session + specifically refer to the properties of the "session leader". + </para> + + </para> + </refsect1> + <refsect1 role="details"><title role="details.title">Details</title><refsect2><title><anchor role="function" id="Session.GetId"/>GetId ()</title><indexterm><primary>GetId</primary><secondary>Session</secondary></indexterm><programlisting>GetId (out 'o' ssid)</programlisting></refsect2><para>Returns the ID for Session.</para> + <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Session.GetSeatId"/>GetSeatId ()</title><indexterm><primary>GetSeatId</primary><secondary>Session</secondary></indexterm><programlisting>GetSeatId (out 'o' sid)</programlisting></refsect2><para>Returns the ID for the Seat the Session is + attached to.</para> + <variablelist role="params"><varlistentry><term><parameter>sid</parameter>:</term><listitem><simpara>Seat ID</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Seat">org.freedesktop.ConsoleKit.Seat</link></para><refsect2><title><anchor role="function" id="Session.GetSessionType"/>GetSessionType ()</title><indexterm><primary>GetSessionType</primary><secondary>Session</secondary></indexterm><programlisting>GetSessionType (out 's' type)</programlisting></refsect2> + <para>Returns the type of the session.</para> + <para>Warning: we haven't yet defined the allowed values for this property. + It is probably best to avoid this until we do. + </para> + <variablelist role="params"><varlistentry><term><parameter>type</parameter>:</term><listitem><simpara>Session type</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:session-type"><literal>session-type</literal></link></para><refsect2><title><anchor role="function" id="Session.GetUser"/>GetUser ()</title><indexterm><primary>GetUser</primary><secondary>Session</secondary></indexterm><programlisting>GetUser (out 'i' uid)</programlisting></refsect2><para>Returns the user that the session belongs to.</para> + <variablelist role="params"><varlistentry><term><parameter>uid</parameter>:</term><listitem><simpara>User ID</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:user"><literal>user</literal></link></para><refsect2><title><anchor role="function" id="Session.GetX11Display"/>GetX11Display ()</title><indexterm><primary>GetX11Display</primary><secondary>Session</secondary></indexterm><programlisting>GetX11Display (out 's' display)</programlisting></refsect2><para>Returns the value of the X11 DISPLAY for this session + if one is present.</para> + <variablelist role="params"><varlistentry><term><parameter>display</parameter>:</term><listitem><simpara>The value of the X11 display</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:x11-display"><literal>x11-display</literal></link></para><refsect2><title><anchor role="function" id="Session.GetX11DisplayDevice"/>GetX11DisplayDevice ()</title><indexterm><primary>GetX11DisplayDevice</primary><secondary>Session</secondary></indexterm><programlisting>GetX11DisplayDevice (out 's' x11_display_device)</programlisting></refsect2><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.</para> + <variablelist role="params"><varlistentry><term><parameter>x11_display_device</parameter>:</term><listitem><simpara>The value of the X11 display device</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:x11-display-device"><literal>x11-display-device</literal></link></para><refsect2><title><anchor role="function" id="Session.GetDisplayDevice"/>GetDisplayDevice ()</title><indexterm><primary>GetDisplayDevice</primary><secondary>Session</secondary></indexterm><programlisting>GetDisplayDevice (out 's' display_device)</programlisting></refsect2><para>Returns the value of the display device (aka TTY) that the + session is connected to.</para> + <variablelist role="params"><varlistentry><term><parameter>display_device</parameter>:</term><listitem><simpara>The value of the display device</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:display-device"><literal>display-device</literal></link></para><refsect2><title><anchor role="function" id="Session.GetRemoteHostName"/>GetRemoteHostName ()</title><indexterm><primary>GetRemoteHostName</primary><secondary>Session</secondary></indexterm><programlisting>GetRemoteHostName (out 's' remote_host_name)</programlisting></refsect2><para>Returns the value of the remote host name for the session. + </para> + <variablelist role="params"><varlistentry><term><parameter>remote_host_name</parameter>:</term><listitem><simpara>The remote host name</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:remote-host-name"><literal>remote-host-name</literal></link></para><refsect2><title><anchor role="function" id="Session.IsActive"/>IsActive ()</title><indexterm><primary>IsActive</primary><secondary>Session</secondary></indexterm><programlisting>IsActive (out 'b' active)</programlisting></refsect2><para>Returns whether the session is active on the Seat that + it is attached to.</para> + <para>If the session is not attached to a seat this value is undefined. + </para> + <variablelist role="params"><varlistentry><term><parameter>active</parameter>:</term><listitem><simpara>TRUE if the session is active, otherwise FALSE</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:active"><literal>active</literal></link></para><refsect2><title><anchor role="function" id="Session.IsLocal"/>IsLocal ()</title><indexterm><primary>IsLocal</primary><secondary>Session</secondary></indexterm><programlisting>IsLocal (out 'b' local)</programlisting></refsect2><para>Returns whether the session is local</para> + <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. + </para> + <variablelist role="params"><varlistentry><term><parameter>local</parameter>:</term><listitem><simpara>TRUE if the session is local, otherwise FALSE</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:is-local"><literal>is-local</literal></link></para><refsect2><title><anchor role="function" id="Session.GetCreationTime"/>GetCreationTime ()</title><indexterm><primary>GetCreationTime</primary><secondary>Session</secondary></indexterm><programlisting>GetCreationTime (out 's' iso8601_datetime)</programlisting></refsect2> + <para>Returns an ISO 8601 date-time string that corresponds to + the time that the session was opened. + </para> + <variablelist role="params"><varlistentry><term><parameter>iso8601_datetime</parameter>:</term><listitem><simpara>An ISO 8601 format date-type string</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Session.Activate"/>Activate ()</title><indexterm><primary>Activate</primary><secondary>Session</secondary></indexterm><programlisting>Activate ()</programlisting></refsect2> + <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.</para> + <variablelist role="params"/><para> +See also: +<link linkend="Seat.ActivateSession"><function>Seat.ActivateSession()</function></link></para><refsect2><title><anchor role="function" id="Session.Lock"/>Lock ()</title><indexterm><primary>Lock</primary><secondary>Session</secondary></indexterm><programlisting>Lock ()</programlisting></refsect2> + <para>This will cause a <link linkend="Session::Lock"><literal>Lock</literal></link> + signal to be emitted for this session. + </para> + <variablelist role="params"/><para> +See also: +<link linkend="Session::Lock"><literal>Lock signal</literal></link></para><refsect2><title><anchor role="function" id="Session.Unlock"/>Unlock ()</title><indexterm><primary>Unlock</primary><secondary>Session</secondary></indexterm><programlisting>Unlock ()</programlisting></refsect2> + <para>This will cause an <link linkend="Session::Unlock"><literal>Unlock</literal></link> + signal to be emitted for this session. + </para> + <para>This can be used by login managers to unlock a session before it is + re-activated during fast-user-switching. + </para> + <variablelist role="params"/><para> +See also: +<link linkend="Session::Unlock"><literal>Unlock signal</literal></link></para><refsect2><title><anchor role="function" id="Session.GetIdleHint"/>GetIdleHint ()</title><indexterm><primary>GetIdleHint</primary><secondary>Session</secondary></indexterm><programlisting>GetIdleHint (out 'b' idle_hint)</programlisting></refsect2> + <para>Gets the value of the <link linkend="Session:idle-hint"><literal>idle-hint</literal></link> + property. + </para> + <variablelist role="params"><varlistentry><term><parameter>idle_hint</parameter>:</term><listitem><simpara>The value of the idle-hint</simpara></listitem></varlistentry></variablelist><para> +See also: +<link linkend="Session:idle-hint"><literal>idle-hint</literal></link></para><refsect2><title><anchor role="function" id="Session.GetIdleSinceHint"/>GetIdleSinceHint ()</title><indexterm><primary>GetIdleSinceHint</primary><secondary>Session</secondary></indexterm><programlisting>GetIdleSinceHint (out 's' iso8601_datetime)</programlisting></refsect2> + <para>Returns an ISO 8601 date-time string that corresponds to + the time of the last change of the idle-hint. + </para> + <variablelist role="params"><varlistentry><term><parameter>iso8601_datetime</parameter>:</term><listitem><simpara>An ISO 8601 format date-type string</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Session.SetIdleHint"/>SetIdleHint ()</title><indexterm><primary>SetIdleHint</primary><secondary>Session</secondary></indexterm><programlisting>SetIdleHint (in 'b' idle_hint)</programlisting></refsect2> + <para>This may be used by the session to indicate that + it is idle. + </para> + <para>Use of this method is restricted to the user + that owns the session.</para> + <variablelist role="params"><varlistentry><term><parameter>idle_hint</parameter>:</term><listitem><simpara>boolean value to set the idle-hint to</simpara></listitem></varlistentry></variablelist></refsect1> + <refsect1 role="signals"><title role="signals.title">Signal Details</title><refsect2><title><anchor role="function" id="Session::ActiveChanged"/>The ActiveChanged signal</title><indexterm><primary>ActiveChanged</primary><secondary>Session</secondary></indexterm><programlisting>ActiveChanged ('b' is_active)</programlisting></refsect2> + <para>Emitted when the active property has changed.</para> + <variablelist role="params"><varlistentry><term><parameter>is_active</parameter>:</term><listitem><simpara>TRUE if the session is active, otherwise FALSE</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Session::IdleHintChanged"/>The IdleHintChanged signal</title><indexterm><primary>IdleHintChanged</primary><secondary>Session</secondary></indexterm><programlisting>IdleHintChanged ('b' hint)</programlisting></refsect2> + <para>Emitted when the idle-hint property has changed.</para> + <variablelist role="params"><varlistentry><term><parameter>hint</parameter>:</term><listitem><simpara>the new value of idle-hint</simpara></listitem></varlistentry></variablelist><refsect2><title><anchor role="function" id="Session::Lock"/>The Lock signal</title><indexterm><primary>Lock</primary><secondary>Session</secondary></indexterm><programlisting>Lock ()</programlisting></refsect2> + <para>Emitted in response to a call to the <link linkend="Session.Lock"><function>Lock()</function></link> method.</para> + <para>It is intended that the screensaver for the session should lock the screen in response to this signal.</para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session::Unlock"/>The Unlock signal</title><indexterm><primary>Unlock</primary><secondary>Session</secondary></indexterm><programlisting>Unlock ()</programlisting></refsect2> + <para>Emitted in response to a call to the <link linkend="Session.Unlock"><function>Unlock()</function></link> method.</para> + <para>It is intended that the screensaver for the session should unlock the screen in response to this signal.</para> + <variablelist role="params"/></refsect1> + <refsect1 role="property_details"><title role="property_details.title">Property Details</title><refsect2><title><anchor role="function" id="Session:user"/>The "user" property</title><indexterm><primary>user</primary><secondary>Session</secondary></indexterm><programlisting>'user' readwrite 'u' +</programlisting></refsect2> + <para>The user assigned to the session.</para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:session-type"/>The "session-type" property</title><indexterm><primary>session-type</primary><secondary>Session</secondary></indexterm><programlisting>'session-type' readwrite 's' +</programlisting></refsect2> + <para>The type of the session.</para> + <para>Warning: we haven't yet defined the allowed values for this property. + It is probably best to avoid this until we do. + </para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:remote-host-name"/>The "remote-host-name" property</title><indexterm><primary>remote-host-name</primary><secondary>Session</secondary></indexterm><programlisting>'remote-host-name' readwrite 's' +</programlisting></refsect2> + <para>The remote host name for the session. + </para> + <para>This will be set in situations where the session is + opened and controlled from a remote system. + </para> + <para>For example, this value will be set when the + session is created from an SSH or XDMCP connection. + </para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:display-device"/>The "display-device" property</title><indexterm><primary>display-device</primary><secondary>Session</secondary></indexterm><programlisting>'display-device' readwrite 's' +</programlisting></refsect2> + <para>The display device (aka TTY) that the + session is connected to. + </para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:x11-display"/>The "x11-display" property</title><indexterm><primary>x11-display</primary><secondary>Session</secondary></indexterm><programlisting>'x11-display' readwrite 's' +</programlisting></refsect2> + <para>Value of the X11 DISPLAY for this session + if one is present. + </para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:x11-display-device"/>The "x11-display-device" property</title><indexterm><primary>x11-display-device</primary><secondary>Session</secondary></indexterm><programlisting>'x11-display-device' readwrite 's' +</programlisting></refsect2> + <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. + </para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:active"/>The "active" property</title><indexterm><primary>active</primary><secondary>Session</secondary></indexterm><programlisting>'active' readwrite 'b' +</programlisting></refsect2> + <para> + Whether the session is active on the Seat that + it is attached to.</para> + <para>If the session is not attached to a seat this value is undefined. + </para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:is-local"/>The "is-local" property</title><indexterm><primary>is-local</primary><secondary>Session</secondary></indexterm><programlisting>'is-local' readwrite 'b' +</programlisting></refsect2> + <para> + Whether the session is local</para> + <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. + </para> + <variablelist role="params"/><refsect2><title><anchor role="function" id="Session:idle-hint"/>The "idle-hint" property</title><indexterm><primary>idle-hint</primary><secondary>Session</secondary></indexterm><programlisting>'idle-hint' readwrite 'b' +</programlisting></refsect2> + <para> + This is a hint used to indicate that the session may be idle. + </para> + <para> + For sessions with a <link linkend="Session:x11-display"><literal>x11-display</literal></link> set (ie. graphical + sessions), it is up to each session to delegate the + responsibility for updating this value. Typically, the + screensaver will set this. + </para> + <para>However, for non-graphical sessions with a <link linkend="Session:display-device"><literal>display-device</literal></link> set + the Session object itself will periodically update this value based + on the activity detected on the display-device itself. + </para> + <para> + This should not be considered authoritative. + </para> + <variablelist role="params"/></refsect1> +</refentry> |