mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
refs #199, convenience methods for easier initializations
This commit is contained in:
@@ -262,6 +262,24 @@ namespace BlackCore
|
||||
return static_cast<CContextSimulator *>(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));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user