~ci-train-bot/online-accounts-api/online-accounts-api-ubuntu-yakkety-landing-090

« back to all changes in this revision

Viewing changes to src/daemon/manager.xml

  • Committer: Alberto Mardegan
  • Date: 2015-04-28 17:02:17 UTC
  • mfrom: (3.2.8 dbus-api)
  • Revision ID: alberto.mardegan@canonical.com-20150428170217-z1mvhbdehssa74jc
Update DBus API

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
  <interface name="com.ubuntu.OnlineAccounts.Manager">
6
6
 
7
7
    <!--
8
 
        GetAccounts: returns a list containing account information for
9
 
        accounts that provide one of a list of service IDs.
 
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.
10
49
    -->
11
50
    <method name="GetAccounts">
12
 
      <arg name="service_ids" type="as" direction="in" />
 
51
      <arg name="filters" type="a{sv}" direction="in" />
 
52
      <!--
 
53
        The return value is a list of account IDs paired with a dictionary of account data.
 
54
        This will always include:
 
55
        - "serviceId" (s)
 
56
        - "displayName" (s)
 
57
        Other settings stored on the account will also be included, such as the
 
58
        server address and port of an owncloud or IMAP account, but we haven't
 
59
        defined exactly how. Possibly, all account-specific keys will be
 
60
        prefixed by "settings/", in order not to clash with the keys defined at
 
61
        the framework level.
 
62
      -->
13
63
      <arg name="accounts" type="a(ua{sv})" direction="out" />
 
64
      <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
14
65
      <annotation name="org.qtproject.QtDBus.QtTypeName.Out0"
15
66
                  value="QList&lt;AccountInfo&gt;"/>
16
67
    </method>
17
68
 
18
69
    <!--
19
 
        GetAccountInfo: return information about a given account ID
20
 
    -->
21
 
    <method name="GetAccountInfo">
22
 
      <arg name="service_id" type="s" direction="in" />
23
 
      <arg name="account_id" type="u" direction="in" />
24
 
      <arg name="details" type="(ua{sv})" direction="out" />
25
 
      <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="AccountInfo"/>
26
 
    </method>
27
 
 
28
 
    <!--
29
 
        Authenticate: request authentication credentials for the given
30
 
        account ID in the context of a particualr service.
31
 
 
32
 
        If "interactive" is false, an error will be returned if
33
 
        user interaction would be required to retrieve the
34
 
        credentials.
35
 
 
36
 
        If "invalidate" is true, any stored credentials will be
37
 
        ignored and new credentials will be requested from the account
38
 
        provider.
 
70
      Authenticate: request authentication credentials for the given
 
71
      account ID in the context of a particular service.
 
72
 
 
73
      If "interactive" is false, an error will be returned if
 
74
      user interaction would be required to retrieve the
 
75
      credentials.
 
76
 
 
77
      If "invalidate" is true, any stored credentials will be
 
78
      ignored and new credentials will be requested from the account
 
79
      provider.
39
80
    -->
40
81
    <method name="Authenticate">
41
 
      <arg name="service_id" type="s" direction="in" />
42
 
      <arg name="account_id" type="u" direction="in" />
 
82
      <arg name="accountId" type="u" direction="in" />
 
83
      <arg name="serviceId" type="s" direction="in" />
43
84
      <arg name="interactive" type="b" direction="in" />
44
85
      <arg name="invalidate" type="b" direction="in" />
45
 
      <!-- <arg name="reply_socket" type="h" direction="in" /> -->
 
86
      <!--
 
87
        This dictionary can be used to specify OAuth client keys or permission
 
88
        scopes. While it's possible to statically define them a the "serviceId"
 
89
        level, some apps might want to change this information at runtime.
 
90
        Possible use cases:
 
91
        1) OAuth keys are retrieved from a server (so that they can be updated
 
92
           when the old ones are revoked).
 
93
        2) An app might want to use different keys when talking to GMail and
 
94
           Picasa.
 
95
        3) The scope list can also be dynamic, and depending on how the user is
 
96
           using the app.
 
97
        4) SASL: the parameters would contain the latest challenge got from the
 
98
           server.
 
99
      --> 
 
100
      <arg name="parameters" type="a{sv}" direction="in" />
46
101
      <arg name="credentials" type="a{sv}" direction="out" />
 
102
      <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
47
103
      <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
48
104
    </method>
49
105
 
50
106
    <!--
51
 
        Register: register a new account for use with the given
52
 
        service.
 
107
      RequestAccess: register a new account for use with the given
 
108
      service.
 
109
      This method also performs the authentication, since that's what apps
 
110
      would do as soon as they get the account.
53
111
    -->
54
 
    <method name="Register">
55
 
      <arg name="service_id" type="s" direction="in" />
56
 
      <!-- <arg name="reply_socket" type="h" direction="in" /> -->
 
112
    <method name="RequestAccess">
 
113
      <arg name="serviceId" type="s" direction="in" />
 
114
      <arg name="parameters" type="a{sv}" direction="in" />
57
115
      <arg name="account" type="(ua{sv})" direction="out" />
 
116
      <arg name="credentials" type="a{sv}" direction="out" />
 
117
      <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
58
118
      <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="AccountInfo"/>
59
 
      <arg name="credentials" type="a{sv}" direction="out" />
60
119
      <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
61
120
    </method>
62
121
 
63
122
    <!--
64
 
        AccountChanged: emitted when account details are changed.
65
 
 
66
 
        This signal will be emitted when new accounts are enabled, and
67
 
        when existing accounts are disabled.  Clients can detect these
68
 
        cases by checking the "enabled" flag and comparing the account
69
 
        ID with the list of accounts they currently know about.
70
 
 
71
 
        The actual changed account details can be retrieved with
72
 
        GetAccountInfo().
 
123
      AccountChanged: emitted when account details are changed.
 
124
 
 
125
      The apparmor policy will NOT ALLOW confined applications to receive
 
126
      this signal on the account manager object path (which might be
 
127
      /com/ubuntu/OnlineAccounts/Manager). Only unconfined applications will
 
128
      be able to listen to this signal from that object path.
 
129
 
 
130
      Confined apps will have to catch this signal from a different object path:
 
131
      /com/ubuntu/OnlineAccounts/Manager/@{APP_PKGNAME_DBUS}, which will
 
132
      deliver the signal only for those accounts which the app has been
 
133
      authorized to use.
73
134
    -->
74
135
    <signal name="AccountChanged">
75
 
      <arg name="service_id" type="s" />
76
 
      <arg name="account_id" type="u" />
77
 
      <arg name="enabled" type="b" />
78
 
    </signal>
79
 
 
80
 
    <!--
81
 
        CredentialsChanged: emitted when the credentials for the given
82
 
        service ID on the given account change.
83
 
 
84
 
        The new credentials can be retrieved with Authenticate().
85
 
    -->
86
 
    <signal name="CredentialsChanged">
87
 
      <arg name="service_id" type="s" />
88
 
      <arg name="account_id" type="u" />
 
136
      <!--
 
137
        The serviceId will also be included in the "account" dictionary. The
 
138
        reason for having it also here is to allow clients to filter D-Bus
 
139
        messages by arg0. This can be important for unconfined clients, which
 
140
        would otherwise be woken up by any account change, even those not
 
141
          relevant to them.
 
142
      -->
 
143
      <arg name="serviceId" type="s" />
 
144
      <!--
 
145
        The dictionary contains a changeType key, type "u", whose value is
 
146
        enum { enabled, disabled, changed }
 
147
      -->
 
148
      <arg name="account" type="(ua{sv})" />
 
149
      <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="AccountInfo"/>
89
150
    </signal>
90
151
 
91
152
  </interface>