Stellarium 0.15.2
|
This is the main request handler for the remote control plugin, receiving and dispatching the HTTP requests. More...
#include <RequestHandler.hpp>
Public Slots | |
void | setUsePassword (bool v) |
Sets wether a password set with setPassword() is required by all requests. More... | |
bool | getUsePassword () |
Returns if a password is required to access the remote control. More... | |
void | setPassword (const QString &pw) |
Public Member Functions | |
RequestHandler (const StaticFileControllerSettings &settings, QObject *parent=0) | |
Constructs the request handler. More... | |
virtual | ~RequestHandler () |
The internal APIController, and all registered services are deleted. More... | |
void | update (double deltaTime) |
Called in the main thread each frame, only passed on to APIController::update. More... | |
virtual void | service (HttpRequest &request, HttpResponse &response) |
Receives the HttpRequest from the HttpListener. More... | |
Public Member Functions inherited from HttpRequestHandler | |
HttpRequestHandler (QObject *parent=NULL) | |
Constructor. More... | |
virtual | ~HttpRequestHandler () |
Destructor. More... | |
This is the main request handler for the remote control plugin, receiving and dispatching the HTTP requests.
It also handles the optional simple HTTP authentication. See service to find out how the requests are processed.
Definition at line 32 of file RequestHandler.hpp.
RequestHandler::RequestHandler | ( | const StaticFileControllerSettings & | settings, |
QObject * | parent = 0 |
||
) |
Constructs the request handler.
This also creates an StaticFileController for the webroot
folder, and an APIController.
To see the default services that are registered here, see API reference.
|
virtual |
The internal APIController, and all registered services are deleted.
|
inlineslot |
Returns if a password is required to access the remote control.
Definition at line 68 of file RequestHandler.hpp.
|
virtual |
Receives the HttpRequest from the HttpListener.
It checks the optional HTTP authentication and sets the keep-alive header if requested by the client.
If the authentication is correct, the request is processed according to the following rules:
"/api/"
, then the request is passed to the APIController without further processing.translate_files
file is requested, the cached translated version of this file is returned. This cache is updated each time the app language changes.data/webroot
folder.Reimplemented from HttpRequestHandler.
|
slot |
|
slot |
Sets wether a password set with setPassword() is required by all requests.
It uses HTTP Basic authorization, with an empty username.
void RequestHandler::update | ( | double | deltaTime | ) |
Called in the main thread each frame, only passed on to APIController::update.