Telepathy::Client::AccountInterface Class Reference
[Account and Account Manager proxies]

#include <TelepathyQt4/Client/AccountManager>

Inheritance diagram for Telepathy::Client::AccountInterface:

Inheritance graph
[legend]
Collaboration diagram for Telepathy::Client::AccountInterface:

Collaboration graph
[legend]

List of all members.

Public Slots

QDBusPendingReply Remove ()
QDBusPendingReply UpdateParameters (const QVariantMap &set, const QStringList &unset)

Signals

void Removed ()
void AccountPropertyChanged (const QVariantMap &properties)

Public Member Functions

 AccountInterface (const QString &serviceName, const QString &objectPath, QObject *parent=0)
 AccountInterface (const QDBusConnection &connection, const QString &serviceName, const QString &objectPath, QObject *parent=0)
 AccountInterface (Telepathy::Client::DBusProxy *proxy)
QStringList Interfaces () const TELEPATHY_GNUC_DEPRECATED
QString DisplayName () const TELEPATHY_GNUC_DEPRECATED
void setDisplayName (const QString &newValue) TELEPATHY_GNUC_DEPRECATED
QString Icon () const TELEPATHY_GNUC_DEPRECATED
void setIcon (const QString &newValue) TELEPATHY_GNUC_DEPRECATED
bool Valid () const TELEPATHY_GNUC_DEPRECATED
bool Enabled () const TELEPATHY_GNUC_DEPRECATED
void setEnabled (bool newValue) TELEPATHY_GNUC_DEPRECATED
QString Nickname () const TELEPATHY_GNUC_DEPRECATED
void setNickname (const QString &newValue) TELEPATHY_GNUC_DEPRECATED
QVariantMap Parameters () const TELEPATHY_GNUC_DEPRECATED
Telepathy::SimplePresence AutomaticPresence () const TELEPATHY_GNUC_DEPRECATED
void setAutomaticPresence (const Telepathy::SimplePresence &newValue) TELEPATHY_GNUC_DEPRECATED
bool ConnectAutomatically () const TELEPATHY_GNUC_DEPRECATED
void setConnectAutomatically (bool newValue) TELEPATHY_GNUC_DEPRECATED
QDBusObjectPath Connection () const TELEPATHY_GNUC_DEPRECATED
uint ConnectionStatus () const TELEPATHY_GNUC_DEPRECATED
uint ConnectionStatusReason () const TELEPATHY_GNUC_DEPRECATED
Telepathy::SimplePresence CurrentPresence () const TELEPATHY_GNUC_DEPRECATED
Telepathy::SimplePresence RequestedPresence () const TELEPATHY_GNUC_DEPRECATED
void setRequestedPresence (const Telepathy::SimplePresence &newValue) TELEPATHY_GNUC_DEPRECATED
QString NormalizedName () const TELEPATHY_GNUC_DEPRECATED

Static Public Member Functions

static const char * staticInterfaceName ()

Protected Member Functions

virtual void invalidate (Telepathy::Client::DBusProxy *, const QString &, const QString &)

Properties

QStringList Interfaces
QString DisplayName
QString Icon
bool Valid
bool Enabled
QString Nickname
QVariantMap Parameters
Telepathy::SimplePresence AutomaticPresence
bool ConnectAutomatically
QDBusObjectPath Connection
uint ConnectionStatus
uint ConnectionStatusReason
Telepathy::SimplePresence CurrentPresence
Telepathy::SimplePresence RequestedPresence
QString NormalizedName


Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Account."

Constructor & Destructor Documentation

Telepathy::Client::AccountInterface::AccountInterface ( const QString &  serviceName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a AccountInterface associated with the given object on the session bus.

Parameters:
serviceName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed to the parent class constructor.

Telepathy::Client::AccountInterface::AccountInterface ( const QDBusConnection &  connection,
const QString &  serviceName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a AccountInterface associated with the given object on the given bus.

Parameters:
connection The bus via which the object can be reached.
serviceName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed to the parent class constructor.

Telepathy::Client::AccountInterface::AccountInterface ( Telepathy::Client::DBusProxy proxy  ) 

Creates a AccountInterface associated with the same object as the given proxy.

Parameters:
proxy The proxy to use. It will also be the QObject::parent() for this object.


Member Function Documentation

void Telepathy::Client::AccountInterface::AccountPropertyChanged ( const QVariantMap &  properties  )  [signal]

Represents the signal "AccountPropertyChanged" on the remote object.

The values of one or more properties on this interface (that do not specify that this signal does not apply to them) may have changed. This does not cover properties of other interfaces, which must provide their own change notification if appropriate.

Parameters:
properties A map from property names in this namespace (e.g. Nickname) to values. Properties whose values have not changed SHOULD be omitted, but this need not be done.

Telepathy::SimplePresence Telepathy::Client::AccountInterface::AutomaticPresence (  )  const [inline]

Getter for the remote object property "AutomaticPresence".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

bool Telepathy::Client::AccountInterface::ConnectAutomatically (  )  const [inline]

Getter for the remote object property "ConnectAutomatically".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

QDBusObjectPath Telepathy::Client::AccountInterface::Connection (  )  const [inline]

Getter for the remote object property "Connection".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

uint Telepathy::Client::AccountInterface::ConnectionStatus (  )  const [inline]

Getter for the remote object property "ConnectionStatus".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

uint Telepathy::Client::AccountInterface::ConnectionStatusReason (  )  const [inline]

Getter for the remote object property "ConnectionStatusReason".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

Telepathy::SimplePresence Telepathy::Client::AccountInterface::CurrentPresence (  )  const [inline]

Getter for the remote object property "CurrentPresence".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

QString Telepathy::Client::AccountInterface::DisplayName (  )  const [inline]

Getter for the remote object property "DisplayName".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

bool Telepathy::Client::AccountInterface::Enabled (  )  const [inline]

Getter for the remote object property "Enabled".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

QString Telepathy::Client::AccountInterface::Icon (  )  const [inline]

Getter for the remote object property "Icon".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

QStringList Telepathy::Client::AccountInterface::Interfaces (  )  const [inline]

Getter for the remote object property "Interfaces".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

virtual void Telepathy::Client::AccountInterface::invalidate ( Telepathy::Client::DBusProxy ,
const QString &  ,
const QString &   
) [protected, virtual]

QString Telepathy::Client::AccountInterface::Nickname (  )  const [inline]

Getter for the remote object property "Nickname".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

QString Telepathy::Client::AccountInterface::NormalizedName (  )  const [inline]

Getter for the remote object property "NormalizedName".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

QVariantMap Telepathy::Client::AccountInterface::Parameters (  )  const [inline]

Getter for the remote object property "Parameters".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

QDBusPendingReply Telepathy::Client::AccountInterface::Remove (  )  [inline, slot]

Begins a call to the D-Bus method "Remove" on the remote object.

Delete the account.

References Telepathy::Client::AbstractInterface::invalidationMessage(), and Telepathy::Client::AbstractInterface::invalidationReason().

void Telepathy::Client::AccountInterface::Removed (  )  [signal]

Represents the signal "Removed" on the remote object.

This account has been removed. This is redundant with AccountRemoved, but it's still worth having, to avoid having to bind to AccountManager.AccountRemoved to tell you whether your Account is valid — ideally, an account-editing UI should only care about a single Account.

Telepathy::SimplePresence Telepathy::Client::AccountInterface::RequestedPresence (  )  const [inline]

Getter for the remote object property "RequestedPresence".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.

void Telepathy::Client::AccountInterface::setAutomaticPresence ( const Telepathy::SimplePresence newValue  )  [inline]

Setter for the remote object property "AutomaticPresence".

Don't use this: it blocks the main loop.

Parameters:
newValue The value to set the property to.

void Telepathy::Client::AccountInterface::setConnectAutomatically ( bool  newValue  )  [inline]

Setter for the remote object property "ConnectAutomatically".

Don't use this: it blocks the main loop.

Parameters:
newValue The value to set the property to.

void Telepathy::Client::AccountInterface::setDisplayName ( const QString &  newValue  )  [inline]

Setter for the remote object property "DisplayName".

Don't use this: it blocks the main loop.

Parameters:
newValue The value to set the property to.

void Telepathy::Client::AccountInterface::setEnabled ( bool  newValue  )  [inline]

Setter for the remote object property "Enabled".

Don't use this: it blocks the main loop.

Parameters:
newValue The value to set the property to.

void Telepathy::Client::AccountInterface::setIcon ( const QString &  newValue  )  [inline]

Setter for the remote object property "Icon".

Don't use this: it blocks the main loop.

Parameters:
newValue The value to set the property to.

void Telepathy::Client::AccountInterface::setNickname ( const QString &  newValue  )  [inline]

Setter for the remote object property "Nickname".

Don't use this: it blocks the main loop.

Parameters:
newValue The value to set the property to.

void Telepathy::Client::AccountInterface::setRequestedPresence ( const Telepathy::SimplePresence newValue  )  [inline]

Setter for the remote object property "RequestedPresence".

Don't use this: it blocks the main loop.

Parameters:
newValue The value to set the property to.

static const char* Telepathy::Client::AccountInterface::staticInterfaceName (  )  [inline, static]

Returns the name of the interface "org.freedesktop.Telepathy.Account", which this class represents.

Returns:
The D-Bus interface name.

QDBusPendingReply Telepathy::Client::AccountInterface::UpdateParameters ( const QVariantMap &  set,
const QStringList &  unset 
) [inline, slot]

Begins a call to the D-Bus method "UpdateParameters" on the remote object.

Change the value of the <tp:member-ref>Parameters</tp:member-ref> property. If any of the changed parameters' <tp:type>Conn_Mgr_Param_Flags</tp:type> include DBus_Property, the change will be applied to the corresponding D-Bus Property on the active <tp:member-ref>Connection</tp:member-ref> if there is one; changes to other parameters will not take effect until the next time the account is disconnected and reconnected.

<tp:rationale> Migration tools that twiddle the settings of all accounts shouldn't cause an automatic disconnect and reconnect, probably. I could be persuaded otherwise, though. Or we could add a Reconnect() method. </tp:rationale>

Parameters:
set A mapping from parameter names to their values. These parameters should be stored for future use.
unset A list of the names of parameters to be removed from the set of stored values, allowing the default values to be used. If the given parameters were not, in fact, stored, or even if they do not exist at all, the account manager MUST accept this without error.

References Telepathy::Client::AbstractInterface::invalidationMessage(), and Telepathy::Client::AbstractInterface::invalidationReason().

bool Telepathy::Client::AccountInterface::Valid (  )  const [inline]

Getter for the remote object property "Valid".

Don't use this: it blocks the main loop.

Returns:
The value of the property, or a default-constructed value if the property is not readable.


Property Documentation

Telepathy::SimplePresence Telepathy::Client::AccountInterface::AutomaticPresence [read, write]

Represents property "AutomaticPresence" on the remote object.

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 <tp:type>Connection_Presence_Type</tp:type> in the structure SHOULD NOT be Offline or Unset.

<tp:rationale> In ITOS2007 and ITOS2008 this is a global preference, not visible on D-Bus (the "default presence"). "Automatic presence" better describes when it is used. </tp:rationale>

bool Telepathy::Client::AccountInterface::ConnectAutomatically [read, write]

Represents property "ConnectAutomatically" on the remote object.

If true, the account manager SHOULD attempt to put this account online with the AutomaticPresence whenever possible (in the base Account interface this is deliberately left vague). If false, it MUST NOT put the account online automatically in response to, for instance, connectivity changes, but SHOULD still put the account online with the AutomaticPresence if requested by the user (for instance, if the user tries to start a conversation using this account). This approximately corresponds to NMC 4.x "enabled" and Decibel "autoreconnect".

QDBusObjectPath Telepathy::Client::AccountInterface::Connection [read]

Represents property "Connection" on the remote object.

Either the object path of the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to this account, or the special value '/' 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 '.'.

<tp:rationale> Object paths aren't nullable, so we can't use an empty string. </tp:rationale>

uint Telepathy::Client::AccountInterface::ConnectionStatus [read]

Represents property "ConnectionStatus" on the remote object.

If the Connection property is non-empty, the status of that connection. If the Connection property is the empty string, this property may either be Disconnected (indicating that the account manager is not attempting to bring it online), or Connecting (indicating that the account manager is attempting to connect). The account manager is expected to set this by observing signals from the Connection. If the AM is doing some sort of backoff/delay on reconnection attempts, the account's status is conceptually "Connecting" even though there is no Connection. This vaguely corresponds to GetCurrentStatus in NMC 4.x.

uint Telepathy::Client::AccountInterface::ConnectionStatusReason [read]

Represents property "ConnectionStatusReason" on the remote object.

The reason for the last change to ConnectionStatus. The account manager is expected to set this by observing signals from the Connection. If you weren't watching the Connection at the time it failed, you can't tell why - unless the AM can tell you. This is part of GetCurrentStatus in NMC 4.x.

Telepathy::SimplePresence Telepathy::Client::AccountInterface::CurrentPresence [read]

Represents property "CurrentPresence" on the remote object.

The actual presence. If the connection is not online, this should be (Connection_Presence_Type_Offline, "", ""). If the connection is online but does not support the Presence interface, this should be (Connection_Presence_Type_Unset, "", ""). The account manager is expected to set this by observing signals from the Connection. This corresponds to GetPresenceActual in NMC 4.x.

QString Telepathy::Client::AccountInterface::DisplayName [read, write]

Represents property "DisplayName" on the remote object.

The user-visible name of this account. This SHOULD be chosen by the user at account creation time. The account creation user interface is responsible for setting a reasonable default value in the user's locale; something like "Jabber (bob@example.com)" would be sensible. This approximately corresponds to "display name" in NMC 4.x and Decibel.

bool Telepathy::Client::AccountInterface::Enabled [read, write]

Represents property "Enabled" on the remote object.

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.

<tp:rationale>

Use cases:

  • user has two or more accounts capable of calling contact X, but he doesn't want the UI to prompt him everytime about which one he wants to use for the call. He can then disable all the equivalent accounts but one.

  • There is some temporary server error and the user doesn't want to be be bother by error messages, or change the account configuration: temporarily disabling the account is quicker.
</tp:rationale>

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.

<tp:rationale>

There doesn't seem to be any good reason not to allow this. </tp:rationale>

QString Telepathy::Client::AccountInterface::Icon [read, write]

Represents property "Icon" on the remote object.

The name of an icon in the system's icon theme, such as "im-msn", or the empty string to not specify an icon. If the icon is set to an empty string, the account manager or any client MAY derive a default icon, for instance from the protocol. This approximately corresponds to mc_profile_get_icon_name (or possibly mc_profile_get_branding_icon_name) in NMC 4.x. It's accessed via the account rather than the profile because we no longer have profiles as a core concept.

QStringList Telepathy::Client::AccountInterface::Interfaces [read]

Represents property "Interfaces" on the remote object.

A list of the extra interfaces provided by this account.

QString Telepathy::Client::AccountInterface::Nickname [read, write]

Represents property "Nickname" on the remote object.

The nickname to set on this account for display to other contacts, as set by the user. When the account becomes connected, the account manager SHOULD set this as the user's alias using SetAliases if appropriate. In a later specification revision, we plan to separate the concepts of a contact's nickname as set by themselves, and the local name for them in our contact list (a "handle" or "pet name" as described in XEP-0165 and its references). The terminology change from alias to nickname here is a step in that direction. This corresponds to NMC 4.x mc_account_get_alias.

QString Telepathy::Client::AccountInterface::NormalizedName [read]

Represents property "NormalizedName" on the remote object.

The normalized user ID of the local user on this account (i.e. the string returned when the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref> method is called on the result of <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">GetSelfHandle</tp:dbus-ref> for an active connection).

It is unspecified whether this user ID is globally unique.

<tp:rationale>

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. </tp:rationale>

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.

<tp:rationale>

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. </tp:rationale>

QVariantMap Telepathy::Client::AccountInterface::Parameters [read]

Represents property "Parameters" on the remote object.

A map from connection manager parameter names (as in the <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> interface) to their values. This property includes only those parameters that are stored for this account, and SHOULD only include those parameters that the user has explicitly set.

This property cannot be altered using Set() - use <tp:member-ref>UpdateParameters</tp:member-ref> instead.

<tp:rationale> This avoids NMC being tied to gconf as a matter of API. </tp:rationale>

Telepathy::SimplePresence Telepathy::Client::AccountInterface::RequestedPresence [read, write]

Represents property "RequestedPresence" on the remote object.

The requested presence for this account. When this is changed, the account manager should attempt to manipulate the connection manager to make <tp:member-ref>CurrentPresence</tp:member-ref> match <tp:member-ref>RequestedPresence</tp:member-ref> as closely as possible. It should not be saved to any sort of persistent storage.

When the account manager automatically connects an account, it must signal this by setting the RequestedPresence to the same thing as the <tp:member-ref>AutomaticPresence</tp:member-ref>.

<tp:rationale> This corresponds to e.g. GetPresence and GetPresenceMessage in NMC 4.x. </tp:rationale>

bool Telepathy::Client::AccountInterface::Valid [read]

Represents property "Valid" on the remote object.

If true, this account is considered by the account manager to be complete and usable. If false, user action is required to make it usable, and it will never attempt to connect (for instance, this might be caused by the absence of a required parameter). For connection managers with a plugin architecture, like telepathy-haze, we have little or no control over the parameters offered; for platforms with package management, we have little or no control over the CMs offered. NMC 4.x would just pretend the account didn't exist in these circumstances, but silent data loss is bad, and UIs with CM-specific knowledge (or a user filling in newly-required parameters) might be able to rescue a broken account.


Generated on Thu Mar 5 18:51:58 2009 for TelepathyQt4-0.1.1 by  doxygen 1.5.8