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

@@ -6,6 +6,7 @@
#ifndef BLACKCORE_CONTEXTAPPLICATION_H
#define BLACKCORE_CONTEXTAPPLICATION_H
#include "blackcore/context.h"
#include "blackmisc/statusmessage.h"
#include <QObject>
@@ -14,15 +15,20 @@
namespace BlackCore
{
/*!
* \brief Application context interface
*/
class IContextApplication : public QObject
class IContextApplication : public CContext
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAPPLICATION_INTERFACENAME)
protected:
friend class CRuntime;
//! Constructor
IContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime) : CContext(mode, runtime) {}
public:
//! Service name
@@ -39,11 +45,6 @@ namespace BlackCore
return s;
}
/*!
* \brief DBus version constructor
* \param parent
*/
IContextApplication(QObject *parent = nullptr) : QObject(parent) {}
//! Destructor
virtual ~IContextApplication() {}