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