Stellarium
0.21.3
|
Control Stellarium through your web browser! For more information, see Remote Control Plug-in documentation. More...
Data Structures | |
struct | APIServiceResponse |
Thread-safe version of HttpResponse that can be passed around through QMetaObject::invokeMethod. More... | |
class | RemoteControlServiceInterface |
Interface for all Remote Control Plug-in services. More... | |
class | AbstractAPIService |
Abstract base class for all RemoteControlServiceInterface implementations which are provided by the Remote Control Plug-in plugin directly. More... | |
class | APIController |
class | LocationSearchService |
class | LocationService |
class | MainService |
class | ObjectService |
class | RemoteControl |
class | RemoteControlStelPluginInterface |
class | RequestHandler |
This is the main request handler for the remote control plugin, receiving and dispatching the HTTP requests. More... | |
class | SimbadService |
class | StelActionService |
class | StelPropertyService |
class | ViewService |
Macros | |
#define | RemoteControlServiceInterface_iid "org.stellarium.plugin.RemoteSync.RemoteControlServiceInterface/1.0" |
Typedefs | |
typedef QMultiMap< QByteArray, QByteArray > | APIParameters |
Defines the HTTP request parameters for the service. | |
struct APIServiceResponse |
It contains the data that will be sent back to the client in the HTTP thread, when control returns to the APIController.
Public Member Functions | |
APIServiceResponse () | |
Constructs an invalid response. | |
void | setHeader (const QByteArray &name, const QByteArray &val) |
Sets a specific HTTP header to the specified value. | |
void | setHeader (const QByteArray &name, const int val) |
Shortcut for int header values. | |
void | setCacheTime (int seconds) |
Sets the time in seconds for which the browser is allowed to cache the reply. | |
void | setStatus (int status, const QByteArray &text) |
Sets the HTTP status type and status text. | |
void | setData (const QByteArray &data) |
Replaces the current return data. | |
void | appendData (const QByteArray &data) |
Appends to the current return data. | |
void | writeRequestError (const QByteArray &msg) |
Sets the HTTP status to 400, and sets the response data to the message. | |
void | writeJSON (const QJsonDocument &doc) |
Sets the Content-Type to "application/json" and serializes the given document into JSON text format. | |
void | writeWrappedHTML (const QString &html, const QString &title) |
Because the HTML descriptions in Stellarium are often not compatible with "clean" HTML5 which is used for the main interface, this method can be used to explicitely wrap the given HTML snippet in a valid HTML 4.01 transitional document for better results, and include the stylesheet iframestyle.css for consistent styling when used in iframes of the RemoteControl web interface. More... | |
void | writeFile (const QString &path, bool allowCaching=false) |
Writes the specified file contents into the response. More... | |
Friends | |
class | APIController |
|
inline |
path | The (preferably absolute) path to a file |
allowCaching | if true, the browser is allowed to cache the file for one hour |
|
inline |
html | The HTML snippet to wrap with HTML document tags |
title | The title of the page |
class RemoteControlServiceInterface |
Each implementation is mapped to a separate HTTP request path. The get() or post() method is called to handle each request. Instances of this class which are provided through the StelModuleMgr's extension mechanism (by adding it into the list returned by StelPluginInterface::getExtensionList()) are automatically discovered and registered with the APIController.
Public Member Functions | |
virtual QLatin1String | getPath () const =0 |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual bool | isThreadSafe () const =0 |
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... | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response)=0 |
Implement this to define reactions to HTTP GET requests. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response)=0 |
Implement this to define reactions to HTTP POST requests. More... | |
virtual void | update (double deltaTime)=0 |
Called in the main thread each frame. More... | |
|
pure virtual |
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 |
Implemented in MainService, AbstractAPIService, LocationSearchService, ObjectService, SimbadService, LocationService, StelActionService, ViewService, StelPropertyService, and Scenery3dRemoteControlService.
|
pure virtual |
This can result in better performance if done correctly. Unless you are sure, return false here.
Implemented in AbstractAPIService, LocationSearchService, SimbadService, and Scenery3dRemoteControlService.
|
pure virtual |
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 |
Implemented in MainService, AbstractAPIService, LocationService, StelActionService, StelPropertyService, and Scenery3dRemoteControlService.
|
pure virtual |
Can be used for ongoing actions, for example movement control.
Implemented in MainService, AbstractAPIService, and Scenery3dRemoteControlService.
class AbstractAPIService |
Public Member Functions | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual bool | isThreadSafe () const Q_DECL_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... | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Provides a default implementation which returns an error message. | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Provides a default implementation which returns an error message. | |
Public Member Functions inherited from RemoteControlServiceInterface | |
virtual QLatin1String | getPath () const =0 |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
Static Protected Attributes | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
This can result in better performance if done correctly. Unless you are sure, return false here.
Implements RemoteControlServiceInterface.
Reimplemented in LocationSearchService, and SimbadService.
|
virtual |
Default implementation does nothing. Can be used for ongoing actions, for example movement control.
Implements RemoteControlServiceInterface.
Reimplemented in MainService.
class APIController |
This class handles the API-specific requests and dispatches them to the correct RemoteControlServiceInterface implementation. Services are registered using registerService(). To see the default services used, see the RequestHandler::RequestHandler constructor.
Public Member Functions | |
APIController (int prefixLength, QObject *parent=Q_NULLPTR) | |
Constructs an APIController. More... | |
void | update (double deltaTime) |
Should be called each frame from the main thread, like from StelModule::update. More... | |
virtual void | service (HttpRequest &request, HttpResponse &response) Q_DECL_OVERRIDE |
Handles an API-specific request. More... | |
void | registerService (RemoteControlServiceInterface *service) |
Registers a service with the APIController. More... | |
Public Member Functions inherited from HttpRequestHandler | |
HttpRequestHandler (QObject *parent=Q_NULLPTR) | |
Constructor. More... | |
virtual | ~HttpRequestHandler () |
Destructor. | |
APIController::APIController | ( | int | prefixLength, |
QObject * | parent = Q_NULLPTR |
||
) |
prefixLength | Determines how many characters to strip from the front of the request path |
parent | passed on to QObject constructor |
void APIController::registerService | ( | RemoteControlServiceInterface * | service | ) |
The RemoteControlServiceInterface::getPath() determines the request path of the service.
|
virtual |
It finds out which RemoteControlServiceInterface to use depending on the service name (first part of path until slash). An error is returned for invalid requests. If a service was found, the request is passed on to its RemoteControlServiceInterface::get or RemoteControlServiceInterface::post method depending on the HTTP request type. If RemoteControlServiceInterface::isThreadSafe is false, these methods are called in the Stellarium main thread using QMetaObject::invokeMethod, otherwise they are directly executed in the current thread (HTTP worker thread).
Reimplemented from HttpRequestHandler.
void APIController::update | ( | double | deltaTime | ) |
Passed on to each AbstractAPIService::update method for optional processing.
class LocationSearchService |
Provides predefined location search functionality, using the StelLocationMgr.
Public Member Functions | |
LocationSearchService (QObject *parent=Q_NULLPTR) | |
virtual bool | isThreadSafe () const Q_DECL_OVERRIDE |
We work on a copy of the StelLocationMgr, to prevent hitches as the web user is typing. More... | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the GET method. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Provides a default implementation which returns an error message. | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.
|
inlinevirtual |
Reimplemented from AbstractAPIService.
class LocationService |
Provides methods to look up location-related information, and change the current location
Public Member Functions | |
LocationService (QObject *parent=Q_NULLPTR) | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP GET requests. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP POST requests. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual bool | isThreadSafe () const Q_DECL_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... | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.
|
virtual |
Reimplemented from AbstractAPIService.
class MainService |
Implements the main API services, including the status
operation which can be repeatedly polled to find the current state of the main program, including time, view, location, StelAction and StelProperty state changes, movement, script status ...
Public Types | |
enum | SelectionMode { Center, Zoom, Mark } |
Public Member Functions | |
MainService (QObject *parent=Q_NULLPTR) | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Used to implement move functionality. | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the GET operations. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP POST operations. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual bool | isThreadSafe () const Q_DECL_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... | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.
|
virtual |
Reimplemented from AbstractAPIService.
class ObjectService |
Provides operations to look up objects in the Stellarium catalogs
Public Member Functions | |
ObjectService (QObject *parent=Q_NULLPTR) | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP GET method. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual bool | isThreadSafe () const Q_DECL_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... | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Provides a default implementation which returns an error message. | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.
class RemoteControl |
Main class of the RemoteControl plug-in, implementing the StelModule interface. Manages the settings and the starting/stopping of the QtWebApp web server. The RequestHandler class is used for request processing.
Public Slots | |
void | setFlagEnabled (bool b) |
Starts/stops the web server. | |
void | setFlagAutoStart (bool b) |
If true, the server is automatically started when init() is called. | |
void | setFlagUsePassword (bool b) |
If true, the password from setPassword() is required for all web requests. | |
void | setPassword (const QString &password) |
Sets the password that is optionally enabled with setFlagUsePassword(). More... | |
void | setFlagEnableCors (bool b) |
If true, Access-Control-Allow-Origin header will be appended to responses. | |
void | setCorsOrigin (const QString &corsOrigin) |
Sets the CORS origin that is optionally enabled with setFlagEnableCors(). | |
void | setPort (const int port) |
Sets the port where the server listens. More... | |
void | loadSettings () |
Load the plug-in's settings from the configuration file. More... | |
void | saveSettings () |
Save the plug-in's settings to the configuration file. More... | |
void | restoreDefaultSettings () |
Restore the plug-in's settings to the default state. More... | |
void | startServer () |
Starts the HTTP server using the current settings and begins handling requests. More... | |
void | stopServer () |
Stops the HTTP server gracefully. | |
Signals | |
void | flagEnabledChanged (bool val) |
void | flagAutoStartChanged (bool val) |
void | flagUsePasswordChanged (bool val) |
void | flagEnableCorsChanged (bool val) |
void | portChanged (int val) |
void | passwordChanged (const QString &val) |
void | corsOriginChanged (const QString &val) |
Public Member Functions | |
virtual void | init () Q_DECL_OVERRIDE |
Initialize itself. More... | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Update the module with respect to the time. More... | |
virtual void | draw (StelCore *core) Q_DECL_OVERRIDE |
Execute all the drawing functions for this module. More... | |
virtual double | getCallOrder (StelModuleActionName actionName) const Q_DECL_OVERRIDE |
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations. More... | |
virtual void | handleKeys (QKeyEvent *event) Q_DECL_OVERRIDE |
Handle key events. More... | |
virtual bool | configureGui (bool show=true) Q_DECL_OVERRIDE |
Detect or show the configuration GUI elements for the module. More... | |
bool | getFlagEnabled () const |
bool | getFlagAutoStart () const |
bool | getFlagUsePassword () const |
bool | getFlagEnableCors () const |
QString | getPassword () const |
QString | getCorsOrigin () const |
int | getPort () const |
Public Member Functions inherited from StelModule | |
virtual void | deinit () |
Called before the module will be delete, and before the openGL context is suppressed. More... | |
virtual QSettings * | getSettings () |
Return module-specific settings. More... | |
virtual QString | getModuleVersion () const |
Get the version of the module, default is stellarium main version. | |
virtual QString | getAuthorName () const |
Get the name of the module author. | |
virtual QString | getAuthorEmail () const |
Get the email adress of the module author. | |
virtual void | handleMouseClicks (class QMouseEvent *) |
Handle mouse clicks. More... | |
virtual void | handleMouseWheel (class QWheelEvent *) |
Handle mouse wheel. More... | |
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
Handle mouse moves. More... | |
virtual bool | handlePinch (qreal scale, bool started) |
Handle pinch gesture events. More... | |
Properties | |
bool | enabled |
Determines if the web server is running, and can be used to start/stop the server. | |
bool | autoStart |
If true, the server is automatically started when init() is called. | |
bool | usePassword |
If true, the password set with setPassword() is required for all requests. More... | |
bool | enableCors |
Additional Inherited Members | |
Public Types inherited from StelModule | |
enum | StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection } |
Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More... | |
enum | StelModuleActionName { ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves, ActionHandleKeys } |
Define the possible action for which an order is defined. More... | |
Protected Member Functions inherited from StelModule | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to slot) to the StelActionMgr object. More... | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to own slot) to the StelActionMgr object. More... | |
StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *contextObject, std::function< void()> lambda, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to Lambda functor) to the StelActionMgr object. More... | |
|
virtual |
This is to be used with plugins to display a configuration dialog from the plugin list window.
show | if true, make the configuration GUI visible. If false, hide the config GUI if there is one. |
Reimplemented from StelModule.
|
virtual |
core | the core to use for the drawing |
Reimplemented from StelModule.
|
virtual |
actionName | the name of the action for which we want the call order |
Reimplemented from StelModule.
|
inlinevirtual |
Please note that most of the interactions will be done through the GUI module.
e | the Key event |
Reimplemented from StelModule.
|
virtual |
If the initialization takes significant time, the progress should be displayed on the loading bar.
Implements StelModule.
|
slot |
Settings are kept in the "RemoteControl" section in Stellarium's configuration file. If no such section exists, it will load default values.
|
slot |
Replace the plug-in's settings in Stellarium's configuration file with the default values and re-load them. Uses internally loadSettings() and saveSettings().
|
slot |
|
slot |
The password is required by RequestHandler for all HTTP requests. Basic HTTP auth is used, without a user name.
|
slot |
Must be done before startServer() is called, or restart the server to use the new setting.
|
slot |
Uses the RequestHandler class for processing.
|
virtual |
deltaTime | the time increment in second since last call. |
Implements StelModule.
|
readwrite |
The password is passed on to the RequestHandler.
class RemoteControlStelPluginInterface |
This class defines the plugin interface with the main Stellarium program
Public Member Functions | |
virtual StelModule * | getStelModule () const Q_DECL_OVERRIDE |
Get the instance of StelModule to include in the list of standard StelModule. | |
virtual StelPluginInfo | getPluginInfo () const Q_DECL_OVERRIDE |
Get information about the plugin. | |
virtual QObjectList | getExtensionList () const Q_DECL_OVERRIDE |
A mechanism to provide abitrary QObjects to the StelModuleMgr. More... | |
|
inlinevirtual |
Introduced to provide some limited form of inter-plugin communication. If you do not need this, return an empty list.
The StelModuleMgr remembers all loaded extensions and provides methods to access them. You should use qobject_cast to try to cast each object to a specific interface in which you are interested in.
Implements StelPluginInterface.
class RequestHandler |
It also handles the optional simple HTTP authentication. See service to find out how the requests are processed.
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. | |
void | setPassword (const QString &pw) |
void | setEnableCors (bool v) |
Sets wether CORS is enabled. More... | |
bool | getEnableCors () const |
Returns if CORS is enabled. | |
void | setCorsOrigin (const QString &origin) |
Set the host for which CORS is enabled. More... | |
Public Member Functions | |
RequestHandler (const StaticFileControllerSettings &settings, QObject *parent=Q_NULLPTR) | |
Constructs the request handler. More... | |
virtual | ~RequestHandler () Q_DECL_OVERRIDE |
The internal APIController, and all registered services are deleted. | |
void | update (double deltaTime) |
Called in the main thread each frame, only passed on to APIController::update. | |
virtual void | service (HttpRequest &request, HttpResponse &response) Q_DECL_OVERRIDE |
Receives the HttpRequest from the HttpListener. More... | |
Public Member Functions inherited from HttpRequestHandler | |
HttpRequestHandler (QObject *parent=Q_NULLPTR) | |
Constructor. More... | |
virtual | ~HttpRequestHandler () |
Destructor. | |
RequestHandler::RequestHandler | ( | const StaticFileControllerSettings & | settings, |
QObject * | parent = Q_NULLPTR |
||
) |
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 |
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 |
Specify "*" to let any website take control.
|
slot |
|
slot |
|
slot |
It uses HTTP Basic authorization, with an empty username.
class SimbadService |
Allows SIMBAD object lookups like SearchDialog uses.
Public Member Functions | |
SimbadService (QObject *parent=Q_NULLPTR) | |
virtual bool | isThreadSafe () const Q_DECL_OVERRIDE |
Simbad lookups dont block the main thread. | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP GET method. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Provides a default implementation which returns an error message. | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.
class StelActionService |
Provides services related to StelAction. See also the StelAction related operations of MainService.
Public Member Functions | |
StelActionService (QObject *parent=Q_NULLPTR) | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP GET method. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP POST method. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual bool | isThreadSafe () const Q_DECL_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... | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.
|
virtual |
Reimplemented from AbstractAPIService.
class StelPropertyService |
Provides services related to StelProperty. See also the StelProperty related operations of MainService.
Public Member Functions | |
StelPropertyService (QObject *parent=Q_NULLPTR) | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP GET method. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP POST method. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual bool | isThreadSafe () const Q_DECL_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... | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.
|
virtual |
Reimplemented from AbstractAPIService.
class ViewService |
Provides services related to the view (landscape, sky culture, projection).
Public Member Functions | |
ViewService (QObject *parent=Q_NULLPTR) | |
virtual QLatin1String | getPath () const Q_DECL_OVERRIDE |
Returns the desired path mapping If there is a conflict, only the first object is mapped. | |
virtual void | get (const QByteArray &operation, const APIParameters ¶meters, APIServiceResponse &response) Q_DECL_OVERRIDE |
Implements the HTTP GET operations. More... | |
Public Member Functions inherited from AbstractAPIService | |
AbstractAPIService (QObject *parent=Q_NULLPTR) | |
Only calls QObject constructor. | |
virtual bool | isThreadSafe () const Q_DECL_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... | |
virtual void | update (double deltaTime) Q_DECL_OVERRIDE |
Called in the main thread each frame. More... | |
virtual void | post (const QByteArray &operation, const APIParameters ¶meters, const QByteArray &data, APIServiceResponse &response) Q_DECL_OVERRIDE |
Provides a default implementation which returns an error message. | |
Additional Inherited Members | |
Static Protected Attributes inherited from AbstractAPIService | |
static const Qt::ConnectionType | SERVICE_DEFAULT_INVOKETYPE |
This defines the connection type QMetaObject::invokeMethod has to use inside a service: either Qt::DirectConnection for main thread handling, or Qt::BlockingQueuedConnection for HTTP thread handling. | |
|
virtual |
Reimplemented from AbstractAPIService.