Debian Codegraph @

data/org.freedesktop.impl.portal.PermissionStore.xml

raw
1 <!DOCTYPE node PUBLIC
2 "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
3 "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
4
5 <!--
6 Copyright (C) 2015 Red Hat, Inc.
7
8 SPDX-License-Identifier: LGPL-2.1-or-later
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General
21 Public License along with this library; if not, write to the
22 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, USA.
24
25 Author: Alexander Larsson <[email protected]>
26 -->
27
28 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
29 <!--
30 org.freedesktop.impl.portal.PermissionStore:
31 @short_description: Database to store permissions
32
33 The permission store can be used by portals to store permissions
34 that sandboxed applications have to various resources, such as
35 files outside the sandbox.
36
37 Since the resources managed by portals can be varied, the permission
38 store is fairly free-form: there can be multiple tables; resources are
39 identified by an ID, as are applications, and permissions are stored as
40 string arrays. None of these strings are interpreted by the permission
41 store in any way.
42
43 In addition, the permission store allows to associate extra data
44 (in the form of a GVariant) with each resource.
45
46 This document describes version 2 of the permission store interface.
47 -->
48 <interface name="org.freedesktop.impl.portal.PermissionStore">
49 <property name="version" type="u" access="read"/>
50
51 <!--
52 Lookup:
53 @table: the name of the table to use
54 @id: the resource ID to look up
55 @permissions: map from application ID to permissions
56 @data: data that is associated with the resource
57
58 Looks up the entry for a resource in one of the tables and returns
59 all associated application permissions and data.
60 -->
61 <method name="Lookup">
62 <arg name="table" type="s" direction="in"/>
63 <arg name="id" type="s" direction="in"/>
64 <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QMap&lt;QString,QStringList&gt;"/>
65 <arg name="permissions" type="a{sas}" direction="out"/>
66 <arg name="data" type="v" direction="out"/>
67 </method>
68
69 <!--
70 Set:
71 @table: the name of the table to use
72 @create: whether to create the table if it does not exist
73 @id: the resource ID to modify
74 @app_permissions: map from application ID to permissions
75 @data: data to associate with the resource
76
77 Writes the entry for a resource in the given table.
78 -->
79 <method name="Set">
80 <arg name="table" type="s" direction="in"/>
81 <arg name="create" type="b" direction="in"/>
82 <arg name="id" type="s" direction="in"/>
83 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QMap&lt;QString,QStringList&gt;"/>
84 <arg name="app_permissions" type="a{sas}" direction="in"/>
85 <arg name="data" type="v" direction="in"/>
86 </method>
87
88 <!--
89 Delete:
90 @table: the name of the table to use
91 @id: the resource ID to delete
92
93 Removes the entry for a resource in the given table.
94 -->
95 <method name="Delete">
96 <arg name="table" type="s" direction="in"/>
97 <arg name="id" type="s" direction="in"/>
98 </method>
99
100 <!--
101 SetValue:
102 @table: the name of the table to use
103 @create: whether to create the table if it does not exist
104 @id: the resource ID to modify
105 @data: data to associate with the resource
106
107 Sets just the data for a resource in the given table.
108 -->
109 <method name="SetValue">
110 <arg name="table" type="s" direction="in"/>
111 <arg name="create" type="b" direction="in"/>
112 <arg name="id" type="s" direction="in"/>
113 <arg name="data" type="v" direction="in"/>
114 </method>
115
116 <!--
117 SetPermission:
118 @table: the name of the table to use
119 @create: whether to create the table if it does not exist
120 @id: the resource ID to modify
121 @app: the application ID to modify
122 @permissions: permissions to set
123
124 Sets the permissions for an application and a resource
125 in the given table.
126 -->
127 <method name="SetPermission">
128 <arg name="table" type="s" direction="in"/>
129 <arg name="create" type="b" direction="in"/>
130 <arg name="id" type="s" direction="in"/>
131 <arg name="app" type="s" direction="in"/>
132 <arg name="permissions" type="as" direction="in"/>
133 </method>
134
135 <!--
136 DeletePermission:
137 @table: the name of the table to use
138 @id: the resource ID to modify
139 @app: the application ID to modify
140
141 Removes the entry for an application and a resource
142 in the given table.
143
144 This method was added in version 2.
145 -->
146 <method name="DeletePermission">
147 <arg name="table" type="s" direction="in"/>
148 <arg name="id" type="s" direction="in"/>
149 <arg name="app" type="s" direction="in"/>
150 </method>
151
152 <!--
153 GetPermission:
154 @table: the name of the table to use
155 @id: the resource ID to modify
156 @app: the application ID to modify
157 @permissions: permissions to get
158
159 Gets the entry for an application and a resource
160 in the given table.
161 -->
162 <method name="GetPermission">
163 <arg name="table" type="s" direction="in"/>
164 <arg name="id" type="s" direction="in"/>
165 <arg name="app" type="s" direction="in"/>
166 <arg name="permissions" type="as" direction="out"/>
167 </method>
168
169 <!--
170 List:
171 @table: the name of the table to use
172 @ids: IDs of all resources that are present in the table
173
174 Returns all the resources that are present in the table.
175 -->
176 <method name="List">
177 <arg name="table" type="s" direction="in"/>
178 <arg name="ids" type="as" direction="out"/>
179 </method>
180
181 <!--
182 Changed:
183 @table: the name of the table
184 @ids: IDs of the changed resource
185 @deleted: whether the resource was deleted
186 @data: the data that is associated the resource
187 @permissions: the permissions that are associated with the resource
188
189 The Changed signal is emitted when the entry for a resource
190 is modified or deleted. If the entry was deleted, then @data
191 and @permissions contain the last values that were found in the
192 database. If the entry was modified, they contain the new values.
193 -->
194 <signal name="Changed">
195 <arg name="table" type="s" direction="out"/>
196 <arg name="id" type="s" direction="out"/>
197 <arg name="deleted" type="b" direction="out"/>
198 <arg name="data" type="v" direction="out"/>
199 <annotation name="org.qtproject.QtDBus.QtTypeName.Out4" value="QMap&lt;QString,QStringList&gt;"/>
200 <arg name="permissions" type="a{sas}" direction="out"/>
201 </signal>
202 </interface>
203
204 </node>