refs #520 CDBusServer style/cleanup.

This commit is contained in:
Mathew Sutcliffe
2015-11-29 20:14:31 +00:00
parent 2a980af25b
commit 01d20c53e7
15 changed files with 186 additions and 234 deletions

View File

@@ -33,7 +33,7 @@ namespace BlackCore
case CRuntimeConfig::LocalInDbusServer:
return (new CContextApplication(mode, parent))->registerWithDBus(server);
case CRuntimeConfig::Remote:
return new BlackCore::CContextApplicationProxy(BlackMisc::CDBusServer::ServiceName(), connection, mode, parent);
return new BlackCore::CContextApplicationProxy(BlackMisc::CDBusServer::coreServiceName(), connection, mode, parent);
case CRuntimeConfig::NotUsed:
default:
return new CContextApplicationEmpty(parent);

View File

@@ -23,7 +23,7 @@ namespace BlackCore
case CRuntimeConfig::LocalInDbusServer:
return (new CContextAudio(mode, runtime))->registerWithDBus(server);
case CRuntimeConfig::Remote:
return new CContextAudioProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, runtime);
return new CContextAudioProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, runtime);
default:
return new CContextAudioEmpty(runtime); // audio not mandatory
}

View File

@@ -23,7 +23,7 @@ namespace BlackCore
case CRuntimeConfig::LocalInDbusServer:
return (new CContextNetwork(mode, runtime))->registerWithDBus(server);
case CRuntimeConfig::Remote:
return new CContextNetworkProxy(BlackMisc::CDBusServer::ServiceName(), connection, mode, runtime);
return new CContextNetworkProxy(BlackMisc::CDBusServer::coreServiceName(), connection, mode, runtime);
case CRuntimeConfig::NotUsed:
default:
return new CContextNetworkEmpty(runtime);

View File

@@ -22,7 +22,7 @@ namespace BlackCore
case CRuntimeConfig::LocalInDbusServer:
return (new CContextOwnAircraft(mode, parent))->registerWithDBus(server);
case CRuntimeConfig::Remote:
return new CContextOwnAircraftProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, parent);
return new CContextOwnAircraftProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, parent);
case CRuntimeConfig::NotUsed:
default:
return new CContextOwnAircraftEmpty(parent);

View File

@@ -212,7 +212,7 @@ namespace BlackCore
disconnect(this);
// unregister all from DBus
if (this->m_dbusServer) { this->m_dbusServer->unregisterAllObjects(); }
if (this->m_dbusServer) { this->m_dbusServer->removeAllObjects(); }
// handle contexts
if (this->getIContextSimulator())
@@ -272,11 +272,11 @@ namespace BlackCore
void CRuntime::initDBusConnection(const QString &address)
{
if (this->m_initDBusConnection) { return; }
if (address.isEmpty() || address == CDBusServer::sessionDBusServer())
if (address.isEmpty() || address == CDBusServer::sessionBusAddress())
{
this->m_dbusConnection = QDBusConnection::sessionBus();
}
else if (address == CDBusServer::systemDBusServer())
else if (address == CDBusServer::systemBusAddress())
{
this->m_dbusConnection = QDBusConnection::sessionBus();
}

View File

@@ -42,7 +42,7 @@ namespace BlackCore
case CRuntimeConfig::LocalInDbusServer:
return (new CContextSimulator(mode, parent))->registerWithDBus(server);
case CRuntimeConfig::Remote:
return new CContextSimulatorProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, parent);
return new CContextSimulatorProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, parent);
case CRuntimeConfig::NotUsed:
default:
return new CContextSimulatorEmpty(parent);