Sailfish Accounts
API DocumentationAccountManager QML Type
Provides access to providers, services and accounts. More...
| Import Statement: | import Sailfish.Accounts 1.0 |
Properties
- accountIdentifiers : list
- providerNames : list
- serviceNames : list
- serviceTypeNames : list
Signals
- accountCreated(int accountId, string providerName)
- accountCreationFailed(string message, string providerName)
Methods
- Account account(int accountIdentifier)
- bool createAccount(string providerName)
- bool credentialsNeedUpdate(int accountId)
- Provider provider(string providerName)
- list providerAccountIdentifiers(string providerName)
- Service service(string serviceName)
- ServiceType serviceType(string 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.
Signal Documentation
Emitted when account has been created.
The accountId parameter contains the id of the account that was created. The providerName parameter contains the name of the account provider.
Emitted if account creation fails.
The message parameter contains an error message which can be displayed to user. The providerName parameter contains the name of the account provider.
Method Documentation
Account account(int accountIdentifier) |
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.
Returns true if the global service of the account identified by accountId has CredentialsNeedUpdate flag and it is set.
Provider provider(string 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).
Service service(string serviceName) |
Returns the service identified by the given serviceName. The AccountManager has ownership of the Service adapter, and will delete it automatically on destruction.
ServiceType serviceType(string serviceTypeName) |
Returns the service type identified by the given serviceTypeName. The AccountManager owns the returned instance and will delete it on destruction.