mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #199 , fail safe method to register contexts with DBus server, easer way to initialize in runtime
This commit is contained in:
@@ -27,13 +27,13 @@ namespace BlackCore
|
||||
//! Constructor
|
||||
CContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime);
|
||||
|
||||
//! Register myself in DBus
|
||||
//! Register myself in DBus, fail safe
|
||||
CContextApplication *registerWithDBus(CDBusServer *server)
|
||||
{
|
||||
if (!server || this->m_mode != CRuntimeConfig::LocalInDbusServer) return this;
|
||||
server->addObject(IContextApplication::ObjectPath(), this);
|
||||
return this;
|
||||
}
|
||||
|
||||
public:
|
||||
//! Destructor
|
||||
virtual ~CContextApplication() {}
|
||||
|
||||
Reference in New Issue
Block a user