forked from piratfm/fmstick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
requestmapper.h
45 lines (36 loc) · 985 Bytes
/
requestmapper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
@file
@author Stefan Frings
*/
#ifndef REQUESTMAPPER_H
#define REQUESTMAPPER_H
#include "httprequesthandler.h"
/**
The request mapper dispatches incoming HTTP requests to controller classes
depending on the requested path.
*/
class RequestMapper : public HttpRequestHandler {
Q_OBJECT
Q_DISABLE_COPY(RequestMapper)
public:
/**
Constructor.
@param parent Parent object
*/
RequestMapper(QObject* parent=0);
/**
Dispatch a request to a controller.
@param request The received HTTP request
@param response Must be used to return the response
*/
void service(HttpRequest& request, HttpResponse& response);
QObject* mw_ptr;
bool emitUpdateItem(QObject *obj, QString *val);
QString fileBase64(QString path);
signals:
bool updateItem(QObject *obj, QString *val);
private:
QSettings web_cfg;
void mainPageStaff(HttpRequest& request, HttpResponse& response);
};
#endif // REQUESTMAPPER_H