2021-05-03 00:21:36 +08:00
|
|
|
#ifndef SEARCHPLUGINFACTORY_H
|
|
|
|
#define SEARCHPLUGINFACTORY_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2021-05-27 21:10:11 +08:00
|
|
|
#include "search-plugin-iface.h"
|
2021-05-03 00:21:36 +08:00
|
|
|
|
|
|
|
namespace Zeeker {
|
|
|
|
class SearchPluginManager : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
bool registerPlugin(SearchPluginIface *plugin);
|
|
|
|
|
|
|
|
static SearchPluginManager *getInstance();
|
|
|
|
const QStringList getPluginIds();
|
|
|
|
SearchPluginIface *getPlugin(const QString &pluginId);
|
|
|
|
|
|
|
|
void close();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QHash<QString, SearchPluginIface*> m_hash;
|
|
|
|
|
|
|
|
explicit SearchPluginManager(QObject *parent = nullptr);
|
|
|
|
~SearchPluginManager();
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SEARCHPLUGINFACTORY_H
|