File indexing completed on 2024-11-10 04:40:36
0001 /* 0002 SPDX-FileCopyrightText: 2018 Daniel Vrátil <dvratil@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QObject> 0010 0011 #include "akonadicore_export.h" 0012 0013 #include <memory> 0014 0015 namespace Akonadi 0016 { 0017 class AgentConfigurationManagerPrivate; 0018 0019 class AKONADICORE_EXPORT AgentConfigurationManager : public QObject 0020 { 0021 Q_OBJECT 0022 public: 0023 static AgentConfigurationManager *self(); 0024 ~AgentConfigurationManager() override; 0025 0026 bool registerInstanceConfiguration(const QString &instance); 0027 void unregisterInstanceConfiguration(const QString &instance); 0028 0029 [[nodiscard]] bool isInstanceRegistered(const QString &instance) const; 0030 0031 QString findConfigPlugin(const QString &type) const; 0032 0033 private: 0034 AgentConfigurationManager(QObject *parent = nullptr); 0035 0036 friend class AgentConfigurationManagerPrivate; 0037 std::unique_ptr<AgentConfigurationManagerPrivate> const d; 0038 static AgentConfigurationManager *sInstance; 0039 }; 0040 0041 }