Hobrasoft httpd server
Embedded HTTP server for Qt and C++
|
Processes requests with path /example. More...
#include <controllerexample.h>
Public Member Functions | |
ControllerExample (HobrasoftHttpd::HttpConnection *parent) | |
Public Member Functions inherited from Example::Httpd::AbstractController | |
AbstractController (HobrasoftHttpd::HttpConnection *parent) | |
Constructor. | |
virtual void | service (HobrasoftHttpd::HttpRequest *request, HobrasoftHttpd::HttpResponse *response) |
Request processing. | |
void | setCheckId (bool x) |
If the checkId is set then the exixtence of the item is checked in requests PUT and POST. | |
bool | checkId () const |
Returns the state of checkId. More... | |
Public Member Functions inherited from HobrasoftHttpd::HttpRequestHandler | |
HttpRequestHandler (HttpConnection *parent) | |
Konstruktor. | |
HttpResponse * | response () |
Returns new instance of HttpResponse class. More... | |
Protected Member Functions | |
virtual bool | exists (const QString &id) const |
Check existence of th ID. More... | |
virtual void | serviceList (HobrasoftHttpd::HttpRequest *request, HobrasoftHttpd::HttpResponse *response) |
virtual void | serviceEvents (HobrasoftHttpd::HttpRequest *request, HobrasoftHttpd::HttpResponse *response) |
virtual void | serviceIdEvents (HobrasoftHttpd::HttpRequest *request, HobrasoftHttpd::HttpResponse *response, const QString &id) |
virtual void | serviceIdGet (HobrasoftHttpd::HttpRequest *request, HobrasoftHttpd::HttpResponse *response, const QString &id) |
Protected Member Functions inherited from Example::Httpd::AbstractController | |
virtual void | serviceOK (HobrasoftHttpd::HttpRequest *request, HobrasoftHttpd::HttpResponse *response, const QVariant &data=QVariant()) |
Sends 200 OK response. More... | |
Protected Member Functions inherited from HobrasoftHttpd::HttpRequestHandler | |
HttpConnection * | connection () const |
Returns pointer to parent HttpConnection class. | |
const HttpSettings * | settings () const |
Returns pointer to HttpSettings used in the HttpServer. | |
Private Slots | |
void | sendUpdate (const Item *) |
Sends data of the item to the event stream. | |
Processes requests with path /example.
Definition at line 22 of file controllerexample.h.
|
protectedvirtual |
Check existence of th ID.
The method should be reimplemented in derived classes. Depending of the result the decission is made if the 404 error is sent to the request, of if the reimplemented method will be called (one of serviceId(), serviceIdEvents(), serviceIdDelete()).
Reimplemented from Example::Httpd::AbstractController.
Definition at line 24 of file controllerexample.cpp.