25 #ifndef ACCOUNTS_MANAGER_H 26 #define ACCOUNTS_MANAGER_H 31 #include <QStringList> 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" 49 typedef QList<Application> ApplicationList;
51 class 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;
102 void accountCreated(Accounts::AccountId
id);
103 void accountRemoved(Accounts::AccountId
id);
104 void accountUpdated(Accounts::AccountId
id);
105 void enabledEvent(Accounts::AccountId
id);
111 friend class Private;
114 friend class Account;
121 Q_DECLARE_OPERATORS_FOR_FLAGS(Accounts::Manager::Options)
123 #endif // ACCOUNTS_MANAGER_H Manager of accounts, services and providers.
Account settings for a specific service.
Option
Specifies options for the object.
Representation of an account provider.
Representation of an account service type.
Representation of an account service.
Base object definition for accounts error handling.
Information on the client applications of libaccounts.