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.


Detailed Description

Object representing a Telepathy account manager.

Public Types

enum  Feature { _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 (Features features=0) const
PendingReadyAccountManagerbecomeReady (Features features=0)

Protected Member Functions

AccountManagerInterfacebaseInterface () const

Friends

struct Private
class PendingAccount

Member Enumeration Documentation

Enumerator:
_Padding 


Constructor & Destructor Documentation

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

Construct a new AccountManager object.

Parameters:
parent Object parent.

References Telepathy::Client::DBusProxy::isValid().

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

Construct a new AccountManager object.

Parameters:
bus QDBusConnection to use.
parent Object parent.

References Telepathy::Client::DBusProxy::isValid().

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

Class destructor.


Member Function Documentation

QStringList Telepathy::Client::AccountManager::interfaces (  )  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.

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

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

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

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

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

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

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

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.

bool Telepathy::Client::AccountManager::isReady ( Features  features = 0  )  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

Referenced by becomeReady().

PendingReadyAccountManager * Telepathy::Client::AccountManager::becomeReady ( Features  requestedFeatures = 0  ) 

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.

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

References isReady(), Telepathy::Client::DBusProxy::isValid(), Telepathy::Client::PendingOperation::setFinished(), Telepathy::Client::PendingOperation::setFinishedWithError(), TELEPATHY_ERROR_INVALID_ARGUMENT, and TELEPATHY_ERROR_NOT_AVAILABLE.

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

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

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

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.


Friends And Related Function Documentation

friend struct Private [friend]

friend class PendingAccount [friend]

Referenced by createAccount().


Generated on Fri Feb 27 12:10:20 2009 for TelepathyQt4-0.1.0 by  doxygen 1.5.6