summaryrefslogtreecommitdiff
path: root/spec/Connection_Manager_Interface_Account_Storage1.xml
blob: a3af965d65ef9b5b28232975f76507b8b1947d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0" ?>
<node name="/Connection_Manager_Interface_Account_Storage1"
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">

  <tp:copyright>Copyright © 2011 Collabora Ltd.</tp:copyright>
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
    <p>This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Lesser General Public
      License as published by the Free Software Foundation; either
      version 2.1 of the License, or (at your option) any later version.</p>

    <p>This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Lesser General Public License for more details.</p>

    <p>You should have received a copy of the GNU Lesser General Public
      License along with this library; if not, write to the Free Software
      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
      02110-1301, USA.</p>
  </tp:license>

  <interface name="im.telepathy1.ConnectionManager.Interface.AccountStorage1"
    tp:causes-havoc="experimental">
    <tp:added version="0.21.10">(draft 1)</tp:added>
    <tp:requires interface="im.telepathy1.ConnectionManager"/>

    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>An interface for connection managers that store account details
        internally.  At the moment this consists only of storing an account's
        credentials, but other functionality may be added in the future.</p>

      <p><tp:dbus-ref namespace="imt1">Account</tp:dbus-ref> objects
        representing accounts on a connection manager that implements this
        interface should implement the
	<tp:dbus-ref namespace="imt1.Account.Interface">ExternalPasswordStorage1</tp:dbus-ref>
        interface.</p>
    </tp:docstring>

    <tp:flags name="Account_Flags" value-prefix="Account_Flag" type="u">
      <tp:docstring>
        A set of flags representing the status of the Account stored in the
        Connection Manager.
      </tp:docstring>

      <tp:flag suffix="Credentials_Stored" value="1">
        <tp:docstring>
          The associated account has its authentication credentials (password)
          stored in the connection manager
        </tp:docstring>
      </tp:flag>
    </tp:flags>

    <tp:mapping name="Account_Flags_Map" array-name="Account_Flags_Map_List">
      <tp:docstring>A mapping from Account_Ids to account flags.
      </tp:docstring>
      <tp:member type="s" name="Account_Id"/>
      <tp:member type="u" tp:type="Account_Flags" name="Flags"/>
    </tp:mapping>

    <property name="Accounts"
      tp:name-for-bindings="Accounts"
      type="a{su}" tp:type="Account_Flags_Map" access="read">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The set of Accounts stored in this Connection Manager, and flags
          indicating their status.</p>

        <p>Change notification for this property is provided by the standard
          D-Bus <code>PropertiesChanged</code> signal.</p>
      </tp:docstring>
    </property>

    <method name="ForgetCredentials" tp:name-for-bindings="Forget_Credentials">
      <tp:docstring>
        Clears any saved credentials associated with the specified Account_Id.
        Any other saved data related to the account will be unaffected.
      </tp:docstring>

      <arg direction="in" name="Account_Id"
        type="s">
        <tp:docstring>
          An account id as returned from
	  <tp:dbus-ref namespace="imt1">Protocol.IdentifyAccount</tp:dbus-ref>.
        </tp:docstring>
      </arg>

      <tp:possible-errors>
        <tp:error name="im.telepathy1.Error.InvalidArgument">
          <tp:docstring>
            The account id is invalid.
          </tp:docstring>
        </tp:error>
      </tp:possible-errors>
    </method>

    <method name="RemoveAccount" tp:name-for-bindings="Remove_Account">
      <tp:docstring>
        Completely removes all data associated with an account from the
        connection manager's internal storage.
      </tp:docstring>

      <arg direction="in" name="Account_Id"
        type="s">
        <tp:docstring>
          An account id as returned from
	  <tp:dbus-ref namespace="imt1">Protocol.IdentifyAccount</tp:dbus-ref>.
        </tp:docstring>
      </arg>

      <tp:possible-errors>
        <tp:error name="im.telepathy1.Error.InvalidArgument">
          <tp:docstring>
            The account id is invalid.
          </tp:docstring>
        </tp:error>
      </tp:possible-errors>
    </method>

  </interface>
</node>