Akonadi

akonadicontrol/accountsintegration.h
1/***************************************************************************
2 * SPDX-FileCopyrightText: 2019 Daniel Vrátil <dvratil@kde.org> *
3 * *
4 * SPDX-License-Identifier: LGPL-2.0-or-later *
5 ***************************************************************************/
6
7#pragma once
8
9#include <QMap>
10#include <QObject>
11
12#include <Accounts/Manager>
13
14#include <optional>
15
16namespace Accounts
17{
18class Account;
19class Service;
20}
21
22class AgentManager;
23
24class AccountsIntegration : public QObject
25{
27public:
28 explicit AccountsIntegration(AgentManager &agentManager);
29
30private Q_SLOTS:
31 void onAccountAdded(Accounts::AccountId);
32 void onAccountRemoved(Accounts::AccountId);
33 void onAccountServiceEnabled(const QString &service, bool enabled);
34
35private:
36 void configureAgentInstance(const QString &identifier, Accounts::AccountId accountId, int attempt = 0);
37 std::optional<QString> agentForAccount(const QString &agentType, Accounts::AccountId accountId) const;
38 void createAgent(const QString &agentType, Accounts::AccountId accountId);
39 void removeAgentInstance(const QString &identifier);
40
41 AgentManager &mAgentManager;
42 Accounts::Manager mAccountsManager;
43
44 QMap<QString, QString /* agent type */> mSupportedServices;
45};
The agent manager has knowledge about all available agents (it scans for .desktop files in the agent ...
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.