Hobrasoft httpd server
Embedded HTTP server for Qt and C++
shtmlcontroller.h
Go to the documentation of this file.
1 
8 #ifndef _ShtmlController_H_
9 #define _ShtmlController_H_
10 
11 #include <QObject>
12 #include <QCache>
13 #include "httprequesthandler.h"
14 
15 namespace HobrasoftHttpd {
16 
17 class HttpRequest;
18 class HttpResponse;
19 class HttpConnection;
20 
36  Q_OBJECT
37  public:
38 
43 
47  void service(HttpRequest *request, HttpResponse *response);
48 
49  private:
53  QByteArray readFile(const QString& path, HttpResponse *response, int depth);
54 
55  #ifndef DOXYGEN_SHOULD_SKIP_THIS
56  HttpConnection *m_parent;
57  #endif
58 
59 };
60 
61 }
62 
63 #endif
void service(HttpRequest *request, HttpResponse *response)
Processes one request.
HttpResponse * response()
Returns new instance of HttpResponse class.
Response to HTTP request - headers, cookies and body.
Definition: httpresponse.h:30
Processes incoming requests.
QByteArray readFile(const QString &path, HttpResponse *response, int depth)
Reads and processes one file, other files can be included recursivelly.
Processes request to SHTML files.
Processes HTTP request, parses headers, body and files sent by HTTP protocol.
Definition: httprequest.h:23
ShtmlController(HttpConnection *parent)
Construct sets the default parameter from configuration (encoding and root)
Namespace of HTTP server.
One single connection to http server.