Torc
0.1
|
#include <torchttpservice.h>
Public Member Functions | |
TorcHTTPService (QObject *Parent, const QString &Signature, const QString &Name, const QMetaObject &MetaObject, const QString &Blacklist=QStringLiteral("")) | |
virtual | ~TorcHTTPService () |
void | ProcessHTTPRequest (const QString &PeerAddress, int PeerPort, const QString &LocalAddress, int LocalPort, TorcHTTPRequest &Request) override |
QVariantMap | ProcessRequest (const QString &Method, const QVariant &Parameters, QObject *Connection, bool Authenticated) override |
QString | GetMethod (int Index) |
QVariant | GetProperty (int Index) |
Get the value of a given property. More... | |
QVariantMap | GetServiceDetails (void) |
Return a QVariantMap describing the services methods and properties. More... | |
virtual QString | GetUIName (void) |
virtual QString | GetPresentationURL (void) |
Public Member Functions inherited from TorcHTTPHandler | |
TorcHTTPHandler (const QString &Signature, const QString &Name) | |
virtual | ~TorcHTTPHandler () |
QString | Signature (void) const |
bool | GetRecursive (void) const |
QString | Name (void) const |
Protected Member Functions | |
void | HandleSubscriberDeleted (QObject *Subscriber) |
Protected Attributes | |
QReadWriteLock | m_httpServiceLock |
Protected Attributes inherited from TorcHTTPHandler | |
QString | m_signature |
bool | m_recursive |
QString | m_name |
Additional Inherited Members | |
Static Protected Member Functions inherited from TorcHTTPHandler | |
static bool | MethodIsAuthorised (TorcHTTPRequest &Request, int Allowed) |
Check the current request is authorised and set the authentication header if not. More... | |
static void | HandleOptions (TorcHTTPRequest &Request, int Allowed) |
static void | HandleFile (TorcHTTPRequest &Request, const QString &Filename, int Cache) |
Support for complex parameter types via RPC (e.g. array etc).
ProcessRequest implicitly assumes JSON-RPC (though applies to much of the RPC code).
Definition at line 20 of file torchttpservice.h.
TorcHTTPService::TorcHTTPService | ( | QObject * | Parent, |
const QString & | Signature, | ||
const QString & | Name, | ||
const QMetaObject & | MetaObject, | ||
const QString & | Blacklist = QStringLiteral("") |
||
) |
Definition at line 262 of file torchttpservice.cpp.
|
virtual |
Definition at line 431 of file torchttpservice.cpp.
QString TorcHTTPService::GetMethod | ( | int | Index | ) |
Definition at line 823 of file torchttpservice.cpp.
|
virtual |
Reimplemented in TorcCameraVideoOutput.
Definition at line 441 of file torchttpservice.cpp.
QVariant TorcHTTPService::GetProperty | ( | int | Index | ) |
Get the value of a given property.
Definition at line 835 of file torchttpservice.cpp.
QVariantMap TorcHTTPService::GetServiceDetails | ( | void | ) |
Return a QVariantMap describing the services methods and properties.
This is sent to new subscribers immediately after a successful subscription to provide them with the full 'API' and current state.
It is also used by the TorcHTMLServicesHelp object to retrieve a service description (as used by the API helper screen on the web frontend).
Definition at line 729 of file torchttpservice.cpp.
|
virtual |
Reimplemented in TorcNetworkedContext, TorcOutput, TorcControl, TorcInput, TorcPower, TorcHTTPServices, TorcLanguage, TorcCentral, TorcInputs, TorcOutputs, and TorcHTTPServiceTest.
Definition at line 436 of file torchttpservice.cpp.
|
protected |
Definition at line 847 of file torchttpservice.cpp.
|
overridevirtual |
Implements TorcHTTPHandler.
Reimplemented in TorcHTTPServices.
Definition at line 446 of file torchttpservice.cpp.
|
overridevirtual |
Reimplemented from TorcHTTPHandler.
Reimplemented in TorcHTTPServices.
Definition at line 529 of file torchttpservice.cpp.
|
protected |
Definition at line 42 of file torchttpservice.h.