Torc  0.1
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Properties | List of all members
TorcHTTPServices Class Reference

Top level interface into services. More...

#include <torchttpservices.h>

Inheritance diagram for TorcHTTPServices:
[legend]

Public Slots

void SubscriberDeleted (QObject *Subscriber)
 
QVariantMap GetDetails (void)
 Return complete application information. More...
 
QVariantMap GetServiceList (void)
 
QVariantMap GetServiceDescription (const QString &Service)
 
QVariantList GetReturnFormats (void)
 
QVariantList GetWebSocketProtocols (void)
 
qint64 GetStartTime (void)
 
int GetPriority (void)
 
QString GetUuid (void)
 
QString GetWebSocketToken (void)
 Return a WebSocket token for connecting a WebSocket when authentication is required. More...
 
bool IsSecure (void)
 
void HandlersChanged (void)
 

Signals

void ServiceListChanged (void)
 

Public Member Functions

 TorcHTTPServices (TorcHTTPServer *Server)
 
virtual ~TorcHTTPServices ()=default
 
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 GetUIName (void) override
 
- Public Member Functions inherited from TorcHTTPService
 TorcHTTPService (QObject *Parent, const QString &Signature, const QString &Name, const QMetaObject &MetaObject, const QString &Blacklist=QStringLiteral(""))
 
virtual ~TorcHTTPService ()
 
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 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
 

Static Public Member Functions

static QString GetVersion (void)
 

Properties

QMap serviceList
 
QVariantList returnFormats
 
QVariantList webSocketProtocols
 

Additional Inherited Members

- Protected Member Functions inherited from TorcHTTPService
void HandleSubscriberDeleted (QObject *Subscriber)
 
- 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)
 
- Protected Attributes inherited from TorcHTTPService
QReadWriteLock m_httpServiceLock
 
- Protected Attributes inherited from TorcHTTPHandler
QString m_signature
 
bool m_recursive
 
QString m_name
 

Detailed Description

Top level interface into services.

A helper service that provides details to clients on the available services, return types, WebSocket protocols etc. It also acts as the entry point for clients wishing to authenticate for a WebSocket connection

Definition at line 14 of file torchttpservices.h.

Constructor & Destructor Documentation

TorcHTTPServices::TorcHTTPServices ( TorcHTTPServer Server)
explicit

Definition at line 46 of file torchttpservices.cpp.

virtual TorcHTTPServices::~TorcHTTPServices ( )
virtualdefault

Member Function Documentation

QVariantMap TorcHTTPServices::GetDetails ( void  )
slot

Return complete application information.

This acts as a convenience method for peers to retrieve pertinant application information with one remote call.

Definition at line 170 of file torchttpservices.cpp.

int TorcHTTPServices::GetPriority ( void  )
slot

Definition at line 210 of file torchttpservices.cpp.

QVariantList TorcHTTPServices::GetReturnFormats ( void  )
slot

Definition at line 195 of file torchttpservices.cpp.

QVariantMap TorcHTTPServices::GetServiceDescription ( const QString &  Service)
slot

Definition at line 189 of file torchttpservices.cpp.

QVariantMap TorcHTTPServices::GetServiceList ( void  )
slot

Definition at line 184 of file torchttpservices.cpp.

qint64 TorcHTTPServices::GetStartTime ( void  )
slot

Definition at line 205 of file torchttpservices.cpp.

QString TorcHTTPServices::GetUIName ( void  )
overridevirtual

Reimplemented from TorcHTTPService.

Definition at line 71 of file torchttpservices.cpp.

QString TorcHTTPServices::GetUuid ( void  )
slot

Definition at line 215 of file torchttpservices.cpp.

QString TorcHTTPServices::GetVersion ( void  )
static

Definition at line 65 of file torchttpservices.cpp.

QVariantList TorcHTTPServices::GetWebSocketProtocols ( void  )
slot

Definition at line 200 of file torchttpservices.cpp.

QString TorcHTTPServices::GetWebSocketToken ( void  )
slot

Return a WebSocket token for connecting a WebSocket when authentication is required.

Note
This is a dummy method as there is no point in calling it internally. The actual implementation is captured in ProcessHTTPRequest as it requires access to the underlying HTTP headers to authenticate.

Definition at line 225 of file torchttpservices.cpp.

void TorcHTTPServices::HandlersChanged ( void  )
slot

Definition at line 235 of file torchttpservices.cpp.

bool TorcHTTPServices::IsSecure ( void  )
slot

Definition at line 230 of file torchttpservices.cpp.

void TorcHTTPServices::ProcessHTTPRequest ( const QString &  PeerAddress,
int  PeerPort,
const QString &  LocalAddress,
int  LocalPort,
TorcHTTPRequest Request 
)
overridevirtual

Reimplemented from TorcHTTPService.

Definition at line 98 of file torchttpservices.cpp.

QVariantMap TorcHTTPServices::ProcessRequest ( const QString &  Method,
const QVariant &  Parameters,
QObject *  Connection,
bool  Authenticated 
)
overridevirtual

Reimplemented from TorcHTTPService.

Definition at line 76 of file torchttpservices.cpp.

void TorcHTTPServices::ServiceListChanged ( void  )
signal
void TorcHTTPServices::SubscriberDeleted ( QObject *  Subscriber)
slot

Definition at line 160 of file torchttpservices.cpp.

Property Documentation

QVariantList TorcHTTPServices::returnFormats
read

Definition at line 27 of file torchttpservices.h.

QMap TorcHTTPServices::serviceList
read

Definition at line 26 of file torchttpservices.h.

QVariantList TorcHTTPServices::webSocketProtocols
read

Definition at line 28 of file torchttpservices.h.


The documentation for this class was generated from the following files: