mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Details coming soon.
This commit is contained in:
38
libsrc/webserver/StaticFileServing.h
Normal file
38
libsrc/webserver/StaticFileServing.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef STATICFILESERVING_H
|
||||
#define STATICFILESERVING_H
|
||||
|
||||
#include <QMimeDatabase>
|
||||
|
||||
//#include "QtHttpServer.h"
|
||||
#include "QtHttpRequest.h"
|
||||
#include "QtHttpReply.h"
|
||||
#include "QtHttpHeader.h"
|
||||
#include "CgiHandler.h"
|
||||
|
||||
#include <hyperion/Hyperion.h>
|
||||
#include <utils/Logger.h>
|
||||
|
||||
class StaticFileServing : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit StaticFileServing (Hyperion *hyperion, QObject * parent = nullptr);
|
||||
virtual ~StaticFileServing (void);
|
||||
|
||||
void setBaseUrl(const QString& url);
|
||||
|
||||
public slots:
|
||||
void onRequestNeedsReply (QtHttpRequest * request, QtHttpReply * reply);
|
||||
|
||||
private:
|
||||
Hyperion * _hyperion;
|
||||
QString _baseUrl;
|
||||
QMimeDatabase * _mimeDb;
|
||||
CgiHandler _cgi;
|
||||
Logger * _log;
|
||||
|
||||
void printErrorToReply (QtHttpReply * reply, QtHttpReply::StatusCode code, QString errorMessage);
|
||||
|
||||
};
|
||||
|
||||
#endif // STATICFILESERVING_H
|
Reference in New Issue
Block a user