This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-core/hive/libhive/jsonhandler.h
Simon Stürz 94f1f39070 aktuell
2013-12-30 02:38:19 +01:00

37 lines
840 B
C++

#ifndef JSONHANDLER_H
#define JSONHANDLER_H
#include <QObject>
#include <QVariant>
#include <jsonplugin/jsonplugin.h>
#include <jsonplugin/devicejsonplugin.h>
#include <jsonplugin/radiojsonplugin.h>
class JsonHandler : public QObject
{
Q_OBJECT
public:
explicit JsonHandler(QObject *parent = 0);
QByteArray addRemote(QString deviceType, QString method, QString name, QString protocol, QString Linecode, QString m);
signals:
void notifyAll(const QByteArray &data);
public slots:
QByteArray process(const QByteArray &data);
private:
DeviceJsonPlugin *m_device;
RadioJsonPlugin *m_radio;
QByteArray formatResponse(const QVariantMap &command, const QVariantMap &responseParams);
QByteArray formatErrorResponse(const QVariantMap &command, const QString &error);
};
#endif // JSONHANDLER_H