3
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
4
<tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
5
<tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
6
<tp:license xmlns="http://www.w3.org/1999/xhtml">
7
<p>This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public
9
License as published by the Free Software Foundation; either
10
version 2.1 of the License, or (at your option) any later version.</p>
12
<p>This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.</p>
17
<p>You should have received a copy of the GNU Lesser General Public
18
License along with this library; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
<interface name="org.freedesktop.Telepathy.Account">
23
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
24
<p>An Account object encapsulates the necessary details to make a
25
Telepathy connection.</p>
27
<p>Accounts are uniquely identified by object path. The object path
28
of an Account MUST take the form
29
<code>/org/freedesktop/Telepathy/Account/<em>cm</em>/<em>proto</em>/<em>acct</em></code>, where:</p>
32
<li><em>cm</em> is the same <tp:type>Connection_Manager_Name</tp:type>
33
that appears in the connection manager's well-known bus name and
35
<li><em>proto</em> is the <tp:type>Protocol</tp:type> name as seen in
37
namespace="org.freedesktop.Telepathy">ConnectionManager.ListProtocols</tp:dbus-ref>,
38
but with "-" replaced with "_"
39
(i.e. the same as in the object-path of a <tp:dbus-ref
40
namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>)</li>
41
<li><em>acct</em> is an arbitrary string of ASCII letters, digits
42
and underscores, starting with a letter or underscore, which
43
uniquely identifies this account</li>
44
<li>Clients SHOULD parse the object path to discover the
45
connection manager and protocol</li>
46
<li>Clients MUST NOT attempt to parse <em>acct</em></li>
47
<li>Clients MUST NOT assume that <em>acct</em> matches
48
the connection-specific part of a Connection's object-path and
50
<li>The account manager SHOULD choose <em>acct</em> such that if
51
an account is deleted, its object path will be re-used if and only
52
if the new account is in some sense "the same"
53
(incorporating the 'account' parameter in some way is
58
<p>This API avoids specifying the "profiles" used in Mission Control
59
4.x or the "presets" that have been proposed to replace them. An
60
optional interface will be provided for AM implementations
61
that want to provide presets.</p>
63
<p>There is deliberately no functionality here for opening channels;
64
we intend to provide that in the channel dispatcher.</p>
66
<p>Other missing features which would be better in their own
70
<li>dynamic parameter-providing (aka provisioning)</li>
71
<li>saved server capabilities</li>
72
<li>account conditions</li>
73
<li>account grouping</li>
78
<tp:added version="0.17.2"/>
79
<tp:changed version="0.17.6">moved the Avatar property to a separate
80
interface</tp:changed>
82
<!-- Missing functionality compared with NMC 4.x account + profile,
83
apart from as listed above:
85
* vCard field, + default profile for each vCard field
86
(vCard field is per protocol and should be chosen by the
87
Telepathy <-> address-book bridge?; default profile is now
90
* "normalized name" (normalized handle?)
92
* branding icon (what's this and how does it differ from the icon?)
94
* configuration UI (not our problem - perhaps the UI could special-case
95
by cm,protocol,preset tuples?)
97
* default account domain (somewhat meaningless in general; specialized
98
account config UI can hard-code this)
100
* SPLIT_ACCOUNT (pseudo-capability - this is a property of the protocol,
101
not the profile, and in any case only the account config UI cares)
103
Missing functionality compared with Decibel accounts:
105
* we don't really know, they take arbitrary key/value pairs...
106
but display name, protocol, presence/message, current, autoreconnect
107
are the ones given special status by the source, and we have all of them
110
<property name="Interfaces" tp:name-for-bindings="Interfaces"
111
type="as" tp:type="DBus_Interface[]" access="read">
113
A list of the extra interfaces provided by this account.
117
<method name="Remove" tp:name-for-bindings="Remove">
118
<tp:docstring>Delete the account.</tp:docstring>
120
<tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
121
</tp:possible-errors>
124
<signal name="Removed" tp:name-for-bindings="Removed">
126
This account has been removed.
129
This is redundant with <tp:dbus-ref
130
namespace="org.freedesktop.Telepathy.AccountManager">AccountRemoved</tp:dbus-ref>,
131
but it's still worth having,
132
to avoid having to bind to AccountManager.AccountRemoved to tell
133
you whether your Account is valid — ideally, an account-editing UI
134
should only care about a single Account.
139
<signal name="AccountPropertyChanged"
140
tp:name-for-bindings="Account_Property_Changed">
142
The values of one or more properties on this interface (that do not
143
specify that this signal does not apply to them) may have changed.
144
This does not cover properties of other interfaces, which must
145
provide their own change notification if appropriate.
148
<arg name="Properties" type="a{sv}">
150
A map from property names in this namespace (e.g.
151
<tp:member-ref>Nickname</tp:member-ref>) to
152
values. Properties whose values have not changed SHOULD be
153
omitted, but this need not be done.
158
<property name="DisplayName" type="s" access="readwrite"
159
tp:name-for-bindings="Display_Name">
161
The user-visible name of this account. This SHOULD be chosen by the
162
user at account creation time. The account creation user interface
163
is responsible for setting a reasonable default value in the user's
164
locale; something like "Jabber (bob@example.com)" would be sensible.
167
This approximately corresponds to "display name" in NMC 4.x and
173
<property name="Icon" tp:name-for-bindings="Icon"
174
type="s" access="readwrite">
176
The name of an icon in the system's icon theme, such as "im-msn",
177
or the empty string to not specify an icon. If the icon is set to
178
an empty string, the account manager or any client MAY derive a
179
default icon, for instance from the protocol.
182
This approximately corresponds to mc_profile_get_icon_name
183
(or possibly mc_profile_get_branding_icon_name) in NMC 4.x.
184
It's accessed via the account rather than the profile because
185
we no longer have profiles as a core concept.
190
<property name="Valid" tp:name-for-bindings="Valid"
191
type="b" access="read">
193
If true, this account is considered by the account manager to be
194
complete and usable. If false, user action is required to make it
195
usable, and it will never attempt to connect (for instance, this
196
might be caused by the absence of a required parameter).
199
For connection managers with a plugin architecture, like
200
telepathy-haze, we have little or no control over the parameters
201
offered; for platforms with package management, we have little or
202
no control over the CMs offered. NMC 4.x would just pretend the
203
account didn't exist in these circumstances, but silent data loss
204
is bad, and UIs with CM-specific knowledge (or a user filling in
205
newly-required parameters) might be able to rescue a broken account.
210
<property name="Enabled" tp:name-for-bindings="Enabled"
211
type="b" access="readwrite">
212
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
213
<p>This property gives the users the possibility to prevent an account
214
from being used. This flag does not change the validity of the
217
<p>A disabled account can never be put online.</p>
223
<li>user has two or more accounts capable of calling contact X, but
224
he doesn't want the UI to prompt him everytime about which one he
225
wants to use for the call. He can then disable all the equivalent
226
accounts but one.</li>
228
<li>There is some temporary server error and the user doesn't want
229
to be be bother by error messages, or change the account
230
configuration: temporarily disabling the account is quicker.</li>
234
<p>The AccountManager SHOULD allow this property to be set on invalid
235
accounts, but MUST NOT attempt to put invalid accounts online
236
even if they become Enabled.</p>
239
<p>There doesn't seem to be any good reason not to allow this.</p>
244
<property name="Nickname" tp:name-for-bindings="Nickname"
245
type="s" access="readwrite">
247
The nickname to set on this account for display to other contacts,
248
as set by the user. When the account becomes connected, the
249
account manager SHOULD set this as the user's alias using <tp:dbus-ref
250
namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">SetAliases</tp:dbus-ref>
254
In a later specification revision, we plan to separate the concepts
255
of a contact's nickname as set by themselves, and the local
256
name for them in our contact list (a "handle" or "pet name" as
257
described in XEP-0165 and its references). The terminology change
258
from alias to nickname here is a step in that direction.
259
This corresponds to NMC 4.x mc_account_get_alias.
264
<property name="Parameters" tp:name-for-bindings="Parameters"
265
type="a{sv}" access="read">
266
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
267
<p>A map from connection manager parameter names (as in the
269
namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref>
270
interface) to their values. This property includes
271
only those parameters that are stored for this account, and SHOULD
272
only include those parameters that the user has explicitly set.
274
<p>This property cannot be altered using Set() - use
275
<tp:member-ref>UpdateParameters</tp:member-ref> instead.</p>
278
This avoids NMC being tied to gconf as a matter of API.
283
<method name="UpdateParameters" tp:name-for-bindings="Update_Parameters">
284
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
285
Change the value of the <tp:member-ref>Parameters</tp:member-ref>
286
property. If any of the changed parameters'
287
<tp:type>Conn_Mgr_Param_Flags</tp:type> include
288
<code>DBus_Property</code>, the change will be applied to the
289
corresponding D-Bus Property on the active
290
<tp:member-ref>Connection</tp:member-ref> if there is one; changes to
291
other parameters will not take effect until the next time the account
292
is disconnected and reconnected.
295
Migration tools that twiddle the settings of all accounts shouldn't
296
cause an automatic disconnect and reconnect, probably. I could be
297
persuaded otherwise, though. Or we could add a Reconnect() method.
301
<tp:changed version="0.17.16">
302
parameters which are also D-Bus properties can and should be updated on
306
<arg name="Set" type="a{sv}" direction="in">
308
A mapping from parameter names to their values. These parameters
309
should be stored for future use.
312
<arg name="Unset" type="as" direction="in">
314
A list of the names of parameters to be removed from the set of
315
stored values, allowing the default values to be used.
316
If the given parameters were not, in fact, stored, or even if they
317
do not exist at all, the account manager MUST accept this without
323
<tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
324
<tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
325
</tp:possible-errors>
328
<property name="AutomaticPresence" type="(uss)" access="readwrite"
329
tp:type="Simple_Presence" tp:name-for-bindings="Automatic_Presence">
330
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
331
<p>The presence status that this account should have if it is brought
334
<p>Setting this property MUST NOT actually change the account's
335
status until the next time it is (re)connected for some reason.</p>
337
<p>The <tp:type>Connection_Presence_Type</tp:type> in the structure
338
SHOULD NOT be Offline or Unset.</p>
341
In ITOS2007 and ITOS2008 this is a global preference, not visible
342
on D-Bus (the "default presence"). "Automatic presence" better
343
describes when it is used.
348
<property name="ConnectAutomatically" type="b" access="readwrite"
349
tp:name-for-bindings="Connect_Automatically">
351
If true, the account manager SHOULD attempt to put this account
352
online with the <tp:member-ref>AutomaticPresence</tp:member-ref>
353
whenever possible (in the base
354
Account interface this is deliberately left vague). If false,
355
it MUST NOT put the account online automatically in response to,
356
for instance, connectivity changes, but SHOULD still put the account
357
online with the <tp:member-ref>AutomaticPresence</tp:member-ref> if
358
requested by the user (for
359
instance, if the user tries to start a conversation using this
363
This approximately corresponds to NMC 4.x "enabled" and Decibel
369
<property name="Connection" tp:name-for-bindings="Connection"
370
type="o" access="read">
371
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
372
Either the object path of the <tp:dbus-ref
373
namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to
374
this account, or the special value <code>'/'</code> if there is no
378
Object paths aren't nullable, so we can't use an empty string.
383
<property name="ConnectionStatus" type="u" access="read"
384
tp:name-for-bindings="Connection_Status">
386
If the <tp:member-ref>Connection</tp:member-ref> property is non-empty,
387
the status of that connection.
388
If the Connection property is the empty string, this property may
389
either be Disconnected (indicating that the account manager is not
390
attempting to bring it online), or Connecting (indicating that the
391
account manager is attempting to connect).
392
The account manager is expected to set this by observing signals
396
If the AM is doing some sort of backoff/delay on reconnection
397
attempts, the account's status is conceptually "Connecting" even
398
though there is no Connection. This vaguely corresponds to
399
GetCurrentStatus in NMC 4.x.
404
<property name="ConnectionStatusReason" type="u" access="read"
405
tp:name-for-bindings="Connection_Status_Reason">
407
The reason for the last change to
408
<tp:member-ref>ConnectionStatus</tp:member-ref>.
409
The account manager is expected to set this by observing signals
413
If you weren't watching the Connection at the time it failed,
414
you can't tell why - unless the AM can tell you. This is part
415
of GetCurrentStatus in NMC 4.x.
420
<property name="CurrentPresence" type="(uss)" access="read"
421
tp:type="Simple_Presence" tp:name-for-bindings="Current_Presence">
423
The actual presence. If the connection is not online, this should be
424
(Connection_Presence_Type_Offline, "", "").
425
If the connection is online but does not support the <tp:dbus-ref
426
namespace="org.freedesktop.Telepathy.Connection.Interface">Presence</tp:dbus-ref>
427
interface, this should be (Connection_Presence_Type_Unset, "", "").
428
The account manager is expected to set this by observing signals
432
This corresponds to GetPresenceActual in NMC 4.x.
437
<property name="RequestedPresence" type="(uss)" access="readwrite"
438
tp:type="Simple_Presence" tp:name-for-bindings="Requested_Presence">
439
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
440
<p>The requested presence for this account. When this is changed, the
441
account manager should attempt to manipulate the connection manager to
442
make <tp:member-ref>CurrentPresence</tp:member-ref> match
443
<tp:member-ref>RequestedPresence</tp:member-ref> as closely as
444
possible. It should not be saved to any sort of persistent
447
<p>When the account manager automatically connects an account,
448
it must signal this by setting the RequestedPresence to the same
449
thing as the <tp:member-ref>AutomaticPresence</tp:member-ref>.</p>
452
This corresponds to e.g. GetPresence and GetPresenceMessage
458
<property name="NormalizedName" type="s" access="read"
459
tp:name-for-bindings="Normalized_Name">
460
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
461
<p>The normalized user ID of the local user on this account (i.e. the
462
string returned when the <tp:dbus-ref
463
namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>
464
method is called on the
465
result of <tp:dbus-ref
466
namespace="org.freedesktop.Telepathy.Connection">GetSelfHandle</tp:dbus-ref>
467
for an active connection).</p>
469
<p>It is unspecified whether this user ID is globally unique.</p>
472
<p>As currently implemented, IRC user IDs are only unique within
473
the same IRCnet. On some saner protocols, the user ID includes a
474
DNS name which provides global uniqueness.</p>
477
<p>If this value is not known yet (which will always be the case for
478
accounts that have never been online), it will be an empty
481
<p>It is possible that this value will change if the connection
482
manager's normalization algorithm changes, although this SHOULD
486
<p>It's not always completely clear what normalization algorithm
487
should be used; for instance, in Gabble, we currently use JIDs,
488
but it would also have been reasonable to use xmpp URIs.</p>
495
<!-- vim:set sw=2 sts=2 et ft=xml: -->