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.
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.
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.
An Account object encapsulates the necessary details to make a Telepathy connection.
Accounts are uniquely identified by object path. The object path
of an Account MUST take the form
/org/freedesktop/Telepathy/Account/cm/proto/acct
, where:
This API avoids specifying the "profiles" used in Mission Control 4.x or the "presets" that have been proposed to replace them. An optional interface will be provided for AM implementations that want to provide presets.
There is deliberately no functionality here for opening channels; we intend to provide that in the channel dispatcher.
Other missing features which would be better in their own interfaces:
This property gives the users the possibility to prevent an account from being used. This flag does not change the validity of the account.
A disabled account can never be put online.
Use cases:
The AccountManager SHOULD allow this property to be set on invalid accounts, but MUST NOT attempt to put invalid accounts online even if they become Enabled.
There doesn't seem to be any good reason not to allow this.
Some protocols, like XMPP and SIP, are used by various different
user-recognised brands, such as Google Talk and Ovi by
Nokia. On accounts for such services, this property SHOULD be
set to a string describing the service, which MUST consist only of
ASCII letters, numbers and hyphen/minus signs, and start with a
letter (matching the requirements for
The
This property MAY be set, if appropriate, when calling
Cannot_Set_Service
.
A map from connection manager parameter names (as in the
This property cannot be altered using Set() - use
Change the value of the
If any of the changed parameters'
DBus_Property
, the change will be applied immediately to
the
corresponding D-Bus Property on the active
In general, reconnecting is a destructive operation that shouldn't happen as a side-effect. In particular, migration tools that twiddle the settings of all accounts shouldn't cause an automatic disconnect and reconnect.
If all of the parameters had the DBus_Property
flag,
the empty list, signifying that no reconnection is required for the
new parameters to take effect. For example, if the only parameter
updated is ...Cellular.
Otherwise, a list of the names of parameters with changes that
will not take effect until the account is reconnected. User
interfaces that require "instant apply" semantics MAY call
["require-encryption"]
.
The presence status that this account should have if it is brought online.
Setting this property MUST NOT actually change the account's status until the next time it is (re)connected for some reason.
The value of this property MUST be one that would be acceptable
for
Otherwise, it would not be possible to use this presence to bring the account online for a channel request.
Either the object path of the '/'
if there is no
connection.
If this object path is not '/', the Connection's well-known bus name can be derived from this object path by removing the first '/' and replacing subsequent '/' characters with '.'.
If the last connection to this account failed with an error,
the D-Bus error name of that error; otherwise, the empty string.
The account manager is expected to set this by observing the
If ConnectionError is received before the connection disconnects, its first argument should be used to set this property; otherwise, the Reason argument of StatusChanged should be converted to a suitable D-Bus error name.
Whenever the Connection connects successfully, this property should be reset to the empty string.
This combines the state-recoverability of
If the last connection to this account failed with an error,
a mapping representing any additional information about the last
disconnection; otherwise, the empty map. The keys and values are
the same as for the second argument of
Whenever the Connection connects successfully, this property should be reset to the empty map.
This combines the state-recoverability of
The requested presence for this account. When this is changed, the
account manager should attempt to manipulate the connection manager to
make
When the account manager automatically connects an account,
it must signal this by setting the RequestedPresence to the same
thing as the
The
Requesting those presence types doesn't make sense.
If true, a change to the presence of this account is in progress.
Whenever
When the account manager succeeds or fails in changing the presence,
or the connection disconnects due to an error, ChangingPresence MUST
change to False as part of the same
This allows UIs to indicate that a presence change is in progress or has finished, even if the change was initiated by a different UI.
For instance, Maemo 5 and Empathy indicate a presence change by
having the presence indicator alternate between the
Re-connect this account. If the account is currently disconnected
and the requested presence is offline, or if the account
is not
If the account is disconnected and the requested presence is not offline, this forces an attempt to connect with the requested presence immediately.
If the account is connecting or connected, this is equivalent to
remembering the current value of
Clients desiring "instant apply" semantics for CM parameters MAY call this method to achieve that.
In particular, if the account's
This is necessary to ensure that the new parameters are picked up.
The normalized user ID of the local user on this account (i.e. the
string returned when the
It is unspecified whether this user ID is globally unique.
As currently implemented, IRC user IDs are only unique within the same IRCnet. On some saner protocols, the user ID includes a DNS name which provides global uniqueness.
If this value is not known yet (which will always be the case for accounts that have never been online), it will be an empty string.
It is possible that this value will change if the connection manager's normalization algorithm changes, although this SHOULD be avoided.
It's not always completely clear what normalization algorithm should be used; for instance, in Gabble, we currently use JIDs, but it would also have been reasonable to use xmpp URIs.