Monitors an account key or group of keys. More...

#include <Accounts/Account>

Inherits QObject.


void displayNameChanged (const QString &displayName)
void enabledChanged (const QString &serviceName, bool enabled)
void error (Accounts::Error error)
void synced ()
void removed ()

Public Member Functions

uint credentialsId ()
void setCredentialsId (const uint id)
 Sets the accounts credentials ID. More...
QString displayName () const
void setDisplayName (const QString &displayName)
QString providerName () const
Provider provider () const
void selectService (const Service &service=Service())
Service selectedService () const
QStringList allKeys () const
void beginGroup (const QString &prefix)
QStringList childGroups () const
QStringList childKeys () const
void clear ()
bool contains (const QString &key) const
void endGroup ()
QString group () const
bool isWritable () const
void remove (const QString &key)
void setValue (const QString &key, const QVariant &value)
QVariant value (const QString &key, const QVariant &defaultValue=QVariant(), SettingSource *source=0) const
SettingSource value (const QString &key, QVariant &value) const
QString valueAsString (const QString &key, QString default_value=QString::null, SettingSource *source=0) const
int valueAsInt (const QString &key, int default_value=0, SettingSource *source=0) const
quint64 valueAsUInt64 (const QString &key, quint64 default_value=0, SettingSource *source=0) const
bool valueAsBool (const QString &key, bool default_value=false, SettingSource *source=0) const
WatchwatchKey (const QString &key=QString())
void sync ()
bool syncAndBlock ()
void remove ()
void sign (const QString &key, const char *token)
bool verify (const QString &key, const char **token)
bool verifyWithTokens (const QString &key, QList< const char * > tokens)

Detailed Description

Monitors an account key or group of keys.

A watch is created via the Account::watch method and is a simple object which will emit the notify() signal when the value of the key (or group) that it is monitoring is changed.

Definition at line 70 of file account.h.

Member Function Documentation

uint credentialsId ( )

Q_SIGNALS: void notify(const char key); };

class ACCOUNTS_EXPORT Account: public QObject { Q_OBJECT

public: Account(Manager manager, const QString &provider, QObject parent = 0); virtual ~Account();

static Account fromId(Manager manager, AccountId id, QObject parent = 0);

AccountId id() const;

Manager manager() const;

bool supportsService(const QString &serviceType) const;

ServiceList services(const QString &serviceType = QString()) const; ServiceList enabledServices() const;

bool enabled() const; bool isEnabled() const; void setEnabled(bool);

/! Gets the account's credentials ID in Signon database.

The credentials ID is first read from the currently selected service; if it is not found, then it is ready from the global account settings. In any case, the currently selected service is not altered.

void setCredentialsId ( const uint  id)

Sets the accounts credentials ID.

The change will be written only when sync() is called.

This method operates on the currently selected service.

Definition at line 134 of file account.h.