online-accounts-daemon/lib/LomiriOnlineAccountsDaemon/com.lomiri.OnlineAccounts.Manager.xml
raw symbols SCIP| 1 | <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" |
| 2 | "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> |
| 3 | |
| 4 | <node name="/com/lomiri/OnlineAccounts/Manager"> |
| 5 | <interface name="com.lomiri.OnlineAccounts.Manager"> |
| 6 | |
| 7 | <!-- |
| 8 | Global concepts: |
| 9 | |
| 10 | Clients are identified by their "applicationId", which is the |
| 11 | "<package>_<app>" of the client. |
| 12 | |
| 13 | The "serviceId" is an application-specific name for an account provider. |
| 14 | That is, the "serviceId" contains the information about the application |
| 15 | which will use it, and the account provider (e.g. "google", "facebook"). |
| 16 | "serviceId"s are backed by files shipped with the application, which can |
| 17 | contain application/account-provider specific information, such as the |
| 18 | ClientId and ClientSecret to be used when authentication with OAuth 2.0. |
| 19 | An application can ship more than one "serviceId", if they refer to |
| 20 | different account providers; that is, one application can have a |
| 21 | serviceId for Google and one for Facebook, but the same application |
| 22 | cannot have one for GMail and another for Picasa. |
| 23 | --> |
| 24 | |
| 25 | <!-- |
| 26 | GetAccounts: returns a list of account IDs that satisfy the given |
| 27 | filters. |
| 28 | |
| 29 | Allowed keys for the "filters" parameter (any combination is allowed, |
| 30 | though not all combinations might make sense): |
| 31 | |
| 32 | - "applicationId" ("s"): the "<package>_<app>" of the client. An |
| 33 | unconfined application can specify this in order to restrict the set |
| 34 | of results to only those accounts that the application has been |
| 35 | authorized to use. For confined apps, OA will deduce the |
| 36 | applicationId from the apparmor label of the caller. |
| 37 | |
| 38 | - "serviceId" ("s"): if the application wants to list only those |
| 39 | accounts coming from a specific provider (e.g., "Facebook"). |
| 40 | |
| 41 | - "accountId" ("u"): the ID of an account. |
| 42 | |
| 43 | In any case, an application will receive only those accounts which the |
| 44 | user has authorized the application to use. See |
| 45 | http://wiki.ubuntu.com/OnlineAccounts |
| 46 | for an overview of the UI experience. |
| 47 | |
| 48 | Disabled accounts will not be returned. |
| 49 | --> |
| 50 | <method name="GetAccounts"> |
| 51 | <arg name="filters" type="a{sv}" direction="in" /> |
| 52 | |
| 53 | <!-- |
| 54 | The return value is a list of account IDs paired with a dictionary of account data. |
| 55 | This will always include: |
| 56 | - "serviceId" (s) |
| 57 | - "displayName" (s) |
| 58 | Other settings stored on the account will also be included, such as the |
| 59 | server address and port of an owncloud or IMAP account, but we haven't |
| 60 | defined exactly how. Possibly, all account-specific keys will be |
| 61 | prefixed by "settings/", in order not to clash with the keys defined at |
| 62 | the framework level. |
| 63 | --> |
| 64 | <arg name="accounts" type="a(ua{sv})" direction="out" /> |
| 65 | |
| 66 | <!-- |
| 67 | The returned "services" is a list of dictionaries of the services' data. |
| 68 | This will always include: |
| 69 | - "serviceId" (s) |
| 70 | - "displayName" (s): the translated display name |
| 71 | - "iconSource" (s): URL to the service icon; if the URL starts with |
| 72 | "image://theme/", then what follows is the symbolic icon name |
| 73 | --> |
| 74 | <arg name="services" type="aa{sv}" direction="out" /> |
| 75 | |
| 76 | <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> |
| 77 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" |
| 78 | value="QList<AccountInfo>"/> |
| 79 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" |
| 80 | value="QList<QVariantMap>"/> |
| 81 | </method> |
| 82 | |
| 83 | <!-- |
| 84 | Authenticate: request authentication credentials for the given |
| 85 | account ID in the context of a particular service. |
| 86 | |
| 87 | If "interactive" is false, an error will be returned if |
| 88 | user interaction would be required to retrieve the |
| 89 | credentials. |
| 90 | |
| 91 | If "invalidate" is true, any stored credentials will be |
| 92 | ignored and new credentials will be requested from the account |
| 93 | provider. |
| 94 | --> |
| 95 | <method name="Authenticate"> |
| 96 | <arg name="accountId" type="u" direction="in" /> |
| 97 | <arg name="serviceId" type="s" direction="in" /> |
| 98 | <arg name="interactive" type="b" direction="in" /> |
| 99 | <arg name="invalidate" type="b" direction="in" /> |
| 100 | <!-- |
| 101 | This dictionary can be used to specify OAuth client keys or permission |
| 102 | scopes. While it's possible to statically define them a the "serviceId" |
| 103 | level, some apps might want to change this information at runtime. |
| 104 | Possible use cases: |
| 105 | 1) OAuth keys are retrieved from a server (so that they can be updated |
| 106 | when the old ones are revoked). |
| 107 | 2) An app might want to use different keys when talking to GMail and |
| 108 | Picasa. |
| 109 | 3) The scope list can also be dynamic, and depending on how the user is |
| 110 | using the app. |
| 111 | 4) SASL: the parameters would contain the latest challenge got from the |
| 112 | server. |
| 113 | --> |
| 114 | <arg name="parameters" type="a{sv}" direction="in" /> |
| 115 | <arg name="credentials" type="a{sv}" direction="out" /> |
| 116 | <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/> |
| 117 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/> |
| 118 | </method> |
| 119 | |
| 120 | <!-- |
| 121 | RequestAccess: register a new account for use with the given |
| 122 | service. |
| 123 | This method also performs the authentication, since that's what apps |
| 124 | would do as soon as they get the account. |
| 125 | --> |
| 126 | <method name="RequestAccess"> |
| 127 | <arg name="serviceId" type="s" direction="in" /> |
| 128 | <arg name="parameters" type="a{sv}" direction="in" /> |
| 129 | <arg name="account" type="(ua{sv})" direction="out" /> |
| 130 | <arg name="credentials" type="a{sv}" direction="out" /> |
| 131 | <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/> |
| 132 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="AccountInfo"/> |
| 133 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/> |
| 134 | </method> |
| 135 | |
| 136 | <!-- |
| 137 | AccountChanged: emitted when account details are changed. |
| 138 | |
| 139 | The apparmor policy will NOT ALLOW confined applications to receive |
| 140 | this signal on the account manager object path (which might be |
| 141 | /com/lomiri/OnlineAccounts/Manager). Only unconfined applications will |
| 142 | be able to listen to this signal from that object path. |
| 143 | |
| 144 | Confined apps will have to catch this signal from a different object path: |
| 145 | /com/lomiri/OnlineAccounts/Manager/@{APP_PKGNAME_DBUS}, which will |
| 146 | deliver the signal only for those accounts which the app has been |
| 147 | authorized to use. |
| 148 | --> |
| 149 | <signal name="AccountChanged"> |
| 150 | <!-- |
| 151 | The serviceId will also be included in the "account" dictionary. The |
| 152 | reason for having it also here is to allow clients to filter D-Bus |
| 153 | messages by arg0. This can be important for unconfined clients, which |
| 154 | would otherwise be woken up by any account change, even those not |
| 155 | relevant to them. |
| 156 | --> |
| 157 | <arg name="serviceId" type="s" /> |
| 158 | <!-- |
| 159 | The dictionary contains a changeType key, type "u", whose value is |
| 160 | enum { enabled, disabled, changed } |
| 161 | --> |
| 162 | <arg name="account" type="(ua{sv})" /> |
| 163 | <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="AccountInfo"/> |
| 164 | </signal> |
| 165 | |
| 166 | </interface> |
| 167 | </node> |