File indexing completed on 2024-12-22 04:55:33

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "kaddressbook_importexport_export.h"
0010 #include <PimCommon/PluginUtil>
0011 #include <QObject>
0012 
0013 namespace KAddressBookImportExport
0014 {
0015 class Plugin;
0016 class PluginManagerPrivate;
0017 
0018 /** Contact import/export plugin manager. */
0019 class KADDRESSBOOK_IMPORTEXPORT_EXPORT PluginManager : public QObject
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit PluginManager(QObject *parent = nullptr);
0024     ~PluginManager() override;
0025 
0026     static PluginManager *self();
0027 
0028     [[nodiscard]] QList<Plugin *> pluginsList() const;
0029 
0030     [[nodiscard]] QList<PimCommon::PluginUtilData> pluginsDataList() const;
0031 
0032     [[nodiscard]] QString configGroupName() const;
0033     [[nodiscard]] QString configPrefixSettingKey() const;
0034     Plugin *pluginFromIdentifier(const QString &id);
0035 
0036 private:
0037     QScopedPointer<PluginManagerPrivate> const d;
0038 };
0039 }