mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
refs #520 Moved CDBusServer from BlackCore to BlackMisc.
This commit is contained in:
@@ -25,7 +25,7 @@ using namespace BlackMisc;
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
IContextApplication *IContextApplication::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection)
|
||||
IContextApplication *IContextApplication::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -33,7 +33,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextApplication(mode, parent))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new BlackCore::CContextApplicationProxy(BlackCore::CDBusServer::ServiceName(), connection, mode, parent);
|
||||
return new BlackCore::CContextApplicationProxy(BlackMisc::CDBusServer::ServiceName(), connection, mode, parent);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextApplicationEmpty(parent);
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextApplication *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextApplication *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextApplication() {}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace BlackCore
|
||||
IContextApplication(mode, runtime)
|
||||
{}
|
||||
|
||||
CContextApplication *CContextApplication::registerWithDBus(CDBusServer *server)
|
||||
CContextApplication *CContextApplication::registerWithDBus(BlackMisc::CDBusServer *server)
|
||||
{
|
||||
if (!server || this->m_mode != CRuntimeConfig::LocalInDbusServer) { return this; }
|
||||
server->addObject(IContextApplication::ObjectPath(), this);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "blackcoreexport.h"
|
||||
#include "contextapplication.h"
|
||||
#include "contextruntime.h"
|
||||
#include "dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/identifierlist.h"
|
||||
|
||||
namespace BlackCore
|
||||
@@ -95,7 +95,7 @@ namespace BlackCore
|
||||
CContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime);
|
||||
|
||||
//! Register myself in DBus, fail safe
|
||||
CContextApplication *registerWithDBus(CDBusServer *server);
|
||||
CContextApplication *registerWithDBus(BlackMisc::CDBusServer *server);
|
||||
|
||||
private:
|
||||
BlackMisc::CIdentifierList m_registeredApplications;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
IContextAudio *IContextAudio::create(CRuntime *runtime, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn)
|
||||
IContextAudio *IContextAudio::create(CRuntime *runtime, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -23,7 +23,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextAudio(mode, runtime))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextAudioProxy(BlackCore::CDBusServer::ServiceName(), conn, mode, runtime);
|
||||
return new CContextAudioProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, runtime);
|
||||
default:
|
||||
return new CContextAudioEmpty(runtime); // audio not mandatory
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextAudio *create(CRuntime *runtime, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextAudio *create(CRuntime *runtime, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextAudio() {}
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "blackcoreexport.h"
|
||||
#include "contextaudio.h"
|
||||
#include "dbusserver.h"
|
||||
#include "voice.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackcore/contextaudio.h"
|
||||
#include "blackcore/contextruntime.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/voice.h"
|
||||
#include "blackcore/voicechannel.h"
|
||||
#include "blackcore/audiodevice.h"
|
||||
@@ -23,6 +22,7 @@
|
||||
#include "blackcore/actionbind.h"
|
||||
#include "blackinput/keyboard.h"
|
||||
#include "blackcore/settings/audio.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
|
||||
#include <QThread>
|
||||
@@ -122,7 +122,7 @@ namespace BlackCore
|
||||
CContextAudio(CRuntimeConfig::ContextMode mode, CRuntime *runtime);
|
||||
|
||||
//! Register myself in DBus
|
||||
CContextAudio *registerWithDBus(CDBusServer *server)
|
||||
CContextAudio *registerWithDBus(BlackMisc::CDBusServer *server)
|
||||
{
|
||||
if (!server || this->m_mode != CRuntimeConfig::LocalInDbusServer) { return this; }
|
||||
server->addObject(IContextAudio::ObjectPath(), this);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
IContextNetwork *IContextNetwork::create(CRuntime *runtime, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection)
|
||||
IContextNetwork *IContextNetwork::create(CRuntime *runtime, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -23,7 +23,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextNetwork(mode, runtime))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextNetworkProxy(BlackCore::CDBusServer::ServiceName(), connection, mode, runtime);
|
||||
return new CContextNetworkProxy(BlackMisc::CDBusServer::ServiceName(), connection, mode, runtime);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextNetworkEmpty(runtime);
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextNetwork *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection);
|
||||
static IContextNetwork *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextNetwork() {}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace BlackCore
|
||||
connect(this->m_airspace, &CAirspaceMonitor::addedAircraft, this, &CContextNetwork::addedAircraft);
|
||||
}
|
||||
|
||||
CContextNetwork *CContextNetwork::registerWithDBus(CDBusServer *server)
|
||||
CContextNetwork *CContextNetwork::registerWithDBus(BlackMisc::CDBusServer *server)
|
||||
{
|
||||
if (!server || this->m_mode != CRuntimeConfig::LocalInDbusServer) return this;
|
||||
server->addObject(IContextNetwork::ObjectPath(), this);
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "blackcoreexport.h"
|
||||
#include "blackcore/contextnetwork.h"
|
||||
#include "blackcore/contextruntime.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/network.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/simulation/remoteaircraftprovider.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/aircraftsituationlist.h"
|
||||
@@ -233,7 +233,7 @@ namespace BlackCore
|
||||
CContextNetwork(CRuntimeConfig::ContextMode, CRuntime *runtime);
|
||||
|
||||
//! Register myself in DBus
|
||||
CContextNetwork *registerWithDBus(CDBusServer *server);
|
||||
CContextNetwork *registerWithDBus(BlackMisc::CDBusServer *server);
|
||||
|
||||
private:
|
||||
CAirspaceMonitor *m_airspace = nullptr;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
IContextOwnAircraft *IContextOwnAircraft::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn)
|
||||
IContextOwnAircraft *IContextOwnAircraft::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextOwnAircraft(mode, parent))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextOwnAircraftProxy(BlackCore::CDBusServer::ServiceName(), conn, mode, parent);
|
||||
return new CContextOwnAircraftProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, parent);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextOwnAircraftEmpty(parent);
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextOwnAircraft *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextOwnAircraft *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextOwnAircraft() {}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "blackcoreexport.h"
|
||||
#include "blackcore/contextownaircraft.h"
|
||||
#include "blackcore/contextruntime.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/settings/network.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/simulation/ownaircraftprovider.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
@@ -123,7 +123,7 @@ namespace BlackCore
|
||||
CContextOwnAircraft(CRuntimeConfig::ContextMode, CRuntime *runtime);
|
||||
|
||||
//! Register myself in DBus
|
||||
CContextOwnAircraft *registerWithDBus(CDBusServer *server)
|
||||
CContextOwnAircraft *registerWithDBus(BlackMisc::CDBusServer *server)
|
||||
{
|
||||
if (!server || this->m_mode != CRuntimeConfig::LocalInDbusServer) return this;
|
||||
server->addObject(IContextOwnAircraft::ObjectPath(), this);
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
#include <QMultiMap>
|
||||
#include <QReadWriteLock>
|
||||
|
||||
namespace BlackMisc { class CDBusServer; }
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
// forward declaration, see review
|
||||
// https://dev.vatsim-germany.org/boards/22/topics/1350?r=1359#message-1359
|
||||
class CDBusServer;
|
||||
class CContextApplication;
|
||||
class CContextAudio;
|
||||
class CContextNetwork;
|
||||
@@ -53,7 +54,7 @@ namespace BlackCore
|
||||
virtual ~CRuntime() { this->gracefulShutdown(); }
|
||||
|
||||
//! DBus server (if applicable)
|
||||
const CDBusServer *getDBusServer() const { return this->m_dbusServer; }
|
||||
const BlackMisc::CDBusServer *getDBusServer() const { return this->m_dbusServer; }
|
||||
|
||||
//! DBus connection (if applicable)
|
||||
const QDBusConnection &getDBusConnection() const { return this->m_dbusConnection; }
|
||||
@@ -153,7 +154,7 @@ namespace BlackCore
|
||||
CSetting<Settings::Network::DBusServerAddress> m_dbusServerAddress { this };
|
||||
|
||||
// DBus
|
||||
CDBusServer *m_dbusServer = nullptr;
|
||||
BlackMisc::CDBusServer *m_dbusServer = nullptr;
|
||||
QDBusConnection m_dbusConnection = QDBusConnection("default");
|
||||
bool m_initDBusConnection = false;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackCore
|
||||
return t;
|
||||
}
|
||||
|
||||
IContextSimulator *IContextSimulator::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn)
|
||||
IContextSimulator *IContextSimulator::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextSimulator(mode, parent))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextSimulatorProxy(BlackCore::CDBusServer::ServiceName(), conn, mode, parent);
|
||||
return new CContextSimulatorProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, parent);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextSimulatorEmpty(parent);
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "blackcoreexport.h"
|
||||
#include "context.h"
|
||||
#include "blackcore/simulator.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/contextruntime.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
#include "blackmisc/simulation/simulatorsetup.h"
|
||||
@@ -61,7 +61,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextSimulator *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextSimulator *create(CRuntime *parent, CRuntimeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextSimulator() {}
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace BlackCore
|
||||
CContextSimulator(CRuntimeConfig::ContextMode, CRuntime *runtime);
|
||||
|
||||
//! Register myself in DBus
|
||||
CContextSimulator *registerWithDBus(CDBusServer *server)
|
||||
CContextSimulator *registerWithDBus(BlackMisc::CDBusServer *server)
|
||||
{
|
||||
if (!server || this->m_mode != CRuntimeConfig::LocalInDbusServer) return this;
|
||||
server->addObject(CContextSimulator::ObjectPath(), this);
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#include "ui_settingscomponent.h"
|
||||
#include "blackgui/models/atcstationlistmodel.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/contextnetwork.h"
|
||||
#include "blackcore/contextaudio.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/input/keyboardkeylist.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include <QColorDialog>
|
||||
|
||||
@@ -7,16 +7,15 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "dbusserver.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "dbusserver.h"
|
||||
#include <QProcess>
|
||||
#include <QMetaClassInfo>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
namespace BlackCore
|
||||
namespace BlackMisc
|
||||
{
|
||||
/*
|
||||
* Constructor
|
||||
@@ -98,7 +97,7 @@ namespace BlackCore
|
||||
|
||||
const QString &CDBusServer::ServiceName()
|
||||
{
|
||||
static const QString sn(BLACKCORE_RUNTIME_SERVICENAME);
|
||||
static const QString sn(SWIFT_SERVICENAME);
|
||||
return sn;
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_DBUSSERVER_H
|
||||
#define BLACKCORE_DBUSSERVER_H
|
||||
#ifndef BLACKMISC_DBUSSERVER_H
|
||||
#define BLACKMISC_DBUSSERVER_H
|
||||
|
||||
#include "blackcoreexport.h"
|
||||
#include "blackmiscexport.h"
|
||||
#include "blackmisc/valueobject.h" // for qHash overload, include before Qt stuff due GCC issue
|
||||
#include <QObject>
|
||||
#include <QtDBus/QDBusServer>
|
||||
@@ -22,9 +22,9 @@
|
||||
#include <QMap>
|
||||
|
||||
//! Service name of DBus service
|
||||
#define BLACKCORE_RUNTIME_SERVICENAME "org.swift-project"
|
||||
#define SWIFT_SERVICENAME "org.swift-project"
|
||||
|
||||
namespace BlackCore
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
/*!
|
||||
@@ -33,10 +33,10 @@ namespace BlackCore
|
||||
* with session or system bus. For session / system bus this class represents no real server,
|
||||
* but more a wrapper for \sa QDBusConnection and the registered objects
|
||||
*/
|
||||
class BLACKCORE_EXPORT CDBusServer : public QObject
|
||||
class BLACKMISC_EXPORT CDBusServer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", BLACKCORE_RUNTIME_SERVICENAME)
|
||||
Q_CLASSINFO("D-Bus Interface", SWIFT_SERVICENAME)
|
||||
|
||||
public:
|
||||
//! Service name of DBus server
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "xbusserviceproxy.h"
|
||||
#include "xbustrafficproxy.h"
|
||||
#include "xbusweatherproxy.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/simulation/modelmappingsprovider.h"
|
||||
@@ -354,11 +354,11 @@ namespace BlackSimPlugin
|
||||
|
||||
QDBusConnection CSimulatorXPlane::connectionFromString(const QString &str)
|
||||
{
|
||||
if (str == BlackCore::CDBusServer::sessionDBusServer())
|
||||
if (str == BlackMisc::CDBusServer::sessionDBusServer())
|
||||
{
|
||||
return QDBusConnection::sessionBus();
|
||||
}
|
||||
else if (str == BlackCore::CDBusServer::systemDBusServer())
|
||||
else if (str == BlackMisc::CDBusServer::systemDBusServer())
|
||||
{
|
||||
return QDBusConnection::systemBus();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "xbusserviceproxy.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include <QMetaMethod>
|
||||
|
||||
#define XBUS_SERVICE_SERVICENAME "org.swift-project.xbus"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "xbustrafficproxy.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include <QMetaMethod>
|
||||
|
||||
#define XBUS_SERVICENAME "org.swift-project.xbus"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "xbusweatherproxy.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
|
||||
#define XBUS_SERVICENAME "org.swift-project.xbus"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "simulatorxplaneconfigwindow.h"
|
||||
#include "ui_simulatorxplaneconfigwindow.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/simulation/xplane/xplaneutil.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include <QStringBuilder>
|
||||
@@ -30,8 +30,8 @@ namespace BlackSimPlugin
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->cp_XBusServer->addItem(BlackCore::CDBusServer::sessionDBusServer());
|
||||
ui->cp_XBusServer->addItem(BlackCore::CDBusServer::systemDBusServer());
|
||||
ui->cp_XBusServer->addItem(BlackMisc::CDBusServer::sessionDBusServer());
|
||||
ui->cp_XBusServer->addItem(BlackMisc::CDBusServer::systemDBusServer());
|
||||
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CSimulatorXPlaneConfigWindow::ps_storeSettings);
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CSimulatorXPlaneConfigWindow::close);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "blackcore/contextruntime.h"
|
||||
#include "blackcore/contextapplication.h"
|
||||
#include "blackcore/contextapplicationimpl.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/worker.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#include "blackmisc/icon.h"
|
||||
#include "blackmisc/loghandler.h"
|
||||
#include "blackmisc/project.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackgui/components/logcomponent.h"
|
||||
#include "blackgui/components/enableforruntime.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
#include "blackgui/models/atcstationlistmodel.h"
|
||||
#include "blackgui/components/logcomponent.h"
|
||||
#include "blackgui/components/settingscomponent.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/contextnetwork.h"
|
||||
#include "blackcore/contextapplication.h"
|
||||
#include "blackcore/contextownaircraft.h"
|
||||
#include "blackcore/network.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
#include <QMouseEvent>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "swiftguistd.h"
|
||||
#include "blackgui/models/atcstationlistmodel.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackcore/contextnetwork.h"
|
||||
|
||||
using namespace BlackCore;
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
#include "swiftguistd.h"
|
||||
#include "ui_swiftguistd.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/contextallinterfaces.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackgui/guiutility.h"
|
||||
#include "blackgui/components/allmaininfoareacomponents.h"
|
||||
#include "blackgui/models/atcstationlistmodel.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
#include "blackmisc/project.h"
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "swiftlauncher.h"
|
||||
#include "ui_swiftlauncher.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackcore/setupreader.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/project.h"
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace XBus
|
||||
CPlugin::CPlugin()
|
||||
: m_menu(CMenu::mainMenu().subMenu("XBus"))
|
||||
{
|
||||
m_startServerMenuItems.push_back(m_menu.item("Start server on session bus", [this]{ startServer(BlackCore::CDBusServer::sessionDBusServer()); }));
|
||||
m_startServerMenuItems.push_back(m_menu.item("Start server on system bus", [this]{ startServer(BlackCore::CDBusServer::systemDBusServer()); }));
|
||||
m_startServerMenuItems.push_back(m_menu.item("Start server on localhost P2P", [this]{ startServer(BlackCore::CDBusServer::p2pAddress()); }));
|
||||
m_startServerMenuItems.push_back(m_menu.item("Start server on session bus", [this]{ startServer(BlackMisc::CDBusServer::sessionDBusServer()); }));
|
||||
m_startServerMenuItems.push_back(m_menu.item("Start server on system bus", [this]{ startServer(BlackMisc::CDBusServer::systemDBusServer()); }));
|
||||
m_startServerMenuItems.push_back(m_menu.item("Start server on localhost P2P", [this]{ startServer(BlackMisc::CDBusServer::p2pAddress()); }));
|
||||
}
|
||||
|
||||
void CPlugin::startServer(const QString &address)
|
||||
@@ -30,7 +30,7 @@ namespace XBus
|
||||
Q_ASSERT(! m_server);
|
||||
for (auto &item : m_startServerMenuItems) { item.setEnabled(false); }
|
||||
|
||||
m_server = new BlackCore::CDBusServer(xbusServiceName(), address, this);
|
||||
m_server = new BlackMisc::CDBusServer(xbusServiceName(), address, this);
|
||||
m_service = new CService(this);
|
||||
m_traffic = new CTraffic(this);
|
||||
m_weather = new CWeather(this);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#pragma push_macro("interface")
|
||||
#undef interface
|
||||
#include "blackcore/dbusserver.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#pragma pop_macro("interface")
|
||||
|
||||
#include <QVector>
|
||||
@@ -49,7 +49,7 @@ namespace XBus
|
||||
void onAircraftRepositioned();
|
||||
|
||||
private:
|
||||
BlackCore::CDBusServer *m_server = nullptr;
|
||||
BlackMisc::CDBusServer *m_server = nullptr;
|
||||
CService *m_service = nullptr;
|
||||
CTraffic *m_traffic = nullptr;
|
||||
CWeather *m_weather = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user