mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* initial commit of webconfig * update example config with webconfig and fix format of file update debian postinst script for install example config * fix compiling add new web server command "serverinfo" to use in webapp to retrieve json port * change web default port to 8099
33 lines
805 B
C++
33 lines
805 B
C++
#ifndef STATICFILESERVING_H
|
|
#define STATICFILESERVING_H
|
|
|
|
#include <QObject>
|
|
#include <QMimeDatabase>
|
|
|
|
#include "QtHttpServer.h"
|
|
#include "QtHttpRequest.h"
|
|
#include "QtHttpReply.h"
|
|
#include "QtHttpHeader.h"
|
|
|
|
class StaticFileServing : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit StaticFileServing (QString baseUrl, quint16 port, quint16 jsonPort, QObject * parent = NULL);
|
|
virtual ~StaticFileServing (void);
|
|
|
|
public slots:
|
|
void onServerStopped (void);
|
|
void onServerStarted (quint16 port);
|
|
void onServerError (QString msg);
|
|
void onRequestNeedsReply (QtHttpRequest * request, QtHttpReply * reply);
|
|
|
|
private:
|
|
QString m_baseUrl;
|
|
QtHttpServer * _server;
|
|
QMimeDatabase * m_mimeDb;
|
|
quint16 _jsonPort;
|
|
};
|
|
|
|
#endif // STATICFILESERVING_H
|