mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #248 replaced CStub with CPlugin
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
* 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/. */
|
||||
|
||||
#define NOMINMAX
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include "stub.h"
|
||||
#include "plugin.h"
|
||||
#include "utils.h"
|
||||
|
||||
QSharedPointer<QApplication> g_qApp;
|
||||
XBus::CStub *g_stub;
|
||||
XBus::CPlugin *g_plugin;
|
||||
|
||||
PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc)
|
||||
{
|
||||
@@ -27,13 +28,13 @@ PLUGIN_API int XPluginEnable()
|
||||
QXPlaneMessageHandler::install();
|
||||
g_qApp = QSharedApplication::sharedInstance();
|
||||
QXPlaneEventLoop::exec();
|
||||
g_stub = new XBus::CStub;
|
||||
g_plugin = new XBus::CPlugin;
|
||||
return 1;
|
||||
}
|
||||
|
||||
PLUGIN_API void XPluginDisable()
|
||||
{
|
||||
delete g_stub;
|
||||
delete g_plugin;
|
||||
g_qApp.reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,25 +3,13 @@
|
||||
* 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 BLACKSIM_XBUS_STUB_H
|
||||
#define BLACKSIM_XBUS_STUB_H
|
||||
|
||||
/*!
|
||||
* \file
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \namespace XBus
|
||||
*/
|
||||
#include "plugin.h"
|
||||
|
||||
namespace XBus
|
||||
{
|
||||
/*!
|
||||
* stub
|
||||
*/
|
||||
class CStub
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
CPlugin::CPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
31
src/xbus/plugin.h
Normal file
31
src/xbus/plugin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* 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 BLACKSIM_XBUS_PLUGIN_H
|
||||
#define BLACKSIM_XBUS_PLUGIN_H
|
||||
|
||||
//! \file
|
||||
|
||||
//! \namespace XBus
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace XBus
|
||||
{
|
||||
/*!
|
||||
* Main plugin class
|
||||
*/
|
||||
class CPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CPlugin();
|
||||
|
||||
private:
|
||||
};
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user