#include <TelepathyQt4/Prototype/Account.h>
Signals | |
void | signalPropertiesChanged (const QVariantMap &properties) |
void | signalAboutToRemove () |
void | signalRemoved () |
void | signalPresenceChanged () |
Public Member Functions | |
QVariantMap | parameters () |
QVariantMap | properties () |
void | setProperties (const QVariantMap &properties) |
bool | setParameters (const QVariantMap ¶meters) |
TpPrototype::Connection * | connection (QObject *parent=NULL) |
bool | remove () |
bool | isValid () |
QString | connectionManagerName () |
QString | protocolName () |
QString | currentPresence () |
Protected Slots | |
void | slotPropertiesChanged (const QVariantMap &properties) |
void | slotRemoved () |
Protected Member Functions | |
Account (const QString &handle, QObject *parent) | |
~Account () | |
Telepathy::Client::AccountInterface * | interface () |
QString | handle () const |
Friends | |
class | AccountManager |
class | AccountManagerPrivate |
In order to allow custom extensions, we need a support to register proxies in the AccountManager
Account::Account | ( | const QString & | handle, | |
QObject * | parent | |||
) | [protected] |
Constructor. The account manager cannot be instantiated directly. Use AccountManager::account() for it!
Account::~Account | ( | ) | [protected] |
TpPrototype::Connection * Account::connection | ( | QObject * | parent = NULL |
) |
Connection. Returns a connection object that belongs to this account.
Info: This class keeps ownership of this class.
parent | The parent of this object. If NULL the connection is used as parent. |
Referenced by TpPrototype::ConnectionFacade::connectionWithAccount(), and currentPresence().
QString Account::connectionManagerName | ( | ) |
Get connection manager for this account. Returns the connection manager that belongs to this account
QString Account::currentPresence | ( | ) |
Get the current presence. The presence for the current connection is returned. Needs to be called befor signalPresenceChanged()will be emitted.
References connection(), TpPrototype::PresenceManager::currentPresence(), TpPrototype::Connection::presenceManager(), signalPresenceChanged(), and Telepathy::SimplePresence::status.
QString Account::handle | ( | ) | const [protected] |
Returns the handle. The handle is an internal representation to access the real data. Its format should not be interpreted.
Referenced by TpPrototype::AccountManager::slotAccountRemoved().
Telepathy::Client::AccountInterface * Account::interface | ( | ) | [protected] |
D-BUS interface. This protected access to the D-BUS interface can be used to extend this class with special features.
bool Account::isValid | ( | ) |
Validity check. Do not access any functions if this account is invalid.
QVariantMap Account::parameters | ( | ) |
The parameters of this account. Returns a list of all parameters of this account that were explicitly set by AccountManager::createAccount().
QVariantMap Account::properties | ( | ) |
Properties of this account
QString Account::protocolName | ( | ) |
Get protocol for this account. Returns the protocol that belongs to this account
bool Account::remove | ( | ) |
Remove account. Removes the given account. Note: Although this call is synchronous, the internal book keeping of valid accounts is updated by DBUS signals that might need some time. Thus, calling AccountManager::count() emmediately after removing might return an incorrect value. Wait until AccountManager::signalAccountsUpdated() is emitted.
References signalAboutToRemove(), and signalRemoved().
bool Account::setParameters | ( | const QVariantMap & | parameters | ) |
Set Parameters. Changes the given list of parameters.
parameters | The list of changed or new parameters |
Referenced by TpPrototype::ConnectionFacade::connectionWithAccount(), and TpPrototype::Connection::slotStatusChanged().
void Account::setProperties | ( | const QVariantMap & | properties | ) |
Set Properties. Changes the given list of Properties.
properties | The list of changed or new properties. |
void TpPrototype::Account::signalAboutToRemove | ( | ) | [signal] |
About to remove. This signal is emmitted before the account is removed.
Referenced by remove().
void TpPrototype::Account::signalPresenceChanged | ( | ) | [signal] |
Account presence was changed. Signal is emitted after the account changed its presence state. currentPresence() has to be called before.
Referenced by currentPresence().
void TpPrototype::Account::signalPropertiesChanged | ( | const QVariantMap & | properties | ) | [signal] |
Property were changed. This signal is emitted when properties were changed.
void TpPrototype::Account::signalRemoved | ( | ) | [signal] |
Removed. This signal is emmitted after the account is removed.
Referenced by remove().
void Account::slotPropertiesChanged | ( | const QVariantMap & | properties | ) | [protected, slot] |
void Account::slotRemoved | ( | ) | [protected, slot] |
friend class AccountManager [friend] |
friend class AccountManagerPrivate [friend] |