From 13f9d8c3432366380da8b3022872e82cf2ae98a6 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Sat, 14 Jun 2014 20:20:14 +0100 Subject: [PATCH] refs #248 replaced CStub with CPlugin --- src/xbus/main.cpp | 9 +++++---- src/xbus/{stub.h => plugin.cpp} | 24 ++++++------------------ src/xbus/plugin.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 22 deletions(-) rename src/xbus/{stub.h => plugin.cpp} (63%) create mode 100644 src/xbus/plugin.h diff --git a/src/xbus/main.cpp b/src/xbus/main.cpp index 257936862..8f9fe8b30 100644 --- a/src/xbus/main.cpp +++ b/src/xbus/main.cpp @@ -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 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(); } diff --git a/src/xbus/stub.h b/src/xbus/plugin.cpp similarity index 63% rename from src/xbus/stub.h rename to src/xbus/plugin.cpp index bc66a75a5..f3c35bc8b 100644 --- a/src/xbus/stub.h +++ b/src/xbus/plugin.cpp @@ -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() + { + } + +} diff --git a/src/xbus/plugin.h b/src/xbus/plugin.h new file mode 100644 index 000000000..85e3703a1 --- /dev/null +++ b/src/xbus/plugin.h @@ -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 + +namespace XBus +{ + /*! + * Main plugin class + */ + class CPlugin : public QObject + { + Q_OBJECT + + public: + CPlugin(); + + private: + }; +} + +#endif // guard