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_CONTEXTAUDIO_H
#define BLACKCORE_CONTEXTAUDIO_H
#include "blackcore/context.h"
#include "blackmisc/genericdbusinterface.h"
#include "blackmisc/audiodevicelist.h"
#include "blackmisc/voiceroomlist.h"
@@ -22,11 +23,15 @@ namespace BlackCore
{
//! \brief Audio context interface
class IContextAudio : public QObject
class IContextAudio : public CContext
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAUDIO_INTERFACENAME)
protected:
//! \brief Constructor
IContextAudio(CRuntimeConfig::ContextMode mode, CRuntime *runtime) : CContext(mode, runtime) {}
public:
//! \brief Interface name
static const QString &InterfaceName()
@@ -42,15 +47,9 @@ namespace BlackCore
return s;
}
//! \brief Constructor
IContextAudio(QObject *parent = nullptr) : QObject(parent) {}
//! \brief Destructor
virtual ~IContextAudio() {}
//! \brief Using local objects?
virtual bool usingLocalObjects() const = 0;
signals:
//! \brief Audio test has been completed
void audioTestCompleted();