Table of Contents
Table of Contents
This API is not yet stable and is likely to change in the future.
Table of Contents
org.gnome.SessionManager — SessionManager interface
Setenv (in 's' variable, in 's' value) InitializationError (in 's' message, in 'b' fatal) RegisterClient (in 's' app_id, in 's' client_startup_id, out 'o' client_id) UnregisterClient (in 'o' client_id) Inhibit (in 's' app_id, in 'u' toplevel_xid, in 's' reason, in 'u' flags, out 'u' inhibit_cookie) Uninhibit (in 'u' inhibit_cookie) IsInhibited (in 'u' flags, out 'b' is_inhibited) GetClients (out 'ao' clients) GetInhibitors (out 'ao' inhibitors) IsAutostartConditionHandled (in 's' condition, out 'b' handled) Shutdown () CanShutdown (out 'b' is_available) Logout (in 'u' mode)
ClientAdded ('o' id) ClientRemoved ('o' id) InhibitorAdded ('o' id) InhibitorRemoved ('o' id) SessionRunning () SessionOver ()
Objects implementing org.gnome.SessionManager also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
Adds the variable name to the application launch environment with the specified value. May only be used during the Session Manager initialization phase.
variable
:value
:May be used by applications launched during the Session Manager initialization phase to indicate there was a problem.
message
:fatal
:Register the caller as a Session Management client.
app_id
:client_startup_id
:client_id
:Unregister the specified client from Session Management.
client_id
:Inhibit (in 's' app_id, in 'u' toplevel_xid, in 's' reason, in 'u' flags, out 'u' inhibit_cookie)
Applications should invoke this method when they begin an operation that
should not be interrupted, such as creating a CD or DVD. The types of actions
that may be blocked are specified by the flags parameter. When the application
completes the operation it should call Uninhibit()
or disconnect from the system bus.
Applications should not expect that they will always be able to block the action. In most cases, users will be given the option to force the action to take place.
Reasons should be short and to the point.
The flags parameter must include at least one of the following:
Values for flags may be bitwise or'ed together.
The returned cookie is used to uniquely identify this request. It should be used
as an argument to Uninhibit()
in
order to remove the request.
app_id
:toplevel_xid
:reason
:flags
:inhibit_cookie
:Cancel a previous call to Inhibit()
identified by the cookie.
inhibit_cookie
:Determine if operation(s) specified by the flags
are currently inhibited. Flags are same as those accepted
by the
Inhibit()
method.
flags
:is_inhibited
:This gets a list of all the Clients that are currently known to the session manager.
Each Client ID is an D-Bus object path for the object that implements the Client interface.
clients
:See also: org.gnome.SessionManager.Client
This gets a list of all the Inhibitors that are currently known to the session manager.
Each Inhibitor ID is an D-Bus object path for the object that implements the Inhibitor interface.
inhibitors
:See also: org.gnome.SessionManager.Inhibitor
Allows the caller to determine whether the session manager is handling changes to the specified autostart condition.
condition
:handled
:Request a shutdown dialog
Allows the caller to determine whether or not it's okay to show a shutdown option in the UI
is_available
:Request a logout dialog
Allowed values for the mode parameter are:
Values for flags may be bitwise or'ed together.
mode
:Emitted when a client has been added to the session manager.
id
:Emitted when a client has been removed from the session manager.
id
:Emitted when an inhibitor has been added to the session manager.
id
:Emitted when an inhibitor has been removed from the session manager.
id
:Indicates the session has entered the Running phase.
Indicates the session is about to end.
org.gnome.SessionManager.Client — Client interface
GetAppId (out 's' app_id) GetStartupId (out 's' startup_id) GetRestartStyleHint (out 'u' hint) GetUnixProcessId (out 'u' pid) GetStatus (out 'u' status)
Objects implementing org.gnome.SessionManager.Client also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
Return the application ID associated with this client.
app_id
:Return the startup ID associated with this client.
startup_id
:Return the restart style hint for this client.
hint
:Return the Unix process identifier for this client.
pid
:Return the status of this client.
status
:org.gnome.SessionManager.ClientPrivate — ClientPrivate interface
EndSessionResponse (in 'b' is_ok, in 's' reason)
Objects implementing org.gnome.SessionManager.ClientPrivate also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
This method should be used by the client in response to
the QueryEndSession
and EndSession
signals.
is_ok
:reason
:This signal is used to inform the client that the
session is about to end. The client must respond by
calling
EndSessionResponse
within one second of the signal emission.
The flags may include:
EndSessionResponse
reason and any inhibit from client will be
ignored.
If the client responds with an EndSessionResponse is-ok argument equal to FALSE and a reason then this reason may be displayed to the user.
The client must not attempt to perform any actions or
interact with the user in response to this signal. Any
actions required for a clean shutdown should take place in
response to the
EndSession
signal.
The client should limit operations until either a
EndSession
CancelEndSession
signal is received.
flags
:This signal is used to inform the client that the
session is about to end. The client must respond by
calling
EndSessionResponse
within ten seconds of the signal emission.
The client must not attempt to interact with the user in response to this signal. The application will be given a maxium of ten seconds to perform any actions required for a clean shutdown.
flags
:QueryEndSession
has been cancelled. The client should resume normal operations.
org.gnome.SessionManager.Inhibitor — Inhibitor interface
GetAppId (out 's' app_id) GetClientId (out 'o' client_id) GetReason (out 's' reason) GetFlags (out 'u' flags) GetToplevelXid (out 'u' xid)
Objects implementing org.gnome.SessionManager.Inhibitor also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
Return the application ID associated with this inhibit.
app_id
:Return the client object path associated with this inhibit.
client_id
:Return the reason for the inhibit
reason
:Return the flags that determine the scope of the inhibit
flags
:Return the X11 toplevel window identifier associated with this inhibit. Zero if not set.
xid
: