accounts-qt  1.16
Accounts-Qt library


The Accounts library provides a storage solution for user accounts. The API provides access to the account storage: retrieval, editing and creation of accounts, as well as enumeration of the currently installed account providers and services. A change notification mechanism is implemented in order to let different processes operate on the same data simultaneously.

Terminology and basic concepts

Common terms such as accounts, provider, services are familiar to most people, but not everyone associates the same meaning to them. Therefore, since these terms are commonly used in this library APIs, please spend some time to get familiar with our naming convention:

  • Account: This is a user account on a server. With the same term we also refer to the local object which represents a remote account. An account has one provider, and zero or more services.
  • Provider: The organization which provides the account.
  • Service: the actual service that the end user accesses by means of the account; on the same account there could be more than one service.
  • Service type: The protocol or application of a service. Every service has a service type, and there might be many services having the same type (possibly even on the same account).

Accounts are stored in the DB provided by this library; providers, services and service types are defined by XML files which should be installed in well-defined filesystem paths (the Accounts-Qt library defaults to /usr/share/accounts/{providers,services,service-types}/) and which the library will allow applications to enumerate and read.

Note that the library doesn't come with any pre-installed provider, service or service type: it's expected that provider and service files will be installed by the applications (or account plugins, if a centralized account-editing application is installed on the system) written by the service providers; service types should be defined by the applications or frameworks which are going to use the account information.

List of classes in Accounts-Qt

Accounts::ManagerMain object in Accounts-Qt: instantiate an Accounts::Manager to list and instantiate accounts, providers, services.
Accounts::AccountInterface to account settings and data.
Accounts::AccountServiceService settings of an account.
Accounts::ProviderRepresentation of an installed account provider.
Accounts::ServiceRepresentation of an installed account service.
Accounts::ServiceTypeRepresentation of an account service type.
Accounts::WatchMonitors an account key or group of keys.
Accounts::ErrorBase object definition for errors emitted by the library.