mirror of https://github.com/nymea/nymea.git
Add experience mode plugins
parent
5e3bc2acbd
commit
f1ca2a5b86
|
|
@ -0,0 +1,11 @@
|
|||
#include "experiencemanager.h"
|
||||
|
||||
#include "jsonrpc/jsonrpcserver.h"
|
||||
namespace nymeaserver {
|
||||
ExperienceManager::ExperienceManager(JsonRPCServer *jsonRpcServer, QObject *parent) : QObject(parent)
|
||||
{
|
||||
// jsonRpcServer->registerHandler();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef EXPERIENCEMANAGER_H
|
||||
#define EXPERIENCEMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace nymeaserver {
|
||||
|
||||
class JsonRPCServer;
|
||||
|
||||
class ExperienceManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ExperienceManager(JsonRPCServer *jsonRpcServer, QObject *parent = nullptr);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
}
|
||||
#endif // EXPERIENCEMANAGER_H
|
||||
|
|
@ -71,6 +71,8 @@ public:
|
|||
void registerTransportInterface(TransportInterface *interface, bool authenticationRequired);
|
||||
void unregisterTransportInterface(TransportInterface *interface);
|
||||
|
||||
void registerHandler(JsonHandler *handler);
|
||||
|
||||
private:
|
||||
QHash<QString, JsonHandler *> handlers() const;
|
||||
|
||||
|
|
@ -117,8 +119,6 @@ private:
|
|||
|
||||
int m_notificationId;
|
||||
|
||||
void registerHandler(JsonHandler *handler);
|
||||
|
||||
QString formatAssertion(const QString &targetNamespace, const QString &method, QMetaMethod::MethodType methodType, JsonHandler *handler, const QVariantMap &data) const;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ RESOURCES += $$top_srcdir/icons.qrc \
|
|||
HEADERS += nymeacore.h \
|
||||
devices/devicemanagerimplementation.h \
|
||||
devices/translator.h \
|
||||
experiences/experiencemanager.h \
|
||||
ruleengine/ruleengine.h \
|
||||
ruleengine/rule.h \
|
||||
ruleengine/stateevaluator.h \
|
||||
|
|
@ -95,6 +96,7 @@ HEADERS += nymeacore.h \
|
|||
SOURCES += nymeacore.cpp \
|
||||
devices/devicemanagerimplementation.cpp \
|
||||
devices/translator.cpp \
|
||||
experiences/experiencemanager.cpp \
|
||||
ruleengine/ruleengine.cpp \
|
||||
ruleengine/rule.cpp \
|
||||
ruleengine/stateevaluator.cpp \
|
||||
|
|
|
|||
|
|
@ -171,6 +171,9 @@ void NymeaCore::init() {
|
|||
qCDebug(dcApplication) << "Creating Cloud Manager";
|
||||
m_cloudManager = new CloudManager(m_configuration, m_networkManager, this);
|
||||
|
||||
qCDebug(dcApplication()) << "Loading experiences";
|
||||
|
||||
|
||||
CloudNotifications *cloudNotifications = m_cloudManager->createNotificationsPlugin();
|
||||
m_deviceManager->registerStaticPlugin(cloudNotifications, cloudNotifications->metaData());
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
#include "experienceplugin.h"
|
||||
|
||||
ExperiencePlugin::ExperiencePlugin(QObject *parent) : JsonHandler(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef EXPERIENCEPLUGIN_H
|
||||
#define EXPERIENCEPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#include "jsonrpc/jsonhandler.h"
|
||||
|
||||
class ExperiencePlugin : public JsonHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ExperiencePlugin(QObject *parent = nullptr);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // EXPERIENCEPLUGIN_H
|
||||
|
|
@ -26,6 +26,7 @@ HEADERS += \
|
|||
devices/browseresult.h \
|
||||
jsonrpc/jsonhandler.h \
|
||||
jsonrpc/jsonreply.h \
|
||||
experiences/experienceplugin.h \
|
||||
libnymea.h \
|
||||
platform/package.h \
|
||||
platform/repository.h \
|
||||
|
|
@ -102,6 +103,7 @@ SOURCES += \
|
|||
devices/browseresult.cpp \
|
||||
jsonrpc/jsonhandler.cpp \
|
||||
jsonrpc/jsonreply.cpp \
|
||||
experiences/experienceplugin.cpp \
|
||||
loggingcategories.cpp \
|
||||
nymeasettings.cpp \
|
||||
platform/package.cpp \
|
||||
|
|
|
|||
Loading…
Reference in New Issue