Top |
org.freedesktop.impl.portal.PermissionStoreorg.freedesktop.impl.portal.PermissionStore — Database to store permissions |
Lookup (IN s table, IN s id, OUT a{sas} permissions, OUT v data); Set (IN s table, IN b create, IN s id, IN a{sas} app_permissions, IN v data); Delete (IN s table, IN s id); SetValue (IN s table, IN b create, IN s id, IN v data); SetPermission (IN s table, IN b create, IN s id, IN s app, IN as permissions); DeletePermission (IN s table, IN s id, IN s app); List (IN s table, OUT as ids);
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.
Lookup (IN s table, IN s id, OUT a{sas} permissions, OUT v data);
Looks up the entry for a resource in one of the tables and returns all associated application permissions and data.
|
the name of the table to use |
|
the resource ID to look up |
|
map from application ID to permissions |
|
data that is associated with the resource |
Set (IN s table, IN b create, IN s id, IN a{sas} app_permissions, IN v data);
Writes the entry for a resource in the given table.
|
the name of the table to use |
|
whether to create the table if it does not exist |
|
the resource ID to modify |
|
map from application ID to permissions |
|
data to associate with the resource |
Delete (IN s table, IN s id);
Removes the entry for a resource in the given table.
|
the name of the table to use |
|
the resource ID to delete |
SetValue (IN s table, IN b create, IN s id, IN v data);
Sets just the data for a resource in the given table.
|
the name of the table to use |
|
whether to create the table if it does not exist |
|
the resource ID to modify |
|
data to associate with the resource |
SetPermission (IN s table, IN b create, IN s id, IN s app, IN as permissions);
Sets the permissions for an application and a resource in the given table.
|
the name of the table to use |
|
whether to create the table if it does not exist |
|
the resource ID to modify |
|
the application ID to modify |
|
permissions to set |
DeletePermission (IN s table, IN s id, IN s app);
Removes the entry for an application and a resource in the given table.
This method was added in version 2.
|
the name of the table to use |
|
the resource ID to modify |
|
the application ID to modify |
Changed (s table, s id, b deleted, v data, a{sas} permissions);
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.
|
the name of the table |
|
|
|
whether the resource was deleted |
|
the data that is associated the resource |
|
the permissions that are associated with the resource |