| 1 |
<?xml version="1.0"?> |
| 2 |
<!-- |
| 3 |
Copyright (C) 2016 Red Hat, Inc. |
| 4 |
|
| 5 |
SPDX-License-Identifier: LGPL-2.1-or-later |
| 6 |
|
| 7 |
This library is free software; you can redistribute it and/or |
| 8 |
modify it under the terms of the GNU Lesser General Public |
| 9 |
License as published by the Free Software Foundation; either |
| 10 |
version 2.1 of the License, or (at your option) any later version. |
| 11 |
|
| 12 |
This library is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
Lesser General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU Lesser General Public |
| 18 |
License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
Author: Matthias Clasen <[email protected]> |
| 21 |
--> |
| 22 |
|
| 23 |
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> |
| 24 |
<!-- |
| 25 |
org.freedesktop.portal.Inhibit: |
| 26 |
@short_description: Portal for inhibiting session transitions |
| 27 |
|
| 28 |
This simple interface lets sandboxed applications inhibit the user |
| 29 |
session from ending, suspending, idling or getting switched away. |
| 30 |
|
| 31 |
This documentation describes version 3 of this interface. |
| 32 |
--> |
| 33 |
<interface name="org.freedesktop.portal.Inhibit"> |
| 34 |
<!-- |
| 35 |
Inhibit: |
| 36 |
@window: Identifier for the window |
| 37 |
@flags: Flags identifying what is inhibited |
| 38 |
@options: Vardict with optional further information |
| 39 |
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call |
| 40 |
|
| 41 |
Inhibits a session status changes. To remove the inhibition, |
| 42 |
call :ref:`org.freedesktop.portal.Request.Close` on the returned |
| 43 |
handle. |
| 44 |
|
| 45 |
The flags determine what changes are inhibited: |
| 46 |
|
| 47 |
- ``1``: Logout |
| 48 |
- ``2``: User Switch |
| 49 |
- ``4``: Suspend |
| 50 |
- ``8``: Idle |
| 51 |
|
| 52 |
Supported keys in the @options vardict include: |
| 53 |
|
| 54 |
* ``handle_token`` (``s``) |
| 55 |
|
| 56 |
A string that will be used as the last element of the @handle. Must be a valid |
| 57 |
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for |
| 58 |
more information about the @handle. |
| 59 |
|
| 60 |
* ``reason`` (``s``) |
| 61 |
|
| 62 |
User-visible reason for the inhibition. |
| 63 |
--> |
| 64 |
<method name="Inhibit"> |
| 65 |
<arg type="s" name="window" direction="in"/> |
| 66 |
<arg type="u" name="flags" direction="in"/> |
| 67 |
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/> |
| 68 |
<arg type="a{sv}" name="options" direction="in"/> |
| 69 |
<arg type="o" name="handle" direction="out"/> |
| 70 |
</method> |
| 71 |
|
| 72 |
<!-- |
| 73 |
CreateMonitor: |
| 74 |
@window: the parent window |
| 75 |
@options: Vardict with optional further information |
| 76 |
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call |
| 77 |
|
| 78 |
Creates a monitoring session. While this session is |
| 79 |
active, the caller will receive StateChanged signals |
| 80 |
with updates on the session state. |
| 81 |
|
| 82 |
A successfully created session can at any time be closed using |
| 83 |
org.freedesktop.portal.Session::Close, or may at any time be closed |
| 84 |
by the portal implementation, which will be signalled via |
| 85 |
:ref:`org.freedesktop.portal.Session::Closed`. |
| 86 |
|
| 87 |
Supported keys in the @options vardict include: |
| 88 |
|
| 89 |
* ``handle_token`` (``s``) |
| 90 |
|
| 91 |
A string that will be used as the last element of the @handle. Must be a valid |
| 92 |
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for |
| 93 |
more information about the @handle. |
| 94 |
|
| 95 |
* ``session_handle_token`` (``s``) |
| 96 |
|
| 97 |
A string that will be used as the last element of the session handle. Must be a valid |
| 98 |
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for |
| 99 |
more information about the session handle. |
| 100 |
|
| 101 |
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal: |
| 102 |
|
| 103 |
* ``session_handle`` (``s``) |
| 104 |
|
| 105 |
The session handle. An object path for the |
| 106 |
:ref:`org.freedesktop.portal.Session` object representing the created |
| 107 |
session. |
| 108 |
|
| 109 |
.. note:: |
| 110 |
The ``session_handle`` is an object path that was erroneously implemented |
| 111 |
as ``s``. For backwards compatibility it will remain this type. |
| 112 |
|
| 113 |
This method was added in version 2 of this interface. |
| 114 |
--> |
| 115 |
<method name="CreateMonitor"> |
| 116 |
<arg type="s" name="window" direction="in"/> |
| 117 |
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/> |
| 118 |
<arg type="a{sv}" name="options" direction="in"/> |
| 119 |
<arg type="o" name="handle" direction="out"/> |
| 120 |
</method> |
| 121 |
|
| 122 |
<!-- |
| 123 |
StateChanged: |
| 124 |
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object |
| 125 |
@state: Vardict with information about the session state |
| 126 |
|
| 127 |
The StateChanged signal is sent to active monitoring sessions when |
| 128 |
the session state changes. |
| 129 |
|
| 130 |
When the session state changes to 'Query End', clients with active monitoring |
| 131 |
sessions are expected to respond by calling |
| 132 |
org.freedesktop.portal.Inhibit.QueryEndResponse() within a second |
| 133 |
of receiving the StateChanged signal. They may call org.freedesktop.portal.Inhibit.Inhibit() |
| 134 |
first to inhibit logout, to prevent the session from proceeding to the Ending state. |
| 135 |
|
| 136 |
The following information may get returned in the @state vardict: |
| 137 |
|
| 138 |
* ``screensaver-active`` (``b``) |
| 139 |
|
| 140 |
Whether the screensaver is active. |
| 141 |
|
| 142 |
* ``session-state`` (``u``) |
| 143 |
|
| 144 |
The state of the session. This member is new in version 3. |
| 145 |
|
| 146 |
- ``1``: Running |
| 147 |
- ``2``: Query End |
| 148 |
- ``3``: Ending |
| 149 |
|
| 150 |
--> |
| 151 |
<signal name="StateChanged"> |
| 152 |
<arg type="o" name="session_handle" direction="out"/> |
| 153 |
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/> |
| 154 |
<arg type="a{sv}" name="state" direction="out"/> |
| 155 |
</signal> |
| 156 |
|
| 157 |
<!-- |
| 158 |
QueryEndResponse: |
| 159 |
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object |
| 160 |
|
| 161 |
Acknowledges that the caller received the #org.freedesktop.portal.Inhibit::StateChanged |
| 162 |
signal. This method should be called within one second or receiving a StateChanged |
| 163 |
signal with the 'Query End' state. |
| 164 |
|
| 165 |
Since version 3. |
| 166 |
--> |
| 167 |
<method name="QueryEndResponse"> |
| 168 |
<arg type="o" name="session_handle" direction="in"/> |
| 169 |
</method> |
| 170 |
|
| 171 |
<property name="version" type="u" access="read"/> |
| 172 |
</interface> |
| 173 |
</node> |