[AFV] Ref T739, changed facade config

* core audio mode is remote
* plus minor style changes
This commit is contained in:
Klaus Basan
2019-11-02 19:24:40 +01:00
committed by Mat Sutcliffe
parent b0714d3d80
commit 991681a1ea
2 changed files with 18 additions and 19 deletions

View File

@@ -14,12 +14,12 @@ namespace BlackCore
{ {
return ( return (
// those 3 should decide whether we are running the server // those 3 should decide whether we are running the server
this->m_network == LocalInDBusServer || m_network == LocalInDBusServer ||
this->m_ownAircraft == LocalInDBusServer || m_ownAircraft == LocalInDBusServer ||
this->m_simulator == LocalInDBusServer || m_simulator == LocalInDBusServer ||
// added as work around // added as work around
this->m_audio == LocalInDBusServer m_audio == LocalInDBusServer
); );
} }
@@ -30,11 +30,11 @@ namespace BlackCore
bool CCoreFacadeConfig::any(CCoreFacadeConfig::ContextMode mode) const bool CCoreFacadeConfig::any(CCoreFacadeConfig::ContextMode mode) const
{ {
return (this->m_application == mode || return (m_application == mode ||
this->m_audio == mode || m_audio == mode ||
this->m_network == mode || m_network == mode ||
this->m_ownAircraft == mode || m_ownAircraft == mode ||
this->m_simulator == mode); m_simulator == mode);
} }
bool CCoreFacadeConfig::anyRemote() const bool CCoreFacadeConfig::anyRemote() const
@@ -62,7 +62,6 @@ namespace BlackCore
CCoreFacadeConfig CCoreFacadeConfig::remote(const QString &dbusBootstrapAddress) CCoreFacadeConfig CCoreFacadeConfig::remote(const QString &dbusBootstrapAddress)
{ {
CCoreFacadeConfig cfg = CCoreFacadeConfig(CCoreFacadeConfig(CCoreFacadeConfig::Remote, dbusBootstrapAddress)); CCoreFacadeConfig cfg = CCoreFacadeConfig(CCoreFacadeConfig(CCoreFacadeConfig::Remote, dbusBootstrapAddress));
cfg.m_audio = CCoreFacadeConfig::LocalInDBusServer;
return cfg; return cfg;
} }

View File

@@ -52,31 +52,31 @@ namespace BlackCore
m_dbusAddress(dbusBootstrapAddress) m_dbusAddress(dbusBootstrapAddress)
{} {}
//! application mode //! Application mode
ContextMode getModeApplication() const { return m_application; } ContextMode getModeApplication() const { return m_application; }
//! audio mode //! Audio mode
ContextMode getModeAudio() const { return m_audio; } ContextMode getModeAudio() const { return m_audio; }
//! network mode //! Network mode
ContextMode getModeNetwork() const { return m_network; } ContextMode getModeNetwork() const { return m_network; }
//! own aircraft //! Own aircraft
ContextMode getModeOwnAircraft() const { return m_ownAircraft; } ContextMode getModeOwnAircraft() const { return m_ownAircraft; }
//! settings mode //! Settings mode
ContextMode getModeSettings() const { return m_settings; } ContextMode getModeSettings() const { return m_settings; }
//! simulator mode //! Simulator mode
ContextMode getModeSimulator() const { return m_simulator; } ContextMode getModeSimulator() const { return m_simulator; }
//! local settings? //! Local settings?
bool hasLocalSettings() const { return m_settings == Local || m_settings == LocalInDBusServer; } bool hasLocalSettings() const { return m_settings == Local || m_settings == LocalInDBusServer; }
//! requires server (at least one in server)? //! Requires server (at least one in server)?
bool requiresDBusSever() const; bool requiresDBusSever() const;
//! requires DBus connection (at least one remote)? //! Requires DBus connection (at least one remote)?
bool requiresDBusConnection() const; bool requiresDBusConnection() const;
//! DBus address //! DBus address