mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
/* Copyright (C) 2013 VATSIM Community / authors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef SAMPLE_PLUGIN_H
|
|
#define SAMPLE_PLUGIN_H
|
|
|
|
#include "blackmisc/plugins.h"
|
|
|
|
class CPlugin : public BlackMisc::IPlugin
|
|
{
|
|
public:
|
|
CPlugin(BlackMisc::IPluginFactory &factory, BlackMisc::IContext &context);
|
|
|
|
virtual ~CPlugin();
|
|
|
|
virtual bool isValid() const { return m_ctorOK; }
|
|
|
|
virtual BlackMisc::IPluginFactory &getFactory() { return m_factory; }
|
|
|
|
private:
|
|
bool m_ctorOK;
|
|
BlackMisc::IPluginFactory &m_factory;
|
|
BlackMisc::IContext &m_context;
|
|
};
|
|
|
|
class CPluginFactory : public QObject, public BlackMisc::IPluginFactory
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(BlackMisc::IPluginFactory)
|
|
Q_PLUGIN_METADATA(IID BLACKMISC_IPLUGINFACTORY_IID)
|
|
BLACKMISC_IMPLEMENT_IPLUGINFACTORY(CPlugin, "sample_plugin", "An example minimal plugin")
|
|
};
|
|
|
|
#endif //SAMPLE_PLUGIN_H
|