Sailfish Accounts
API DocumentationAccountManager QML Type
Provides access to providers, services and accounts. More...
Import Statement: | import . |
Properties
- accountIdentifiers : QList<int>
- providerNames : QStringList
- serviceNames : QStringList
- serviceTypeNames : QStringList
Methods
- Account *account(int accountId)
- bool createAccount(const QString &providerName)
- Account *credentialsNeedUpdate(int accountId)
- Provider *provider(const QString &providerName)
- QList<int> providerAccountIdentifiers(const QString &providerName)
- ServiceType *serviceType(const QString &serviceTypeName)
Detailed Description
The AccountManager type is intended for use by privileged applications and account provider plugins. The functionality it provides is not useful for client applications who wish to use an account to access a service (such clients should use the account model instead).
The AccountManager provides information about existing providers, services, and accounts. It also allows new accounts to be created.
Property Documentation
Holds the identifiers of all accounts which exist in the system accounts database.
Holds the names of all providers which exist in the system accounts database, which match the service type filter.
Holds the names of all services which exist in the system accounts database, which match the service type filter.
Holds the service type names which may be used as filter values.
The values are derived from examination of the service type of all services which exist in the system accounts database at the point in time when the AccountManager instance was created.
Method Documentation
Account *account(int accountId) |
Returns the account identified by the given accountIdentifier. The AccountManager has ownership of the Account adapter, and will delete it automatically on destruction.
Returns null if no such account exists.
Creates a new, disabled Account with the provider identified by the given providerName and stores it to the database. The operation is asynchronous and on success, the accountCreated() signal will be emitted. On failure, the accountCreationFailed() signal will be emitted.
Returns true if the account creation process is triggered, or false if the manager is currently busy creating another account.
Account *credentialsNeedUpdate(int accountId) |
Returns true if account's global service has CredentialsNeedUpadate flag and it is set.
Provider *provider(const QString &providerName) |
Returns the provider identified by the given providerName. The AccountManager has ownership of the Provider adapter, and will delete it automatically on destruction.
Returns the list of ids of accounts provided by the provider with the given providerName (or all providers, if the given providerName is empty).
ServiceType *serviceType(const QString &serviceTypeName) |
Returns the service type identified by the given serviceTypeName. The AccountManager owns the returned instance and will delete it on destruction.