1  /*
2  * This file is part of Kopete
3  *
4  * Copyright (C) 2009 Collabora Ltd. <info@collabora.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20 
21 #ifndef TELEPATHY_ACCOUNTS_KCM_PLUGIN_MANAGER_H
22 #define TELEPATHY_ACCOUNTS_KCM_PLUGIN_MANAGER_H
23 
24 #include "kcm_telepathy_accounts_export.h"
25 
26 #include <QList>
27 #include <QObject>
28 
29 class AbstractAccountUi;
30 class AbstractAccountUiPlugin;
31 
32 class KCM_TELEPATHY_ACCOUNTS_EXPORT PluginManager : public QObject
33 {
34     Q_OBJECT
35     Q_DISABLE_COPY(PluginManager)
36 
37 public:
38     static PluginManager *instance();
39 
40     ~PluginManager() override;
41 
42     AbstractAccountUi *accountUiForProtocol(const QString &connectionManager, const QString &protocol, const QString &serviceName);
43 
44 private:
45     explicit PluginManager(QObject *parent = nullptr);
46     static PluginManager *s_self;
47 
48     void loadPlugins();
49 
50     QList<AbstractAccountUiPlugin*> m_plugins;
51 };
52 
53 
54 #endif  // Header guard
55 
56