#include <TelepathyQt4/Client/AccountManager>
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::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 (Features features=0) const |
PendingReadyAccountManager * | becomeReady (Features features=0) |
Protected Member Functions | |
AccountManagerInterface * | baseInterface () const |
Friends | |
struct | Private |
class | PendingAccount |
Telepathy::Client::AccountManager::AccountManager | ( | QObject * | parent = 0 |
) |
Construct a new AccountManager object.
parent | Object parent. |
References Telepathy::Client::DBusProxy::isValid().
Telepathy::Client::AccountManager::AccountManager | ( | const QDBusConnection & | bus, | |
QObject * | parent = 0 | |||
) |
Construct a new AccountManager object.
bus | QDBusConnection to use. | |
parent | Object parent. |
References Telepathy::Client::DBusProxy::isValid().
Telepathy::Client::AccountManager::~AccountManager | ( | ) | [virtual] |
Class destructor.
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.
Referenced by validAccounts().
QStringList Telepathy::Client::AccountManager::invalidAccountPaths | ( | ) | const |
Return a list of object paths for all invalid accounts.
Referenced by invalidAccounts().
QStringList Telepathy::Client::AccountManager::allAccountPaths | ( | ) | const |
Return a list of object paths for all accounts.
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.
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.
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.
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.
path | The object path to create account for. |
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.
paths | List of object paths to create accounts for. |
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.
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.
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.
features | The features which should be tested |
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.
requestedFeatures | The features which should be enabled |
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.
friend struct Private [friend] |
Reimplemented from Telepathy::Client::StatelessDBusProxy.
friend class PendingAccount [friend] |
Referenced by createAccount().