|
Packit |
ae235b |
|
|
Packit |
ae235b |
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
|
Packit |
ae235b |
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Copyright (C) 2015 Red Hat, Inc.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This library is free software; you can redistribute it and/or
|
|
Packit |
ae235b |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
ae235b |
License as published by the Free Software Foundation; either
|
|
Packit |
ae235b |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This library is distributed in the hope that it will be useful,
|
|
Packit |
ae235b |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
ae235b |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
ae235b |
Lesser General Public License for more details.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
You should have received a copy of the GNU Lesser General
|
|
Packit |
ae235b |
Public License along with this library; if not, write to the
|
|
Packit |
ae235b |
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Packit |
ae235b |
Boston, MA 02110-1301, USA.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Author: Alexander Larsson <alexl@redhat.com>
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
org.freedesktop.portal.Documents:
|
|
Packit |
ae235b |
@short_description: Document portal
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
The document portal allows to make files from the outside world
|
|
Packit |
ae235b |
available to sandboxed applications in a controlled way.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Exported files will be made accessible to the application via
|
|
Packit |
ae235b |
a fuse filesystem that gets mounted at /run/user/$UID/doc/. The
|
|
Packit |
ae235b |
filesystem gets mounted both outside and inside the sandbox, but
|
|
Packit |
ae235b |
the view inside the sandbox is restricted to just those files
|
|
Packit |
ae235b |
that the application is allowed to access.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Individual files will appear at /run/user/$UID/doc/$DOC_ID/filename,
|
|
Packit |
ae235b |
where $DOC_ID is the ID of the file in the document store. It is
|
|
Packit |
ae235b |
returned by the org.freedesktop.portal.Documents.Add() and
|
|
Packit |
ae235b |
org.freedesktop.portal.Documents.AddNamed() calls.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
The permissions that the application has for a document store entry
|
|
Packit |
ae235b |
(see org.freedesktop.portal.Documents.GrantPermissions()) are reflected
|
|
Packit |
ae235b |
in the POSIX mode bits in the fuse filesystem.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<interface name='org.freedesktop.portal.Documents'>
|
|
Packit |
ae235b |
<property name="version" type="u" access="read"/>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
GetMountPoint:
|
|
Packit |
ae235b |
@path: the path at which the fuse filesystem is mounted
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Returns the path at which the document store fuse filesystem
|
|
Packit |
ae235b |
is mounted. This will typically be /run/user/$UID/doc/.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="GetMountPoint">
|
|
Packit |
ae235b |
<arg type='ay' name='path' direction='out'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Add:
|
|
Packit |
ae235b |
@o_path_fd: open file descriptor for the file to add
|
|
Packit |
ae235b |
@reuse_existing: whether to reuse an existing document store entry for the file
|
|
Packit |
ae235b |
@persistent: whether to add the file only for this session or permanently
|
|
Packit |
ae235b |
@doc_id: the ID of the file in the document store
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Adds a file to the document store. The file is passed in the
|
|
Packit |
ae235b |
form of an open file descriptor to prove that the caller has
|
|
Packit |
ae235b |
access to the file.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="Add">
|
|
Packit |
ae235b |
<arg type='h' name='o_path_fd' direction='in'/>
|
|
Packit |
ae235b |
<arg type='b' name='reuse_existing' direction='in'/>
|
|
Packit |
ae235b |
<arg type='b' name='persistent' direction='in'/>
|
|
Packit |
ae235b |
<arg type='s' name='doc_id' direction='out'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
AddNamed:
|
|
Packit |
ae235b |
@o_path_parent_fd: open file descriptor for the parent directory
|
|
Packit |
ae235b |
@filename: the basename for the file
|
|
Packit |
ae235b |
@reuse_existing: whether to reuse an existing document store entry for the file
|
|
Packit |
ae235b |
@persistent: whether to add the file only for this session or permanently
|
|
Packit |
ae235b |
@doc_id: the ID of the file in the document store
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Creates an entry in the document store for writing a new file.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="AddNamed">
|
|
Packit |
ae235b |
<arg type='h' name='o_path_parent_fd' direction='in'/>
|
|
Packit |
ae235b |
<arg type='ay' name='filename' direction='in'/>
|
|
Packit |
ae235b |
<arg type='b' name='reuse_existing' direction='in'/>
|
|
Packit |
ae235b |
<arg type='b' name='persistent' direction='in'/>
|
|
Packit |
ae235b |
<arg type='s' name='doc_id' direction='out'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
AddFull:
|
|
Packit |
ae235b |
@o_path_fds: open file descriptors for the files to export
|
|
Packit |
ae235b |
@flags: flags, 1 == reuse_existing, 2 == persistent
|
|
Packit |
ae235b |
@app_id: an application ID, or empty string
|
|
Packit |
ae235b |
@permissions: the permissions to grant, possible values are 'read', 'write', 'grant-permissions' and 'delete'
|
|
Packit |
ae235b |
@doc_ids: the IDs of the files in the document store
|
|
Packit |
ae235b |
@extra_info: Extra info returned
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Adds multiple files to the document store. The file is passed in the
|
|
Packit |
ae235b |
form of an open file descriptor to prove that the caller has
|
|
Packit |
ae235b |
access to the file.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Additionally, if app_id is specified, it will be given the permissions
|
|
Packit |
ae235b |
listed in GrantPermission.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
The method also returns some extra info that can be used to avoid
|
|
Packit |
ae235b |
multiple roundtrips. For now it only contains as "mountpoint", the
|
|
Packit |
ae235b |
fuse mountpoint of the document portal.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This method was added in version 2 of the org.freedesktop.portal.Documents interface.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="AddFull">
|
|
Packit |
ae235b |
<arg type='ah' name='o_path_fds' direction='in'/>
|
|
Packit |
ae235b |
<arg type='u' name='flags' direction='in'/>
|
|
Packit |
ae235b |
<arg type='s' name='app_id' direction='in'/>
|
|
Packit |
ae235b |
<arg type='as' name='permissions' direction='in'/>
|
|
Packit |
ae235b |
<arg type='as' name='doc_ids' direction='out'/>
|
|
Packit |
ae235b |
<arg type='a{sv}' name='extra_out' direction='out'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
GrantPermissions:
|
|
Packit |
ae235b |
@doc_id: the ID of the file in the document store
|
|
Packit |
ae235b |
@app_id: the ID of the application to which permissions are granted
|
|
Packit |
ae235b |
@permissions: the permissions to grant, possible values are 'read', 'write', 'grant-permissions' and 'delete'
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Grants access permissions for a file in the document store
|
|
Packit |
ae235b |
to an application.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This call is available inside the sandbox if the application
|
|
Packit |
ae235b |
has the 'grant-permissions' permission for the document.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="GrantPermissions">
|
|
Packit |
ae235b |
<arg type='s' name='doc_id' direction='in'/>
|
|
Packit |
ae235b |
<arg type='s' name='app_id' direction='in'/>
|
|
Packit |
ae235b |
<arg type='as' name='permissions' direction='in'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
RevokePermissions:
|
|
Packit |
ae235b |
@doc_id: the ID of the file in the document store
|
|
Packit |
ae235b |
@app_id: the ID of the application to which permissions are granted
|
|
Packit |
ae235b |
@permissions: the permissions to grant, possible values are 'read', 'write', 'grant-permissions' and 'delete'
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Revokes access permissions for a file in the document store
|
|
Packit |
ae235b |
from an application.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This call is available inside the sandbox if the application
|
|
Packit |
ae235b |
has the 'grant-permissions' permission for the document.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="RevokePermissions">
|
|
Packit |
ae235b |
<arg type='s' name='doc_id' direction='in'/>
|
|
Packit |
ae235b |
<arg type='s' name='app_id' direction='in'/>
|
|
Packit |
ae235b |
<arg type='as' name='permissions' direction='in'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Delete:
|
|
Packit |
ae235b |
@doc_id: the ID of the file in the document store
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Removes an entry from the document store. The file itself is
|
|
Packit |
ae235b |
not deleted.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This call is available inside the sandbox if the application
|
|
Packit |
ae235b |
has the 'delete' permission for the document.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="Delete">
|
|
Packit |
ae235b |
<arg type='s' name='doc_id' direction='in'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Lookup:
|
|
Packit |
ae235b |
@filename: a path in the host filesystem
|
|
Packit |
ae235b |
@doc_id: the ID of the file in the document store, or '' if the file is not in the document store
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Looks up the document ID for a file.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This call is no not available inside the sandbox.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="Lookup">
|
|
Packit |
ae235b |
<arg type='ay' name='filename' direction='in'/>
|
|
Packit |
ae235b |
<arg type='s' name='doc_id' direction='out'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Info:
|
|
Packit |
ae235b |
@doc_id: the ID of the file in the document store
|
|
Packit |
ae235b |
@path: the path for the file in the host filesystem
|
|
Packit |
ae235b |
@apps: a dictionary mapping application IDs to the permissions for that application
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Gets the filesystem path and application permissions for a document store
|
|
Packit |
ae235b |
entry.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This call is not available inside the sandbox.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="Info">
|
|
Packit |
ae235b |
<arg type='s' name='doc_id' direction='in'/>
|
|
Packit |
ae235b |
<arg type='ay' name='path' direction='out'/>
|
|
Packit |
ae235b |
<arg type='a{sas}' name='apps' direction='out'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
List:
|
|
Packit |
ae235b |
@app_id: an application ID, or '' to list all documents
|
|
Packit |
ae235b |
@docs: a dictonary mapping document IDs to their filesystem path
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Lists documents in the document store for an application (or for
|
|
Packit |
ae235b |
all applications).
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
This call is not available inside the sandbox.
|
|
Packit |
ae235b |
-->
|
|
Packit |
ae235b |
<method name="List">
|
|
Packit |
ae235b |
<arg type='s' name='app_id' direction='in'/>
|
|
Packit |
ae235b |
<arg type='a{say}' name='docs' direction='out'/>
|
|
Packit |
ae235b |
</method>
|
|
Packit |
ae235b |
</interface>
|
|
Packit |
ae235b |
</node>
|