| 1 |
<?xml version="1.0"?> |
| 2 |
<!-- |
| 3 |
Copyright (C) 2015 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: Alexander Larsson <[email protected]> |
| 21 |
--> |
| 22 |
|
| 23 |
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> |
| 24 |
<!-- |
| 25 |
org.freedesktop.portal.Request: |
| 26 |
@short_description: Shared request interface |
| 27 |
|
| 28 |
The Request interface is shared by all portal interfaces. When a |
| 29 |
portal method is called, the reply includes a handle (i.e. object path) |
| 30 |
for a Request object, which will stay alive for the duration of the |
| 31 |
user interaction related to the method call. |
| 32 |
|
| 33 |
The portal indicates that a portal request interaction is over by |
| 34 |
emitting the #org.freedesktop.portal.Request::Response signal on the |
| 35 |
Request object. |
| 36 |
|
| 37 |
The application can abort the interaction calling |
| 38 |
org.freedesktop.portal.Request.Close() on the Request object. |
| 39 |
|
| 40 |
Since version 0.9 of xdg-desktop-portal, the handle will be of the form |
| 41 |
|
| 42 |
:: |
| 43 |
|
| 44 |
/org/freedesktop/portal/desktop/request/SENDER/TOKEN |
| 45 |
|
| 46 |
|
| 47 |
where ``SENDER`` is the callers unique name, with the initial ``':'`` removed and |
| 48 |
all ``'.'`` replaced by ``'_'``, and ``TOKEN`` is a unique token that the caller provided |
| 49 |
with the handle_token key in the options vardict. |
| 50 |
|
| 51 |
This change was made to let applications subscribe to the Response signal before |
| 52 |
making the initial portal call, thereby avoiding a race condition. It is recommended |
| 53 |
that the caller should verify that the returned handle is what it expected, and update |
| 54 |
its signal subscription if it isn't. This ensures that applications will work with both |
| 55 |
old and new versions of xdg-desktop-portal. |
| 56 |
|
| 57 |
The token that the caller provides should be unique and not guessable. To avoid clashes |
| 58 |
with calls made from unrelated libraries, it is a good idea to use a per-library prefix |
| 59 |
combined with a random number. |
| 60 |
--> |
| 61 |
<interface name="org.freedesktop.portal.Request"> |
| 62 |
|
| 63 |
<!-- |
| 64 |
Close: |
| 65 |
|
| 66 |
Closes the portal request to which this object refers and ends all |
| 67 |
related user interaction (dialogs, etc). |
| 68 |
|
| 69 |
A Response signal will not be emitted in this case. |
| 70 |
--> |
| 71 |
<method name="Close"> |
| 72 |
</method> |
| 73 |
|
| 74 |
<!-- |
| 75 |
Response: |
| 76 |
@response: Numeric response |
| 77 |
@results: Vardict with results. The keys and values in the vardict depend on the request. |
| 78 |
|
| 79 |
Emitted when the user interaction for a portal request is over. |
| 80 |
|
| 81 |
The @response indicates how the user interaction ended: |
| 82 |
|
| 83 |
- 0: Success, the request is carried out |
| 84 |
- 1: The user cancelled the interaction |
| 85 |
- 2: The user interaction was ended in some other way |
| 86 |
--> |
| 87 |
<signal name="Response"> |
| 88 |
<arg type="u" name="response"/> |
| 89 |
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/> |
| 90 |
<arg type="a{sv}" name="results"/> |
| 91 |
</signal> |
| 92 |
</interface> |
| 93 |
</node> |