diff --git a/src/blackcore/context_runtime.cpp b/src/blackcore/context_runtime.cpp index 2b74fdddd..c4137e2f4 100644 --- a/src/blackcore/context_runtime.cpp +++ b/src/blackcore/context_runtime.cpp @@ -262,6 +262,24 @@ namespace BlackCore return static_cast(this->m_contextSimulator); } + bool CRuntimeConfig::requiresDBusSever() const + { + return (this->m_application == LocalInDbusServer || + this->m_audio == LocalInDbusServer || + this->m_network == LocalInDbusServer || + this->m_settings == LocalInDbusServer || + this->m_simulator == LocalInDbusServer); + } + + bool CRuntimeConfig::requiresDBusConnection() const + { + return (this->m_application == Remote || + this->m_audio == Remote || + this->m_network == Remote || + this->m_settings == Remote || + this->m_simulator == Remote); + } + const CRuntimeConfig &CRuntimeConfig::forCore() { static CRuntimeConfig cfg = CRuntimeConfig(CRuntimeConfig(CRuntimeConfig::LocalInDbusServer)); diff --git a/src/blackcore/context_runtime_config.h b/src/blackcore/context_runtime_config.h index bead6937d..bf81c5ef3 100644 --- a/src/blackcore/context_runtime_config.h +++ b/src/blackcore/context_runtime_config.h @@ -48,6 +48,10 @@ namespace BlackCore ContextMode getModeApplication() const { return this->m_application; } //! local settings? bool hasLocalSettings() const { return this->m_settings == Local || this->m_settings == LocalInDbusServer; } + //! requires server (at least one in server)? + bool requiresDBusSever() const; + //! requires DBus connection (at least one remote)? + bool requiresDBusConnection() const; //! predefined for Core static const CRuntimeConfig &forCore(); @@ -57,7 +61,6 @@ namespace BlackCore //! predefined, completely remote (e.g. for GUI with core) static const CRuntimeConfig &remote(); - }; } #endif // guard