diff --git a/samples/blackmiscdbus/main.cpp b/samples/blackmiscdbus/main.cpp index f32b9fe27..ff81bda44 100644 --- a/samples/blackmiscdbus/main.cpp +++ b/samples/blackmiscdbus/main.cpp @@ -9,7 +9,7 @@ #include "blackmisc/registermetadata.h" #include "servicetool.h" -#include "blackcore/dbusserver.h" +#include "blackmisc/dbusserver.h" #include #include #include @@ -122,7 +122,7 @@ int main(int argc, char *argv[]) qDebug(); qDebug("--------------------------------------------------------"); - BlackCore::CDBusServer *dBusServer = new BlackCore::CDBusServer(useSessionBusForServer ? "session" : address); + BlackMisc::CDBusServer *dBusServer = new BlackMisc::CDBusServer(useSessionBusForServer ? "session" : address); if (dBusServer->hasQDBusServer()) { qDebug() << "server" << dBusServer->qDBusServer()->address() << "connected:" << dBusServer->qDBusServer()->isConnected(); diff --git a/samples/blackmiscdbus/servicetool.cpp b/samples/blackmiscdbus/servicetool.cpp index 45bd3838e..d54da1ea6 100644 --- a/samples/blackmiscdbus/servicetool.cpp +++ b/samples/blackmiscdbus/servicetool.cpp @@ -10,7 +10,7 @@ #include "servicetool.h" #include "testservice.h" #include "testserviceinterface.h" -#include "blackcore/dbusserver.h" +#include "blackmisc/dbusserver.h" #include #include @@ -59,7 +59,7 @@ namespace BlackMiscTest arg.endArray(); } - void ServiceTool::dataTransferTestServer(BlackCore::CDBusServer *dBusServer) + void ServiceTool::dataTransferTestServer(BlackMisc::CDBusServer *dBusServer) { QDBusConnection sessionBusConnection = QDBusConnection::sessionBus(); if (sessionBusConnection.interface()->isServiceRegistered(Testservice::ServiceName)) diff --git a/samples/blackmiscdbus/servicetool.h b/samples/blackmiscdbus/servicetool.h index 3a2844ef7..4bce49cd0 100644 --- a/samples/blackmiscdbus/servicetool.h +++ b/samples/blackmiscdbus/servicetool.h @@ -12,7 +12,7 @@ #ifndef BLACKMISCTEST_SERVICETOOL_H #define BLACKMISCTEST_SERVICETOOL_H -#include "blackcore/dbusserver.h" +#include "blackmisc/dbusserver.h" #include "blackmisc/aviation/atcstationlist.h" #include "blackmisc/aviation/airportlist.h" #include "blackmisc/network/clientlist.h" @@ -52,7 +52,7 @@ namespace BlackMiscTest /*! * \brief Server side of data transfer test */ - static void dataTransferTestServer(BlackCore::CDBusServer *dBusServer); + static void dataTransferTestServer(BlackMisc::CDBusServer *dBusServer); /*! * \brief Start a new process diff --git a/src/blackcore/contextapplication.cpp b/src/blackcore/contextapplication.cpp index e8fc76dc0..f98d0772b 100644 --- a/src/blackcore/contextapplication.cpp +++ b/src/blackcore/contextapplication.cpp @@ -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); diff --git a/src/blackcore/contextapplication.h b/src/blackcore/contextapplication.h index 377490a9b..4d85d07f2 100644 --- a/src/blackcore/contextapplication.h +++ b/src/blackcore/contextapplication.h @@ -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() {} diff --git a/src/blackcore/contextapplicationimpl.cpp b/src/blackcore/contextapplicationimpl.cpp index 9f5eff53e..0116b8190 100644 --- a/src/blackcore/contextapplicationimpl.cpp +++ b/src/blackcore/contextapplicationimpl.cpp @@ -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); diff --git a/src/blackcore/contextapplicationimpl.h b/src/blackcore/contextapplicationimpl.h index a61a07831..1cb28db50 100644 --- a/src/blackcore/contextapplicationimpl.h +++ b/src/blackcore/contextapplicationimpl.h @@ -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; diff --git a/src/blackcore/contextaudio.cpp b/src/blackcore/contextaudio.cpp index ceb643bab..76d9e8729 100644 --- a/src/blackcore/contextaudio.cpp +++ b/src/blackcore/contextaudio.cpp @@ -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 } diff --git a/src/blackcore/contextaudio.h b/src/blackcore/contextaudio.h index a720e5f53..6055ad795 100644 --- a/src/blackcore/contextaudio.h +++ b/src/blackcore/contextaudio.h @@ -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() {} diff --git a/src/blackcore/contextaudioempty.h b/src/blackcore/contextaudioempty.h index 5653a701e..20e22d386 100644 --- a/src/blackcore/contextaudioempty.h +++ b/src/blackcore/contextaudioempty.h @@ -14,8 +14,8 @@ #include "blackcoreexport.h" #include "contextaudio.h" -#include "dbusserver.h" #include "voice.h" +#include "blackmisc/dbusserver.h" namespace BlackCore { diff --git a/src/blackcore/contextaudioimpl.h b/src/blackcore/contextaudioimpl.h index 4119587b3..b0df32b53 100644 --- a/src/blackcore/contextaudioimpl.h +++ b/src/blackcore/contextaudioimpl.h @@ -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 @@ -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); diff --git a/src/blackcore/contextnetwork.cpp b/src/blackcore/contextnetwork.cpp index 2be8deba8..7de6c84fc 100644 --- a/src/blackcore/contextnetwork.cpp +++ b/src/blackcore/contextnetwork.cpp @@ -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); diff --git a/src/blackcore/contextnetwork.h b/src/blackcore/contextnetwork.h index 55819b46a..db58a285a 100644 --- a/src/blackcore/contextnetwork.h +++ b/src/blackcore/contextnetwork.h @@ -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() {} diff --git a/src/blackcore/contextnetworkimpl.cpp b/src/blackcore/contextnetworkimpl.cpp index 61abf1fd4..3313006b4 100644 --- a/src/blackcore/contextnetworkimpl.cpp +++ b/src/blackcore/contextnetworkimpl.cpp @@ -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); diff --git a/src/blackcore/contextnetworkimpl.h b/src/blackcore/contextnetworkimpl.h index ce9697974..d5dccf200 100644 --- a/src/blackcore/contextnetworkimpl.h +++ b/src/blackcore/contextnetworkimpl.h @@ -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; diff --git a/src/blackcore/contextownaircraft.cpp b/src/blackcore/contextownaircraft.cpp index 61e51990a..4ec778ce9 100644 --- a/src/blackcore/contextownaircraft.cpp +++ b/src/blackcore/contextownaircraft.cpp @@ -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); diff --git a/src/blackcore/contextownaircraft.h b/src/blackcore/contextownaircraft.h index 78108d28f..b5ad6dd31 100644 --- a/src/blackcore/contextownaircraft.h +++ b/src/blackcore/contextownaircraft.h @@ -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() {} diff --git a/src/blackcore/contextownaircraftimpl.h b/src/blackcore/contextownaircraftimpl.h index 97fd7eb83..88020e8cd 100644 --- a/src/blackcore/contextownaircraftimpl.h +++ b/src/blackcore/contextownaircraftimpl.h @@ -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); diff --git a/src/blackcore/contextruntime.h b/src/blackcore/contextruntime.h index 6590abf55..fe6b2d9ba 100644 --- a/src/blackcore/contextruntime.h +++ b/src/blackcore/contextruntime.h @@ -24,11 +24,12 @@ #include #include +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 m_dbusServerAddress { this }; // DBus - CDBusServer *m_dbusServer = nullptr; + BlackMisc::CDBusServer *m_dbusServer = nullptr; QDBusConnection m_dbusConnection = QDBusConnection("default"); bool m_initDBusConnection = false; diff --git a/src/blackcore/contextsimulator.cpp b/src/blackcore/contextsimulator.cpp index c1843c20e..6ddd37304 100644 --- a/src/blackcore/contextsimulator.cpp +++ b/src/blackcore/contextsimulator.cpp @@ -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); diff --git a/src/blackcore/contextsimulator.h b/src/blackcore/contextsimulator.h index d4a5fd6eb..736f720e9 100644 --- a/src/blackcore/contextsimulator.h +++ b/src/blackcore/contextsimulator.h @@ -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() {} diff --git a/src/blackcore/contextsimulatorimpl.h b/src/blackcore/contextsimulatorimpl.h index 84160bee6..37a71b2f0 100644 --- a/src/blackcore/contextsimulatorimpl.h +++ b/src/blackcore/contextsimulatorimpl.h @@ -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); diff --git a/src/blackgui/components/settingscomponent.cpp b/src/blackgui/components/settingscomponent.cpp index b81383763..f6e665323 100644 --- a/src/blackgui/components/settingscomponent.cpp +++ b/src/blackgui/components/settingscomponent.cpp @@ -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 diff --git a/src/blackcore/dbusserver.cpp b/src/blackmisc/dbusserver.cpp similarity index 99% rename from src/blackcore/dbusserver.cpp rename to src/blackmisc/dbusserver.cpp index 1acb7b3bb..0ffd58a41 100644 --- a/src/blackcore/dbusserver.cpp +++ b/src/blackmisc/dbusserver.cpp @@ -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 #include -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; } diff --git a/src/blackcore/dbusserver.h b/src/blackmisc/dbusserver.h similarity index 94% rename from src/blackcore/dbusserver.h rename to src/blackmisc/dbusserver.h index ddb4059ef..b180d5831 100644 --- a/src/blackcore/dbusserver.h +++ b/src/blackmisc/dbusserver.h @@ -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 #include @@ -22,9 +22,9 @@ #include //! 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 diff --git a/src/plugins/simulator/xplane/simulatorxplane.cpp b/src/plugins/simulator/xplane/simulatorxplane.cpp index f465cb01a..24fcdeee9 100644 --- a/src/plugins/simulator/xplane/simulatorxplane.cpp +++ b/src/plugins/simulator/xplane/simulatorxplane.cpp @@ -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(); } diff --git a/src/plugins/simulator/xplane/xbusserviceproxy.cpp b/src/plugins/simulator/xplane/xbusserviceproxy.cpp index 06d00d517..69fe0c3a4 100644 --- a/src/plugins/simulator/xplane/xbusserviceproxy.cpp +++ b/src/plugins/simulator/xplane/xbusserviceproxy.cpp @@ -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 #define XBUS_SERVICE_SERVICENAME "org.swift-project.xbus" diff --git a/src/plugins/simulator/xplane/xbustrafficproxy.cpp b/src/plugins/simulator/xplane/xbustrafficproxy.cpp index eb86ac74d..25caeccdb 100644 --- a/src/plugins/simulator/xplane/xbustrafficproxy.cpp +++ b/src/plugins/simulator/xplane/xbustrafficproxy.cpp @@ -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 #define XBUS_SERVICENAME "org.swift-project.xbus" diff --git a/src/plugins/simulator/xplane/xbusweatherproxy.cpp b/src/plugins/simulator/xplane/xbusweatherproxy.cpp index b4dea1b34..9ff83a692 100644 --- a/src/plugins/simulator/xplane/xbusweatherproxy.cpp +++ b/src/plugins/simulator/xplane/xbusweatherproxy.cpp @@ -8,7 +8,7 @@ */ #include "xbusweatherproxy.h" -#include "blackcore/dbusserver.h" +#include "blackmisc/dbusserver.h" #define XBUS_SERVICENAME "org.swift-project.xbus" diff --git a/src/plugins/simulator/xplaneconfig/simulatorxplaneconfigwindow.cpp b/src/plugins/simulator/xplaneconfig/simulatorxplaneconfigwindow.cpp index 7027a500b..7886529e7 100644 --- a/src/plugins/simulator/xplaneconfig/simulatorxplaneconfigwindow.cpp +++ b/src/plugins/simulator/xplaneconfig/simulatorxplaneconfigwindow.cpp @@ -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 @@ -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); diff --git a/src/swiftcore/main.cpp b/src/swiftcore/main.cpp index c62beff6e..c55020dab 100644 --- a/src/swiftcore/main.cpp +++ b/src/swiftcore/main.cpp @@ -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" diff --git a/src/swiftcore/swiftcore.cpp b/src/swiftcore/swiftcore.cpp index 3db719e0e..7b6d5cd1d 100644 --- a/src/swiftcore/swiftcore.cpp +++ b/src/swiftcore/swiftcore.cpp @@ -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 #include diff --git a/src/swiftguistandard/swiftguistd.cpp b/src/swiftguistandard/swiftguistd.cpp index 6eb15776e..035aa8d67 100644 --- a/src/swiftguistandard/swiftguistd.cpp +++ b/src/swiftguistandard/swiftguistd.cpp @@ -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 diff --git a/src/swiftguistandard/swiftguistdaircraft.cpp b/src/swiftguistandard/swiftguistdaircraft.cpp index 9a83e173d..6d2ed8324 100644 --- a/src/swiftguistandard/swiftguistdaircraft.cpp +++ b/src/swiftguistandard/swiftguistdaircraft.cpp @@ -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; diff --git a/src/swiftguistandard/swiftguistdinit.cpp b/src/swiftguistandard/swiftguistdinit.cpp index a3fee4e05..0a04b5fab 100644 --- a/src/swiftguistandard/swiftguistdinit.cpp +++ b/src/swiftguistandard/swiftguistdinit.cpp @@ -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" diff --git a/src/swiftlauncher/swiftlauncher.cpp b/src/swiftlauncher/swiftlauncher.cpp index 831ca3d4b..947c0ef25 100644 --- a/src/swiftlauncher/swiftlauncher.cpp +++ b/src/swiftlauncher/swiftlauncher.cpp @@ -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" diff --git a/src/xbus/plugin.cpp b/src/xbus/plugin.cpp index b3a202466..e04623278 100644 --- a/src/xbus/plugin.cpp +++ b/src/xbus/plugin.cpp @@ -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); diff --git a/src/xbus/plugin.h b/src/xbus/plugin.h index 9d2c4e5de..7b3923271 100644 --- a/src/xbus/plugin.h +++ b/src/xbus/plugin.h @@ -20,7 +20,7 @@ #pragma push_macro("interface") #undef interface -#include "blackcore/dbusserver.h" +#include "blackmisc/dbusserver.h" #pragma pop_macro("interface") #include @@ -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;