/** * SPDX-FileCopyrightText: 2013 Albert Vaca * * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #ifndef PLUGINLOADER_H #define PLUGINLOADER_H #include #include #include #include #include "kdeconnectcore_export.h" class Device; class KdeConnectPlugin; class KPluginFactory; class KDECONNECTCORE_EXPORT PluginLoader { public: static PluginLoader *instance(); QStringList getPluginList() const; QSet getPluginSet() const { #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) return getPluginList().toSet(); #else const QStringList pluginList = getPluginList(); return QSet(pluginList.begin(), pluginList.end()); #endif } KPluginMetaData getPluginInfo(const QString &name) const; KdeConnectPlugin *instantiatePluginForDevice(const QString &name, Device *device) const; QStringList incomingCapabilities() const; QStringList outgoingCapabilities() const; QSet pluginsForCapabilities(const QSet &incoming, const QSet &outgoing); private: PluginLoader(); QHash plugins; #ifdef SAILFISHOS QHash pluginsFactories; #endif }; #endif