mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Detect if running with DBus (core + GUI) or just "standalone" (no swift DBus)
This commit is contained in:
@@ -903,6 +903,16 @@ namespace BlackCore
|
||||
return this->startWebDataServices();
|
||||
}
|
||||
|
||||
bool CApplication::isLocalContext() const
|
||||
{
|
||||
return this->getIContextApplication() && this->getIContextApplication()->isUsingImplementingObject();
|
||||
}
|
||||
|
||||
bool CApplication::isDBusContext() const
|
||||
{
|
||||
return this->getIContextApplication() && !this->getIContextApplication()->isUsingImplementingObject() && !this->getIContextApplication()->isEmptyObject();
|
||||
}
|
||||
|
||||
CStatusMessageList CApplication::startCoreFacadeAndWebDataServices()
|
||||
{
|
||||
Q_ASSERT_X(m_parsed, Q_FUNC_INFO, "Call this function after parsing");
|
||||
|
||||
@@ -364,6 +364,11 @@ namespace BlackCore
|
||||
//! Get the facade
|
||||
CCoreFacade *getCoreFacade() { return m_coreFacade.data(); }
|
||||
|
||||
//! Local or DBus application? @{
|
||||
bool isLocalContext() const;
|
||||
bool isDBusContext() const;
|
||||
//! @}
|
||||
|
||||
//! Get the facade
|
||||
const CCoreFacade *getCoreFacade() const { return m_coreFacade.data(); }
|
||||
//! @}
|
||||
|
||||
Reference in New Issue
Block a user