Stellarium
23.4
|
Provides a Scenery3d service for the Remote Control Plug-in plugin. More...
#include <Scenery3dRemoteControlService.hpp>
Public Member Functions | |
Scenery3dRemoteControlService () | |
Requires the Scenery3d module to be registered. | |
QLatin1String | getPath () const override |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
bool | isThreadSafe () const override |
Return true if the service's get() and post() methods can safely be run in the HTTP handler thread, instead of having to queue it into the Stellarium main thread. More... | |
void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) override |
Implement this to define reactions to HTTP GET requests. More... | |
void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) override |
Implement this to define reactions to HTTP POST requests. More... | |
void | update (double deltaTime) override |
Called in the main thread each frame. More... | |
Protected Member Functions | |
void | performMove (double x, double y, double z) |
Provides a Scenery3d service for the Remote Control Plug-in plugin.
|
overridevirtual |
Implement this to define reactions to HTTP GET requests.
GET requests generally should only query data or program state, and not change it. If there is an error with the request, use APIServiceResponse::writeRequestError to notify the client.
operation | The operation string of the request (i.e. the part of the request URL after the service name, without parameters) |
parameters | The extracted service parameters (extracted from the URL) |
response | The response object, write your response into this |
Implements RemoteControlServiceInterface.
|
overridevirtual |
Return true if the service's get() and post() methods can safely be run in the HTTP handler thread, instead of having to queue it into the Stellarium main thread.
This can result in better performance if done correctly. Unless you are sure, return false here.
Implements RemoteControlServiceInterface.
|
overridevirtual |
Implement this to define reactions to HTTP POST requests.
POST requests generally should change data or perform some action. If there is an error with the request, use APIServiceResponse::writeRequestError to notify the client.
operation | The operation string of the request (i.e. the part of the request URL after the service name, without parameters) |
parameters | The extracted service parameters (extracted from the URL, and form data, if applicable) |
data | The unmodified data as sent from the client |
response | The response object, write your response into this |
Implements RemoteControlServiceInterface.
|
overridevirtual |
Called in the main thread each frame.
Can be used for ongoing actions, for example movement control.
Implements RemoteControlServiceInterface.