From 8b42a4928a0a266c3b3ae6bb13997764bc7f6405 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Tue, 13 Mar 2007 03:42:04 -0400 Subject: add the last bits of spec framework The spec is the introspection format extended with docs. There are tools to build docbook and strip the docs to make dbus introspect xml. --- doc/ConsoleKit.html | 336 +++++++++++++++++++++++++++-------- doc/ConsoleKit.xml.in | 9 +- doc/Makefile.am | 8 +- doc/ck-introduction.xml | 23 --- doc/dbus-introspect-docs.dtd | 31 ++++ doc/docbook-dbus.xsl | 261 --------------------------- doc/docbook.css | 5 + doc/docize-dbus-xml.sh | 34 ---- doc/ref-ck-manager.xml | 181 ------------------- doc/ref-ck-seat.xml | 111 ------------ doc/ref-ck-session.xml | 350 ------------------------------------ doc/spec/ck-manager.xml | 286 ++++++++++++++++++++++++++++++ doc/spec/ck-seat.xml | 110 ++++++++++++ doc/spec/ck-session.xml | 401 ++++++++++++++++++++++++++++++++++++++++++ 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 | 379 +++++++++++++++++++++++++++++++++++++++ doc/tools/update-from-spec | 25 +++ doc/xml/ck-introduction.xml | 20 +++ doc/xml/ref-ck-manager.xml | 174 ++++++++++++++++++ doc/xml/ref-ck-seat.xml | 72 ++++++++ doc/xml/ref-ck-session.xml | 240 +++++++++++++++++++++++++ 23 files changed, 2120 insertions(+), 1040 deletions(-) delete mode 100644 doc/ck-introduction.xml create mode 100644 doc/dbus-introspect-docs.dtd delete mode 100644 doc/docbook-dbus.xsl delete mode 100755 doc/docize-dbus-xml.sh delete mode 100644 doc/ref-ck-manager.xml delete mode 100644 doc/ref-ck-seat.xml delete mode 100644 doc/ref-ck-session.xml create mode 100644 doc/spec/ck-manager.xml create mode 100644 doc/spec/ck-seat.xml create mode 100644 doc/spec/ck-session.xml create mode 100755 doc/tools/spec-strip-docs create mode 100644 doc/tools/spec-strip-docs.xsl create mode 100755 doc/tools/spec-to-docbook create mode 100644 doc/tools/spec-to-docbook.xsl create mode 100755 doc/tools/update-from-spec create mode 100644 doc/xml/ck-introduction.xml create mode 100644 doc/xml/ref-ck-manager.xml create mode 100644 doc/xml/ref-ck-seat.xml create mode 100644 doc/xml/ref-ck-session.xml (limited to 'doc') diff --git a/doc/ConsoleKit.html b/doc/ConsoleKit.html index 4aeac2b..b79bf4d 100644 --- a/doc/ConsoleKit.html +++ b/doc/ConsoleKit.html @@ -1,13 +1,13 @@ ConsoleKit 0.1.3 Documentation

ConsoleKit 0.1.3 Documentation

William Jon McCann


            
-          

Version 0.1.3


Introduction

-

Part I. Concepts

Chapter 1. Introduction

Table of Contents

About
Defining the Problem

About

+          

Version 0.1.3


Table of Contents

Introduction
I. Concepts
1. Introduction
About
Defining the Problem
II. Reference
I. D-Bus API Reference
org.freedesktop.ConsoleKit.Manager — Manager interface
org.freedesktop.ConsoleKit.Seat — Seat interface
org.freedesktop.ConsoleKit.Session — Session interface
Index

Introduction

+

Part I. Concepts

Chapter 1. Introduction

Table of Contents

About
Defining the Problem

About

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. -

Defining the Problem

-

Part II. Reference

D-Bus API Reference


+

Defining the Problem

+

Part II. Reference

D-Bus API Reference


ConsoleKit provides a D-Bus API for programs to obtain information about the users, sessions, and seats that are present on a system.

@@ -15,82 +15,274 @@ these concepts.

This API is not yet stable and is likely to change in the future. -

Table of Contents

org.freedesktop.ConsoleKit.Manager — Manager interface
org.freedesktop.ConsoleKit.Seat — Seat interface
org.freedesktop.ConsoleKit.Session — Session interface

Name

org.freedesktop.ConsoleKit.Manager — Manager interface

Methods

OpenSession               (out 's'     cookie)
-OpenSessionWithParameters (in  'a(sv)' parameters,
+        

Table of Contents

org.freedesktop.ConsoleKit.Manager — Manager interface
org.freedesktop.ConsoleKit.Seat — Seat interface
org.freedesktop.ConsoleKit.Session — Session interface

Name

org.freedesktop.ConsoleKit.Manager — Manager interface

Methods

OpenSession               (out 's'     cookie)
+OpenSessionWithParameters (in  'a(sv)' parameters,
                            out 's'     cookie)
-CloseSession              (in  's'     cookie,
+CloseSession              (in  's'     cookie,
                            out 'b'     result)
-GetSeats                  (out 'ao'    seats)
-GetCurrentSession         (out 'o'     ssid)
-GetSessionForCookie       (in  's'     cookie,
+GetSeats                  (out 'ao'    seats)
+GetSessionForCookie       (in  's'     cookie,
                            out 'o'     ssid)
-GetSessionForUnixProcess  (in  'u'     pid,
+GetSessionForUnixProcess  (in  'u'     pid,
                            out 'o'     ssid)
-GetSessionsForUser        (in  'u'     uid,
+GetCurrentSession         (out 'o'     ssid)
+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 +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

OpenSession ()

OpenSession (out 's' cookie)

OpenSessionWithParameters ()

OpenSessionWithParameters (in  'a(sv)' parameters,
-                           out 's'     cookie)

CloseSession ()

CloseSession (in  's' cookie,
-              out 'b' result)

GetSeats ()

GetSeats (out 'ao' seats)

GetCurrentSession ()

GetCurrentSession (out 'o' ssid)

GetSessionForCookie ()

GetSessionForCookie (in  's' cookie,
-                     out 'o' ssid)

GetSessionForUnixProcess ()

GetSessionForUnixProcess (in  'u' pid,
-                          out 'o' ssid)

GetSessionsForUser ()

GetSessionsForUser (in  'u'  uid,
-                    out 'ao' sessions)

GetSystemIdleHint ()

GetSystemIdleHint (out 'b' idle_hint)

GetSystemIdleSinceHint ()

GetSystemIdleSinceHint (out 's' iso8601_datetime)

Signal Details

SeatAdded ()

SeatAdded ('o' sid)

SeatRemoved ()

SeatRemoved ('o' sid)

SystemIdleHintChanged ()

SystemIdleHintChanged ('b' hint)

Property Details


Name

org.freedesktop.ConsoleKit.Seat — Seat interface

Methods

GetId            (out 'o'  sid)
-GetSessions      (out 'ao' sessions)
-GetActiveSession (out 'o'  ssid)
-ActivateSession  (in  'o'  ssid)
-

Signals

ActiveSessionChanged ('o' sid)
-SessionAdded         ('o' sid)
-SessionRemoved       ('o' sid)
-

Implemented Interfaces

org.freedesktop.ConsoleKit.Seat implements +

Properties

Description

Details

OpenSession ()

OpenSession (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()

OpenSessionWithParameters ()

OpenSessionWithParameters (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 values
cookie:
The secret cookie that is used to identify the new session

This method is restricted to privileged users by D-Bus policy.

+See also: +org.freedesktop.ConsoleKit.Session

CloseSession ()

CloseSession (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 session
result:
Whether the session was successfully closed

GetSeats ()

GetSeats (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

GetSessionForCookie ()

GetSessionForCookie (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 session
ssid:
The object identifier for the current session

GetSessionForUnixProcess ()

GetSessionForUnixProcess (in  'u' pid,
+                          out 'o' ssid)

Attempts to determine the session ID for the specified + POSIX process ID (pid). +

pid:
The POSIX process ID
ssid:
The object identifier for the current session

GetCurrentSession ()

GetCurrentSession (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

GetSessionsForUser ()

GetSessionsForUser (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 identification
sessions:
an array of Session IDs

GetSystemIdleHint ()

GetSystemIdleHint (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

GetSystemIdleSinceHint ()

GetSystemIdleSinceHint (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

The SeatAdded signal

SeatAdded ('o' sid)

Emitted when a Seat has been added to the system. +

sid:
The Seat ID for the added seat

The SeatRemoved signal

SeatRemoved ('o' sid)

Emitted when a Seat has been removed from the system. +

sid:
The Seat ID for the removed seat

The SystemIdleHintChanged signal

SystemIdleHintChanged ('b' hint)

Emitted when the value of the system-idle-hint has changed. +

hint:
The value of the system-idle-hint

Property Details


Name

org.freedesktop.ConsoleKit.Seat — Seat interface

Methods

GetId            (out 'o'  sid)
+GetSessions      (out 'ao' sessions)
+GetActiveSession (out 'o'  ssid)
+ActivateSession  (in  'o'  ssid)
+

Signals

ActiveSessionChanged ('o' ssid)
+SessionAdded         ('o' ssid)
+SessionRemoved       ('o' ssid)
+

Implemented Interfaces

org.freedesktop.ConsoleKit.Seat implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties -

Properties

Description

Details

GetId ()

GetId (out 'o' sid)

GetSessions ()

GetSessions (out 'ao' sessions)

GetActiveSession ()

GetActiveSession (out 'o' ssid)

ActivateSession ()

ActivateSession (in  'o' ssid)

Signal Details

ActiveSessionChanged ()

ActiveSessionChanged ('o' sid)

SessionAdded ()

SessionAdded ('o' sid)

SessionRemoved ()

SessionRemoved ('o' sid)

Property Details


Name

org.freedesktop.ConsoleKit.Session — Session interface

Methods

GetId               (out 'o' ssid)
-GetSeatId           (out 'o' sid)
-GetSessionType      (out 's' type)
-GetUser             (out 'i' uid)
-GetX11Display       (out 's' display)
-GetX11DisplayDevice (out 's' x11_display_device)
-GetDisplayDevice    (out 's' display_device)
-GetRemoteHostName   (out 's' remote_host_name)
-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 +

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

GetId ()

GetId (out 'o' sid)
Returns the ID for Seat. +
sid:
Seat ID

GetSessions ()

GetSessions (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

GetActiveSession ()

GetActiveSession (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

ActivateSession ()

ActivateSession (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

The ActiveSessionChanged signal

ActiveSessionChanged ('o' ssid)

Emitted when the active session has changed.

ssid:
Session ID

The SessionAdded signal

SessionAdded ('o' ssid)

Emitted when a session has been added to the seat.

ssid:
Session ID

The SessionRemoved signal

SessionRemoved ('o' ssid)

Emitted when a session has been removed from the seat.

ssid:
Session ID

Property Details


Name

org.freedesktop.ConsoleKit.Session — Session interface

Methods

GetId               (out 'o' ssid)
+GetSeatId           (out 'o' sid)
+GetSessionType      (out 's' type)
+GetUser             (out 'i' uid)
+GetX11Display       (out 's' display)
+GetX11DisplayDevice (out 's' x11_display_device)
+GetDisplayDevice    (out 's' display_device)
+GetRemoteHostName   (out 's' remote_host_name)
+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

'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

Details

GetId ()

GetId (out 'o' ssid)

GetSeatId ()

GetSeatId (out 'o' sid)

GetSessionType ()

GetSessionType (out 's' type)

GetUser ()

GetUser (out 'i' uid)

GetX11Display ()

GetX11Display (out 's' display)

GetX11DisplayDevice ()

GetX11DisplayDevice (out 's' x11_display_device)

GetDisplayDevice ()

GetDisplayDevice (out 's' display_device)

GetRemoteHostName ()

GetRemoteHostName (out 's' remote_host_name)

IsActive ()

IsActive (out 'b' active)

IsLocal ()

IsLocal (out 'b' local)

GetCreationTime ()

GetCreationTime (out 's' iso8601_datetime)

Activate ()

Activate ()

Lock ()

Lock ()

Unlock ()

Unlock ()

GetIdleHint ()

GetIdleHint (out 'b' idle_hint)

GetIdleSinceHint ()

GetIdleSinceHint (out 's' iso8601_datetime)

SetIdleHint ()

SetIdleHint (in  'b' idle_hint)

Signal Details

ActiveChanged ()

ActiveChanged ('b' is_active)

IdleHintChanged ()

IdleHintChanged ('b' hint)

Lock ()

Lock ()

Unlock ()

Unlock ()

Property Details

'user'

'user'  readwrite 'u'
-

'session-type'

'session-type'  readwrite 's'
-

'remote-host-name'

'remote-host-name'  readwrite 's'
-

'display-device'

'display-device'  readwrite 's'
-

'x11-display'

'x11-display'  readwrite 's'
-

'x11-display-device'

'x11-display-device'  readwrite 's'
-

'active'

'active'  readwrite 'b'
-

'is-local'

'is-local'  readwrite 'b'
-

'idle-hint'

'idle-hint'  readwrite 'b'
-

Index

A

Activate
Session
method, Activate ()
ActivateSession
Seat
method, ActivateSession ()
active
Session
property, 'active'
ActiveChanged
Session
signal, ActiveChanged ()
ActiveSessionChanged
Seat
signal, ActiveSessionChanged ()

C

CloseSession
Manager
method, CloseSession ()

D

display-device
Session
property, 'display-device'

G

GetActiveSession
Seat
method, GetActiveSession ()
GetCreationTime
Session
method, GetCreationTime ()
GetCurrentSession
Manager
method, GetCurrentSession ()
GetDisplayDevice
Session
method, GetDisplayDevice ()
GetId
Seat
method, GetId ()
Session
method, GetId ()
GetIdleHint
Session
method, GetIdleHint ()
GetIdleSinceHint
Session
method, GetIdleSinceHint ()
GetRemoteHostName
Session
method, GetRemoteHostName ()
GetSeatId
Session
method, GetSeatId ()
GetSeats
Manager
method, GetSeats ()
GetSessionForCookie
Manager
method, GetSessionForCookie ()
GetSessionForUnixProcess
Manager
method, GetSessionForUnixProcess ()
GetSessions
Seat
method, GetSessions ()
GetSessionsForUser
Manager
method, GetSessionsForUser ()
GetSessionType
Session
method, GetSessionType ()
GetSystemIdleHint
Manager
method, GetSystemIdleHint ()
GetSystemIdleSinceHint
Manager
method, GetSystemIdleSinceHint ()
GetUser
Session
method, GetUser ()
GetX11Display
Session
method, GetX11Display ()
GetX11DisplayDevice
Session
method, GetX11DisplayDevice ()

I

idle-hint
Session
property, 'idle-hint'
IdleHintChanged
Session
signal, IdleHintChanged ()
is-local
Session
property, 'is-local'
IsActive
Session
method, IsActive ()
IsLocal
Session
method, IsLocal ()

L

Lock
Session
method, Lock ()
signal, Lock ()

O

OpenSession
Manager
method, OpenSession ()
OpenSessionWithParameters
Manager
method, OpenSessionWithParameters ()

R

remote-host-name
Session
property, 'remote-host-name'

S

SeatAdded
Manager
signal, SeatAdded ()
SeatRemoved
Manager
signal, SeatRemoved ()
session-type
Session
property, 'session-type'
SessionAdded
Seat
signal, SessionAdded ()
SessionRemoved
Seat
signal, SessionRemoved ()
SetIdleHint
Session
method, SetIdleHint ()
SystemIdleHintChanged
Manager
signal, SystemIdleHintChanged ()

U

Unlock
Session
method, Unlock ()
signal, Unlock ()
user
Session
property, 'user'

X

x11-display
Session
property, 'x11-display'
x11-display-device
Session
property, 'x11-display-device'
+

Properties

'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

GetId ()

GetId (out 'o' ssid)

Returns the ID for Session.

ssid:
Session ID

GetSeatId ()

GetSeatId (out 'o' sid)

Returns the ID for the Seat the Session is + attached to.

sid:
Seat ID

+See also: +org.freedesktop.ConsoleKit.Seat

GetSessionType ()

GetSessionType (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

GetUser ()

GetUser (out 'i' uid)

Returns the user that the session belongs to.

uid:
User ID

+See also: +user

GetX11Display ()

GetX11Display (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

GetX11DisplayDevice ()

GetX11DisplayDevice (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

GetDisplayDevice ()

GetDisplayDevice (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

GetRemoteHostName ()

GetRemoteHostName (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

IsActive ()

IsActive (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

IsLocal ()

IsLocal (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

GetCreationTime ()

GetCreationTime (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

Activate ()

Activate ()

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()

Lock ()

Lock ()

This will cause a Lock + signal to be emitted for this session. +

+See also: +Lock signal

Unlock ()

Unlock ()

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. +

+See also: +Unlock signal

GetIdleHint ()

GetIdleHint (out 'b' idle_hint)

Gets the value of the idle-hint + property. +

idle_hint:
The value of the idle-hint

+See also: +idle-hint

GetIdleSinceHint ()

GetIdleSinceHint (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

SetIdleHint ()

SetIdleHint (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

The ActiveChanged signal

ActiveChanged ('b' is_active)

Emitted when the active property has changed.

is_active:
TRUE if the session is active, otherwise FALSE

The IdleHintChanged signal

IdleHintChanged ('b' hint)

Emitted when the idle-hint property has changed.

hint:
the new value of idle-hint

The Lock signal

Lock ()

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.

The Unlock signal

Unlock ()

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

The "user" property

'user'  readwrite 'u'
+

The user assigned to the session.

The "session-type" property

'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. +

The "remote-host-name" property

'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. +

The "display-device" property

'display-device'  readwrite 's'
+

The display device (aka TTY) that the + session is connected to. +

The "x11-display" property

'x11-display'  readwrite 's'
+

Value of the X11 DISPLAY for this session + if one is present. +

The "x11-display-device" property

'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. +

The "active" property

'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. +

The "is-local" property

'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. +

The "idle-hint" property

'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. +

Index

A

Activate
Session, Activate ()
ActivateSession
Seat, ActivateSession ()
active
Session, The "active" property
ActiveChanged
Session, The ActiveChanged signal
ActiveSessionChanged
Seat, The ActiveSessionChanged signal

C

CloseSession
Manager, CloseSession ()

D

display-device
Session, The "display-device" property

G

GetActiveSession
Seat, GetActiveSession ()
GetCreationTime
Session, GetCreationTime ()
GetCurrentSession
Manager, GetCurrentSession ()
GetDisplayDevice
Session, GetDisplayDevice ()
GetId
Seat, GetId ()
Session, GetId ()
GetIdleHint
Session, GetIdleHint ()
GetIdleSinceHint
Session, GetIdleSinceHint ()
GetRemoteHostName
Session, GetRemoteHostName ()
GetSeatId
Session, GetSeatId ()
GetSeats
Manager, GetSeats ()
GetSessionForCookie
Manager, GetSessionForCookie ()
GetSessionForUnixProcess
Manager, GetSessionForUnixProcess ()
GetSessions
Seat, GetSessions ()
GetSessionsForUser
Manager, GetSessionsForUser ()
GetSessionType
Session, GetSessionType ()
GetSystemIdleHint
Manager, GetSystemIdleHint ()
GetSystemIdleSinceHint
Manager, GetSystemIdleSinceHint ()
GetUser
Session, GetUser ()
GetX11Display
Session, GetX11Display ()
GetX11DisplayDevice
Session, GetX11DisplayDevice ()

I

idle-hint
Session, The "idle-hint" property
IdleHintChanged
Session, The IdleHintChanged signal
is-local
Session, The "is-local" property
IsActive
Session, IsActive ()
IsLocal
Session, IsLocal ()

L

Lock
Session, Lock (), The Lock signal

O

OpenSession
Manager, OpenSession ()
OpenSessionWithParameters
Manager, OpenSessionWithParameters ()

R

remote-host-name
Session, The "remote-host-name" property

S

SeatAdded
Manager, The SeatAdded signal
SeatRemoved
Manager, The SeatRemoved signal
session-type
Session, The "session-type" property
SessionAdded
Seat, The SessionAdded signal
SessionRemoved
Seat, The SessionRemoved signal
SetIdleHint
Session, SetIdleHint ()
SystemIdleHintChanged
Manager, The SystemIdleHintChanged signal

U

Unlock
Session, Unlock (), The Unlock signal
user
Session, The "user" property

X

x11-display
Session, The "x11-display" property
x11-display-device
Session, The "x11-display-device" property
diff --git a/doc/ConsoleKit.xml.in b/doc/ConsoleKit.xml.in index fca0aa4..3aa5fbf 100644 --- a/doc/ConsoleKit.xml.in +++ b/doc/ConsoleKit.xml.in @@ -1,8 +1,9 @@ - - + + + + ]> @@ -32,7 +33,7 @@ Concepts - + &Intro; diff --git a/doc/Makefile.am b/doc/Makefile.am index c7ac22a..a291f01 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,10 +2,10 @@ NULL = SPEC_XML_FILES = \ ConsoleKit.xml \ - ck-introduction.xml \ - ref-ck-manager.xml \ - ref-ck-seat.xml \ - ref-ck-session.xml \ + xml/ck-introduction.xml \ + xml/ref-ck-manager.xml \ + xml/ref-ck-seat.xml \ + xml/ref-ck-session.xml \ $(NULL) if DOCBOOK_DOCS_ENABLED diff --git a/doc/ck-introduction.xml b/doc/ck-introduction.xml deleted file mode 100644 index 3a23d76..0000000 --- a/doc/ck-introduction.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Introduction - - - About - - 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. - - - - - Defining the Problem - - - - - diff --git a/doc/dbus-introspect-docs.dtd b/doc/dbus-introspect-docs.dtd new file mode 100644 index 0000000..ce7204e --- /dev/null +++ b/doc/dbus-introspect-docs.dtd @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/docbook-dbus.xsl b/doc/docbook-dbus.xsl deleted file mode 100644 index 56eada4..0000000 --- a/doc/docbook-dbus.xsl +++ /dev/null @@ -1,261 +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"/>-property-<xsl:value-of select="@name"/></xsl:attribute></anchor>'<xsl:value-of select="@name"/>' -property -'' - - - - - - - - - - - - - - - - <anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>-signal-<xsl:value-of select="@name"/></xsl:attribute></anchor><xsl:value-of select="@name"/> () -signal - () - - - - - - - - - - - - - - - <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"/> () -method - () - - - - - - - - - - - - - --property-'' - - - - - - - - - - - - --signal-() - - - - - - - - - - - - --() - - - - - -'' -, - - - - - -'' -, - - - - - - -'' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/docbook.css b/doc/docbook.css index f1ee7e1..6a7373e 100644 --- a/doc/docbook.css +++ b/doc/docbook.css @@ -5,6 +5,11 @@ body h1.title { } +.permission +{ + color: #ee0000; + text-decoration: underline; +} .synopsis, .classsynopsis { background: #eeeeee; diff --git a/doc/docize-dbus-xml.sh b/doc/docize-dbus-xml.sh deleted file mode 100755 index 1df63e1..0000000 --- a/doc/docize-dbus-xml.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -DIST_BIN=`dirname "$0"` - -CMD=xsltproc -XSL=${DIST_BIN}/docbook-dbus.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/ref-ck-manager.xml b/doc/ref-ck-manager.xml deleted file mode 100644 index c2392f3..0000000 --- a/doc/ref-ck-manager.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - org.freedesktop.ConsoleKit.Manager - - - org.freedesktop.ConsoleKit.Manager - Manager interface - - - Methods - OpenSession (out 's' cookie) -OpenSessionWithParameters (in 'a(sv)' parameters, - out 's' cookie) -CloseSession (in 's' cookie, - out 'b' result) -GetSeats (out 'ao' seats) -GetCurrentSession (out 'o' ssid) -GetSessionForCookie (in 's' cookie, - out 'o' ssid) -GetSessionForUnixProcess (in 'u' pid, - out 'o' ssid) -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-OpenSession"/>OpenSession () - - OpenSession - Manager - method - - OpenSession (out 's' cookie) - - - <anchor role="function" id="Manager-OpenSessionWithParameters"/>OpenSessionWithParameters () - - OpenSessionWithParameters - Manager - method - - OpenSessionWithParameters (in 'a(sv)' parameters, - out 's' cookie) - - - <anchor role="function" id="Manager-CloseSession"/>CloseSession () - - CloseSession - Manager - method - - CloseSession (in 's' cookie, - out 'b' result) - - - <anchor role="function" id="Manager-GetSeats"/>GetSeats () - - GetSeats - Manager - method - - GetSeats (out 'ao' seats) - - - <anchor role="function" id="Manager-GetCurrentSession"/>GetCurrentSession () - - GetCurrentSession - Manager - method - - GetCurrentSession (out 'o' ssid) - - - <anchor role="function" id="Manager-GetSessionForCookie"/>GetSessionForCookie () - - GetSessionForCookie - Manager - method - - GetSessionForCookie (in 's' cookie, - out 'o' ssid) - - - <anchor role="function" id="Manager-GetSessionForUnixProcess"/>GetSessionForUnixProcess () - - GetSessionForUnixProcess - Manager - method - - GetSessionForUnixProcess (in 'u' pid, - out 'o' ssid) - - - <anchor role="function" id="Manager-GetSessionsForUser"/>GetSessionsForUser () - - GetSessionsForUser - Manager - method - - GetSessionsForUser (in 'u' uid, - out 'ao' sessions) - - - <anchor role="function" id="Manager-GetSystemIdleHint"/>GetSystemIdleHint () - - GetSystemIdleHint - Manager - method - - GetSystemIdleHint (out 'b' idle_hint) - - - <anchor role="function" id="Manager-GetSystemIdleSinceHint"/>GetSystemIdleSinceHint () - - GetSystemIdleSinceHint - Manager - method - - GetSystemIdleSinceHint (out 's' iso8601_datetime) - - - - Signal Details - - <anchor role="function" id="Manager-signal-SeatAdded"/>SeatAdded () - - SeatAdded - Manager - signal - - SeatAdded ('o' sid) - - - <anchor role="function" id="Manager-signal-SeatRemoved"/>SeatRemoved () - - SeatRemoved - Manager - signal - - SeatRemoved ('o' sid) - - - <anchor role="function" id="Manager-signal-SystemIdleHintChanged"/>SystemIdleHintChanged () - - SystemIdleHintChanged - Manager - signal - - SystemIdleHintChanged ('b' hint) - - - - Property Details - - diff --git a/doc/ref-ck-seat.xml b/doc/ref-ck-seat.xml deleted file mode 100644 index a679d8e..0000000 --- a/doc/ref-ck-seat.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - org.freedesktop.ConsoleKit.Seat - - - org.freedesktop.ConsoleKit.Seat - Seat interface - - - Methods - GetId (out 'o' sid) -GetSessions (out 'ao' sessions) -GetActiveSession (out 'o' ssid) -ActivateSession (in 'o' ssid) - - - - Signals - ActiveSessionChanged ('o' sid) -SessionAdded ('o' sid) -SessionRemoved ('o' sid) - - - - Implemented Interfaces - org.freedesktop.ConsoleKit.Seat implements - org.freedesktop.DBus.Introspectable, - org.freedesktop.DBus.Properties - - - - Properties - - - - Description - - - - Details - - <anchor role="function" id="Seat-GetId"/>GetId () - - GetId - Seat - method - - GetId (out 'o' sid) - - - <anchor role="function" id="Seat-GetSessions"/>GetSessions () - - GetSessions - Seat - method - - GetSessions (out 'ao' sessions) - - - <anchor role="function" id="Seat-GetActiveSession"/>GetActiveSession () - - GetActiveSession - Seat - method - - GetActiveSession (out 'o' ssid) - - - <anchor role="function" id="Seat-ActivateSession"/>ActivateSession () - - ActivateSession - Seat - method - - ActivateSession (in 'o' ssid) - - - - Signal Details - - <anchor role="function" id="Seat-signal-ActiveSessionChanged"/>ActiveSessionChanged () - - ActiveSessionChanged - Seat - signal - - ActiveSessionChanged ('o' sid) - - - <anchor role="function" id="Seat-signal-SessionAdded"/>SessionAdded () - - SessionAdded - Seat - signal - - SessionAdded ('o' sid) - - - <anchor role="function" id="Seat-signal-SessionRemoved"/>SessionRemoved () - - SessionRemoved - Seat - signal - - SessionRemoved ('o' sid) - - - - Property Details - - diff --git a/doc/ref-ck-session.xml b/doc/ref-ck-session.xml deleted file mode 100644 index 9a4a4db..0000000 --- a/doc/ref-ck-session.xml +++ /dev/null @@ -1,350 +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 'i' uid) -GetX11Display (out 's' display) -GetX11DisplayDevice (out 's' x11_display_device) -GetDisplayDevice (out 's' display_device) -GetRemoteHostName (out 's' remote_host_name) -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 - '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 - - - - Details - - <anchor role="function" id="Session-GetId"/>GetId () - - GetId - Session - method - - GetId (out 'o' ssid) - - - <anchor role="function" id="Session-GetSeatId"/>GetSeatId () - - GetSeatId - Session - method - - GetSeatId (out 'o' sid) - - - <anchor role="function" id="Session-GetSessionType"/>GetSessionType () - - GetSessionType - Session - method - - GetSessionType (out 's' type) - - - <anchor role="function" id="Session-GetUser"/>GetUser () - - GetUser - Session - method - - GetUser (out 'i' uid) - - - <anchor role="function" id="Session-GetX11Display"/>GetX11Display () - - GetX11Display - Session - method - - GetX11Display (out 's' display) - - - <anchor role="function" id="Session-GetX11DisplayDevice"/>GetX11DisplayDevice () - - GetX11DisplayDevice - Session - method - - GetX11DisplayDevice (out 's' x11_display_device) - - - <anchor role="function" id="Session-GetDisplayDevice"/>GetDisplayDevice () - - GetDisplayDevice - Session - method - - GetDisplayDevice (out 's' display_device) - - - <anchor role="function" id="Session-GetRemoteHostName"/>GetRemoteHostName () - - GetRemoteHostName - Session - method - - GetRemoteHostName (out 's' remote_host_name) - - - <anchor role="function" id="Session-IsActive"/>IsActive () - - IsActive - Session - method - - IsActive (out 'b' active) - - - <anchor role="function" id="Session-IsLocal"/>IsLocal () - - IsLocal - Session - method - - IsLocal (out 'b' local) - - - <anchor role="function" id="Session-GetCreationTime"/>GetCreationTime () - - GetCreationTime - Session - method - - GetCreationTime (out 's' iso8601_datetime) - - - <anchor role="function" id="Session-Activate"/>Activate () - - Activate - Session - method - - Activate () - - - <anchor role="function" id="Session-Lock"/>Lock () - - Lock - Session - method - - Lock () - - - <anchor role="function" id="Session-Unlock"/>Unlock () - - Unlock - Session - method - - Unlock () - - - <anchor role="function" id="Session-GetIdleHint"/>GetIdleHint () - - GetIdleHint - Session - method - - GetIdleHint (out 'b' idle_hint) - - - <anchor role="function" id="Session-GetIdleSinceHint"/>GetIdleSinceHint () - - GetIdleSinceHint - Session - method - - GetIdleSinceHint (out 's' iso8601_datetime) - - - <anchor role="function" id="Session-SetIdleHint"/>SetIdleHint () - - SetIdleHint - Session - method - - SetIdleHint (in 'b' idle_hint) - - - - Signal Details - - <anchor role="function" id="Session-signal-ActiveChanged"/>ActiveChanged () - - ActiveChanged - Session - signal - - ActiveChanged ('b' is_active) - - - <anchor role="function" id="Session-signal-IdleHintChanged"/>IdleHintChanged () - - IdleHintChanged - Session - signal - - IdleHintChanged ('b' hint) - - - <anchor role="function" id="Session-signal-Lock"/>Lock () - - Lock - Session - signal - - Lock () - - - <anchor role="function" id="Session-signal-Unlock"/>Unlock () - - Unlock - Session - signal - - Unlock () - - - - Property Details - - <anchor role="function" id="Session-property-user"/>'user' - - user - Session - property - - 'user' readwrite 'u' - - - - <anchor role="function" id="Session-property-session-type"/>'session-type' - - session-type - Session - property - - 'session-type' readwrite 's' - - - - <anchor role="function" id="Session-property-remote-host-name"/>'remote-host-name' - - remote-host-name - Session - property - - 'remote-host-name' readwrite 's' - - - - <anchor role="function" id="Session-property-display-device"/>'display-device' - - display-device - Session - property - - 'display-device' readwrite 's' - - - - <anchor role="function" id="Session-property-x11-display"/>'x11-display' - - x11-display - Session - property - - 'x11-display' readwrite 's' - - - - <anchor role="function" id="Session-property-x11-display-device"/>'x11-display-device' - - x11-display-device - Session - property - - 'x11-display-device' readwrite 's' - - - - <anchor role="function" id="Session-property-active"/>'active' - - active - Session - property - - 'active' readwrite 'b' - - - - <anchor role="function" id="Session-property-is-local"/>'is-local' - - is-local - Session - property - - 'is-local' readwrite 'b' - - - - <anchor role="function" id="Session-property-idle-hint"/>'idle-hint' - - idle-hint - Session - property - - 'idle-hint' readwrite 'b' - - - - diff --git a/doc/spec/ck-manager.xml b/doc/spec/ck-manager.xml new file mode 100644 index 0000000..998df32 --- /dev/null +++ b/doc/spec/ck-manager.xml @@ -0,0 +1,286 @@ + + + + + + + + + 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 + + + + + + + + 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 + + + + + + + + + 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 new file mode 100644 index 0000000..81fb1cc --- /dev/null +++ b/doc/spec/ck-seat.xml @@ -0,0 +1,110 @@ + + + + + + + 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. + + + + + + + + Session ID + + + + + Gets the Session ID that is currently active on this Seat. + Returns NULL if there is no active session. + + + + + + + + + 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. + + + + + diff --git a/doc/spec/ck-session.xml b/doc/spec/ck-session.xml new file mode 100644 index 0000000..5b1d843 --- /dev/null +++ b/doc/spec/ck-session.xml @@ -0,0 +1,401 @@ + + + + + + + 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 + + + + + + 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 + + + + + + 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 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 new file mode 100755 index 0000000..52d84bc --- /dev/null +++ b/doc/tools/spec-strip-docs @@ -0,0 +1,34 @@ +#!/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 new file mode 100644 index 0000000..21ad558 --- /dev/null +++ b/doc/tools/spec-strip-docs.xsl @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tools/spec-to-docbook b/doc/tools/spec-to-docbook new file mode 100755 index 0000000..883e2ba --- /dev/null +++ b/doc/tools/spec-to-docbook @@ -0,0 +1,34 @@ +#!/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 new file mode 100644 index 0000000..26b5937 --- /dev/null +++ b/doc/tools/spec-to-docbook.xsl @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + +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 new file mode 100755 index 0000000..b20e875 --- /dev/null +++ b/doc/tools/update-from-spec @@ -0,0 +1,25 @@ +#!/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/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 @@ + + Introduction + + + About + + 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. + + + + + Defining the Problem + + + + + 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 @@ + + + org.freedesktop.ConsoleKit.Manager + + + org.freedesktop.ConsoleKit.Manager + Manager interface + + + Methods + OpenSession (out 's' cookie) +OpenSessionWithParameters (in 'a(sv)' parameters, + out 's' cookie) +CloseSession (in 's' cookie, + out 'b' result) +GetSeats (out 'ao' seats) +GetSessionForCookie (in 's' cookie, + out 'o' ssid) +GetSessionForUnixProcess (in 'u' pid, + out 'o' ssid) +GetCurrentSession (out 'o' ssid) +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.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.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.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 IDs<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 new file mode 100644 index 0000000..6161207 --- /dev/null +++ b/doc/xml/ref-ck-seat.xml @@ -0,0 +1,72 @@ + + + org.freedesktop.ConsoleKit.Seat + + + org.freedesktop.ConsoleKit.Seat + Seat interface + + + Methods + GetId (out 'o' sid) +GetSessions (out 'ao' sessions) +GetActiveSession (out 'o' ssid) +ActivateSession (in 'o' ssid) + + + + Signals + ActiveSessionChanged ('o' ssid) +SessionAdded ('o' ssid) +SessionRemoved ('o' ssid) + + + + 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.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.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 + + Property Details + + 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 @@ + + + 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 'i' uid) +GetX11Display (out 's' display) +GetX11DisplayDevice (out 's' x11_display_device) +GetDisplayDevice (out 's' display_device) +GetRemoteHostName (out 's' remote_host_name) +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 + '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 'i' uid)Returns the user that the session belongs to. + uid:User ID +See also: +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.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. + + +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. + + +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:user"/>The "user" propertyuserSession'user' readwrite 'u' + + The user assigned to the session. + <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. + + + -- cgit