Rename xbus to xswiftbus

Summary:
I wanted to rename xbus because its relation to //swift// is not immediately clear from the name.

xswiftbus seems reasonable.

Reviewers: #swift_pilot_client, kbasan

Reviewed By: kbasan

Subscribers: kbasan, jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D14
This commit is contained in:
Mathew Sutcliffe
2017-05-05 23:07:11 +01:00
parent 83adc66ec7
commit 4a4dea8d4d
53 changed files with 442 additions and 442 deletions

View File

@@ -38,7 +38,7 @@ namespace BlackGui
{
QWindow *simulatorWindow = nullptr;
// FIXME:
// Use datarefs Sim/operation/windows/system window via xbus to grab the OS's native window handle
// Use datarefs Sim/operation/windows/system window via xswiftbus to grab the OS's native window handle
// http://www.xsquawkbox.net/xpsdk/mediawiki/sim%252Foperation%252Fwindows%252Fsystem_window
// For the time being, use IWindowFinder.
// The if condition is to prevent a crash on Linux/OSX.

View File

@@ -100,7 +100,7 @@ namespace BlackMisc
Simulation::registerMetadata();
Weather::registerMetadata();
// needed by XBus proxy class
// needed by XSwiftBus proxy class
qRegisterMetaType<CSequence<double>>();
qRegisterMetaType<CSequence<double>>("CDoubleSequence");
qDBusRegisterMetaType<CSequence<double>>();

View File

@@ -138,7 +138,7 @@ namespace BlackMisc
CAircraftModelList CAircraftModelLoaderXPlane::performParsing(const QString &rootDirectory, const QStringList &excludeDirectories)
{
CAircraftModelList allModels;
allModels.push_back(parseCslPackages(CXPlaneUtil::xbusLegacyDir(rootDirectory), excludeDirectories));
allModels.push_back(parseCslPackages(CXPlaneUtil::xswiftbusLegacyDir(rootDirectory), excludeDirectories));
allModels.push_back(parseCslPackages(rootDirectory, excludeDirectories));
allModels.push_back(parseFlyableAirplanes(rootDirectory, excludeDirectories));
return allModels;

View File

@@ -119,25 +119,25 @@ namespace BlackMisc
return QStringList();
}
QString CXPlaneUtil::xbusLegacyDir(const QString &rootDir)
QString CXPlaneUtil::xswiftbusLegacyDir(const QString &rootDir)
{
static const QString legacyPath("/Resources/plugins/xbus/LegacyData");
static const QString legacyPath("/Resources/plugins/xswiftbus/LegacyData");
// Return the first non empty path, we can find.
if (!rootDir.isEmpty())
{
const QString xbusLegacy = CFileUtils::appendFilePaths(rootDir, legacyPath);
if (QDir(xbusLegacy).exists())
const QString xswiftbusLegacy = CFileUtils::appendFilePaths(rootDir, legacyPath);
if (QDir(xswiftbusLegacy).exists())
{
return xbusLegacy;
return xswiftbusLegacy;
}
}
for (auto func : {&CXPlaneUtil::xplane11Dir, &CXPlaneUtil::xplane10Dir, &CXPlaneUtil::xplane9Dir})
{
const QString xbusLegacy = CFileUtils::appendFilePaths(func(), legacyPath);
if (QDir(xbusLegacy).exists())
const QString xswiftbusLegacy = CFileUtils::appendFilePaths(func(), legacyPath);
if (QDir(xswiftbusLegacy).exists())
{
return xbusLegacy;
return xswiftbusLegacy;
}
}
return {};

View File

@@ -48,8 +48,8 @@ namespace BlackMisc
//! Exclude directories for models
static QStringList xplaneModelExcludeDirectoryPatterns();
//! XBus legacy directory
static QString xbusLegacyDir(const QString &rootDir);
//! XSwiftBus legacy directory
static QString xswiftbusLegacyDir(const QString &rootDir);
private:
//! Concatenates dirs for used OS

View File

@@ -48,9 +48,9 @@
#include "blackmisc/weather/windlayer.h"
#include "blackmisc/weather/windlayerlist.h"
#include "qcompilerdetection.h"
#include "xbusserviceproxy.h"
#include "xbustrafficproxy.h"
#include "xbusweatherproxy.h"
#include "xswiftbusserviceproxy.h"
#include "xswiftbustrafficproxy.h"
#include "xswiftbusweatherproxy.h"
#include <QColor>
#include <QDBusServiceWatcher>
@@ -69,9 +69,9 @@ using namespace BlackMisc::Weather;
namespace
{
inline QString xbusServiceName()
inline QString xswiftbusServiceName()
{
return QStringLiteral("org.swift-project.xbus");
return QStringLiteral("org.swift-project.xswiftbus");
}
}
@@ -89,7 +89,7 @@ namespace BlackSimPlugin
{
m_watcher = new QDBusServiceWatcher(this);
m_watcher->setWatchMode(QDBusServiceWatcher::WatchForUnregistration);
m_watcher->addWatchedService(xbusServiceName());
m_watcher->addWatchedService(xswiftbusServiceName());
m_watcher->setObjectName("QDBusServiceWatcher");
connect(m_watcher, &QDBusServiceWatcher::serviceUnregistered, this, &CSimulatorXPlane::ps_serviceUnregistered);
@@ -243,16 +243,16 @@ namespace BlackSimPlugin
{
if (isConnected()) { return true; }
m_conn = QDBusConnection::sessionBus(); // TODO make this configurable
m_service = new CXBusServiceProxy(m_conn, this);
m_traffic = new CXBusTrafficProxy(m_conn, this);
m_weather = new CXBusWeatherProxy(m_conn, this);
m_service = new CXSwiftBusServiceProxy(m_conn, this);
m_traffic = new CXSwiftBusTrafficProxy(m_conn, this);
m_weather = new CXSwiftBusWeatherProxy(m_conn, this);
if (m_service->isValid() && m_traffic->isValid() && m_weather->isValid() && m_traffic->initialize())
{
// FIXME duplication
connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::ps_emitOwnAircraftModelChanged);
connect(m_service, &CXBusServiceProxy::airportsInRangeUpdated, this, &CSimulatorXPlane::ps_setAirportsInRange);
connect(m_traffic, &CXBusTrafficProxy::installedModelsUpdated, this, &CSimulatorXPlane::ps_installedModelsUpdated);
connect(m_service, &CXSwiftBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::ps_emitOwnAircraftModelChanged);
connect(m_service, &CXSwiftBusServiceProxy::airportsInRangeUpdated, this, &CSimulatorXPlane::ps_setAirportsInRange);
connect(m_traffic, &CXSwiftBusTrafficProxy::installedModelsUpdated, this, &CSimulatorXPlane::ps_installedModelsUpdated);
m_service->updateAirportsInRange();
m_traffic->updateInstalledModels();
m_watcher->setConnection(m_conn);
@@ -722,15 +722,15 @@ namespace BlackSimPlugin
void CSimulatorXPlaneListener::startImpl()
{
if (m_watcher) { return; } // already started
if (isXBusRunning())
if (isXSwiftBusRunning())
{
emit simulatorStarted(getPluginInfo());
}
else
{
CLogMessage(this).debug() << "Starting XBus on" << m_xbusServerSetting.getThreadLocal();
m_conn = CSimulatorXPlane::connectionFromString(m_xbusServerSetting.getThreadLocal());
m_watcher = new QDBusServiceWatcher(xbusServiceName(), m_conn, QDBusServiceWatcher::WatchForRegistration, this);
CLogMessage(this).debug() << "Starting XSwiftBus on" << m_xswiftbusServerSetting.getThreadLocal();
m_conn = CSimulatorXPlane::connectionFromString(m_xswiftbusServerSetting.getThreadLocal());
m_watcher = new QDBusServiceWatcher(xswiftbusServiceName(), m_conn, QDBusServiceWatcher::WatchForRegistration, this);
connect(m_watcher, &QDBusServiceWatcher::serviceRegistered, this, &CSimulatorXPlaneListener::ps_serviceRegistered);
}
}
@@ -744,11 +744,11 @@ namespace BlackSimPlugin
}
}
bool CSimulatorXPlaneListener::isXBusRunning() const
bool CSimulatorXPlaneListener::isXSwiftBusRunning() const
{
QDBusConnection conn = CSimulatorXPlane::connectionFromString(m_xbusServerSetting.getThreadLocal());
CXBusServiceProxy *service = new CXBusServiceProxy(conn);
CXBusTrafficProxy *traffic = new CXBusTrafficProxy(conn);
QDBusConnection conn = CSimulatorXPlane::connectionFromString(m_xswiftbusServerSetting.getThreadLocal());
CXSwiftBusServiceProxy *service = new CXSwiftBusServiceProxy(conn);
CXSwiftBusTrafficProxy *traffic = new CXSwiftBusTrafficProxy(conn);
bool result = service->isValid() && traffic->isValid();
@@ -760,13 +760,13 @@ namespace BlackSimPlugin
void CSimulatorXPlaneListener::ps_serviceRegistered(const QString &serviceName)
{
if (serviceName == xbusServiceName())
if (serviceName == xswiftbusServiceName())
{
emit simulatorStarted(getPluginInfo());
}
}
void CSimulatorXPlaneListener::ps_xbusServerSettingChanged()
void CSimulatorXPlaneListener::ps_xswiftbusServerSettingChanged()
{
// user changed settings, restart the listener
if (m_watcher)

View File

@@ -62,9 +62,9 @@ namespace BlackSimPlugin
{
namespace XPlane
{
class CXBusServiceProxy;
class CXBusTrafficProxy;
class CXBusWeatherProxy;
class CXSwiftBusServiceProxy;
class CXSwiftBusTrafficProxy;
class CXSwiftBusWeatherProxy;
//! X-Plane ISimulator implementation
class CSimulatorXPlane : public BlackCore::CSimulatorCommon
@@ -146,9 +146,9 @@ namespace BlackSimPlugin
QDBusConnection m_conn { "default" };
QDBusServiceWatcher *m_watcher { nullptr };
CXBusServiceProxy *m_service { nullptr };
CXBusTrafficProxy *m_traffic { nullptr };
CXBusWeatherProxy *m_weather { nullptr };
CXSwiftBusServiceProxy *m_service { nullptr };
CXSwiftBusTrafficProxy *m_traffic { nullptr };
CXSwiftBusWeatherProxy *m_weather { nullptr };
QTimer *m_fastTimer { nullptr };
QTimer *m_slowTimer { nullptr };
BlackMisc::Aviation::CAirportList m_airportsInRange; //!< aiports in range of own aircraft
@@ -195,7 +195,7 @@ namespace BlackSimPlugin
}
};
//! Listener waits for xbus service to show up
//! Listener waits for xswiftbus service to show up
class CSimulatorXPlaneListener : public BlackCore::ISimulatorListener
{
Q_OBJECT
@@ -212,17 +212,17 @@ namespace BlackSimPlugin
virtual void stopImpl() override;
private:
//! \brief Check if XBus service is already registered
bool isXBusRunning() const;
//! \brief Check if XSwiftBus service is already registered
bool isXSwiftBusRunning() const;
private slots:
void ps_serviceRegistered(const QString &serviceName);
void ps_xbusServerSettingChanged();
void ps_xswiftbusServerSettingChanged();
private:
QDBusConnection m_conn { "default" };
QDBusServiceWatcher *m_watcher { nullptr };
BlackMisc::CSetting<TXBusServer> m_xbusServerSetting { this, &CSimulatorXPlaneListener::ps_xbusServerSettingChanged };
BlackMisc::CSetting<TXSwiftBusServer> m_xswiftbusServerSetting { this, &CSimulatorXPlaneListener::ps_xswiftbusServerSettingChanged };
};
//! Factory for creating CSimulatorXPlane instance

View File

@@ -2,6 +2,6 @@
"identifier" : "org.swift-project.plugins.simulator.xplane",
"name" : "X-Plane",
"simulator" : "xplane",
"description" : "Support for the X-Plane simulator via the xbus plugin.",
"description" : "Support for the X-Plane simulator via the xswiftbus plugin.",
"config" : "org.swift-project.plugins.simulator.xplane.config"
}

View File

@@ -7,423 +7,423 @@
* contained in the LICENSE file.
*/
#include "xbusserviceproxy.h"
#include "xswiftbusserviceproxy.h"
#include <QLatin1String>
class QDBusConnection;
#define XBUS_SERVICE_SERVICENAME "org.swift-project.xbus"
#define XSWIFTBUS_SERVICE_SERVICENAME "org.swift-project.xswiftbus"
namespace BlackSimPlugin
{
namespace XPlane
{
CXBusServiceProxy::CXBusServiceProxy(QDBusConnection &connection, QObject *parent, bool dummy) : QObject(parent)
CXSwiftBusServiceProxy::CXSwiftBusServiceProxy(QDBusConnection &connection, QObject *parent, bool dummy) : QObject(parent)
{
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XBUS_SERVICE_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XSWIFTBUS_SERVICE_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
if (! dummy) { m_dbusInterface->relayParentSignals(); }
}
void CXBusServiceProxy::addTextMessage(const QString &text, double red, double green, double blue)
void CXSwiftBusServiceProxy::addTextMessage(const QString &text, double red, double green, double blue)
{
m_dbusInterface->callDBus(QLatin1String("addTextMessage"), text, red, green, blue);
}
void CXBusServiceProxy::updateAirportsInRange()
void CXSwiftBusServiceProxy::updateAirportsInRange()
{
m_dbusInterface->callDBus(QLatin1String("updateAirportsInRange"));
}
QString CXBusServiceProxy::getAircraftModelPath() const
QString CXSwiftBusServiceProxy::getAircraftModelPath() const
{
return m_dbusInterface->callDBusRet<QString>(QLatin1String("getAircraftModelPath"));
}
void CXBusServiceProxy::getAircraftModelPathAsync(QString *o_modelPath)
void CXSwiftBusServiceProxy::getAircraftModelPathAsync(QString *o_modelPath)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAircraftModelPath"), setterCallback(o_modelPath));
}
QString CXBusServiceProxy::getAircraftModelFilename() const
QString CXSwiftBusServiceProxy::getAircraftModelFilename() const
{
return m_dbusInterface->callDBusRet<QString>(QLatin1String("getAircraftModelFilename"));
}
void CXBusServiceProxy::getAircraftModelFilenameAsync(QString *o_modelFilename)
void CXSwiftBusServiceProxy::getAircraftModelFilenameAsync(QString *o_modelFilename)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAircraftModelFilename"), setterCallback(o_modelFilename));
}
QString CXBusServiceProxy::getAircraftLivery() const
QString CXSwiftBusServiceProxy::getAircraftLivery() const
{
return m_dbusInterface->callDBusRet<QString>(QLatin1String("getAircraftLivery"));
}
void CXBusServiceProxy::getAircraftLiveryAsync(QString *o_modelLivery)
void CXSwiftBusServiceProxy::getAircraftLiveryAsync(QString *o_modelLivery)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAircraftLivery"), setterCallback(o_modelLivery));
}
QString CXBusServiceProxy::getAircraftIcaoCode() const
QString CXSwiftBusServiceProxy::getAircraftIcaoCode() const
{
return m_dbusInterface->callDBusRet<QString>(QLatin1String("getAircraftIcaoCode"));
}
void CXBusServiceProxy::getAircraftIcaoCodeAsync(QString *o_icaoCode)
void CXSwiftBusServiceProxy::getAircraftIcaoCodeAsync(QString *o_icaoCode)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAircraftIcaoCode"), setterCallback(o_icaoCode));
}
int CXBusServiceProxy::getXPlaneVersionMajor() const
int CXSwiftBusServiceProxy::getXPlaneVersionMajor() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getXPlaneVersionMajor"));
}
void CXBusServiceProxy::getXPlaneVersionMajorAsync(int *o_versionMajor)
void CXSwiftBusServiceProxy::getXPlaneVersionMajorAsync(int *o_versionMajor)
{
m_dbusInterface->callDBusAsync(QLatin1String("getXPlaneVersionMajor"), setterCallback(o_versionMajor));
}
int CXBusServiceProxy::getXPlaneVersionMinor() const
int CXSwiftBusServiceProxy::getXPlaneVersionMinor() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getXPlaneVersionMinor"));
}
void CXBusServiceProxy::getXPlaneVersionMinorAsync(int *o_versionMinor)
void CXSwiftBusServiceProxy::getXPlaneVersionMinorAsync(int *o_versionMinor)
{
m_dbusInterface->callDBusAsync(QLatin1String("getXPlaneVersionMinor"), setterCallback(o_versionMinor));
}
QString CXBusServiceProxy::getXPlaneInstallationPath() const
QString CXSwiftBusServiceProxy::getXPlaneInstallationPath() const
{
return m_dbusInterface->callDBusRet<QString>(QLatin1String("getXPlaneInstallationPath"));
}
void CXBusServiceProxy::getXPlaneInstallationPathAsync(QString *o_installPath)
void CXSwiftBusServiceProxy::getXPlaneInstallationPathAsync(QString *o_installPath)
{
m_dbusInterface->callDBusAsync(QLatin1String("getXPlaneInstallationPath"), setterCallback(o_installPath));
}
QString CXBusServiceProxy::getXPlanePreferencesPath() const
QString CXSwiftBusServiceProxy::getXPlanePreferencesPath() const
{
return m_dbusInterface->callDBusRet<QString>(QLatin1String("getXPlanePreferencesPath"));
}
void CXBusServiceProxy::getXPlanePreferencesPathAsync(QString *o_prefsPath)
void CXSwiftBusServiceProxy::getXPlanePreferencesPathAsync(QString *o_prefsPath)
{
m_dbusInterface->callDBusAsync(QLatin1String("getXPlanePreferencesPath"), setterCallback(o_prefsPath));
}
bool CXBusServiceProxy::isPaused() const
bool CXSwiftBusServiceProxy::isPaused() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("isPaused"));
}
void CXBusServiceProxy::isPausedAsync(bool *o_paused)
void CXSwiftBusServiceProxy::isPausedAsync(bool *o_paused)
{
m_dbusInterface->callDBusAsync(QLatin1String("isPaused"), setterCallback(o_paused));
}
bool CXBusServiceProxy::isUsingRealTime() const
bool CXSwiftBusServiceProxy::isUsingRealTime() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("isUsingRealTime"));
}
void CXBusServiceProxy::isUsingRealTimeAsync(bool *o_isRealTime)
void CXSwiftBusServiceProxy::isUsingRealTimeAsync(bool *o_isRealTime)
{
m_dbusInterface->callDBusAsync(QLatin1String("isUsingRealTime"), setterCallback(o_isRealTime));
}
double CXBusServiceProxy::getLatitude() const
double CXSwiftBusServiceProxy::getLatitude() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getLatitude"));
}
void CXBusServiceProxy::getLatitudeAsync(double *o_latitude)
void CXSwiftBusServiceProxy::getLatitudeAsync(double *o_latitude)
{
m_dbusInterface->callDBusAsync(QLatin1String("getLatitude"), setterCallback(o_latitude));
}
double CXBusServiceProxy::getLongitude() const
double CXSwiftBusServiceProxy::getLongitude() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getLongitude"));
}
void CXBusServiceProxy::getLongitudeAsync(double *o_longitude)
void CXSwiftBusServiceProxy::getLongitudeAsync(double *o_longitude)
{
m_dbusInterface->callDBusAsync(QLatin1String("getLongitude"), setterCallback(o_longitude));
}
double CXBusServiceProxy::getAltitudeMSL() const
double CXSwiftBusServiceProxy::getAltitudeMSL() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getAltitudeMSL"));
}
void CXBusServiceProxy::getAltitudeMSLAsync(double *o_altitude)
void CXSwiftBusServiceProxy::getAltitudeMSLAsync(double *o_altitude)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAltitudeMSL"), setterCallback(o_altitude));
}
double CXBusServiceProxy::getHeightAGL() const
double CXSwiftBusServiceProxy::getHeightAGL() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getHeightAGL"));
}
void CXBusServiceProxy::getHeightAGLAsync(double *o_height)
void CXSwiftBusServiceProxy::getHeightAGLAsync(double *o_height)
{
m_dbusInterface->callDBusAsync(QLatin1String("getHeightAGL"), setterCallback(o_height));
}
double CXBusServiceProxy::getGroundSpeed() const
double CXSwiftBusServiceProxy::getGroundSpeed() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getGroundSpeed"));
}
void CXBusServiceProxy::getGroundSpeedAsync(double *o_groundspeed)
void CXSwiftBusServiceProxy::getGroundSpeedAsync(double *o_groundspeed)
{
m_dbusInterface->callDBusAsync(QLatin1String("getGroundSpeed"), setterCallback(o_groundspeed));
}
double CXBusServiceProxy::getIndicatedAirspeed() const
double CXSwiftBusServiceProxy::getIndicatedAirspeed() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getIndicatedAirspeed"));
}
void CXBusServiceProxy::getIndicatedAirspeedAsync(double *o_ias)
void CXSwiftBusServiceProxy::getIndicatedAirspeedAsync(double *o_ias)
{
m_dbusInterface->callDBusAsync(QLatin1String("getIndicatedAirspeed"), setterCallback(o_ias));
}
double CXBusServiceProxy::getTrueAirspeed() const
double CXSwiftBusServiceProxy::getTrueAirspeed() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getTrueAirspeed"));
}
void CXBusServiceProxy::getTrueAirspeedAsync(double *o_tas)
void CXSwiftBusServiceProxy::getTrueAirspeedAsync(double *o_tas)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTrueAirspeed"), setterCallback(o_tas));
}
double CXBusServiceProxy::getPitch() const
double CXSwiftBusServiceProxy::getPitch() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getPitch"));
}
void CXBusServiceProxy::getPitchAsync(double *o_pitch)
void CXSwiftBusServiceProxy::getPitchAsync(double *o_pitch)
{
m_dbusInterface->callDBusAsync(QLatin1String("getPitch"), setterCallback(o_pitch));
}
double CXBusServiceProxy::getRoll() const
double CXSwiftBusServiceProxy::getRoll() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getRoll"));
}
void CXBusServiceProxy::getRollAsync(double *o_roll)
void CXSwiftBusServiceProxy::getRollAsync(double *o_roll)
{
m_dbusInterface->callDBusAsync(QLatin1String("getRoll"), setterCallback(o_roll));
}
double CXBusServiceProxy::getTrueHeading() const
double CXSwiftBusServiceProxy::getTrueHeading() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getTrueHeading"));
}
void CXBusServiceProxy::getTrueHeadingAsync(double *o_heading)
void CXSwiftBusServiceProxy::getTrueHeadingAsync(double *o_heading)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTrueHeading"), setterCallback(o_heading));
}
bool CXBusServiceProxy::getAnyWheelOnGround() const
bool CXSwiftBusServiceProxy::getAnyWheelOnGround() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getAnyWheelOnGround"));
}
void CXBusServiceProxy::getAnyWheelOnGroundAsync(bool *o_anyWheel)
void CXSwiftBusServiceProxy::getAnyWheelOnGroundAsync(bool *o_anyWheel)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAnyWheelOnGround"), setterCallback(o_anyWheel));
}
bool CXBusServiceProxy::getAllWheelsOnGround() const
bool CXSwiftBusServiceProxy::getAllWheelsOnGround() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getAllWheelsOnGround"));
}
void CXBusServiceProxy::getAllWheelsOnGroundAsync(bool *o_allWheels)
void CXSwiftBusServiceProxy::getAllWheelsOnGroundAsync(bool *o_allWheels)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAllWheelsOnGround"), setterCallback(o_allWheels));
}
int CXBusServiceProxy::getCom1Active() const
int CXSwiftBusServiceProxy::getCom1Active() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom1Active"));
}
void CXBusServiceProxy::getCom1ActiveAsync(int *o_com1Active)
void CXSwiftBusServiceProxy::getCom1ActiveAsync(int *o_com1Active)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom1Active"), setterCallback(o_com1Active));
}
int CXBusServiceProxy::getCom1Standby() const
int CXSwiftBusServiceProxy::getCom1Standby() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom1Standby"));
}
void CXBusServiceProxy::getCom1StandbyAsync(int *o_com1Standby)
void CXSwiftBusServiceProxy::getCom1StandbyAsync(int *o_com1Standby)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom1Standby"), setterCallback(o_com1Standby));
}
int CXBusServiceProxy::getCom2Active() const
int CXSwiftBusServiceProxy::getCom2Active() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom2Active"));
}
void CXBusServiceProxy::getCom2ActiveAsync(int *o_com2Active)
void CXSwiftBusServiceProxy::getCom2ActiveAsync(int *o_com2Active)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom2Active"), setterCallback(o_com2Active));
}
int CXBusServiceProxy::getCom2Standby() const
int CXSwiftBusServiceProxy::getCom2Standby() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom2Standby"));
}
void CXBusServiceProxy::getCom2StandbyAsync(int *o_com2Standby)
void CXSwiftBusServiceProxy::getCom2StandbyAsync(int *o_com2Standby)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom2Standby"), setterCallback(o_com2Standby));
}
int CXBusServiceProxy::getTransponderCode() const
int CXSwiftBusServiceProxy::getTransponderCode() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getTransponderCode"));
}
void CXBusServiceProxy::getTransponderCodeAsync(int *o_xpdrCode)
void CXSwiftBusServiceProxy::getTransponderCodeAsync(int *o_xpdrCode)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTransponderCode"), setterCallback(o_xpdrCode));
}
int CXBusServiceProxy::getTransponderMode() const
int CXSwiftBusServiceProxy::getTransponderMode() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getTransponderMode"));
}
void CXBusServiceProxy::getTransponderModeAsync(int *o_xpdrMode)
void CXSwiftBusServiceProxy::getTransponderModeAsync(int *o_xpdrMode)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTransponderMode"), setterCallback(o_xpdrMode));
}
bool CXBusServiceProxy::getTransponderIdent() const
bool CXSwiftBusServiceProxy::getTransponderIdent() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getTransponderIdent"));
}
void CXBusServiceProxy::getTransponderIdentAsync(bool *o_ident)
void CXSwiftBusServiceProxy::getTransponderIdentAsync(bool *o_ident)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTransponderIdent"), setterCallback(o_ident));
}
bool CXBusServiceProxy::getBeaconLightsOn() const
bool CXSwiftBusServiceProxy::getBeaconLightsOn() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getBeaconLightsOn"));
}
void CXBusServiceProxy::getBeaconLightsOnAsync(bool *o_beaconLightsOn)
void CXSwiftBusServiceProxy::getBeaconLightsOnAsync(bool *o_beaconLightsOn)
{
m_dbusInterface->callDBusAsync(QLatin1String("getBeaconLightsOn"), setterCallback(o_beaconLightsOn));
}
bool CXBusServiceProxy::getLandingLightsOn() const
bool CXSwiftBusServiceProxy::getLandingLightsOn() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getLandingLightsOn"));
}
void CXBusServiceProxy::getLandingLightsOnAsync(bool *o_landingLightsOn)
void CXSwiftBusServiceProxy::getLandingLightsOnAsync(bool *o_landingLightsOn)
{
m_dbusInterface->callDBusAsync(QLatin1String("getLandingLightsOn"), setterCallback(o_landingLightsOn));
}
bool CXBusServiceProxy::getNavLightsOn() const
bool CXSwiftBusServiceProxy::getNavLightsOn() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getNavLightsOn"));
}
void CXBusServiceProxy::getNavLightsOnAsync(bool *o_navLightsOn)
void CXSwiftBusServiceProxy::getNavLightsOnAsync(bool *o_navLightsOn)
{
m_dbusInterface->callDBusAsync(QLatin1String("getNavLightsOn"), setterCallback(o_navLightsOn));
}
bool CXBusServiceProxy::getStrobeLightsOn() const
bool CXSwiftBusServiceProxy::getStrobeLightsOn() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getStrobeLightsOn"));
}
void CXBusServiceProxy::getStrobeLightsOnAsync(bool *o_strobeLightsOn)
void CXSwiftBusServiceProxy::getStrobeLightsOnAsync(bool *o_strobeLightsOn)
{
m_dbusInterface->callDBusAsync(QLatin1String("getStrobeLightsOn"), setterCallback(o_strobeLightsOn));
}
bool CXBusServiceProxy::getTaxiLightsOn() const
bool CXSwiftBusServiceProxy::getTaxiLightsOn() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("getTaxiLightsOn"));
}
void CXBusServiceProxy::getTaxiLightsOnAsync(bool *o_taxiLightsOn)
void CXSwiftBusServiceProxy::getTaxiLightsOnAsync(bool *o_taxiLightsOn)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTaxiLightsOn"), setterCallback(o_taxiLightsOn));
}
void CXBusServiceProxy::setCom1Active(int freq)
void CXSwiftBusServiceProxy::setCom1Active(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom1Active"), freq);
}
void CXBusServiceProxy::setCom1Standby(int freq)
void CXSwiftBusServiceProxy::setCom1Standby(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom1Standby"), freq);
}
void CXBusServiceProxy::setCom2Active(int freq)
void CXSwiftBusServiceProxy::setCom2Active(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom2Active"), freq);
}
void CXBusServiceProxy::setCom2Standby(int freq)
void CXSwiftBusServiceProxy::setCom2Standby(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom2Standby"), freq);
}
void CXBusServiceProxy::setTransponderCode(int code)
void CXSwiftBusServiceProxy::setTransponderCode(int code)
{
m_dbusInterface->callDBus(QLatin1String("setTransponderCode"), code);
}
void CXBusServiceProxy::setTransponderMode(int mode)
void CXSwiftBusServiceProxy::setTransponderMode(int mode)
{
m_dbusInterface->callDBus(QLatin1String("setTransponderMode"), mode);
}
double CXBusServiceProxy::getFlapsDeployRatio() const
double CXSwiftBusServiceProxy::getFlapsDeployRatio() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getFlapsDeployRatio"));
}
void CXBusServiceProxy::getFlapsDeployRatioAsync(double *o_flapsDeployRatio)
void CXSwiftBusServiceProxy::getFlapsDeployRatioAsync(double *o_flapsDeployRatio)
{
m_dbusInterface->callDBusAsync(QLatin1String("getFlapsDeployRatio"), setterCallback(o_flapsDeployRatio));
}
double CXBusServiceProxy::getGearDeployRatio() const
double CXSwiftBusServiceProxy::getGearDeployRatio() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getGearDeployRatio"));
}
void CXBusServiceProxy::getGearDeployRatioAsync(double *o_gearDeployRatio)
void CXSwiftBusServiceProxy::getGearDeployRatioAsync(double *o_gearDeployRatio)
{
m_dbusInterface->callDBusAsync(QLatin1String("getGearDeployRatio"), setterCallback(o_gearDeployRatio));
}
int CXBusServiceProxy::getNumberOfEngines() const
int CXSwiftBusServiceProxy::getNumberOfEngines() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getNumberOfEngines"));
}
void CXBusServiceProxy::getNumberOfEnginesAsync(double *o_numberOfEngines)
void CXSwiftBusServiceProxy::getNumberOfEnginesAsync(double *o_numberOfEngines)
{
m_dbusInterface->callDBusAsync(QLatin1String("getNumberOfEngines"), setterCallback(o_numberOfEngines));
}
QList<double> CXBusServiceProxy::getEngineN1Percentage() const
QList<double> CXSwiftBusServiceProxy::getEngineN1Percentage() const
{
return m_dbusInterface->callDBusRet<QList<double>>(QLatin1String("getEngineN1Percentage"));
}
void CXBusServiceProxy::getEngineN1PercentageAsync(QList<double> *o_engineN1Percentage)
void CXSwiftBusServiceProxy::getEngineN1PercentageAsync(QList<double> *o_engineN1Percentage)
{
m_dbusInterface->callDBusAsync(QLatin1String("getEngineN1Percentage"), setterCallback(o_engineN1Percentage));
}
double CXBusServiceProxy::getSpeedBrakeRatio() const
double CXSwiftBusServiceProxy::getSpeedBrakeRatio() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getSpeedBrakeRatio"));
}
void CXBusServiceProxy::getSpeedBrakeRatioAsync(double *o_speedBrakeRatio)
void CXSwiftBusServiceProxy::getSpeedBrakeRatioAsync(double *o_speedBrakeRatio)
{
m_dbusInterface->callDBusAsync(QLatin1String("getSpeedBrakeRatio"), setterCallback(o_speedBrakeRatio));
}

View File

@@ -9,8 +9,8 @@
//! \file
#ifndef BLACKSIMPLUGIN_XBUS_SERVICE_PROXY_H
#define BLACKSIMPLUGIN_XBUS_SERVICE_PROXY_H
#ifndef BLACKSIMPLUGIN_XSWIFTBUS_SERVICE_PROXY_H
#define BLACKSIMPLUGIN_XSWIFTBUS_SERVICE_PROXY_H
@@ -28,8 +28,8 @@ class QDBusConnection;
class QDBusPendingCallWatcher;
//! \cond PRIVATE
#define XBUS_SERVICE_INTERFACENAME "org.swift_project.xbus.service"
#define XBUS_SERVICE_OBJECTPATH "/xbus/service"
#define XSWIFTBUS_SERVICE_INTERFACENAME "org.swift_project.xswiftbus.service"
#define XSWIFTBUS_SERVICE_OBJECTPATH "/xswiftbus/service"
//! \endcond
namespace BlackSimPlugin
@@ -38,9 +38,9 @@ namespace BlackSimPlugin
{
/*!
* Proxy object connected to a real XBus::CService object via DBus
* Proxy object connected to a real XSwiftBus::CService object via DBus
*/
class CXBusServiceProxy : public QObject
class CXSwiftBusServiceProxy : public QObject
{
Q_OBJECT
@@ -48,19 +48,19 @@ namespace BlackSimPlugin
//! Service name
static const QString &InterfaceName()
{
static QString s(XBUS_SERVICE_INTERFACENAME);
static QString s(XSWIFTBUS_SERVICE_INTERFACENAME);
return s;
}
//! Service path
static const QString &ObjectPath()
{
static QString s(XBUS_SERVICE_OBJECTPATH);
static QString s(XSWIFTBUS_SERVICE_OBJECTPATH);
return s;
}
//! Constructor
CXBusServiceProxy(QDBusConnection &connection, QObject *parent = nullptr, bool dummy = false);
CXSwiftBusServiceProxy(QDBusConnection &connection, QObject *parent = nullptr, bool dummy = false);
//! Does the remote object exist?
bool isValid() const { return m_dbusInterface->isValid(); }
@@ -88,134 +88,134 @@ namespace BlackSimPlugin
//! Emitted if an asynchronous method call caused a DBus error
void asyncMethodError(QDBusError error);
//! \copydoc XBus::CService::aircraftModelChanged
//! \copydoc XSwiftBus::CService::aircraftModelChanged
void aircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao);
//! \copydoc XBus::CService::airportsInRangeUpdated
//! \copydoc XSwiftBus::CService::airportsInRangeUpdated
void airportsInRangeUpdated(const QStringList &icaoCodes, const QStringList &names, const QList<double> &lats, const QList<double> &lons, const QList<double> &alts);
public slots:
//! \copydoc XBus::CService::addTextMessage
//! \copydoc XSwiftBus::CService::addTextMessage
void addTextMessage(const QString &text, double red, double green, double blue);
//! \copydoc XBus::CService::updateAirportsInRange
//! \copydoc XSwiftBus::CService::updateAirportsInRange
void updateAirportsInRange();
//! \copydoc XBus::CService::getAircraftModelPath
//! \copydoc XSwiftBus::CService::getAircraftModelPath
//! @{
QString getAircraftModelPath() const;
void getAircraftModelPathAsync(QString *o_modelPath);
//! @}
//! \copydoc XBus::CService::getAircraftModelFilename
//! \copydoc XSwiftBus::CService::getAircraftModelFilename
//! @{
QString getAircraftModelFilename() const;
void getAircraftModelFilenameAsync(QString *o_modelFilename);
//! @}
//! \copydoc XBus::CService::getAircraftLivery
//! \copydoc XSwiftBus::CService::getAircraftLivery
//! @{
QString getAircraftLivery() const;
void getAircraftLiveryAsync(QString *o_modelLivery);
//! @}
//! \copydoc XBus::CService::getAircraftIcaoCode
//! \copydoc XSwiftBus::CService::getAircraftIcaoCode
//! @{
QString getAircraftIcaoCode() const;
void getAircraftIcaoCodeAsync(QString *o_icaoCode);
//! @}
//! \copydoc XBus::CService::getXPlaneVersionMajor
//! \copydoc XSwiftBus::CService::getXPlaneVersionMajor
//! @{
int getXPlaneVersionMajor() const;
void getXPlaneVersionMajorAsync(int *o_versionMajor);
//! @}
//! \copydoc XBus::CService::getXPlaneVersionMinor
//! \copydoc XSwiftBus::CService::getXPlaneVersionMinor
//! @{
int getXPlaneVersionMinor() const;
void getXPlaneVersionMinorAsync(int *o_versionMinor);
//! @}
//! \copydoc XBus::CService::getXPlaneInstallationPath
//! \copydoc XSwiftBus::CService::getXPlaneInstallationPath
//! @{
QString getXPlaneInstallationPath() const;
void getXPlaneInstallationPathAsync(QString *o_installPath);
//! @}
//! \copydoc XBus::CService::getXPlanePreferencesPath
//! \copydoc XSwiftBus::CService::getXPlanePreferencesPath
//! @{
QString getXPlanePreferencesPath() const;
void getXPlanePreferencesPathAsync(QString *o_prefsPath);
//! @}
//! \copydoc XBus::CService::isPaused
//! \copydoc XSwiftBus::CService::isPaused
//! @{
bool isPaused() const;
void isPausedAsync(bool *o_paused);
//! @}
//! \copydoc XBus::CService::isUsingRealTime
//! \copydoc XSwiftBus::CService::isUsingRealTime
//! @{
bool isUsingRealTime() const;
void isUsingRealTimeAsync(bool *o_isRealTime);
//! @}
//! \copydoc XBus::CService::getLatitude
//! \copydoc XSwiftBus::CService::getLatitude
//! @{
double getLatitude() const;
void getLatitudeAsync(double *o_latitude);
//! @}
//! \copydoc XBus::CService::getLongitude
//! \copydoc XSwiftBus::CService::getLongitude
//! @{
double getLongitude() const;
void getLongitudeAsync(double *o_longitude);
//! @}
//! \copydoc XBus::CService::getAltitudeMSL
//! \copydoc XSwiftBus::CService::getAltitudeMSL
//! @{
double getAltitudeMSL() const;
void getAltitudeMSLAsync(double *o_altitude);
//! @}
//! \copydoc XBus::CService::getHeightAGL
//! \copydoc XSwiftBus::CService::getHeightAGL
//! @{
double getHeightAGL() const;
void getHeightAGLAsync(double *o_height);
//! @}
//! \copydoc XBus::CService::getGroundSpeed
//! \copydoc XSwiftBus::CService::getGroundSpeed
//! @{
double getGroundSpeed() const;
void getGroundSpeedAsync(double *o_groundspeed);
//! @}
//! \copydoc XBus::CService::getIndicatedAirspeed
//! \copydoc XSwiftBus::CService::getIndicatedAirspeed
//! @{
double getIndicatedAirspeed() const;
void getIndicatedAirspeedAsync(double *o_ias);
//! @}
//! \copydoc XBus::CService::getTrueAirspeed
//! \copydoc XSwiftBus::CService::getTrueAirspeed
//! @{
double getTrueAirspeed() const;
void getTrueAirspeedAsync(double *o_tas);
//! @}
//! \copydoc XBus::CService::getPitch
//! \copydoc XSwiftBus::CService::getPitch
//! @{
double getPitch() const;
void getPitchAsync(double *o_pitch);
//! @}
//! \copydoc XBus::CService::getRoll
//! \copydoc XSwiftBus::CService::getRoll
//! @{
double getRoll() const;
void getRollAsync(double *o_roll);
//! @}
//! \copydoc XBus::CService::getTrueHeading
//! \copydoc XSwiftBus::CService::getTrueHeading
//! @{
double getTrueHeading() const;
void getTrueHeadingAsync(double *o_heading);
@@ -233,124 +233,124 @@ namespace BlackSimPlugin
void getAllWheelsOnGroundAsync(bool *o_allWheels);
//! @}
//! \copydoc XBus::CService::getCom1Active
//! \copydoc XSwiftBus::CService::getCom1Active
//! @{
int getCom1Active() const;
void getCom1ActiveAsync(int *o_com1Active);
//! @}
//! \copydoc XBus::CService::getCom1Standby
//! \copydoc XSwiftBus::CService::getCom1Standby
//! @{
int getCom1Standby() const;
void getCom1StandbyAsync(int *o_com1Standby);
//! @}
//! \copydoc XBus::CService::getCom2Active
//! \copydoc XSwiftBus::CService::getCom2Active
//! @{
int getCom2Active() const;
void getCom2ActiveAsync(int *o_com2Active);
//! @}
//! \copydoc XBus::CService::getCom2Standby
//! \copydoc XSwiftBus::CService::getCom2Standby
//! @{
int getCom2Standby() const;
void getCom2StandbyAsync(int *o_com2Standby);
//! @}
//! \copydoc XBus::CService::getTransponderCode
//! \copydoc XSwiftBus::CService::getTransponderCode
//! @{
int getTransponderCode() const;
void getTransponderCodeAsync(int *o_xpdrCode);
//! @}
//! \copydoc XBus::CService::getTransponderMode
//! \copydoc XSwiftBus::CService::getTransponderMode
//! @{
int getTransponderMode() const;
void getTransponderModeAsync(int *o_xpdrMode);
//! @}
//! \copydoc XBus::CService::getTransponderIdent
//! \copydoc XSwiftBus::CService::getTransponderIdent
//! @{
bool getTransponderIdent() const;
void getTransponderIdentAsync(bool *o_ident);
//! @}
//! \copydoc XBus::CService::getLandingLightsOn
//! \copydoc XSwiftBus::CService::getLandingLightsOn
//! @{
bool getBeaconLightsOn() const;
void getBeaconLightsOnAsync(bool *o_beaconLightsOn);
//! @}
//! \copydoc XBus::CService::getLandingLightsOn
//! \copydoc XSwiftBus::CService::getLandingLightsOn
//! @{
bool getLandingLightsOn() const;
void getLandingLightsOnAsync(bool *o_landingLightsOn);
//! @}
//! \copydoc XBus::CService::getNavLightsOn
//! \copydoc XSwiftBus::CService::getNavLightsOn
//! @{
bool getNavLightsOn() const;
void getNavLightsOnAsync(bool *o_navLightsOn);
//! @}
//! \copydoc XBus::CService::getStrobeLightsOn
//! \copydoc XSwiftBus::CService::getStrobeLightsOn
//! @{
bool getStrobeLightsOn() const;
void getStrobeLightsOnAsync(bool *o_strobeLightsOn);
//! @}
//! \copydoc XBus::CService::getTaxiLightsOn
//! \copydoc XSwiftBus::CService::getTaxiLightsOn
//! @{
bool getTaxiLightsOn() const;
void getTaxiLightsOnAsync(bool *o_taxiLightsOn);
//! @}
//! \copydoc XBus::CService::setCom1Active
//! \copydoc XSwiftBus::CService::setCom1Active
void setCom1Active(int freq);
//! \copydoc XBus::CService::setCom1Standby
//! \copydoc XSwiftBus::CService::setCom1Standby
void setCom1Standby(int freq);
//! \copydoc XBus::CService::setCom2Active
//! \copydoc XSwiftBus::CService::setCom2Active
void setCom2Active(int freq);
//! \copydoc XBus::CService::setCom2Standby
//! \copydoc XSwiftBus::CService::setCom2Standby
void setCom2Standby(int freq);
//! \copydoc XBus::CService::setTransponderCode
//! \copydoc XSwiftBus::CService::setTransponderCode
void setTransponderCode(int code);
//! \copydoc XBus::CService::setTransponderMode
//! \copydoc XSwiftBus::CService::setTransponderMode
void setTransponderMode(int mode);
//! \copydoc XBus::CService::getFlapsDeployRatio
//! \copydoc XSwiftBus::CService::getFlapsDeployRatio
//! @{
double getFlapsDeployRatio() const;
void getFlapsDeployRatioAsync(double *o_flapsDeployRatio);
//! @}
//! \copydoc XBus::CService::getGearDeployRatio
//! \copydoc XSwiftBus::CService::getGearDeployRatio
//! @{
double getGearDeployRatio() const;
void getGearDeployRatioAsync(double *o_gearDeployRatio);
//! @}
//! \copydoc XBus::CService::getNumberOfEngines
//! \copydoc XSwiftBus::CService::getNumberOfEngines
//! @{
int getNumberOfEngines() const;
void getNumberOfEnginesAsync(double *o_numberOfEngines);
//! @}
//! \copydoc XBus::CService::getEngineN1Percentage
//! \copydoc XSwiftBus::CService::getEngineN1Percentage
//! @{
QList<double> getEngineN1Percentage() const;
void getEngineN1PercentageAsync(QList<double> *o_engineN1Percentage);
//! @}
//! \copydoc XBus::CService::getSpeedBrakeRatio
//! \copydoc XSwiftBus::CService::getSpeedBrakeRatio
//! @{
double getSpeedBrakeRatio() const;
void getSpeedBrakeRatioAsync(double *o_speedBrakeRatio);

View File

@@ -7,103 +7,103 @@
* contained in the LICENSE file.
*/
#include "xbustrafficproxy.h"
#include "xswiftbustrafficproxy.h"
#include <QLatin1String>
class QDBusConnection;
#define XBUS_SERVICENAME "org.swift-project.xbus"
#define XSWIFTBUS_SERVICENAME "org.swift-project.xswiftbus"
namespace BlackSimPlugin
{
namespace XPlane
{
CXBusTrafficProxy::CXBusTrafficProxy(QDBusConnection &connection, QObject *parent, bool dummy) : QObject(parent)
CXSwiftBusTrafficProxy::CXSwiftBusTrafficProxy(QDBusConnection &connection, QObject *parent, bool dummy) : QObject(parent)
{
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XBUS_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XSWIFTBUS_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
if (! dummy) { m_dbusInterface->relayParentSignals(); }
}
bool CXBusTrafficProxy::initialize()
bool CXSwiftBusTrafficProxy::initialize()
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("initialize"));
}
void CXBusTrafficProxy::cleanup()
void CXSwiftBusTrafficProxy::cleanup()
{
m_dbusInterface->callDBus(QLatin1String("cleanup"));
}
bool CXBusTrafficProxy::loadPlanesPackage(const QString &path)
bool CXSwiftBusTrafficProxy::loadPlanesPackage(const QString &path)
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("loadPlanesPackage"), path);
}
void CXBusTrafficProxy::setDefaultIcao(const QString &defaultIcao)
void CXSwiftBusTrafficProxy::setDefaultIcao(const QString &defaultIcao)
{
m_dbusInterface->callDBus(QLatin1String("setDefaultIcao"), defaultIcao);
}
void CXBusTrafficProxy::setDrawingLabels(bool drawing)
void CXSwiftBusTrafficProxy::setDrawingLabels(bool drawing)
{
m_dbusInterface->callDBus(QLatin1String("setDrawingLabels"), drawing);
}
bool CXBusTrafficProxy::isDrawingLabels() const
bool CXSwiftBusTrafficProxy::isDrawingLabels() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("isDrawingLabels"));
}
void CXBusTrafficProxy::updateInstalledModels() const
void CXSwiftBusTrafficProxy::updateInstalledModels() const
{
m_dbusInterface->callDBus(QLatin1String("updateInstalledModels"));
}
void CXBusTrafficProxy::setMaxPlanes(int planes)
void CXSwiftBusTrafficProxy::setMaxPlanes(int planes)
{
m_dbusInterface->callDBus(QLatin1String("setMaxPlanes"), planes);
}
void CXBusTrafficProxy::setMaxDrawDistance(float nauticalMiles)
void CXSwiftBusTrafficProxy::setMaxDrawDistance(float nauticalMiles)
{
m_dbusInterface->callDBus(QLatin1String("setMaxDrawDistance"), nauticalMiles);
}
void CXBusTrafficProxy::addPlane(const QString &callsign, const QString &modelName, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery)
void CXSwiftBusTrafficProxy::addPlane(const QString &callsign, const QString &modelName, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery)
{
m_dbusInterface->callDBus(QLatin1String("addPlane"), callsign, modelName, aircraftIcao, airlineIcao, livery);
}
void CXBusTrafficProxy::removePlane(const QString &callsign)
void CXSwiftBusTrafficProxy::removePlane(const QString &callsign)
{
m_dbusInterface->callDBus(QLatin1String("removePlane"), callsign);
}
void CXBusTrafficProxy::removeAllPlanes()
void CXSwiftBusTrafficProxy::removeAllPlanes()
{
m_dbusInterface->callDBus(QLatin1String("removeAllPlanes"));
}
void CXBusTrafficProxy::addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime)
void CXSwiftBusTrafficProxy::addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime)
{
m_dbusInterface->callDBus(QLatin1String("addPlanePosition"), callsign, latitude, longitude, altitude, pitch, roll, heading, relativeTime);
}
void CXBusTrafficProxy::addPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
void CXSwiftBusTrafficProxy::addPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime)
{
m_dbusInterface->callDBus(QLatin1String("addPlaneSurfaces"), callsign, gear, flap, spoiler, speedBrake, slat, wingSweep, thrust, elevator, rudder, aileron,
landLight, beaconLight, strobeLight, navLight, lightPattern, onGround, relativeTime);
}
void CXBusTrafficProxy::setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident)
void CXSwiftBusTrafficProxy::setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident)
{
m_dbusInterface->callDBus(QLatin1String("setPlaneTransponder"), callsign, code, modeC, ident);
}
void CXBusTrafficProxy::setInterpolatorMode(const QString &callsign, bool spline)
void CXSwiftBusTrafficProxy::setInterpolatorMode(const QString &callsign, bool spline)
{
m_dbusInterface->callDBus(QLatin1String("setInterpolatorMode"), callsign, spline);
}

View File

@@ -9,8 +9,8 @@
//! \file
#ifndef BLACKSIMPLUGIN_XBUS_TRAFFIC_PROXY_H
#define BLACKSIMPLUGIN_XBUS_TRAFFIC_PROXY_H
#ifndef BLACKSIMPLUGIN_XSWIFTBUS_TRAFFIC_PROXY_H
#define BLACKSIMPLUGIN_XSWIFTBUS_TRAFFIC_PROXY_H
#include "blackmisc/genericdbusinterface.h"
@@ -21,8 +21,8 @@
class QDBusConnection;
//! \cond PRIVATE
#define XBUS_TRAFFIC_INTERFACENAME "org.swift_project.xbus.traffic"
#define XBUS_TRAFFIC_OBJECTPATH "/xbus/traffic"
#define XSWIFTBUS_TRAFFIC_INTERFACENAME "org.swift_project.xswiftbus.traffic"
#define XSWIFTBUS_TRAFFIC_OBJECTPATH "/xswiftbus/traffic"
//! \endcond
namespace BlackSimPlugin
@@ -31,9 +31,9 @@ namespace BlackSimPlugin
{
/*!
* Proxy object connected to a real XBus::CTraffic object via DBus
* Proxy object connected to a real XSwiftBus::CTraffic object via DBus
*/
class CXBusTrafficProxy : public QObject
class CXSwiftBusTrafficProxy : public QObject
{
Q_OBJECT
@@ -41,19 +41,19 @@ namespace BlackSimPlugin
//! Service name
static const QString &InterfaceName()
{
static QString s(XBUS_TRAFFIC_INTERFACENAME);
static QString s(XSWIFTBUS_TRAFFIC_INTERFACENAME);
return s;
}
//! Service path
static const QString &ObjectPath()
{
static QString s(XBUS_TRAFFIC_OBJECTPATH);
static QString s(XSWIFTBUS_TRAFFIC_OBJECTPATH);
return s;
}
//! Constructor
CXBusTrafficProxy(QDBusConnection &connection, QObject *parent = nullptr, bool dummy = false);
CXSwiftBusTrafficProxy(QDBusConnection &connection, QObject *parent = nullptr, bool dummy = false);
//! Does the remote object exist?
bool isValid() const { return m_dbusInterface->isValid(); }
@@ -62,57 +62,57 @@ namespace BlackSimPlugin
BlackMisc::CGenericDBusInterface *m_dbusInterface = nullptr;
signals:
//! \copydoc XBus::CTraffic::installedModelsUpdated
//! \copydoc XSwiftBus::CTraffic::installedModelsUpdated
void installedModelsUpdated(const QStringList &modelStrings, const QStringList &icaos, const QStringList &airlines, const QStringList &liveries);
public slots:
//! \copydoc XBus::CTraffic::initialize
//! \copydoc XSwiftBus::CTraffic::initialize
bool initialize();
//! \copydoc XBus::CTraffic::cleanup
//! \copydoc XSwiftBus::CTraffic::cleanup
void cleanup();
//! \copydoc XBus::CTraffic::loadPlanesPackage
//! \copydoc XSwiftBus::CTraffic::loadPlanesPackage
bool loadPlanesPackage(const QString &path);
//! \copydoc XBus::CTraffic::setDefaultIcao
//! \copydoc XSwiftBus::CTraffic::setDefaultIcao
void setDefaultIcao(const QString &defaultIcao);
//! \copydoc XBus::CTraffic::setDrawingLabels
//! \copydoc XSwiftBus::CTraffic::setDrawingLabels
void setDrawingLabels(bool drawing);
//! \copydoc XBus::CTraffic::isDrawingLabels
//! \copydoc XSwiftBus::CTraffic::isDrawingLabels
bool isDrawingLabels() const;
//! \copydoc XBus::CTraffic::updateInstalledModels
//! \copydoc XSwiftBus::CTraffic::updateInstalledModels
void updateInstalledModels() const;
//! \copydoc XBus::CTraffic::setMaxPlanes
//! \copydoc XSwiftBus::CTraffic::setMaxPlanes
void setMaxPlanes(int planes);
//! \copydoc XBus::CTraffic::setMaxDrawDistance
//! \copydoc XSwiftBus::CTraffic::setMaxDrawDistance
void setMaxDrawDistance(float nauticalMiles);
//! \copydoc XBus::CTraffic::addPlane
//! \copydoc XSwiftBus::CTraffic::addPlane
void addPlane(const QString &callsign, const QString &modelName, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery);
//! \copydoc XBus::CTraffic::removePlane
//! \copydoc XSwiftBus::CTraffic::removePlane
void removePlane(const QString &callsign);
//! \copydoc XBus::CTraffic::removeAllPlanes
//! \copydoc XSwiftBus::CTraffic::removeAllPlanes
void removeAllPlanes();
//! \copydoc XBus::CTraffic::addPlanePosition
//! \copydoc XSwiftBus::CTraffic::addPlanePosition
void addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime);
//! \copydoc XBus::CTraffic::addPlaneSurfaces
//! \copydoc XSwiftBus::CTraffic::addPlaneSurfaces
void addPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime);
//! \copydoc XBus::CTraffic::setPlaneTransponder
//! \copydoc XSwiftBus::CTraffic::setPlaneTransponder
void setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident);
//! \copydoc XBus::CTraffic::setInterpolatorMode
//! \copydoc XSwiftBus::CTraffic::setInterpolatorMode
void setInterpolatorMode(const QString &callsign, bool spline);
};

View File

@@ -7,80 +7,80 @@
* contained in the LICENSE file.
*/
#include "xbusweatherproxy.h"
#include "xswiftbusweatherproxy.h"
#include <QLatin1String>
class QDBusConnection;
#define XBUS_SERVICENAME "org.swift-project.xbus"
#define XSWIFTBUS_SERVICENAME "org.swift-project.xswiftbus"
namespace BlackSimPlugin
{
namespace XPlane
{
CXBusWeatherProxy::CXBusWeatherProxy(QDBusConnection &connection, QObject *parent) : QObject(parent)
CXSwiftBusWeatherProxy::CXSwiftBusWeatherProxy(QDBusConnection &connection, QObject *parent) : QObject(parent)
{
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XBUS_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XSWIFTBUS_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
}
bool CXBusWeatherProxy::isUsingRealWeather() const
bool CXSwiftBusWeatherProxy::isUsingRealWeather() const
{
return m_dbusInterface->callDBusRet<bool>(QLatin1String("isUsingRealWeather"));
}
void CXBusWeatherProxy::setUseRealWeather(bool enable)
void CXSwiftBusWeatherProxy::setUseRealWeather(bool enable)
{
m_dbusInterface->callDBus(QLatin1String("setUseRealWeather"), enable);
}
void CXBusWeatherProxy::setVisibility(double visibilityM)
void CXSwiftBusWeatherProxy::setVisibility(double visibilityM)
{
m_dbusInterface->callDBus(QLatin1String("setVisibility"), visibilityM);
}
void CXBusWeatherProxy::setTemperature(int degreesC)
void CXSwiftBusWeatherProxy::setTemperature(int degreesC)
{
m_dbusInterface->callDBus(QLatin1String("setTemperature"), degreesC);
}
void CXBusWeatherProxy::setDewPoint(int degreesC)
void CXSwiftBusWeatherProxy::setDewPoint(int degreesC)
{
m_dbusInterface->callDBus(QLatin1String("setDewPoint"), degreesC);
}
void CXBusWeatherProxy::setQNH(double inHg)
void CXSwiftBusWeatherProxy::setQNH(double inHg)
{
m_dbusInterface->callDBus(QLatin1String("setQNH"), inHg);
}
void CXBusWeatherProxy::setPrecipitationRatio(double precipRatio)
void CXSwiftBusWeatherProxy::setPrecipitationRatio(double precipRatio)
{
m_dbusInterface->callDBus(QLatin1String("setPrecipitationRatio"), precipRatio);
}
void CXBusWeatherProxy::setThunderstormRatio(double cbRatio)
void CXSwiftBusWeatherProxy::setThunderstormRatio(double cbRatio)
{
m_dbusInterface->callDBus(QLatin1String("setThunderstormRatio"), cbRatio);
}
void CXBusWeatherProxy::setTurbulenceRatio(double turbulenceRatio)
void CXSwiftBusWeatherProxy::setTurbulenceRatio(double turbulenceRatio)
{
m_dbusInterface->callDBus(QLatin1String("setTurbulenceRatio"), turbulenceRatio);
}
void CXBusWeatherProxy::setRunwayFriction(int friction)
void CXSwiftBusWeatherProxy::setRunwayFriction(int friction)
{
m_dbusInterface->callDBus(QLatin1String("setRunwayFriction"), friction);
}
void CXBusWeatherProxy::setCloudLayer(int layer, int base, int tops, int type, int coverage)
void CXSwiftBusWeatherProxy::setCloudLayer(int layer, int base, int tops, int type, int coverage)
{
m_dbusInterface->callDBus(QLatin1String("setCloudLayer"), layer, base, tops, type, coverage);
}
void CXBusWeatherProxy::setWindLayer(int layer, int altitude, double direction, int speed, int shearDirection, int shearSpeed, int turbulence)
void CXSwiftBusWeatherProxy::setWindLayer(int layer, int altitude, double direction, int speed, int shearDirection, int shearSpeed, int turbulence)
{
m_dbusInterface->callDBus(QLatin1String("setWindLayer"), layer, altitude, direction, speed, shearDirection, shearSpeed, turbulence);
}

View File

@@ -9,8 +9,8 @@
//! \file
#ifndef BLACKSIMPLUGIN_XBUS_WEATHER_PROXY_H
#define BLACKSIMPLUGIN_XBUS_WEATHER_PROXY_H
#ifndef BLACKSIMPLUGIN_XSWIFTBUS_WEATHER_PROXY_H
#define BLACKSIMPLUGIN_XSWIFTBUS_WEATHER_PROXY_H
#include "blackmisc/genericdbusinterface.h"
@@ -20,8 +20,8 @@
class QDBusConnection;
//! \cond PRIVATE
#define XBUS_WEATHER_INTERFACENAME "org.swift_project.xbus.weather"
#define XBUS_WEATHER_OBJECTPATH "/xbus/weather"
#define XSWIFTBUS_WEATHER_INTERFACENAME "org.swift_project.xswiftbus.weather"
#define XSWIFTBUS_WEATHER_OBJECTPATH "/xswiftbus/weather"
//! \endcond
namespace BlackSimPlugin
@@ -30,9 +30,9 @@ namespace BlackSimPlugin
{
/*!
* Proxy object connected to a real XBus::CWeather object via DBus
* Proxy object connected to a real XSwiftBus::CWeather object via DBus
*/
class CXBusWeatherProxy : public QObject
class CXSwiftBusWeatherProxy : public QObject
{
Q_OBJECT
@@ -40,19 +40,19 @@ namespace BlackSimPlugin
//! Service name
static const QString &InterfaceName()
{
static QString s(XBUS_WEATHER_INTERFACENAME);
static QString s(XSWIFTBUS_WEATHER_INTERFACENAME);
return s;
}
//! Service path
static const QString &ObjectPath()
{
static QString s(XBUS_WEATHER_OBJECTPATH);
static QString s(XSWIFTBUS_WEATHER_OBJECTPATH);
return s;
}
//! Constructor
CXBusWeatherProxy(QDBusConnection &connection, QObject *parent = nullptr);
CXSwiftBusWeatherProxy(QDBusConnection &connection, QObject *parent = nullptr);
//! Does the remote object exist?
bool isValid() const { return m_dbusInterface->isValid(); }
@@ -61,40 +61,40 @@ namespace BlackSimPlugin
BlackMisc::CGenericDBusInterface *m_dbusInterface = nullptr;
public slots:
//! \copydoc XBus::CWeather::isUsingRealWeather
//! \copydoc XSwiftBus::CWeather::isUsingRealWeather
bool isUsingRealWeather() const;
//! \copydoc XBus::CWeather::setUseRealWeather
//! \copydoc XSwiftBus::CWeather::setUseRealWeather
void setUseRealWeather(bool enable);
//! \copydoc XBus::CWeather::setVisibility
//! \copydoc XSwiftBus::CWeather::setVisibility
void setVisibility(double visibilityM);
//! \copydoc XBus::CWeather::setTemperature
//! \copydoc XSwiftBus::CWeather::setTemperature
void setTemperature(int degreesC);
//! \copydoc XBus::CWeather::setDewPoint
//! \copydoc XSwiftBus::CWeather::setDewPoint
void setDewPoint(int degreesC);
//! \copydoc XBus::CWeather::setQNH
//! \copydoc XSwiftBus::CWeather::setQNH
void setQNH(double inHg);
//! \copydoc XBus::CWeather::setPrecipitationRatio
//! \copydoc XSwiftBus::CWeather::setPrecipitationRatio
void setPrecipitationRatio(double precipRatio);
//! \copydoc XBus::CWeather::setThunderstormRatio
//! \copydoc XSwiftBus::CWeather::setThunderstormRatio
void setThunderstormRatio(double cbRatio);
//! \copydoc XBus::CWeather::setTurbulenceRatio
//! \copydoc XSwiftBus::CWeather::setTurbulenceRatio
void setTurbulenceRatio(double turbulenceRatio);
//! \copydoc XBus::CWeather::setRunwayFriction
//! \copydoc XSwiftBus::CWeather::setRunwayFriction
void setRunwayFriction(int friction);
//! \copydoc XBus::CWeather::setCloudLayer
//! \copydoc XSwiftBus::CWeather::setCloudLayer
void setCloudLayer(int layer, int base, int tops, int type, int coverage);
//! \copydoc XBus::CWeather::setWindLayer
//! \copydoc XSwiftBus::CWeather::setWindLayer
void setWindLayer(int layer, int altitude, double direction, int speed, int shearDirection, int shearSpeed, int turbulence);
};

View File

@@ -26,12 +26,12 @@ namespace BlackSimPlugin
namespace XPlane
{
/*!
* Setting for XBus.
* Setting for XSwiftBus.
*/
struct TXBusServer : public BlackMisc::TSettingTrait<QString>
struct TXSwiftBusServer : public BlackMisc::TSettingTrait<QString>
{
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "xbus/server"; }
static const char *key() { return "xswiftbus/server"; }
//! \copydoc BlackMisc::TSettingTrait::defaultValue
static QString defaultValue() { return QStringLiteral("session"); }

View File

@@ -32,9 +32,9 @@ using namespace BlackMisc;
namespace
{
QString xBusOriginDir()
QString xSwiftBusOriginDir()
{
return CDirectoryUtils::applicationDirectoryPath() % QStringLiteral("/../xbus");
return CDirectoryUtils::applicationDirectoryPath() % QStringLiteral("/../xswiftbus");
}
}
@@ -48,19 +48,19 @@ namespace BlackSimPlugin
{
ui->setupUi(this);
ui->cp_XBusServer->addItem(BlackMisc::CDBusServer::sessionBusAddress());
ui->cp_XBusServer->addItem(BlackMisc::CDBusServer::systemBusAddress());
ui->cp_XSwiftBusServer->addItem(BlackMisc::CDBusServer::sessionBusAddress());
ui->cp_XSwiftBusServer->addItem(BlackMisc::CDBusServer::systemBusAddress());
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CSimulatorXPlaneConfigWindow::ps_storeSettings);
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CSimulatorXPlaneConfigWindow::close);
connect(ui->bb_OkCancel, &QDialogButtonBox::rejected, this, &CSimulatorXPlaneConfigWindow::close);
ui->cp_XBusServer->setCurrentText(m_xbusServerSetting.getThreadLocal());
ui->cp_XSwiftBusServer->setCurrentText(m_xswiftbusServerSetting.getThreadLocal());
if (xBusAvailable())
connect(ui->pb_InstallXBus, &QPushButton::clicked, this, &CSimulatorXPlaneConfigWindow::ps_installXBus);
if (xSwiftBusAvailable())
connect(ui->pb_InstallXSwiftBus, &QPushButton::clicked, this, &CSimulatorXPlaneConfigWindow::ps_installXSwiftBus);
else
ui->pb_InstallXBus->setEnabled(false);
ui->pb_InstallXSwiftBus->setEnabled(false);
}
CSimulatorXPlaneConfigWindow::~CSimulatorXPlaneConfigWindow()
@@ -68,20 +68,20 @@ namespace BlackSimPlugin
}
bool CSimulatorXPlaneConfigWindow::xBusAvailable()
bool CSimulatorXPlaneConfigWindow::xSwiftBusAvailable()
{
return QDir(xBusOriginDir()).exists();
return QDir(xSwiftBusOriginDir()).exists();
}
void CSimulatorXPlaneConfigWindow::ps_storeSettings()
{
if (ui->cp_XBusServer->currentText() != m_xbusServerSetting.getThreadLocal())
if (ui->cp_XSwiftBusServer->currentText() != m_xswiftbusServerSetting.getThreadLocal())
{
m_xbusServerSetting.set(ui->cp_XBusServer->currentText());
m_xswiftbusServerSetting.set(ui->cp_XSwiftBusServer->currentText());
}
}
void CSimulatorXPlaneConfigWindow::ps_installXBus()
void CSimulatorXPlaneConfigWindow::ps_installXSwiftBus()
{
const QString xPlaneLocation = BlackMisc::Simulation::XPlane::CXPlaneUtil::xplaneRootDir();
QString path = QFileDialog::getExistingDirectory(parentWidget(),
@@ -99,17 +99,17 @@ namespace BlackSimPlugin
return;
}
path.append("/xbus");
path.append("/xswiftbus");
// TODO Use QtConcurrent here, maybe?
const bool result = BlackMisc::CFileUtils::copyRecursively(xBusOriginDir(), path);
const bool result = BlackMisc::CFileUtils::copyRecursively(xSwiftBusOriginDir(), path);
if (result)
{
QMessageBox::information(this, tr("XBus installed"), tr("You may now launch your X-Plane and start using XBus!"));
QMessageBox::information(this, tr("XSwiftBus installed"), tr("You may now launch your X-Plane and start using XSwiftBus!"));
}
else
{
QMessageBox::warning(this, tr("Failed installing XBus"), tr("Failed installing the XBus plugin in your X-Plane installation directory; try installing it manually."));
QMessageBox::warning(this, tr("Failed installing XSwiftBus"), tr("Failed installing the XSwiftBus plugin in your X-Plane installation directory; try installing it manually."));
}
}
}

View File

@@ -42,16 +42,16 @@ namespace BlackSimPlugin
virtual ~CSimulatorXPlaneConfigWindow();
private:
//! Checks whether xbus is present in the distributed directory.
bool xBusAvailable();
//! Checks whether xswiftbus is present in the distributed directory.
bool xSwiftBusAvailable();
private slots:
void ps_storeSettings();
void ps_installXBus();
void ps_installXSwiftBus();
private:
QScopedPointer<Ui::CSimulatorXPlaneConfigWindow> ui;
BlackMisc::CSetting<TXBusServer> m_xbusServerSetting { this };
BlackMisc::CSetting<TXSwiftBusServer> m_xswiftbusServerSetting { this };
};
}
}

View File

@@ -15,19 +15,19 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QComboBox" name="cp_XBusServer"/>
<widget class="QComboBox" name="cp_XSwiftBusServer"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lbl_XBusServer">
<widget class="QLabel" name="lbl_XSwiftBusServer">
<property name="text">
<string>XBus server:</string>
<string>XSwiftBus server:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="pb_InstallXBus">
<widget class="QPushButton" name="pb_InstallXSwiftBus">
<property name="text">
<string>Install XBus in the X-Plane directory...</string>
<string>Install XSwiftBus in the X-Plane directory...</string>
</property>
</widget>
</item>

View File

@@ -30,7 +30,7 @@ contains(BLACK_CONFIG,SwiftLauncher) {
SUBDIRS += swiftlauncher
}
contains(BLACK_CONFIG,XPlane) {
SUBDIRS += xbus
SUBDIRS += xswiftbus
}
SUBDIRS += plugins

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -7,15 +7,15 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_COMMAND_H
#define BLACKSIM_XBUS_COMMAND_H
#ifndef BLACKSIM_XSWIFTBUS_COMMAND_H
#define BLACKSIM_XSWIFTBUS_COMMAND_H
//! \file
#include <XPLMUtilities.h>
#include <functional>
namespace XBus
namespace XSwiftBus
{
/*!

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_DATAREFS_H
#define BLACKSIM_XBUS_DATAREFS_H
#ifndef BLACKSIM_XSWIFTBUS_DATAREFS_H
#define BLACKSIM_XSWIFTBUS_DATAREFS_H
//! \file
@@ -20,7 +20,7 @@
#include "datarefs.inc"
namespace XBus
namespace XSwiftBus
{
//! \private

View File

@@ -7,14 +7,14 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_DRAWABLE_H
#define BLACKSIM_XBUS_DRAWABLE_H
#ifndef BLACKSIM_XSWIFTBUS_DRAWABLE_H
#define BLACKSIM_XSWIFTBUS_DRAWABLE_H
//! \file
#include <XPLMDisplay.h>
namespace XBus
namespace XSwiftBus
{
/*!

View File

@@ -32,15 +32,15 @@
// See https://dev.vatsim-germany.org/issues/293 for more information.
QSharedPointer<QCoreApplication> g_qApp;
XBus::CPlugin *g_plugin;
XSwiftBus::CPlugin *g_plugin;
PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc)
{
std::strcpy(o_name, "X-Bus");
std::strcpy(o_sig, "org.swift-project.xbus");
std::strcpy(o_desc, "Allows pilot client to connect to X-Plane via D-Bus");
std::strcpy(o_name, "XSwiftBus");
std::strcpy(o_sig, "org.swift-project.xswiftbus");
std::strcpy(o_desc, "Allows swift to connect to X-Plane via D-Bus IPC");
XBus::CTraffic::initLegacyData();
XSwiftBus::CTraffic::initLegacyData();
return 1;
}
@@ -57,7 +57,7 @@ PLUGIN_API int XPluginEnable()
g_qApp = QSharedApplication::sharedInstance();
QXPlaneEventLoop::exec();
g_plugin = new XBus::CPlugin;
g_plugin = new XSwiftBus::CPlugin;
// Here we can be safely assume that QtDBus was loaded by the process
preventQtDBusDllUnload();

View File

@@ -14,7 +14,7 @@
#include <cassert>
#include <string>
namespace XBus
namespace XSwiftBus
{
//! "safe" cast from integer to void*
template <typename T> void *voidptr_cast(T i)

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_MENUS_H
#define BLACKSIM_XBUS_MENUS_H
#ifndef BLACKSIM_XSWIFTBUS_MENUS_H
#define BLACKSIM_XSWIFTBUS_MENUS_H
//! \file
@@ -17,7 +17,7 @@
#include <vector>
#include <memory>
namespace XBus
namespace XSwiftBus
{
class CMenu;

View File

@@ -16,7 +16,7 @@
#include <XPLMGraphics.h>
#include <XPUIGraphics.h>
namespace XBus
namespace XSwiftBus
{
void CMessageBox::draw()
@@ -70,14 +70,14 @@ namespace XBus
CMessageBoxControl::CMessageBoxControl(int left, int right, int top) :
m_messageBox(left, right, top),
m_showCommand("org/swift-project/xbus/show_messages", "Show XBus text messages", [this] { show(); }),
m_hideCommand("org/swift-project/xbus/hide_messages", "Hide XBus text messages", [this] { hide(); }),
m_toggleCommand("org/swift-project/xbus/toggle_messages", "Toggle XBus text messages", [this] { toggle(); }),
m_scrollUpCommand("org/swift-project/xbus/scroll_up", "Scroll up XBus text messages", [this] { scrollUp(); }),
m_scrollDownCommand("org/swift-project/xbus/scroll_down", "Scroll down XBus text messages", [this] { scrollDown(); }),
m_scrollToTopCommand("org/swift-project/xbus/scroll_top", "Scroll to top of XBus text messages", [this] { scrollToTop(); }),
m_scrollToBottomCommand("org/swift-project/xbus/scroll_bottom", "Scroll to bottom of XBus text messages", [this] { scrollToBottom(); }),
m_debugCommand("org/swift-project/xbus/debug", "", [this] { static int c = 0; this->addMessage({ "hello " + std::to_string(c++), 0, .75, 0 }); })
m_showCommand("org/swift-project/xswiftbus/show_messages", "Show XSwiftBus text messages", [this] { show(); }),
m_hideCommand("org/swift-project/xswiftbus/hide_messages", "Hide XSwiftBus text messages", [this] { hide(); }),
m_toggleCommand("org/swift-project/xswiftbus/toggle_messages", "Toggle XSwiftBus text messages", [this] { toggle(); }),
m_scrollUpCommand("org/swift-project/xswiftbus/scroll_up", "Scroll up XSwiftBus text messages", [this] { scrollUp(); }),
m_scrollDownCommand("org/swift-project/xswiftbus/scroll_down", "Scroll down XSwiftBus text messages", [this] { scrollDown(); }),
m_scrollToTopCommand("org/swift-project/xswiftbus/scroll_top", "Scroll to top of XSwiftBus text messages", [this] { scrollToTop(); }),
m_scrollToBottomCommand("org/swift-project/xswiftbus/scroll_bottom", "Scroll to bottom of XSwiftBus text messages", [this] { scrollToBottom(); }),
m_debugCommand("org/swift-project/xswiftbus/debug", "", [this] { static int c = 0; this->addMessage({ "hello " + std::to_string(c++), 0, .75, 0 }); })
{}
void CMessageBoxControl::addMessage(const CMessage &message)

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_MESSAGES_H
#define BLACKSIM_XBUS_MESSAGES_H
#ifndef BLACKSIM_XSWIFTBUS_MESSAGES_H
#define BLACKSIM_XSWIFTBUS_MESSAGES_H
//! \file
@@ -19,7 +19,7 @@
#include <array>
#include <algorithm>
namespace XBus
namespace XSwiftBus
{
/*!
@@ -94,7 +94,7 @@ namespace XBus
//! Add a new message to the bottom of the list.
void addMessage(const CMessage &message);
//! \copydoc XBus::CMessageBox::maxLineLength
//! \copydoc XSwiftBus::CMessageBox::maxLineLength
int maxLineLength() const { return m_messageBox.maxLineLength(); }
private:

View File

@@ -18,16 +18,16 @@
#include <functional>
namespace {
inline QString xbusServiceName() {
return QStringLiteral("org.swift-project.xbus");
inline QString xswiftbusServiceName() {
return QStringLiteral("org.swift-project.xswiftbus");
}
}
namespace XBus
namespace XSwiftBus
{
CPlugin::CPlugin()
: m_menu(CMenu::mainMenu().subMenu("XBus"))
: m_menu(CMenu::mainMenu().subMenu("XSwiftBus"))
{
m_startServerMenuItems.push_back(m_menu.item("Start server on session bus", [this]{ startServer(BlackMisc::CDBusServer::sessionBusAddress()); }));
m_startServerMenuItems.push_back(m_menu.item("Start server on system bus", [this]{ startServer(BlackMisc::CDBusServer::systemBusAddress()); }));
@@ -51,7 +51,7 @@ namespace XBus
// Make sure that there are no calls to XPLM in this method
Q_ASSERT(! m_server);
auto previousLibraryPath = BlackMisc::getCustomLibraryPath();
auto libraryPath = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xbus";
auto libraryPath = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xswiftbus";
#if !defined (Q_OS_MAC) && defined(WORD_SIZE_64)
libraryPath = libraryPath + g_sep + "64";
#endif
@@ -66,7 +66,7 @@ namespace XBus
return;
}
m_server = new BlackMisc::CDBusServer(xbusServiceName(), address, this);
m_server = new BlackMisc::CDBusServer(xswiftbusServiceName(), address, this);
BlackMisc::setCustomLibraryPath(previousLibraryPath);
m_server->addObject(CService::ObjectPath(), m_service);

View File

@@ -7,13 +7,13 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_PLUGIN_H
#define BLACKSIM_XBUS_PLUGIN_H
#ifndef BLACKSIM_XSWIFTBUS_PLUGIN_H
#define BLACKSIM_XSWIFTBUS_PLUGIN_H
//! \file
/*!
* \namespace XBus
* \namespace XSwiftBus
* Plugin loaded by X-Plane which publishes a DBus service
*/
@@ -29,7 +29,7 @@
#include <QVector>
namespace XBus
namespace XSwiftBus
{
class CService;
class CTraffic;

View File

@@ -15,7 +15,7 @@
// clazy:excludeall=reserve-candidates
namespace XBus
namespace XSwiftBus
{
CService::CService(QObject *parent) : QObject(parent)

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_SERVICE_H
#define BLACKSIM_XBUS_SERVICE_H
#ifndef BLACKSIM_XSWIFTBUS_SERVICE_H
#define BLACKSIM_XSWIFTBUS_SERVICE_H
//! \file
@@ -26,8 +26,8 @@
class QTimer;
//! \cond PRIVATE
#define XBUS_SERVICE_INTERFACENAME "org.swift_project.xbus.service"
#define XBUS_SERVICE_OBJECTPATH "/xbus/service"
#define XSWIFTBUS_SERVICE_INTERFACENAME "org.swift_project.xswiftbus.service"
#define XSWIFTBUS_SERVICE_OBJECTPATH "/xswiftbus/service"
//! \endcond
//! Typedef needed to use QList<double> as a DBus argument
@@ -36,16 +36,16 @@ using QDoubleList = QList<double>;
//! Typedef needed to use QList<double> as a DBus argument
Q_DECLARE_METATYPE(QDoubleList)
namespace XBus
namespace XSwiftBus
{
/*!
* XBus service object which is accessible through DBus
* XSwiftBus service object which is accessible through DBus
*/
class CService : public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", XBUS_SERVICE_INTERFACENAME)
Q_CLASSINFO("D-Bus Interface", XSWIFTBUS_SERVICE_INTERFACENAME)
public:
//! Constructor
@@ -54,14 +54,14 @@ namespace XBus
//! DBus interface name
static const QString &InterfaceName()
{
static QString s(XBUS_SERVICE_INTERFACENAME);
static QString s(XSWIFTBUS_SERVICE_INTERFACENAME);
return s;
}
//! DBus object path
static const QString &ObjectPath()
{
static QString s(XBUS_SERVICE_OBJECTPATH);
static QString s(XSWIFTBUS_SERVICE_OBJECTPATH);
return s;
}

View File

@@ -11,7 +11,7 @@
#include <XPLM/XPLMGraphics.h>
#include <limits>
namespace XBus
namespace XSwiftBus
{
CTerrainProbe::CTerrainProbe() : m_ref(XPLMCreateProbe(xplm_ProbeY)) {}

View File

@@ -7,12 +7,12 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_ELEVATIONPROVIDER_H
#define BLACKSIM_XBUS_ELEVATIONPROVIDER_H
#ifndef BLACKSIM_XSWIFTBUS_ELEVATIONPROVIDER_H
#define BLACKSIM_XSWIFTBUS_ELEVATIONPROVIDER_H
#include <XPLM/XPLMScenery.h>
namespace XBus
namespace XSwiftBus
{
/*!
* Class based interface to X-Plane SDK terrain probe.

View File

@@ -27,7 +27,7 @@
// clazy:excludeall=reserve-candidates
namespace XBus
namespace XSwiftBus
{
CTraffic::Plane::Plane(void *id_, QString callsign_, QString aircraftIcao_, QString airlineIcao_, QString livery_)
@@ -83,7 +83,7 @@ namespace XBus
void CTraffic::initLegacyData()
{
initXPlanePath();
auto dir = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xbus" + g_sep + "LegacyData" + g_sep;
auto dir = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xswiftbus" + g_sep + "LegacyData" + g_sep;
auto err = XPMPMultiplayerInitLegacyData(qPrintable(dir + "CSL"), qPrintable(dir + "related.txt"),
qPrintable(dir + "lights.png"), qPrintable(dir + "Doc8643.txt"), "C172", preferences, preferences);
@@ -151,7 +151,7 @@ namespace XBus
bool CTraffic::loadPlanesPackage(const QString &path)
{
initXPlanePath();
auto dir = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xbus" + g_sep + "LegacyData" + g_sep;
auto dir = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xswiftbus" + g_sep + "LegacyData" + g_sep;
auto err = XPMPLoadCSLPackage(qPrintable(path), qPrintable(dir + "related.txt"), qPrintable(dir + "Doc8643.txt"));
if (*err) { return false; }

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_TRAFFIC_H
#define BLACKSIM_XBUS_TRAFFIC_H
#ifndef BLACKSIM_XSWIFTBUS_TRAFFIC_H
#define BLACKSIM_XSWIFTBUS_TRAFFIC_H
//! \file
@@ -26,20 +26,20 @@
#include <utility>
//! \cond PRIVATE
#define XBUS_TRAFFIC_INTERFACENAME "org.swift_project.xbus.traffic"
#define XBUS_TRAFFIC_OBJECTPATH "/xbus/traffic"
#define XSWIFTBUS_TRAFFIC_INTERFACENAME "org.swift_project.xswiftbus.traffic"
#define XSWIFTBUS_TRAFFIC_OBJECTPATH "/xswiftbus/traffic"
//! \endcond
namespace BlackMisc { namespace Simulation { class CInterpolationHints; } }
namespace XBus
namespace XSwiftBus
{
/*!
* XBus service object for traffic aircraft which is accessible through DBus
* XSwiftBus service object for traffic aircraft which is accessible through DBus
*/
class CTraffic : public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", XBUS_TRAFFIC_INTERFACENAME)
Q_CLASSINFO("D-Bus Interface", XSWIFTBUS_TRAFFIC_INTERFACENAME)
public:
//! Constructor
@@ -51,14 +51,14 @@ namespace XBus
//! DBus interface name
static const QString &InterfaceName()
{
static QString s(XBUS_TRAFFIC_INTERFACENAME);
static QString s(XSWIFTBUS_TRAFFIC_INTERFACENAME);
return s;
}
//! DBus object path
static const QString &ObjectPath()
{
static QString s(XBUS_TRAFFIC_OBJECTPATH);
static QString s(XSWIFTBUS_TRAFFIC_OBJECTPATH);
return s;
}

View File

@@ -18,7 +18,7 @@
#include <QString>
#include <QtGlobal>
namespace XBus
namespace XSwiftBus
{
QString g_xplanePath;

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_UTILS_H
#define BLACKSIM_XBUS_UTILS_H
#ifndef BLACKSIM_XSWIFTBUS_UTILS_H
#define BLACKSIM_XSWIFTBUS_UTILS_H
#include <XPLM/XPLMDefs.h>
#include <XPLM/XPLMPlugin.h>
@@ -82,7 +82,7 @@ public:
};
/*!
* QApplication subclass used by XBus.
* QApplication subclass used by XSwiftBus.
*
* Only one instance of QApplication is allowed per process, so if any other
* X-Plane plugin, completely unrelated to this pilot client, wants to use the
@@ -174,7 +174,7 @@ public:
}
};
namespace XBus
namespace XSwiftBus
{
//! Absolute xplane path
extern QString g_xplanePath;

View File

@@ -12,7 +12,7 @@
#include "weather.h"
#include <QDebug>
namespace XBus
namespace XSwiftBus
{
//! Set cloud layer

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKSIM_XBUS_WEATHER_H
#define BLACKSIM_XBUS_WEATHER_H
#ifndef BLACKSIM_XSWIFTBUS_WEATHER_H
#define BLACKSIM_XSWIFTBUS_WEATHER_H
//! \file
@@ -19,20 +19,20 @@
#include <QObject>
//! \cond PRIVATE
#define XBUS_WEATHER_INTERFACENAME "org.swift_project.xbus.weather"
#define XBUS_WEATHER_OBJECTPATH "/xbus/weather"
#define XSWIFTBUS_WEATHER_INTERFACENAME "org.swift_project.xswiftbus.weather"
#define XSWIFTBUS_WEATHER_OBJECTPATH "/xswiftbus/weather"
//! \endcond
namespace XBus
namespace XSwiftBus
{
/*!
* XBus weather object which is accessible through DBus
* XSwiftBus weather object which is accessible through DBus
*/
class CWeather : public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", XBUS_WEATHER_INTERFACENAME)
Q_CLASSINFO("D-Bus Interface", XSWIFTBUS_WEATHER_INTERFACENAME)
public:
//! Constructor
@@ -41,14 +41,14 @@ namespace XBus
//! DBus interface name
static const QString &InterfaceName()
{
static QString s(XBUS_WEATHER_INTERFACENAME);
static QString s(XSWIFTBUS_WEATHER_INTERFACENAME);
return s;
}
//! DBus object path
static const QString &ObjectPath()
{
static QString s(XBUS_WEATHER_OBJECTPATH);
static QString s(XSWIFTBUS_WEATHER_OBJECTPATH);
return s;
}

View File

@@ -20,7 +20,7 @@ else:macx {
}
else:unix {
# Flags needed because there is no XPLM link library
QMAKE_LFLAGS += -shared -rdynamic -nodefaultlibs -undefined_warning -Wl,--version-script=$$PWD/xbus.map
QMAKE_LFLAGS += -shared -rdynamic -nodefaultlibs -undefined_warning -Wl,--version-script=$$PWD/xswiftbus.map
}
DEPENDPATH += . $$SourceRoot/src
@@ -60,8 +60,8 @@ DEFINES += XPLM200=1
DEFINES += XPLM210=1
# Name will be used in libxplanemp log messages
DEFINES += XPMP_CLIENT_NAME=\\\"xbus\\\"
DEFINES += XPMP_CLIENT_LONGNAME=\\\"xbus\\\"
DEFINES += XPMP_CLIENT_NAME=\\\"xswiftbus\\\"
DEFINES += XPMP_CLIENT_LONGNAME=\\\"xswiftbus\\\"
# X-Plane plugins must follow a prescribed filename and directory structure.
TARGET_EXT = .xpl
@@ -70,33 +70,33 @@ linux:TARGET = lin
macx:TARGET = mac
macx {
# a single dylib file contains both 32bit and 64bit binaries
XBUS_DIR = xbus
XBUS_DESTDIR = $$DestRoot/$$XBUS_DIR
XSWIFTBUS_DIR = xswiftbus
XSWIFTBUS_DESTDIR = $$DestRoot/$$XSWIFTBUS_DIR
} else {
equals(WORD_SIZE,64) {
XBUS_DIR = xbus/64
XSWIFTBUS_DIR = xswiftbus/64
DEFINES += WORD_SIZE_64
}
equals(WORD_SIZE,32) {
XBUS_DIR = xbus
XSWIFTBUS_DIR = xswiftbus
}
XBUS_DESTDIR = $$DestRoot/$$XBUS_DIR
XSWIFTBUS_DESTDIR = $$DestRoot/$$XSWIFTBUS_DIR
}
# Default MSVC project name is $$TARGET, so use a better name
QMAKE_PROJECT_NAME = xbus
QMAKE_PROJECT_NAME = xswiftbus
# QMake ignores TARGET_EXT on Unix
macx: QMAKE_POST_LINK += mkdir -p $${XBUS_DESTDIR} && cp $$OUT_PWD/lib$${TARGET}.dylib $$XBUS_DESTDIR/$${TARGET}.xpl
else:unix: QMAKE_POST_LINK += mkdir -p $${XBUS_DESTDIR} && cp $$OUT_PWD/lib$${TARGET}.so $$XBUS_DESTDIR/$${TARGET}.xpl
else: DESTDIR = $$XBUS_DESTDIR
macx: QMAKE_POST_LINK += mkdir -p $$XSWIFTBUS_DESTDIR && cp $$OUT_PWD/lib$${TARGET}.dylib $$XSWIFTBUS_DESTDIR/$${TARGET}.xpl
else:unix: QMAKE_POST_LINK += mkdir -p $$XSWIFTBUS_DESTDIR && cp $$OUT_PWD/lib$${TARGET}.so $$XSWIFTBUS_DESTDIR/$${TARGET}.xpl
else: DESTDIR = $$XSWIFTBUS_DESTDIR
target.path = $$PREFIX/$$XBUS_DIR
target.files *= $$XBUS_DESTDIR/$${TARGET}.xpl
target.path = $$PREFIX/$$XSWIFTBUS_DIR
target.files *= $$XSWIFTBUS_DESTDIR/$${TARGET}.xpl
target.CONFIG += no_check_exist
INSTALLS += target
dep_target.path = $$PREFIX/$$XBUS_DIR
dep_target.path = $$PREFIX/$$XSWIFTBUS_DIR
win32 {
dep_target.files *= $$DestRoot/lib/blackmisc.dll
dep_target.files *= $$[QT_INSTALL_BINS]/Qt5Core$${DLL_DEBUG_SUFFIX}.dll
@@ -109,42 +109,42 @@ win32 {
else: dep_target.files *= $$[QT_INSTALL_BINS]/dbus-1-3.dll
dep_target.CONFIG += no_check_exist
legacy_data_target.path = $$PREFIX/xbus
legacy_data_target.path = $$PREFIX/xswiftbus
legacy_data_target.files *= LegacyData
} else:macx: {
dep_target.files *= $$PREFIX/lib/libblackmisc.0.dylib
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtCore.framework/ $${PREFIX}/$$XBUS_DIR/QtCore.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtGui.framework/ $${PREFIX}/$$XBUS_DIR/QtGui.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtWidgets.framework/ $${PREFIX}/$$XBUS_DIR/QtWidgets.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtDBus.framework/ $${PREFIX}/$$XBUS_DIR/QtDBus.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtNetwork.framework/ $${PREFIX}/$$XBUS_DIR/QtNetwork.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtXml.framework/ $${PREFIX}/$$XBUS_DIR/QtXml.framework/
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtCore.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtCore.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtGui.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtGui.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtWidgets.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtWidgets.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtDBus.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtDBus.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtNetwork.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtNetwork.framework/ &&
dep_target.extra += rsync -avz --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtXml.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtXml.framework/
dep_target.CONFIG += no_check_exist
legacy_data_target.path = $$PREFIX/xbus
legacy_data_target.path = $$PREFIX/xswiftbus
legacy_data_target.files *= LegacyData
# We rely on legacy_data_target to be called after dep_target. So the library should already be installed and can be modified in place.
# We cannot modify the original library since this is xbus specific.
# We cannot modify the original library since this is xswiftbus specific.
legacy_data_target.depends += fix_plugin_rpath
fix_plugin_rpath.target = fix_plugin_rpath
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/libblackmisc.0.dylib\" \"@loader_path/libblackmisc.0.dylib\" $$shell_path($$PREFIX/$$XBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtWidgets.framework/Versions/5/QtWidgets\" \"@loader_path/QtWidgets.framework/Versions/5/QtWidgets\" $$shell_path($$PREFIX/$$XBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtGui.framework/Versions/5/QtGui\" \"@loader_path/QtGui.framework/Versions/5/QtGui\" $$shell_path($$PREFIX/$$XBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtDBus.framework/Versions/5/QtDBus\" \"@loader_path/QtDBus.framework/Versions/5/QtDBus\" $$shell_path($$PREFIX/$$XBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtNetwork.framework/Versions/5/QtNetwork\" \"@loader_path/QtNetwork.framework/Versions/5/QtNetwork\" $$shell_path($$PREFIX/$$XBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtCore.framework/Versions/5/QtCore\" \"@loader_path/QtCore.framework/Versions/5/QtCore\" $$shell_path($$PREFIX/$$XBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtXml.framework/Versions/5/QtXml\" \"@loader_path/QtXml.framework/Versions/5/QtXml\" $$shell_path($$PREFIX/$$XBUS_DIR/libblackmisc.0.dylib)
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/libblackmisc.0.dylib\" \"@loader_path/libblackmisc.0.dylib\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtWidgets.framework/Versions/5/QtWidgets\" \"@loader_path/QtWidgets.framework/Versions/5/QtWidgets\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtGui.framework/Versions/5/QtGui\" \"@loader_path/QtGui.framework/Versions/5/QtGui\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtDBus.framework/Versions/5/QtDBus\" \"@loader_path/QtDBus.framework/Versions/5/QtDBus\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtNetwork.framework/Versions/5/QtNetwork\" \"@loader_path/QtNetwork.framework/Versions/5/QtNetwork\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtCore.framework/Versions/5/QtCore\" \"@loader_path/QtCore.framework/Versions/5/QtCore\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtXml.framework/Versions/5/QtXml\" \"@loader_path/QtXml.framework/Versions/5/QtXml\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib)
QMAKE_EXTRA_TARGETS += fix_plugin_rpath
fix_plugin_rpath.depends += fix_misc_rpath
fix_misc_rpath.target = fix_misc_rpath
fix_misc_rpath.commands += install_name_tool -id \"@loader_path/libblackmisc.0.dylib\" $$shell_path($$PREFIX/$$XBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtGui.framework/Versions/5/QtGui\" \"@loader_path/QtGui.framework/Versions/5/QtGui\" $$shell_path($$PREFIX/$$XBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtDBus.framework/Versions/5/QtDBus\" \"@loader_path/QtDBus.framework/Versions/5/QtDBus\" $$shell_path($$PREFIX/$$XBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtNetwork.framework/Versions/5/QtNetwork\" \"@loader_path/QtNetwork.framework/Versions/5/QtNetwork\" $$shell_path($$PREFIX/$$XBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtCore.framework/Versions/5/QtCore\" \"@loader_path/QtCore.framework/Versions/5/QtCore\" $$shell_path($$PREFIX/$$XBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtXml.framework/Versions/5/QtXml\" \"@loader_path/QtXml.framework/Versions/5/QtXml\" $$shell_path($$PREFIX/$$XBUS_DIR/libblackmisc.0.dylib)
fix_misc_rpath.commands += install_name_tool -id \"@loader_path/libblackmisc.0.dylib\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtGui.framework/Versions/5/QtGui\" \"@loader_path/QtGui.framework/Versions/5/QtGui\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtDBus.framework/Versions/5/QtDBus\" \"@loader_path/QtDBus.framework/Versions/5/QtDBus\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtNetwork.framework/Versions/5/QtNetwork\" \"@loader_path/QtNetwork.framework/Versions/5/QtNetwork\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtCore.framework/Versions/5/QtCore\" \"@loader_path/QtCore.framework/Versions/5/QtCore\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtXml.framework/Versions/5/QtXml\" \"@loader_path/QtXml.framework/Versions/5/QtXml\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib)
QMAKE_EXTRA_TARGETS += fix_misc_rpath
} else:unix: {
@@ -160,7 +160,7 @@ win32 {
dep_target.files *= $$[QT_INSTALL_LIBS]/libicudata.so.56
dep_target.CONFIG += no_check_exist
legacy_data_target.path = $$PREFIX/xbus
legacy_data_target.path = $$PREFIX/xswiftbus
legacy_data_target.files *= LegacyData
}
@@ -177,7 +177,7 @@ win32-g++ {
dep_target.depends += copy_libstdc
copy_libstdc.target = copy_libstdc
source_path = $$[QT_INSTALL_BINS]/libstdc++-6.dll
dest_path = $$PREFIX/$$XBUS_DIR
dest_path = $$PREFIX/$$XSWIFTBUS_DIR
copy_libstdc.commands = xcopy /Y $$shell_path($$source_path) $$shell_path($$dest_path)
QMAKE_EXTRA_TARGETS += copy_libstdc
}