mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
7f2d6bde9a
* implement 404 for webserver - this is a quick hack, should be refactored later * add http error pages ... design is more a placebo ;-) * tune errorpages fix some cgi related stuff, now only python is possible executing and reading python file is possilbe, but it cannot receive any data from webui * fix typo * fix another typo
42 lines
833 B
C++
42 lines
833 B
C++
#ifndef CGIHANDLER_H
|
|
#define CGIHANDLER_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QStringList>
|
|
|
|
#include <hyperion/Hyperion.h>
|
|
#include <utils/Logger.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;
|
|
Logger * _log;
|
|
};
|
|
|
|
#endif // CGIHANDLER_H
|
|
|
|
|