| Home · All Classes · All Namespaces · Modules · Functions · Files

# Tp::Account Class Reference
[Account proxies]

The Account class provides an object representing a Telepathy account. More...

`#include <TelepathyQt4/Account>`

Inherits Tp::StatelessDBusProxy, OptionalInterfaceFactory< Account >, Tp::ReadyObject, and Tp::RefCounted.

List of all members.

## Signals

- void displayNameChanged (const QString &displayName)
- void iconChanged (const QString &icon)
- void nicknameChanged (const QString &nickname)
- void normalizedNameChanged (const QString &normalizedName)
- void validityChanged (bool validity)
- void stateChanged (bool state)
- void connectsAutomaticallyPropertyChanged (bool connectsAutomatically)
- void firstOnline ()
- void parametersChanged (const QVariantMap &parameters)
- void automaticPresenceChanged (const Tp::SimplePresence &automaticPresence) const
- void currentPresenceChanged (const Tp::SimplePresence &currentPresence) const
- void requestedPresenceChanged (const Tp::SimplePresence &requestedPresence) const
- void avatarChanged (const Tp::Avatar &avatar)
- void connectionStatusChanged (Tp::ConnectionStatus status, Tp::ConnectionStatusReason statusReason)
- void haveConnectionChanged (bool haveConnection)

## Public Member Functions

- virtual ~Account ()
- bool isValidAccount () const
- bool isEnabled () const
- PendingOperation * setEnabled (bool value)
- QString cmName () const
- QString protocol () const
- QString displayName () const
- PendingOperation * setDisplayName (const QString &value)
- QString icon () const
- PendingOperation * setIcon (const QString &value)
- QString nickname () const
- PendingOperation * setNickname (const QString &value)
- const Avatar & avatar () const
- PendingOperation * setAvatar (const Avatar &avatar)
- QVariantMap parameters () const
- PendingStringList * updateParameters (const QVariantMap &set, const QStringList &unset)
- PendingOperation * reconnect ()
- ProtocolInfo * protocolInfo () const
- bool connectsAutomatically () const
- PendingOperation * setConnectsAutomatically (bool value)
- bool hasBeenOnline () const
- ConnectionStatus connectionStatus () const
- ConnectionStatusReason connectionStatusReason () const
- bool haveConnection () const
- ConnectionPtr connection () const
- SimplePresence automaticPresence () const
- PendingOperation * setAutomaticPresence (const SimplePresence &value)
- SimplePresence currentPresence () const
- SimplePresence requestedPresence () const
- PendingOperation * setRequestedPresence (const SimplePresence &value)
- QString uniqueIdentifier () const
- QString connectionObjectPath () const
- QString normalizedName () const
- PendingOperation * remove ()
- PendingChannelRequest * ensureTextChat (const QString &contactIdentifier, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureTextChat (const ContactPtr &contact, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureTextChatroom (const QString &roomName, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureMediaCall (const QString &contactIdentifier, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureMediaCall (const ContactPtr &contact, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureAudioCall (const QString &contactIdentifier, QDateTime userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureAudioCall (const ContactPtr &contact, QDateTime userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureVideoCall (const QString &contactIdentifier, bool withAudio=true, QDateTime userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureVideoCall (const ContactPtr &contact, bool withAudio=true, QDateTime userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createFileTransfer (const QString &contactIdentifier, const FileTransferChannelCreationProperties &properties, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createFileTransfer (const ContactPtr &contact, const FileTransferChannelCreationProperties &properties, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createConferenceMediaCall (const QList< ChannelPtr > &channels, const QStringList &initialInviteeContactsIdentifiers=QStringList(), const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createConferenceMediaCall (const QList< ChannelPtr > &channels, const QList< ContactPtr > &initialInviteeContacts=QList< ContactPtr >(), const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createConferenceTextChat (const QList< ChannelPtr > &channels, const QList< ContactPtr > &initialInviteeContacts=QList< ContactPtr >(), const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createConferenceTextChat (const QList< ChannelPtr > &channels, const QStringList &initialInviteeContactsIdentifiers=QStringList(), const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createConferenceTextChatRoom (const QString &roomName, const QList< ChannelPtr > &channels, const QStringList &initialInviteeContactsIdentifiers=QStringList(), const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createConferenceTextChatRoom (const QString &roomName, const QList< ChannelPtr > &channels, const QList< ContactPtr > &initialInviteeContacts=QList< ContactPtr >(), const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * createChannel (const QVariantMap &requestedProperties, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- PendingChannelRequest * ensureChannel (const QVariantMap &requestedProperties, const QDateTime &userActionTime=QDateTime::currentDateTime(), const QString &preferredHandler=QString())
- Client::DBus::PropertiesInterface * propertiesInterface () const
- Client::AccountInterfaceAvatarInterface * avatarInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const

## Static Public Member Functions

- static AccountPtr create (const QString &busName, const QString &objectPath)
- static AccountPtr create (const QDBusConnection &bus, const QString &busName, const QString &objectPath)

## Static Public Attributes

- static const Feature FeatureCore
- static const Feature FeatureAvatar
- static const Feature FeatureProtocolInfo

## Protected Member Functions

- Account (const QString &busName, const QString &objectPath)
- Account (const QDBusConnection &bus, const QString &busName, const QString &objectPath)
- Client::AccountInterface * baseInterface () const

## Detailed Description

The Account class provides an object representing a Telepathy account.

Account adds the following features compared to using Client::AccountManagerInterface directly:

- Status tracking
- Getting the list of supported interfaces automatically

The remote object accessor functions on this object (isValidAccount(), isEnabled(), and so on) don't make any D-Bus calls; instead, they return/use values cached from a previous introspection run. The introspection process populates their values in the most efficient way possible based on what the service implements. Their return value is mostly undefined until the introspection process is completed, i.e. isReady() returns true. See the individual accessor descriptions for more details.

Signals are emitted to indicate that properties have changed, for example displayNameChanged(), iconChanged(), etc.

Convenience methods to create channels using the channel dispatcher such as ensureTextChat(), createFileTransfer() are provided.

To avoid unnecessary D-Bus traffic, some methods only return valid information after a specific feature has been enabled by calling becomeReady() with the desired set of features as an argument, and waiting for the resulting PendingOperation to finish. For instance, to retrieve the account protocol information, it is necessary to call becomeReady() with Account::FeatureProtocolInfo included in the argument. The required features are documented by each method.

If the account is deleted from the AccountManager, this object will not be deleted automatically; however, it will emit invalidated() with error code TELEPATHY_QT4_ERROR_OBJECT_REMOVED and will cease to be useful.

## Usage

### Creating an account object

The easiest way to create account objects is through AccountManager. One can just use the AccountManager convenience methods such as AccountManager::validAccounts() to get a list of account objects representing valid accounts.

If you already know the object path, you can just call create(). For example:

     AccountPtr acc = Account::create(busName, objectPath);

An AccountPtr object is returned, which will automatically keep track of object lifetime.

You can also provide a D-Bus connection as a QDBusConnection:

     AccountPtr acc = Account::create(QDBusConnection::sessionBus(),
             busName, objectPath);

### Making account ready to use

An Account object needs to become ready before usage, meaning that the introspection process finished and the object accessors can be used.

To make the object ready, use becomeReady() and wait for the PendingOperation::finished() signal to be emitted.

     class MyClass : public QObject
     {
         QOBJECT

     public:
         MyClass(QObject *parent = 0);
         ~MyClass() { }

     private Q_SLOTS:
         void onAccountReady(Tp::PendingOperation*);

     private:
         AccountPtr acc;
     };

     MyClass::MyClass(const QString &busName, const QString &objectPath,
             QObject *parent)
         : QObject(parent)
           acc(Account::create(busName, objectPath))
     {
         connect(acc->becomeReady(),
                 SIGNAL(finished(Tp::PendingOperation*)),
                 SLOT(onAccountReady(Tp::PendingOperation*)));
     }

     void MyClass::onAccountReady(Tp::PendingOperation *op)
     {
         if (op->isError()) {
             qWarning() << "Account cannot become ready:" <<
                 op->errorName() << "-" << op->errorMessage();
             return;
         }

         // Account is now ready
         qDebug() << "Display name:" << acc->displayName();
     }

See Asynchronous Object Model, Shared Pointer Usage

## Constructor & Destructor Documentation

Tp::Account::~Account | ( |  | ) | `[virtual]`

Class destructor.

Tp::Account::Account | ( | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[protected]`

Construct a new Account object using QDBusConnection::sessionBus().

Parameters:

  | busName | The account well-known bus name (sometimes called a "service name"). This is usually the same as the account manager bus name TELEPATHY_ACCOUNT_MANAGER_BUS_NAME.
  | objectPath | The account object path.

Tp::Account::Account | ( | const QDBusConnection & | bus,
|  | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[protected]`

Construct a new Account object using the given .

Parameters:

  | bus | QDBusConnection to use.
  | busName | The account well-known bus name (sometimes called a "service name"). This is usually the same as the account manager bus name TELEPATHY_ACCOUNT_MANAGER_BUS_NAME.
  | objectPath | The account object path.

## Member Function Documentation

AccountPtr Tp::Account::create | ( | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[static]`

Create a new Account object using QDBusConnection::sessionBus().

Parameters:

  | busName | The account well-known bus name (sometimes called a "service name"). This is usually the same as the account manager bus name TELEPATHY_ACCOUNT_MANAGER_BUS_NAME.
  | objectPath | The account object path.

Returns:
  An AccountPtr object pointing to the newly created Account object.

AccountPtr Tp::Account::create | ( | const QDBusConnection & | bus,
|  | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[static]`

Create a new Account object using the given bus.

Parameters:

  | bus | QDBusConnection to use.
  | busName | The account well-known bus name (sometimes called a "service name"). This is usually the same as the account manager bus name TELEPATHY_ACCOUNT_MANAGER_BUS_NAME.
  | objectPath | The account object path.

Returns:
  An AccountPtr object pointing to the newly created Account object.

bool Tp::Account::isValidAccount | ( |  | ) | const

Return whether this is a valid account.

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).

This method requires Account::FeatureCore to be enabled.

Returns:
  `true` if the account is valid, `false` otherwise.

See also:
  validityChanged()

bool Tp::Account::isEnabled | ( |  | ) | const

Return whether this account is enabled.

Gives the users the possibility to prevent an account from being used. This flag does not change the validity of the account.

This method requires Account::FeatureCore to be enabled.

Returns:
  `true` if the account is enabled, `false` otherwise.

See also:
  stateChanged()

PendingOperation * Tp::Account::setEnabled | ( | bool | value | ) |

Set whether this account should be enabled or disabled.

Parameters:

  | value | Whether this account should be enabled or disabled.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  stateChanged()

QString Tp::Account::cmName | ( |  | ) | const

Return the connection manager name of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The connection manager name of this account.

QString Tp::Account::protocol | ( |  | ) | const

Return the protocol name of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The protocol name of this account.

QString Tp::Account::displayName | ( |  | ) | const

Return the display name of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The display name of this account.

See also:
  displayNameChanged()

PendingOperation * Tp::Account::setDisplayName | ( | const QString & | value | ) |

Set the display name of this account.

Parameters:

  | value | The display name of this account.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  displayNameChanged()

QString Tp::Account::icon | ( |  | ) | const

Return the icon name of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The icon name of this account.

See also:
  iconChanged()

PendingOperation * Tp::Account::setIcon | ( | const QString & | value | ) |

Set the icon name of this account.

Parameters:

  | value | The icon name of this account.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  iconChanged()

QString Tp::Account::nickname | ( |  | ) | const

Return the nickname of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The nickname of this account.

See also:
  nicknameChanged()

PendingOperation * Tp::Account::setNickname | ( | const QString & | value | ) |

Set the nickname of this account.

Parameters:

  | value | The nickname of this account.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  nicknameChanged()

const Avatar & Tp::Account::avatar | ( |  | ) | const

Return the avatar of this account.

This method requires Account::FeatureAvatar to be enabled.

Returns:
  The avatar of this account.

See also:
  avatarChanged()

PendingOperation * Tp::Account::setAvatar | ( | const Avatar & | avatar | ) |

Set avatar of this account.

Parameters:

  | avatar | The avatar of this account.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  avatarChanged()

QVariantMap Tp::Account::parameters | ( |  | ) | const

Return the parameters of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The parameters of this account.

See also:
  parametersChanged()

PendingStringList * Tp::Account::updateParameters | ( | const QVariantMap & | set,
|  | const QStringList & | unset |
| ) |  |  |

Update this account parameters.

On success, the pending operation returned by this method will produce a list of strings, which are the names of parameters whose changes will not take effect until the account is disconnected and reconnected (for instance by calling reconnect()).

Parameters:

  | set | Parameters to set.
  | unset | Parameters to unset.

Returns:
  A PendingStringList which will emit PendingStringList::finished when the call has finished

See also:
  parametersChanged(), reconnect()

PendingOperation * Tp::Account::reconnect | ( |  | ) |

If this account is currently connected, disconnect and reconnect it. If it is currently trying to connect, cancel the attempt to connect and start another. If it is currently disconnected, do nothing.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

ProtocolInfo * Tp::Account::protocolInfo | ( |  | ) | const

Return the protocol info of this account protocol.

This method requires Account::FeatureProtocolInfo to be enabled.

Returns:
  The protocol info of this account protocol.

bool Tp::Account::connectsAutomatically | ( |  | ) | const

Return whether this account should be put online automatically whenever possible.

This method requires Account::FeatureCore to be enabled.

Returns:
  `true` if it should try to connect automatically, `false` otherwise.

See also:
  connectsAutomaticallyPropertyChanged()

PendingOperation * Tp::Account::setConnectsAutomatically | ( | bool | value | ) |

Set whether this account should be put online automatically whenever possible.

Parameters:

  | value | Value indicating if this account should be put online whenever possible.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  connectsAutomaticallyPropertyChanged()

bool Tp::Account::hasBeenOnline | ( |  | ) | const

Return whether this account has ever been put online successfully.

This property cannot change from true to false, only from false to true. When the account successfully goes online for the first time, or when it is detected that this has already happened, the firstOnline() signal is emitted.

This method requires Account::FeatureCore to be enabled.

Returns:
  Whether the account has ever been online.

ConnectionStatus Tp::Account::connectionStatus | ( |  | ) | const

Return the status of this account connection.

This method requires Account::FeatureCore to be enabled.

Returns:
  The status of this account connection.

See also:
  connectionStatusChanged()

ConnectionStatusReason Tp::Account::connectionStatusReason | ( |  | ) | const

Return the status reason of this account connection.

This method requires Account::FeatureCore to be enabled.

Returns:
  The status reason of this account connection.

See also:
  connectionStatusChanged()

bool Tp::Account::haveConnection | ( |  | ) | const

Return whether this account has a connection object that can be retrieved using connection().

This method requires Account::FeatureCore to be enabled.

Returns:
  `true` if a connection object can be retrieved, `false` otherwise.

See also:
  connection(), haveConnectionChanged()

ConnectionPtr Tp::Account::connection | ( |  | ) | const

Return the ConnectionPtr object of this account.

Note that the returned ConnectionPtr object will not be cached by the Account instance; applications should do it themselves.

Remember to call Connection::becomeReady on the new connection to make sure it is ready before using it.

This method requires Account::FeatureCore to be enabled.

Returns:
  A ConnectionPtr object pointing to the Connection object of this account, or a null ConnectionPtr if this account does not currently have a connection or if an error occurred.

See also:
  haveConnection(), haveConnectionChanged()

SimplePresence Tp::Account::automaticPresence | ( |  | ) | const

Return the presence status that this account will have set on it by the account manager if it brings it online automatically.

This method requires Account::FeatureCore to be enabled.

Returns:
  The presence status that will be set by the account manager if this account is brought online automatically by it.

See also:
  automaticPresenceChanged()

PendingOperation * Tp::Account::setAutomaticPresence | ( | const SimplePresence & | value | ) |

Set the presence status that this account should have if it is brought online automatically by the account manager.

Parameters:

  | value | The presence status to set when this account is brought online automatically by the account manager.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  automaticPresenceChanged(), setRequestedPresence()

SimplePresence Tp::Account::currentPresence | ( |  | ) | const

Return the actual presence of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The actual presence of this account.

See also:
  currentPresenceChanged(), setRequestedPresence(), requestedPresence(), automaticPresence()

SimplePresence Tp::Account::requestedPresence | ( |  | ) | const

Return the requested presence of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The requested presence of this account.

See also:
  requestedPresenceChanged(), setRequestedPresence(), currentPresence(), automaticPresence()

PendingOperation * Tp::Account::setRequestedPresence | ( | const SimplePresence & | value | ) |

Set the requested presence.

When requested presence is changed, the account manager should attempt to manipulate the connection to make currentPresence() match requestedPresence() as closely as possible.

Parameters:

  | value | The requested presence.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  requestedPresenceChanged(), currentPresence(), automaticPresence(), setAutomaticPresence()

QString Tp::Account::uniqueIdentifier | ( |  | ) | const

Return the unique identifier of this account.

This identifier should be unique per AccountManager implementation, i.e. at least per QDBusConnection.

Returns:
  The unique identifier of this account.

QString Tp::Account::connectionObjectPath | ( |  | ) | const

Return the connection object path of this account.

This method requires Account::FeatureCore to be enabled.

Returns:
  The connection object path of this account.

See also:
  haveConnectionChanged(), haveConnection(), connection()

QString Tp::Account::normalizedName | ( |  | ) | const

Return the normalized user ID of the local user of this account.

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.

This method requires Account::FeatureCore to be enabled.

Returns:
  Account normalized user ID of the local user.

See also:
  normalizedNameChanged()

PendingOperation * Tp::Account::remove | ( |  | ) |

Delete this account.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

PendingChannelRequest * Tp::Account::ensureTextChat | ( | const QString & | contactIdentifier,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a text channel with the given contact contactIdentifier exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:

  | contactIdentifier | The identifier of the contact to chat with.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureTextChat | ( | const ContactPtr & | contact,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a text channel with the given contact contact exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:

  | contact | The contact to chat with.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureTextChatroom | ( | const QString & | roomName,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a text chat room with the given room name roomName exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:

  | roomName | The name of the chat room.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureMediaCall | ( | const QString & | contactIdentifier,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a media channel with the given contact contactIdentifier exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:

  | contactIdentifier | The identifier of the contact to call.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureMediaCall | ( | const ContactPtr & | contact,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a media channel with the given contact contact exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:

  | contact | The contact to call.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureAudioCall | ( | const QString & | contactIdentifier,
|  | QDateTime | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that an audio call with the given contact contactIdentifier exists, creating it if necessary.

See ensureChannel() for more details.

This will only work on relatively modern connection managers, like telepathy-gabble 0.9.0 or later.

Parameters:

  | contactIdentifier | The identifier of the contact to call.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureAudioCall | ( | const ContactPtr & | contact,
|  | QDateTime | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that an audio call with the given contact contact exists, creating it if necessary.

See ensureChannel() for more details.

This will only work on relatively modern connection managers, like telepathy-gabble 0.9.0 or later.

Parameters:

  | contact | The contact to call.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureVideoCall | ( | const QString & | contactIdentifier,
|  | bool | withAudio = `true`,
|  | QDateTime | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a video call with the given contact contactIdentifier exists, creating it if necessary.

See ensureChannel() for more details.

This will only work on relatively modern connection managers, like telepathy-gabble 0.9.0 or later.

Parameters:

  | contactIdentifier | The identifier of the contact to call.
  | withAudio | true if both audio and video are required, false for a video-only call.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::ensureVideoCall | ( | const ContactPtr & | contact,
|  | bool | withAudio = `true`,
|  | QDateTime | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a video call with the given contact contact exists, creating it if necessary.

See ensureChannel() for more details.

This will only work on relatively modern connection managers, like telepathy-gabble 0.9.0 or later.

Parameters:

  | contact | The contact to call.
  | withAudio | true if both audio and video are required, false for a video-only call.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createFileTransfer | ( | const QString & | contactIdentifier,
|  | const FileTransferChannelCreationProperties & | properties,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a file transfer channel with the given contact contact.

Parameters:

  | contactIdentifier | The identifier of the contact to send a file.
  | fileName | The suggested filename for the receiver.
  | properties | The desired properties.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createFileTransfer | ( | const ContactPtr & | contact,
|  | const FileTransferChannelCreationProperties & | properties,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a file transfer channel with the given contact contact.

Parameters:

  | contact | The contact to send a file.
  | properties | The desired properties.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createConferenceMediaCall | ( | const QList< ChannelPtr > & | channels,
|  | const QStringList & | initialInviteeContactsIdentifiers = `QStringList()`,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a conference media call with the given channels channels.

Parameters:

  | channels | The conference channels.
  | initialInviteeContactsIdentifiers | A list of additional contacts identifiers to be invited to this conference when it is created.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createConferenceMediaCall | ( | const QList< ChannelPtr > & | channels,
|  | const QList< ContactPtr > & | initialInviteeContacts = `QList<ContactPtr>()`,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a conference media call with the given channels channels.

Parameters:

  | channels | The conference channels.
  | initialInviteeContactsIdentifiers | A list of additional contacts to be invited to this conference when it is created.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createConferenceTextChat | ( | const QList< ChannelPtr > & | channels,
|  | const QList< ContactPtr > & | initialInviteeContacts = `QList<ContactPtr>()`,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a conference text chat with the given channels channels.

Parameters:

  | channels | The conference channels.
  | initialInviteeContactsIdentifiers | A list of additional contacts to be invited to this conference when it is created.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createConferenceTextChat | ( | const QList< ChannelPtr > & | channels,
|  | const QStringList & | initialInviteeContactsIdentifiers = `QStringList()`,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a conference text chat with the given channels channels.

Parameters:

  | channels | The conference channels.
  | initialInviteeContactsIdentifiers | A list of additional contacts identifiers to be invited to this conference when it is created.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createConferenceTextChatRoom | ( | const QString & | roomName,
|  | const QList< ChannelPtr > & | channels,
|  | const QStringList & | initialInviteeContactsIdentifiers = `QStringList()`,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a conference text chat room with the given channels channels and room name roomName.

Parameters:

  | roomName | The room name.
  | channels | The conference channels.
  | initialInviteeContactsIdentifiers | A list of additional contacts identifiers to be invited to this conference when it is created.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createConferenceTextChatRoom | ( | const QString & | roomName,
|  | const QList< ChannelPtr > & | channels,
|  | const QList< ContactPtr > & | initialInviteeContacts = `QList<ContactPtr>()`,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a conference text chat room with the given channels channels and room name roomName.

Parameters:

  | roomName | The room name.
  | channels | The conference channels.
  | initialInviteeContactsIdentifiers | A list of additional contacts to be invited to this conference when it is created.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

Returns:
  A PendingChannelRequest which will emit PendingChannelRequest::finished when the call has finished.

See also:
  ensureChannel(), createChannel()

PendingChannelRequest * Tp::Account::createChannel | ( | const QVariantMap & | request,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to create a channel. This initially just creates a PendingChannelRequest object, which can be used to track the success or failure of the request, or to cancel it.

Helper methods for text chat, text chat room, media call and conference are provided and should be used if appropriate.

Parameters:

  | request | A dictionary containing desirable properties.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

See also:
  createChannel()

PendingChannelRequest * Tp::Account::ensureChannel | ( | const QVariantMap & | request,
|  | const QDateTime & | userActionTime = `QDateTime::currentDateTime()`,
|  | const QString & | preferredHandler = `QString()` |
| ) |  |  |

Start a request to ensure that a channel exists, creating it if necessary. This initially just creates a PendingChannelRequest object, which can be used to track the success or failure of the request, or to cancel it.

Helper methods for text chat, text chat room, media call and conference are provided and should be used if appropriate.

Parameters:

  | request | A dictionary containing desirable properties.
  | userActionTime | The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
  | preferredHandler | Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

See also:
  createChannel()

Client::DBus::PropertiesInterface * Tp::Account::propertiesInterface | ( |  | ) | const`[inline]`

Convenience function for getting a PropertiesInterface interface proxy object for this account. The Account interface relies on properties, so this interface is always assumed to be present.

Returns:
  A pointer to the existing Client::DBus::PropertiesInterface object for this Account object.

Client::AccountInterfaceAvatarInterface * Tp::Account::avatarInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

Convenience function for getting a AvatarInterface interface proxy object for this account.

Returns:
  A pointer to the existing Client::AccountInterfaceAvatarInterface object for this Account object.

void Tp::Account::displayNameChanged | ( | const QString & | displayName | ) | `[signal]`

This signal is emitted when the value of displayName() of this account changes.

Parameters:

  | displayName | The new display name of this account.

See also:
  displayName(), setDisplayName()

void Tp::Account::iconChanged | ( | const QString & | icon | ) | `[signal]`

This signal is emitted when the value of icon() of this account changes.

Parameters:

  | icon | The new icon name of this account.

See also:
  icon(), setIcon()

void Tp::Account::nicknameChanged | ( | const QString & | nickname | ) | `[signal]`

This signal is emitted when the value of nickname() of this account changes.

Parameters:

  | nickname | The new nickname of this account.

See also:
  nickname(), setNickname()

void Tp::Account::normalizedNameChanged | ( | const QString & | normalizedName | ) | `[signal]`

This signal is emitted when the value of normalizedName() of this account changes.

Parameters:

  | normalizedName | The new normalized name of this account.

See also:
  normalizedName()

void Tp::Account::validityChanged | ( | bool | validity | ) | `[signal]`

This signal is emitted when the value of isValidAccount() of this account changes.

Parameters:

  | validity | The new validity of this account.

See also:
  isValidAccount()

void Tp::Account::stateChanged | ( | bool | state | ) | `[signal]`

This signal is emitted when the value of isEnabled() of this account changes.

Parameters:

  | state | The new state of this account.

See also:
  isEnabled()

void Tp::Account::connectsAutomaticallyPropertyChanged | ( | bool | connectsAutomatically | ) | `[signal]`

This signal is emitted when the value of connectsAutomatically() of this account changes.

Parameters:

  | connectsAutomatically | The new value of connects automatically property of this account.

See also:
  isEnabled()

void Tp::Account::firstOnline | ( |  | ) | `[signal]`

This signal is emitted when this account is first put online.

See also:
  hasBeenOnline()

void Tp::Account::parametersChanged | ( | const QVariantMap & | parameters | ) | `[signal]`

This signal is emitted when the value of parameters() of this account changes.

Parameters:

  | parameters | The new parameters of this account.

See also:
  parameters()

void Tp::Account::automaticPresenceChanged | ( | const Tp::SimplePresence & | automaticPresence | ) | const`[signal]`

This signal is emitted when the value of automaticPresence() of this account changes.

Parameters:

  | automaticPresence | The new value of automatic presence property of this account.

See also:
  automaticPresence()

void Tp::Account::currentPresenceChanged | ( | const Tp::SimplePresence & | currentPresence | ) | const`[signal]`

This signal is emitted when the value of currentPresence() of this account changes.

Parameters:

  | currentPresence | The new value of current presence property of this account.

See also:
  currentPresence()

void Tp::Account::requestedPresenceChanged | ( | const Tp::SimplePresence & | requestedPresence | ) | const`[signal]`

This signal is emitted when the value of requestedPresence() of this account changes.

Parameters:

  | requestedPresence | The new value of requested presence property of this account.

See also:
  requestedPresence()

void Tp::Account::avatarChanged | ( | const Tp::Avatar & | avatar | ) | `[signal]`

This signal is emitted when the value of avatar() of this account changes.

Parameters:

  | avatar | The new avatar of this account.

See also:
  avatar()

void Tp::Account::connectionStatusChanged | ( | Tp::ConnectionStatus | status,
|  | Tp::ConnectionStatusReason | statusReason |
| ) |  |  | `[signal]`

This signal is emitted when the value of connectionStatus() of this account changes.

Parameters:

  | status | The new status of this account connection.
  | statusReason | The new status reason of this account connection.

See also:
  connectionStatus(), connectionStatusReason()

void Tp::Account::haveConnectionChanged | ( | bool | haveConnection | ) | `[signal]`

This signal is emitted when the value of haveConnection() of this account changes.

Parameters:

  | haveConnection | Whether this account have a connection.

See also:
  haveConnection(), connection()

Client::AccountInterface * Tp::Account::baseInterface | ( |  | ) | const`[protected]`

Return the Client::AccountInterface interface proxy object for this account. This method is protected since the convenience methods provided by this class should generally be used instead of calling D-Bus methods directly.

Returns:
  A pointer to the existing Client::AccountInterface object for this Account object.

## Member Data Documentation

const Feature Tp::Account::FeatureCore `[static]`

Feature representing the core that needs to become ready to make the Account object usable.

Note that this feature must be enabled in order to use most Account methods. See specific methods documentation for more details.

When calling isReady(), becomeReady(), this feature is implicitly added to the requested features.

const Feature Tp::Account::FeatureAvatar `[static]`

Feature used in order to access account avatar info.

See avatar specific methods' documentation for more details.

const Feature Tp::Account::FeatureProtocolInfo `[static]`

Feature used in order to access account protocol info.

See protocol info specific methods' documentation for more details.