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
2013-08-31 10:44:35 +02:00

34 lines
651 B
C++

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