mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T192, init for P2P via CDBusServer::coreServiceName(connection)
This commit is contained in:
@@ -32,7 +32,7 @@ namespace BlackCore
|
||||
{
|
||||
namespace Context
|
||||
{
|
||||
IContextApplication *IContextApplication::create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection)
|
||||
IContextApplication *IContextApplication::create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ namespace BlackCore
|
||||
case CCoreFacadeConfig::LocalInDBusServer:
|
||||
return (new CContextApplication(mode, parent))->registerWithDBus(server);
|
||||
case CCoreFacadeConfig::Remote:
|
||||
return new CContextApplicationProxy(BlackMisc::CDBusServer::coreServiceName(), connection, mode, parent);
|
||||
return new CContextApplicationProxy(CDBusServer::coreServiceName(connection), connection, mode, parent);
|
||||
case CCoreFacadeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextApplicationEmpty(parent);
|
||||
@@ -136,14 +136,14 @@ namespace BlackCore
|
||||
qFatal("Not implemented"); // avoid losing a change during context interface construction
|
||||
}
|
||||
|
||||
void IContextApplication::registerHotkeyActions(const QStringList &actions, const BlackMisc::CIdentifier &origin)
|
||||
void IContextApplication::registerHotkeyActions(const QStringList &actions, const CIdentifier &origin)
|
||||
{
|
||||
Q_UNUSED(actions);
|
||||
Q_UNUSED(origin);
|
||||
qFatal("Not implemented"); // avoid losing a change during context interface construction
|
||||
}
|
||||
|
||||
void IContextApplication::callHotkeyAction(const QString &action, bool argument, const BlackMisc::CIdentifier &origin)
|
||||
void IContextApplication::callHotkeyAction(const QString &action, bool argument, const CIdentifier &origin)
|
||||
{
|
||||
Q_UNUSED(action);
|
||||
Q_UNUSED(argument);
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const override { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextApplication *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextApplication *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextApplication() {}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace BlackCore
|
||||
return CIcons::radio16();
|
||||
}
|
||||
|
||||
IContextAudio *IContextAudio::create(CCoreFacade *runtime, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn)
|
||||
IContextAudio *IContextAudio::create(CCoreFacade *runtime, CCoreFacadeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ namespace BlackCore
|
||||
case CCoreFacadeConfig::LocalInDBusServer:
|
||||
return (new CContextAudio(mode, runtime))->registerWithDBus(server);
|
||||
case CCoreFacadeConfig::Remote:
|
||||
return new CContextAudioProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, runtime);
|
||||
return new CContextAudioProxy(CDBusServer::coreServiceName(connection), connection, mode, runtime);
|
||||
default:
|
||||
return new CContextAudioEmpty(runtime); // audio not mandatory
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const override { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextAudio *create(CCoreFacade *runtime, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextAudio *create(CCoreFacade *runtime, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextAudio() {}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace BlackCore
|
||||
case CCoreFacadeConfig::LocalInDBusServer:
|
||||
return (new CContextNetwork(mode, runtime))->registerWithDBus(server);
|
||||
case CCoreFacadeConfig::Remote:
|
||||
return new CContextNetworkProxy(CDBusServer::coreServiceName(), connection, mode, runtime);
|
||||
return new CContextNetworkProxy(CDBusServer::coreServiceName(connection), connection, mode, runtime);
|
||||
case CCoreFacadeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextNetworkEmpty(runtime);
|
||||
|
||||
@@ -141,9 +141,6 @@ namespace BlackCore
|
||||
//! Connection status changed for online station
|
||||
void changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &atcStation, bool connected);
|
||||
|
||||
//! Terminated connection
|
||||
void connectionTerminated();
|
||||
|
||||
//! User has been kicked from network
|
||||
void kicked(const QString &kickMessage);
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ namespace BlackCore
|
||||
return sApp->getWebDataServices()->getVatsimVoiceServers();
|
||||
}
|
||||
|
||||
void CContextNetwork::fsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to)
|
||||
void CContextNetwork::fsdConnectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to)
|
||||
{
|
||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << from << to; }
|
||||
auto fromOld = m_currentStatus; // own status cached
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BlackCore
|
||||
{
|
||||
CContextNetworkProxy::CContextNetworkProxy(const QString &serviceName, QDBusConnection &connection, CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : IContextNetwork(mode, runtime), m_dBusInterface(nullptr)
|
||||
{
|
||||
m_dBusInterface = new BlackMisc::CGenericDBusInterface(
|
||||
m_dBusInterface = new CGenericDBusInterface(
|
||||
serviceName , IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
|
||||
connection, this);
|
||||
this->relaySignals(serviceName, connection);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "blackmisc/aviation/aircraftsituation.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Geo;
|
||||
@@ -25,7 +26,7 @@ namespace BlackCore
|
||||
{
|
||||
namespace Context
|
||||
{
|
||||
IContextOwnAircraft *IContextOwnAircraft::create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn)
|
||||
IContextOwnAircraft *IContextOwnAircraft::create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -33,7 +34,7 @@ namespace BlackCore
|
||||
case CCoreFacadeConfig::LocalInDBusServer:
|
||||
return (new CContextOwnAircraft(mode, parent))->registerWithDBus(server);
|
||||
case CCoreFacadeConfig::Remote:
|
||||
return new CContextOwnAircraftProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, parent);
|
||||
return new CContextOwnAircraftProxy(CDBusServer::coreServiceName(), connection, mode, parent);
|
||||
case CCoreFacadeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextOwnAircraftEmpty(parent);
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const override { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextOwnAircraft *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextOwnAircraft *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextOwnAircraft() {}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <QFlag>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
namespace BlackCore
|
||||
@@ -34,13 +35,13 @@ namespace BlackCore
|
||||
return s;
|
||||
}
|
||||
|
||||
const BlackMisc::PhysicalQuantities::CTime &IContextSimulator::HighlightTime()
|
||||
const PhysicalQuantities::CTime &IContextSimulator::HighlightTime()
|
||||
{
|
||||
static const CTime t(10.0, CTimeUnit::s());
|
||||
return t;
|
||||
}
|
||||
|
||||
IContextSimulator *IContextSimulator::create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn)
|
||||
IContextSimulator *IContextSimulator::create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@@ -48,7 +49,7 @@ namespace BlackCore
|
||||
case CCoreFacadeConfig::LocalInDBusServer:
|
||||
return (new CContextSimulator(mode, parent))->registerWithDBus(server);
|
||||
case CCoreFacadeConfig::Remote:
|
||||
return new CContextSimulatorProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, parent);
|
||||
return new CContextSimulatorProxy(CDBusServer::coreServiceName(connection), connection, mode, parent);
|
||||
case CCoreFacadeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextSimulatorEmpty(parent);
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace BlackCore
|
||||
virtual QString getPathAndContextId() const override { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
//! Factory method
|
||||
static IContextSimulator *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &conn);
|
||||
static IContextSimulator *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextSimulator() {}
|
||||
|
||||
Reference in New Issue
Block a user