155 return QStringList ();
183 return QStringList ();
208 virtual QStringList
Uses ()
const
210 return QStringList ();
230 const QString& feature)
272Q_DECLARE_INTERFACE (
IInfo,
"org.Deviant.LeechCraft.IInfo/1.0")
274#define CURRENT_API_LEVEL 21
276#define LC_EXPORT_PLUGIN(file,klass) \
277 ICoreProxy_ptr klass::S_Proxy_; \
278 QObject* klass::S_Plugin_; \
279 const ICoreProxy_ptr& GetProxyHolder () { return klass::S_Proxy_; } \
280 QObject* GetPluginInstance () { return klass::S_Plugin_; } \
284 Q_DECL_EXPORT quint64 GetAPILevels () { return CURRENT_API_LEVEL; } \
292#define LC_PUSH_OVERRIDE_WARNING \
293 _Pragma("clang diagnostic push") \
294 _Pragma("clang diagnostic ignored \"-Winconsistent-missing-override\"")
295#define LC_POP_OVERRIDE_WARNING \
296 _Pragma("clang diagnostic pop")
298#define LC_PUSH_OVERRIDE_WARNING
299#define LC_POP_OVERRIDE_WARNING
302#define DEFINE_PROXY \
303 static ICoreProxy_ptr S_Proxy_; \
304 static QObject *S_Plugin_; \
305 LC_PUSH_OVERRIDE_WARNING \
306 void SetProxy (ICoreProxy_ptr proxy) { S_Proxy_ = std::move (proxy); } \
307 const ICoreProxy_ptr& GetProxy () { return S_Proxy_; } \
308 void SetPluginInstance (QObject *instance) { S_Plugin_ = instance; } \
309 LC_POP_OVERRIDE_WARNING \
310 friend const ICoreProxy_ptr& ::GetProxyHolder (); \
311 friend QObject* ::GetPluginInstance ();
313#define LC_PLUGIN_METADATA(id) \
314 Q_PLUGIN_METADATA (IID id) \
Proxy class for the communication with LeechCraft.
Required interface for every plugin.
virtual void SetProxy(ICoreProxy_ptr)=0
virtual QString GetInfo() const =0
Returns the information string about the plugin.
virtual void SetProvider(QObject *object, const QString &feature)
Sets the provider plugin for a given feature.
virtual void SetPluginInstance(QObject *)=0
virtual ~IInfo()
Virtual destructor.
virtual QIcon GetIcon() const =0
Returns the plugin icon.
virtual QByteArray GetUniqueID() const =0
Returns the unique ID of the plugin.
virtual void Init(ICoreProxy_ptr proxy)=0
Initializes the plugin.
virtual QStringList Needs() const
Returns the list of needed features.
virtual const ICoreProxy_ptr & GetProxy()=0
virtual QString GetName() const =0
Returns the name of the plugin.
virtual void Release()=0
Destroys the plugin.
virtual void SecondInit()=0
Performs second stage of initialization.
virtual QStringList Provides() const
Returns the list of provided features.
virtual QStringList Uses() const
Returns the list of used features.
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
QObject * GetPluginInstance()
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
const ICoreProxy_ptr & GetProxyHolder()