hyperion.ng/libsrc/webconfig/CgiHandler.h
redPanther 8a9d2760ef move write config from json api to http post (#363)
* implement config save over http post instead of json

* remove json set config
finish config write thrugh http post

* remove debug code and add failure messages
2017-01-14 19:04:58 +01:00

40 lines
791 B
C++

#ifndef CGIHANDLER_H
#define CGIHANDLER_H
#include <QObject>
#include <QString>
#include <QStringList>
#include <hyperion/Hyperion.h>
#include "QtHttpReply.h"
#include "QtHttpRequest.h"
class CgiHandler : public QObject {
Q_OBJECT
public:
CgiHandler (Hyperion * hyperion, QString baseUrl, QObject * parent = NULL);
virtual ~CgiHandler (void);
void exec(const QStringList & args,QtHttpRequest * request, QtHttpReply * reply);
// cgi commands
void cmd_cfg_jsonserver();
void cmd_cfg_get ();
void cmd_cfg_set ();
void cmd_runscript ();
private:
Hyperion* _hyperion;
QtHttpReply * _reply;
QtHttpRequest * _request;
QStringList _args;
const QJsonObject &_hyperionConfig;
const QString _baseUrl;
};
#endif // CGIHANDLER_H