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

#include <TelepathyQt4/Client/AccountManager>

Inheritance diagram for Telepathy::Client::AccountManager:

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

Collaboration graph
[legend]

List of all members.

Public Types

enum  Feature { FeatureCore = 0, _Padding = 0xFFFFFFFF }

Signals

void accountCreated (const QString &path)
void accountRemoved (const QString &path)
void accountValidityChanged (const QString &path, bool valid)

Public Member Functions

 AccountManager (QObject *parent=0)
 AccountManager (const QDBusConnection &bus, QObject *parent=0)
virtual ~AccountManager ()
QStringList interfaces () const
DBus::PropertiesInterfacepropertiesInterface () const
QStringList validAccountPaths () const
QStringList invalidAccountPaths () const
QStringList allAccountPaths () const
QList< QSharedPointer< Account > > validAccounts ()
QList< QSharedPointer< Account > > invalidAccounts ()
QList< QSharedPointer< Account > > allAccounts ()
QSharedPointer< AccountaccountForPath (const QString &path)
QList< QSharedPointer< Account > > accountsForPaths (const QStringList &paths)
PendingAccountcreateAccount (const QString &connectionManager, const QString &protocol, const QString &displayName, const QVariantMap &parameters)
bool isReady (const QSet< uint > &features=QSet< uint >()) const
PendingReadybecomeReady (const QSet< uint > &requestedFeatures=QSet< uint >())
QSet< uint > requestedFeatures () const
QSet< uint > actualFeatures () const
QSet< uint > missingFeatures () const

Protected Member Functions

AccountManagerInterfacebaseInterface () const

Friends

struct Private
class PendingAccount


Detailed Description

Object representing a Telepathy account manager.

Member Enumeration Documentation

Enumerator:
FeatureCore 
_Padding 


Constructor & Destructor Documentation

Telepathy::Client::AccountManager::AccountManager ( QObject *  parent = 0  ) 

Construct a new AccountManager object.

Parameters:
parent Object parent.

Telepathy::Client::AccountManager::AccountManager ( const QDBusConnection &  bus,
QObject *  parent = 0 
)

Construct a new AccountManager object.

Parameters:
bus QDBusConnection to use.
parent Object parent.

Telepathy::Client::AccountManager::~AccountManager (  )  [virtual]

Class destructor.


Member Function Documentation

void Telepathy::Client::AccountManager::accountCreated ( const QString &  path  )  [signal]

QSharedPointer< Account > Telepathy::Client::AccountManager::accountForPath ( const QString &  path  ) 

Return an Account object for the given path.

Note that the Account object won't be cached by account manager, and should be done by the application itself.

Remember to call Account::becomeReady on the new account, to make sure it is ready before using it.

Parameters:
path The object path to create account for.
Returns:
A list of Account objects
See also:
validAccounts(), invalidAccounts(), accountsForPaths()

Referenced by accountsForPaths().

void Telepathy::Client::AccountManager::accountRemoved ( const QString &  path  )  [signal]

QList< QSharedPointer< Account > > Telepathy::Client::AccountManager::accountsForPaths ( const QStringList &  paths  ) 

Return a list of Account objects for the given paths.

Note that the Account objects won't be cached by account manager, and should be done by the application itself.

Remember to call Account::becomeReady on the new accounts, to make sure they are ready before using it.

Parameters:
paths List of object paths to create accounts for.
Returns:
A list of Account objects
See also:
validAccounts(), invalidAccounts(), allAccounts()

References accountForPath().

Referenced by allAccounts(), invalidAccounts(), and validAccounts().

void Telepathy::Client::AccountManager::accountValidityChanged ( const QString &  path,
bool  valid 
) [signal]

QSet< uint > Telepathy::Client::AccountManager::actualFeatures (  )  const

QStringList Telepathy::Client::AccountManager::allAccountPaths (  )  const

Return a list of object paths for all accounts.

Returns:
A list of object paths.

Referenced by allAccounts().

QList< QSharedPointer< Account > > Telepathy::Client::AccountManager::allAccounts (  ) 

Return a list of Account objects for all accounts.

Note that the Account objects won't be cached by account manager, and should be done by the application itself.

Remember to call Account::becomeReady on the new accounts, to make sure they are ready before using it.

Returns:
A list of Account objects
See also:
validAccounts(), invalidAccounts(), accountsForPaths()

References accountsForPaths(), and allAccountPaths().

AccountManagerInterface * Telepathy::Client::AccountManager::baseInterface (  )  const [protected]

Get the AccountManagerInterface for this AccountManager. 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 AccountManagerInterface for this AccountManager.

PendingReady * Telepathy::Client::AccountManager::becomeReady ( const QSet< uint > &  requestedFeatures = QSet<uint>()  ) 

Return a pending operation which will succeed when this object finishes its initial setup, or will fail if a fatal error occurs during this initial setup.

If an empty set is used FeatureCore will be considered as the requested feature.

Parameters:
requestedFeatures The features which should be enabled
Returns:
A PendingReady object which will emit finished when this object has finished or failed initial setup for basic functionality plus the given features

PendingAccount * Telepathy::Client::AccountManager::createAccount ( const QString &  connectionManager,
const QString &  protocol,
const QString &  displayName,
const QVariantMap &  parameters 
)

Create an Account with the given parameters.

Return a pending operation representing the Account object which will succeed when the account has been created or fail if an error occurred.

Parameters:
connectionManager Name of the connection manager to create the account for.
protocol Name of the protocol to create the account for.
displayName Account display name.
parameters Account parameters.
Returns:
A PendingOperation which will emit PendingAccount::finished when the account has been created of failed its creation process.

References PendingAccount.

QStringList Telepathy::Client::AccountManager::interfaces (  )  const

QStringList Telepathy::Client::AccountManager::invalidAccountPaths (  )  const

Return a list of object paths for all invalid accounts.

Returns:
A list of object paths.

Referenced by invalidAccounts().

QList< QSharedPointer< Account > > Telepathy::Client::AccountManager::invalidAccounts (  ) 

Return a list of Account objects for all invalid accounts.

Note that the Account objects won't be cached by account manager, and should be done by the application itself.

Remember to call Account::becomeReady on the new accounts, to make sure they are ready before using it.

Returns:
A list of Account objects
See also:
validAccounts(), allAccounts(), accountsForPaths()

References accountsForPaths(), and invalidAccountPaths().

bool Telepathy::Client::AccountManager::isReady ( const QSet< uint > &  features = QSet<uint>()  )  const

Return whether this object has finished its initial setup.

This is mostly useful as a sanity check, in code that shouldn't be run until the object is ready. To wait for the object to be ready, call becomeReady() and connect to the finished signal on the result.

Parameters:
features The features which should be tested
Returns:
true if the object has finished its initial setup for basic functionality plus the given features

QSet< uint > Telepathy::Client::AccountManager::missingFeatures (  )  const

DBus::propertiesInterface * Telepathy::Client::AccountManager::propertiesInterface (  )  const [inline]

Convenience function for getting a Properties interface proxy. The AccountManager interface relies on properties, so this interface is always assumed to be present.

QSet< uint > Telepathy::Client::AccountManager::requestedFeatures (  )  const

QStringList Telepathy::Client::AccountManager::validAccountPaths (  )  const

Return a list of object paths for all valid accounts.

Returns:
A list of object paths.

Referenced by validAccounts().

QList< QSharedPointer< Account > > Telepathy::Client::AccountManager::validAccounts (  ) 

Return a list of Account objects for all valid accounts.

Note that the Account objects won't be cached by account manager, and should be done by the application itself.

Remember to call Account::becomeReady on the new accounts, to make sure they are ready before using it.

Returns:
A list of Account objects
See also:
invalidAccounts(), allAccounts(), accountsForPaths()

References accountsForPaths(), and validAccountPaths().


Friends And Related Function Documentation

friend class PendingAccount [friend]

Referenced by createAccount().

friend struct Private [friend]


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