TpPrototype::Account Class Reference
[Account Management]

#include <TelepathyQt4/Prototype/Account.h>

Collaboration diagram for TpPrototype::Account:

Collaboration graph
[legend]

List of all members.

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 &parameters)
TpPrototype::Connectionconnection (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::AccountInterfaceinterface ()
QString handle () const

Friends

class AccountManager
class AccountManagerPrivate


Detailed Description

This class manages an account.
Todo:
: Account should be more like QPersistantModelIndex. Thus we don't have to use pointer of it.

In order to allow custom extensions, we need a support to register proxies in the AccountManager


Constructor & Destructor Documentation

Account::Account ( const QString &  handle,
QObject *  parent 
) [protected]

Constructor. The account manager cannot be instantiated directly. Use AccountManager::account() for it!

Account::~Account (  )  [protected]


Member Function Documentation

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.

Parameters:
parent The parent of this object. If NULL the connection is used as parent.
Returns:
Connection object.

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

Returns:
The name of the connection manager (like gabble, ..).

QString Account::currentPresence (  ) 

Get the current presence. The presence for the current connection is returned. Needs to be called befor signalPresenceChanged()will be emitted.

Returns:
The current aggregated presence.

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

Returns:
The properties as key,value pair.

QVariantMap Account::properties (  ) 

Properties of this account

QString Account::protocolName (  ) 

Get protocol for this account. Returns the protocol that belongs to this account

Returns:
The name of the protocol (like jabber, ..)

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.

Returns:
true if remove operation was successful.

References signalAboutToRemove(), and signalRemoved().

bool Account::setParameters ( const QVariantMap &  parameters  ) 

Set Parameters. Changes the given list of parameters.

Parameters:
parameters The list of changed or new parameters
Returns:
True if successful.

Referenced by TpPrototype::ConnectionFacade::connectionWithAccount(), and TpPrototype::Connection::slotStatusChanged().

void Account::setProperties ( const QVariantMap &  properties  ) 

Set Properties. Changes the given list of Properties.

Parameters:
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]


Friends And Related Function Documentation

friend class AccountManager [friend]

friend class AccountManagerPrivate [friend]


Generated on Thu Mar 5 18:52:14 2009 for TelepathyQt4-0.1.1 by  doxygen 1.5.8