Attachment 'org.freedesktop.portal.OnlineAccount.xml'

Download

   1 <?xml version="1.0"?>
   2 <!--
   3  Copyright (C) 2017 Red Hat, Inc.
   4 
   5  This library is free software; you can redistribute it and/or
   6  modify it under the terms of the GNU Lesser General Public
   7  License as published by the Free Software Foundation; either
   8  version 2 of the License, or (at your option) any later version.
   9 
  10  This library is distributed in the hope that it will be useful,
  11  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13  Lesser General Public License for more details.
  14 
  15  You should have received a copy of the GNU Lesser General Public
  16  License along with this library. If not, see <http://www.gnu.org/licenses/>.
  17 
  18  Author: Matthias Clasen <mclasen@redhat.com>
  19 -->
  20 
  21 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
  22   <!--
  23       org.freedesktop.portal.OnlineAccount:
  24       @short_description: Portal for obtaining information about online accounts
  25 
  26       This interface lets sandboxed applications request access to
  27       online accounts of the user.
  28   -->
  29   <interface name="org.freedesktop.portal.OnlineAccount">
  30     <!--
  31         GetAccounts:
  32         @window: Identifier for the window
  33         @options: Options
  34         @handle: Object path for the #org.freedesktop.portal.Request object representing this call
  35 
  36         Gets information about the users online accounts. The returned list of accounts
  37         can be filtered by providing providers and interfaces that the application is
  38         interested in. The list will also be filtered by what accounts the application
  39         is allowed to use.
  40 
  41         Supported keys in the @options vardict include:
  42         <variablelist>
  43           <varlistentry>
  44             <term>providers as</term>
  45             <listitem><para>
  46               An array of provider types that the application is interested in.
  47             </para></listitem>
  48           </varlistentry>
  49           <varlistentry>
  50             <term>interfaces as</term>
  51             <listitem><para>
  52               An array of interfaces that need to be enabled for the application to
  53               make use of the account.
  54             </para></listitem>
  55           </varlistentry>
  56         </variablelist>
  57         </variablelist>
  58 
  59         The following results get returned via the #org.freedesktop.portal.Request::Response signal:
  60         <variablelist>
  61           <varlistentry>
  62             <term>accounts a(ssssbbay)</term>
  63             <listitem><para>
  64               An array of accounts. Each acount is represented as a tuple which contains:
  65               the provider type, the provider name (for display), the account id, the user identity
  66               for this account (for display), whether the account needs attention, whether the
  67               account is disabled and a serialized icon.
  68             </para></listitem>
  69           </varlistentry>
  70         </variablelist>
  71     -->
  72 
  73     <method name="GetAccounts">
  74       <arg type="s" name="window" direction="in"/>
  75       <arg type="a{sv}" name="options" direction="in"/>
  76       <arg type="o" name="handle" direction="out"/>
  77     </method>
  78 
  79     <!--
  80         AddAccount:
  81         @window: Identifier for the window
  82         @provider: the provider type to add an account for
  83         @interfaces: the interfaces that are needed for the application
  84         @options: Options
  85         @handle: Object path for the #org.freedesktop.portal.Request object representing this call
  86 
  87         Requests that the user add an account for a provider.
  88 
  89         Supported keys in the @options vardict include:
  90         <variablelist>
  91           <varlistentry>
  92             <term>interfaces as</term>
  93             <listitem><para>
  94               An array of interfaces that need to be enabled for the application to
  95               make use of the account.
  96             </para></listitem>
  97           </varlistentry>
  98         </variablelist>
  99         </variablelist>
 100 
 101         The following results get returned via the #org.freedesktop.portal.Request::Response signal:
 102         <variablelist>
 103           <varlistentry>
 104             <term>account ssssbbay</term>
 105             <listitem><para>
 106               Information about the added account: the provider type, the provider name (for display),
 107               the account id, the user identity for this account (for display), whether the account
 108               needs attention, whether the account is disabled, a serialized icon.
 109             </para></listitem>
 110           </varlistentry>
 111         </variablelist>
 112     -->
 113     <method name="AddAccount">
 114       <arg type="s" name="window" direction="in"/>
 115       <arg type="s" name="provider" direction="in"/>
 116       <arg type="a{sv}" name="options" direction="in"/>
 117       <arg type="o" name="handle" direction="out"/>
 118     </method>
 119 
 120     <!--
 121         EnsureCredentials:
 122         @window: Identifier for the window
 123         @provider: the provider type to add an account for
 124         @interfaces: the interfaces that are needed for the application
 125         @options: Options
 126         @handle: Object path for the #org.freedesktop.portal.Request object representing this call
 127 
 128         Asks the user to provide credentials for an account. Applications need to
 129         call this method to obtain the access token and client ID needed in order
 130         to use the services of an account.
 131 
 132         The following results get returned via the #org.freedesktop.portal.Request::Response signal:
 133         <variablelist>
 134           <varlistentry>
 135             <term>access_token s</term>
 136             <listitem><para>
 137               An access token that can be used t o access services for the account.
 138             </para></listitem>
 139           </varlistentry>
 140           <varlistentry>
 141             <term>expires_in i</term>
 142             <listitem><para>
 143               The time (in seconds) until the credentials expire.
 144             </para></listitem>
 145           </varlistentry>
 146           <varlistentry>
 147             <term>client_id s</term>
 148             <listitem><para>
 149               The OAuth2 client ID.
 150             </para></listitem>
 151           </varlistentry>
 152         </variablelist>
 153     -->
 154     <method name="EnsureCredentials">
 155       <arg type="s" name="window" direction="in"/>
 156       <arg type="s" name="account_id" direction="in"/>
 157       <arg type="a{sv}" name="options" direction="in"/>
 158       <arg type="o" name="handle" direction="out"/>
 159     </method>
 160 
 161     <property name="version" type="u" access="read"/>
 162   </interface>
 163 </node>

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2021-02-25 09:44:04, 23.6 KB) [[attachment:ensure-credentials.png]]
  • [get | view] (2021-02-25 09:44:04, 32.0 KB) [[attachment:get-or-add-accounts.png]]
  • [get | view] (2021-02-25 09:44:04, 60.5 KB) [[attachment:goa1.png]]
  • [get | view] (2021-02-25 09:44:04, 58.4 KB) [[attachment:goa2.png]]
  • [get | view] (2021-02-25 09:44:04, 6.3 KB) [[attachment:org.freedesktop.portal.OnlineAccount.xml]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.