Blame gio/org.freedesktop.portal.Documents.xml

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