Debian Codegraph @

data/org.freedesktop.portal.OpenURI.xml

raw
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.OpenURI:
26 @short_description: Portal for opening URIs
27
28 The OpenURI portal allows sandboxed applications to open
29 URIs (e.g. a http: link to the applications homepage)
30 under the control of the user.
31
32 This documentation describes version 5 of this interface.
33 -->
34 <interface name="org.freedesktop.portal.OpenURI">
35 <!--
36 OpenURI:
37 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
38 @uri: A URI, as described in RFC 3986, to open
39 @options: Vardict with optional further information
40 @handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
41
42 Asks to open a URI.
43
44 Note that ``file://`` URIs are explicitly not supported by this method.
45 To request opening local files, use org.freedesktop.portal.OpenURI.OpenFile().
46
47 Supported keys in the @options vardict include:
48
49 * ``handle_token`` (``s``)
50
51 A string that will be used as the last element of the @handle. Must be a valid
52 object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
53 more information about the @handle.
54
55 * ``writable`` (``b``)
56
57 Whether to allow the chosen application to write to the file.
58
59 This key only takes effect the uri points to a local file that
60 is exported in the document portal, and the chosen application
61 is sandboxed itself.
62
63 * ``ask`` (``b``)
64
65 Whether to ask the user to choose an app. If this is not passed, or false,
66 the portal may use a default or pick the last choice.
67
68 The ask option was introduced in version 3 of the interface.
69
70 * ``activation_token`` (``s``)
71
72 A token that can be used to activate the chosen application.
73
74 The activation_token option was introduced in version 4 of the interface.
75 -->
76 <method name="OpenURI">
77 <arg type="s" name="parent_window" direction="in"/>
78 <arg type="s" name="uri" direction="in"/>
79 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
80 <arg type="a{sv}" name="options" direction="in"/>
81 <arg type="o" name="handle" direction="out"/>
82 </method>
83
84 <!--
85 OpenFile:
86 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
87 @fd: File descriptor for the file or directory to open
88 @options: Vardict with optional further information
89 @handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
90
91 Asks to open a local file or directory.
92
93 Supported keys in the @options vardict include:
94
95 * ``handle_token`` (``s``)
96
97 A string that will be used as the last element of the @handle. Must be a valid
98 object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
99 more information about the @handle.
100
101 * ``writable`` (``b``)
102
103 Whether to allow the chosen application to write to the file.
104
105 This key only takes effect the uri points to a local file that is
106 exported in the document portal, and the chosen application is
107 sandboxed itself.
108
109 * ``ask`` (``b``)
110
111 Whether to ask the user to choose an app. If this is not passed, or false,
112 the portal may use a default or pick the last choice.
113
114 The ask option was introduced in version 3 of the interface.
115
116 * ``activation_token`` (``s``)
117
118 A token that can be used to activate the chosen application.
119
120 The activation_token option was introduced in version 4 of the interface.
121
122 The OpenFile method was introduced in version 2 of the OpenURI portal API.
123 -->
124 <method name="OpenFile">
125 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
126 <arg type="s" name="parent_window" direction="in"/>
127 <arg type="h" name="fd" direction="in"/>
128 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
129 <arg type="a{sv}" name="options" direction="in"/>
130 <arg type="o" name="handle" direction="out"/>
131 </method>
132
133 <!--
134 OpenDirectory:
135 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
136 @fd: File descriptor for a file or directory
137 @options: Vardict with optional further information
138 @handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
139
140 Asks to open the directory containing a local file or directory represented by @fd in the file
141 browser, possibly selecting it. This is implemented using the
142 ``org.freedesktop.FileManager1.ShowItems()`` D-Bus API and if that service doesn't exist falls
143 back to the ``OpenURI`` method on the directory of the file or directory.
144
145 Supported keys in the @options vardict include:
146
147 * ``handle_token`` (``s``)
148
149 A string that will be used as the last element of the @handle. Must be a valid
150 object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
151 more information about the @handle.
152
153 * ``activation_token`` (``s``)
154
155 A token that can be used to activate the chosen application.
156
157 The activation_token option was introduced in version 4 of the interface.
158
159 The OpenDirectory method was introduced in version 3 of the OpenURI portal API.
160 -->
161 <method name="OpenDirectory">
162 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
163 <arg type="s" name="parent_window" direction="in"/>
164 <arg type="h" name="fd" direction="in"/>
165 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
166 <arg type="a{sv}" name="options" direction="in"/>
167 <arg type="o" name="handle" direction="out"/>
168 </method>
169
170 <!--
171 SchemeSupported:
172 @scheme: The URI protocol scheme to check
173 @options: Vardict with optional further information
174 @supported: True if the URI scheme is supported
175
176 Checks if OpenURI supports the protocol scheme @scheme.
177
178 The @options vardict currently has no supported entries.
179
180 The SchemeSupported method was introduced in version 5 of the OpenURI portal API.
181 -->
182 <method name="SchemeSupported">
183 <arg type="s" name="scheme" direction="in"/>
184 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
185 <arg type="a{sv}" name="options" direction="in"/>
186 <arg type="b" name="supported" direction="out"/>
187 </method>
188
189 <property name="version" type="u" access="read"/>
190 </interface>
191 </node>