hyperion.ng/libsrc/webserver/CgiHandler.h

36 lines
656 B
C
Raw Permalink Normal View History

#ifndef CGIHANDLER_H
#define CGIHANDLER_H
#include <QObject>
#include <QString>
#include <QStringList>
#include <utils/Logger.h>
#include "QtHttpReply.h"
#include "QtHttpRequest.h"
class CgiHandler : public QObject
{
Q_OBJECT
public:
CgiHandler(QObject * parent = nullptr);
2018-12-27 23:11:32 +01:00
void setBaseUrl(const QString& url);
void exec(const QStringList & args, QtHttpRequest * request, QtHttpReply * reply);
2018-12-27 23:11:32 +01:00
private:
// CGI commands
void cmd_cfg_jsonserver();
void cmd_runscript();
2018-12-27 23:11:32 +01:00
QtHttpReply * _reply;
QtHttpRequest * _request;
QStringList _args;
2018-12-27 23:11:32 +01:00
QString _baseUrl;
Logger * _log;
};
#endif // CGIHANDLER_H