[xswiftbus] Replace QtDBus with a libevent driven C++ wrapper on top of libdbus

QtDBus was the main component of xswiftbus' Qt dependency. This is the
first preparation step to get xswiftbus Qt free.
The new implementation is based on the low level libdbus library, which
was also in use by QtDBus itself. But instead of QtDBus, we use now a thin
C++ wrapper. To keep DBus handling async, libevent is used to monitor
timeouts and fds.
This commit is contained in:
Roland Winklmeier
2018-03-19 17:08:25 +01:00
parent 849124fe7c
commit d77931e5ec
24 changed files with 2437 additions and 139 deletions

View File

@@ -14,7 +14,6 @@
#include "utils.h"
#include "traffic.h"
#include "service.h"
#include "blackmisc/dbus.h"
#include <XPLM/XPLMPlanes.h>
#if ! defined(XPLM210)
@@ -55,18 +54,11 @@ PLUGIN_API void XPluginStop()
PLUGIN_API int XPluginEnable()
{
qRegisterMetaType<QDoubleList>();
qDBusRegisterMetaType<QDoubleList>();
QXPlaneMessageHandler::install();
g_qApp = QSharedApplication::sharedInstance();
QXPlaneEventLoop::exec();
g_plugin = new XSwiftBus::CPlugin;
// Here we can be safely assume that QtDBus was loaded by the process
preventQtDBusDllUnload();
return 1;
}