#include <TelepathyQt4/Client/AccountManager>
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::PropertiesInterface * | propertiesInterface () const |
QStringList | validAccountPaths () const |
QStringList | invalidAccountPaths () const |
QStringList | allAccountPaths () const |
QList< QSharedPointer< Account > > | validAccounts () |
QList< QSharedPointer< Account > > | invalidAccounts () |
QList< QSharedPointer< Account > > | allAccounts () |
QSharedPointer< Account > | accountForPath (const QString &path) |
QList< QSharedPointer< Account > > | accountsForPaths (const QStringList &paths) |
PendingAccount * | createAccount (const QString &connectionManager, const QString &protocol, const QString &displayName, const QVariantMap ¶meters) |
bool | isReady (const QSet< uint > &features=QSet< uint >()) const |
PendingReady * | becomeReady (const QSet< uint > &requestedFeatures=QSet< uint >()) |
QSet< uint > | requestedFeatures () const |
QSet< uint > | actualFeatures () const |
QSet< uint > | missingFeatures () const |
Protected Member Functions | |
AccountManagerInterface * | baseInterface () const |
Friends | |
struct | Private |
class | PendingAccount |
Telepathy::Client::AccountManager::AccountManager | ( | QObject * | parent = 0 |
) |
Telepathy::Client::AccountManager::AccountManager | ( | const QDBusConnection & | bus, | |
QObject * | parent = 0 | |||
) |
Construct a new AccountManager object.
bus | QDBusConnection to use. | |
parent | Object parent. |
Telepathy::Client::AccountManager::~AccountManager | ( | ) | [virtual] |
Class destructor.
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.
path | The object path to create account for. |
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.
paths | List of object paths to create accounts for. |
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.
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.
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.
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.
requestedFeatures | The features which should be enabled |
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.
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. |
References PendingAccount.
QStringList Telepathy::Client::AccountManager::interfaces | ( | ) | const |
QStringList Telepathy::Client::AccountManager::invalidAccountPaths | ( | ) | const |
Return a list of object paths for all invalid accounts.
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.
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.
features | The features which should be tested |
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.
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.
References accountsForPaths(), and validAccountPaths().
friend class PendingAccount [friend] |
Referenced by createAccount().
friend struct Private [friend] |
Reimplemented from Telepathy::Client::StatelessDBusProxy.