3 Copyright (C) 2016 Red Hat, Inc.
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 Author: Matthias Clasen <mclasen@redhat.com>
21 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
23 org.freedesktop.portal.OpenURI:
24 @short_description: Portal for opening URIs
26 The OpenURI portal allows sandboxed applications to open
27 URIs (e.g. a http: link to the applications homepage)
28 under the control of the user.
30 This documentation describes version 3 of this interface.
32 <interface name="org.freedesktop.portal.OpenURI">
35 @parent_window: Identifier for the application window, see <link linkend="parent_window">Common Conventions</link>
37 @options: Vardict with optional further onformation
38 @handle: Object path for the #org.freedesktop.portal.Request object representing this call
42 Note that file:// uris are explicitly not supported by this method.
43 To request opening local files, use org.freedesktop.portal.OpenURI.OpenFile().
45 Supported keys in the @options vardict include:
48 <term>handle_token s</term>
50 A string that will be used as the last element of the @handle. Must be a valid
51 object path element. See the #org.freedesktop.portal.Request documentation for
52 more information about the @handle.
56 <term>writable b</term>
58 Whether to allow the chosen application to write to the file.
60 This key only takes effect the uri points to a local file that
61 is exported in the document portal, and the chosen application
68 Whether to ask the user to choose an app. If this is not passed, or false,
69 the portal may use a default or pick the last choice.
71 The ask option was introduced in version 3 of the interface.
77 <method name="OpenURI">
78 <arg type="s" name="parent_window" direction="in"/>
79 <arg type="s" name="uri" direction="in"/>
80 <arg type="a{sv}" name="options" direction="in"/>
81 <arg type="o" name="handle" direction="out"/>
86 @parent_window: Identifier for the application window, see <link linkend="parent_window">Common Conventions</link>
87 @fd: File descriptor for the file to open
88 @options: Vardict with optional further onformation
89 @handle: Object path for the #org.freedesktop.portal.Request object representing this call
91 Asks to open a local file.
93 Supported keys in the @options vardict include:
96 <term>handle_token s</term>
98 A string that will be used as the last element of the @handle. Must be a valid
99 object path element. See the #org.freedesktop.portal.Request documentation for
100 more information about the @handle.
104 <term>writable b</term>
106 Whether to allow the chosen application to write to the file.
108 This key only takes effect the uri points to a local file that
109 is exported in the document portal, and the chosen application
116 Whether to ask the user to choose an app. If this is not passed, or false,
117 the portal may use a default or pick the last choice.
119 The ask option was introduced in version 3 of the interface.
124 The OpenFile method was introduced in version 2 of the OpenURI portal API.
126 <method name="OpenFile">
127 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
128 <arg type="s" name="parent_window" direction="in"/>
129 <arg type="h" name="fd" direction="in"/>
130 <arg type="a{sv}" name="options" direction="in"/>
131 <arg type="o" name="handle" direction="out"/>
136 @parent_window: Identifier for the application window, see <link linkend="parent_window">Common Conventions</link>
137 @fd: File descriptor for a file
138 @options: Vardict with optional further onformation
139 @handle: Object path for the #org.freedesktop.portal.Request object representing this call
141 Asks to open the directory containing a local file in the file browser.
143 Supported keys in the @options vardict include:
146 <term>handle_token s</term>
148 A string that will be used as the last element of the @handle. Must be a valid
149 object path element. See the #org.freedesktop.portal.Request documentation for
150 more information about the @handle.
155 The OpenDirectory method was introduced in version 3 of the OpenURI portal API.
157 <method name="OpenDirectory">
158 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
159 <arg type="s" name="parent_window" direction="in"/>
160 <arg type="h" name="fd" direction="in"/>
161 <arg type="a{sv}" name="options" direction="in"/>
162 <arg type="o" name="handle" direction="out"/>
165 <property name="version" type="u" access="read"/>