refs #199 , adjusted context classes

* removed usingLocalObjects() now in CContext
* removed getRuntime() now in CContext
* Constructors no longer public, context can only be obtained via runtime object
* runtime class is friend class
This commit is contained in:
Klaus Basan
2014-04-01 11:48:45 +02:00
parent 0b033fdcac
commit 77fd3bcd70
28 changed files with 161 additions and 290 deletions

View File

@@ -28,10 +28,6 @@ namespace BlackCore
public:
/*!
* \brief DBus version constructor
*/
CContextSettingsProxy(const QString &serviceName, QDBusConnection &connection, QObject *parent = nullptr);
//! \brief Destructor
virtual ~CContextSettingsProxy() {}
@@ -49,6 +45,7 @@ namespace BlackCore
virtual BlackMisc::CStatusMessageList value(const QString &path, const QString &command, const QVariant &value) override;
private:
friend class CRuntime;
BlackMisc::CGenericDBusInterface *m_dBusInterface;
//! Relay connection signals to local signals
@@ -56,11 +53,11 @@ namespace BlackCore
void relaySignals(const QString &serviceName, QDBusConnection &connection);
protected:
/*!
* \brief IContextSettings
* \param parent
*/
CContextSettingsProxy(QObject *parent = nullptr) : IContextSettings(parent), m_dBusInterface(nullptr) {}
//! \brief DBus version constructor
CContextSettingsProxy(const QString &serviceName, QDBusConnection &connection, CRuntimeConfig::ContextMode mode, CRuntime *runtime);
//! \brief Constructor
CContextSettingsProxy(CRuntimeConfig::ContextMode mode, CRuntime *runtime) : IContextSettings(mode, runtime), m_dBusInterface(nullptr) {}
public slots: