25#ifndef ACCOUNTS_MANAGER_H
26#define ACCOUNTS_MANAGER_H
33#include "Accounts/accountscommon.h"
34#include "Accounts/account.h"
35#include "Accounts/error.h"
36#include "Accounts/provider.h"
37#include "Accounts/service.h"
38#include "Accounts/service-type.h"
49typedef QList<Application> ApplicationList;
51class ACCOUNTS_EXPORT
Manager:
public QObject
61 DisableNotifications = 0x1,
63 Q_DECLARE_FLAGS(Options, Option)
65 Manager(QObject *parent =
nullptr);
66 Manager(
const QString &serviceType, QObject *parent =
nullptr);
67 Manager(Options options, QObject *parent =
nullptr);
70 Account *account(
const AccountId &
id)
const;
72 AccountIdList accountList(
const QString &serviceType = QString())
const;
73 AccountIdList accountListEnabled(
const QString &serviceType = QString())
const;
75 Account *createAccount(
const QString &providerName);
77 Service service(
const QString &serviceName)
const;
78 ServiceList serviceList(
const QString &serviceType = QString())
const;
79 ServiceList serviceList(
const Application &application)
const;
81 Provider provider(
const QString &providerName)
const;
82 ProviderList providerList()
const;
86 Application application(
const QString &applicationName)
const;
87 ApplicationList applicationList(
const Service &service)
const;
89 QString serviceType()
const;
91 void setTimeout(quint32 timeout);
94 void setAbortOnTimeout(
bool abort);
95 bool abortOnTimeout()
const;
97 Options options()
const;
99 Error lastError()
const;
111 friend class Private;
114 friend class Account;
121Q_DECLARE_OPERATORS_FOR_FLAGS(Accounts::Manager::Options)
Account settings for a specific service.
Information on the client applications of libaccounts.
Base object definition for accounts error handling.
Manager of accounts, services and providers.
Option
Specifies options for the object.
void enabledEvent(Accounts::AccountId id)
If the manager has been created with serviceType, this signal will be emitted when an account (identi...
void accountRemoved(Accounts::AccountId id)
The signal is emitted when existing account is removed.
void accountUpdated(Accounts::AccountId id)
The signal is emitted when any account property for a particular service is updated.
void accountCreated(Accounts::AccountId id)
The signal is emitted when new account is created.
Representation of an account provider.
Representation of an account service type.
Representation of an account service.