mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +08:00
@@ -5,6 +5,7 @@
|
||||
#include "blackcore/context_network.h"
|
||||
#include "blackcore/context_settings.h"
|
||||
#include "blackcore/context_voice.h"
|
||||
#include "blackcore/context_simulator_impl.h"
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
@@ -14,7 +15,8 @@ namespace BlackCore
|
||||
CCoreRuntime::CCoreRuntime(bool withDbus, QObject *parent) :
|
||||
QObject(parent), m_init(false), m_dbusServer(nullptr),
|
||||
m_contextNetwork(nullptr), m_contextVoice(nullptr),
|
||||
m_contextSettings(nullptr), m_contextApplication(nullptr)
|
||||
m_contextSettings(nullptr), m_contextApplication(nullptr),
|
||||
m_contextSimulator(nullptr)
|
||||
{
|
||||
this->init(withDbus);
|
||||
}
|
||||
@@ -47,6 +49,9 @@ void CCoreRuntime::init(bool withDbus)
|
||||
this->m_contextVoice = new CContextVoice(this);
|
||||
if (withDbus) this->m_contextVoice->registerWithDBus(this->m_dbusServer);
|
||||
|
||||
this->m_contextSimulator = new CContextSimulator(this);
|
||||
if (withDbus) this->m_contextSimulator->registerWithDBus(this->m_dbusServer);
|
||||
|
||||
// flag
|
||||
m_init = true;
|
||||
}
|
||||
@@ -90,4 +95,14 @@ IContextApplication *CCoreRuntime::getIContextApplication()
|
||||
{
|
||||
return this->m_contextApplication;
|
||||
}
|
||||
|
||||
const IContextSimulator *CCoreRuntime::getIContextSimulator() const
|
||||
{
|
||||
return this->m_contextSimulator;
|
||||
}
|
||||
|
||||
IContextSimulator *CCoreRuntime::getIContextSimulator()
|
||||
{
|
||||
return this->m_contextSimulator;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,12 @@ class CContextNetwork;
|
||||
class CContextVoice;
|
||||
class CContextSettings;
|
||||
class CContextApplication;
|
||||
class CContextSimulator;
|
||||
class IContextNetwork;
|
||||
class IContextVoice;
|
||||
class IContextSettings;
|
||||
class IContextApplication;
|
||||
class IContextSimulator;
|
||||
|
||||
/*!
|
||||
* \brief The CCoreRuntime class
|
||||
@@ -31,6 +33,8 @@ private:
|
||||
CContextVoice *m_contextVoice;
|
||||
CContextSettings *m_contextSettings;
|
||||
CContextApplication *m_contextApplication;
|
||||
CContextSimulator *m_contextSimulator;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Init
|
||||
@@ -108,6 +112,18 @@ public:
|
||||
*/
|
||||
IContextApplication *getIContextApplication();
|
||||
|
||||
/*!
|
||||
* \brief Context for simulator
|
||||
* \return
|
||||
*/
|
||||
const IContextSimulator *getIContextSimulator() const;
|
||||
|
||||
/*!
|
||||
* \brief Simulator
|
||||
* \return
|
||||
*/
|
||||
IContextSimulator *getIContextSimulator();
|
||||
|
||||
};
|
||||
}
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user