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) GetLocale (in 'i' category, out 's' value) InitializationError (in 's' message, in 'b' fatal) Initialized () 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 () Reboot () CanShutdown (out 'b' is_available) SetRebootToFirmwareSetup (in 'b' enable) CanRebootToFirmwareSetup (out 'b' is_available) Logout (in 'u' mode) IsSessionRunning (out 'b' running)
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
'SessionName' read 's' 'Renderer' read 's' 'SessionIsActive' read 'b' 'InhibitedActions' read 'u'
Setenv (in 's' variable, in 's' value)
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
:GetLocale (in 'i' category, out 's' value)
Reads the current state of the specific locale category.
category
:value
:InitializationError (in 's' message, in 'b' fatal)
May be used by applications launched during the Session Manager initialization phase to indicate there was a problem.
message
:fatal
:Initialized ()
Run from systemd to signal that gnome-session-initialized.target has been reached.
RegisterClient (in 's' app_id, in 's' client_startup_id, out 'o' client_id)
Register the caller as a Session Management client.
app_id
:client_startup_id
:client_id
:UnregisterClient (in 'o' 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 session 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
:Uninhibit (in 'u' inhibit_cookie)
Cancel a previous call to Inhibit()
identified by the cookie.
inhibit_cookie
:IsInhibited (in 'u' flags, out 'b' is_inhibited)
Determine if operation(s) specified by the flags
are currently inhibited. Flags are same as those accepted
by the
Inhibit()
method.
flags
:is_inhibited
:GetClients (out 'ao' clients)
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
GetInhibitors (out 'ao' inhibitors)
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
IsAutostartConditionHandled (in 's' condition, out 'b' handled)
Allows the caller to determine whether the session manager is handling changes to the specified autostart condition.
condition
:handled
:CanShutdown (out 'b' is_available)
Allows the caller to determine whether or not it's okay to show a shutdown option in the UI
is_available
:SetRebootToFirmwareSetup (in 'b' enable)
Allows the caller to indicate to the system's firmware to boot into setup mode
enable
:CanRebootToFirmwareSetup (out 'b' is_available)
Allows the caller to determine whether or not it's okay to show a reboot to firmware option in the UI
is_available
:Logout (in 'u' mode)
Request a logout dialog
Allowed values for the mode parameter are:
Values for flags may be bitwise or'ed together.
mode
:ClientAdded ('o' id)
Emitted when a client has been added to the session manager.
id
:ClientRemoved ('o' id)
Emitted when a client has been removed from the session manager.
id
:InhibitorAdded ('o' id)
Emitted when an inhibitor has been added to the session manager.
id
:'Renderer' read 's'
The renderer for the session that has been loaded. At the moment this supports GL and GLES, and is only used for the X session.
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) Stop ()
Objects implementing org.gnome.SessionManager.Client also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
GetAppId (out 's' app_id)
Return the application ID associated with this client.
app_id
:GetStartupId (out 's' startup_id)
Return the startup ID associated with this client.
startup_id
:GetRestartStyleHint (out 'u' hint)
Return the restart style hint for this client.
hint
: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
EndSessionResponse (in 'b' is_ok, in 's' reason)
This method should be used by the client in response to
the QueryEndSession
and EndSession
signals.
is_ok
:reason
:Stop ()
The client should stop and remove itself from the session in response to this signal.
QueryEndSession ('u' flags)
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
:EndSession ('u' 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
:CancelEndSession ()
This signal indicates to the client that a previous emission of
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
GetAppId (out 's' app_id)
Return the application ID associated with this inhibit.
app_id
:GetClientId (out 'o' client_id)
Return the client object path associated with this inhibit.
client_id
:GetReason (out 's' reason)
Return the reason for the inhibit
reason
:org.gnome.SessionManager.Presence — Presence interface
SetStatus (in 'u' status) SetStatusText (in 's' status_text)
Objects implementing org.gnome.SessionManager.Presence also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties