Torc  0.1
Public Slots | Public Member Functions | List of all members
TorcHTTPServiceTest Class Reference

Implements an HTTP service for testing purposes. More...

#include <torchttpservicetest.h>

Inheritance diagram for TorcHTTPServiceTest:
[legend]

Public Slots

void SubscriberDeleted (QObject *Subscriber)
 
void GetVoid (void)
 Returns a void. More...
 
int EchoInt (int Value)
 Returns the given Integer. More...
 
bool EchoBool (bool Value)
 Returns the given Boolean value. More...
 
float EchoFloat (float Value)
 Returns the given float. More...
 
unsigned long long EchoUnsignedLongLong (unsigned long long Value)
 Returns the given large unsigned integer. More...
 
QStringList EchoStringList (const QString &Value1, const QString &Value2, const QString &Value3)
 Returns the given strings as a list or array. More...
 
QVariantMap GetVariantMap (void)
 Returns a complex, nested data type. More...
 
QDateTime GetTimeNow (void)
 Returns the current time. More...
 
QDateTime GetTimeNowUtc (void)
 Returns the current time in Utc. More...
 
QVariantHash GetUnsupportedHash (void)
 This function should be rejected at startup. More...
 
void * GetUnsupportedPointer (void)
 This function should be rejected at startup. More...
 
void GetUnsupportedParameter (QStringList Unsupported)
 This function should be rejected at startup. More...
 

Public Member Functions

 TorcHTTPServiceTest ()
 
QString GetUIName (void)
 
- Public Member Functions inherited from TorcHTTPService
 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 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
 

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

Implements an HTTP service for testing purposes.

This class is purely for testing the HTTP interface.

Todo:
Only build in debug mode.

Definition at line 13 of file torchttpservicetest.h.

Constructor & Destructor Documentation

TorcHTTPServiceTest::TorcHTTPServiceTest ( )

Definition at line 34 of file torchttpservicetest.cpp.

Member Function Documentation

bool TorcHTTPServiceTest::EchoBool ( bool  Value)
slot

Returns the given Boolean value.

Definition at line 62 of file torchttpservicetest.cpp.

float TorcHTTPServiceTest::EchoFloat ( float  Value)
slot

Returns the given float.

Definition at line 68 of file torchttpservicetest.cpp.

int TorcHTTPServiceTest::EchoInt ( int  Value)
slot

Returns the given Integer.

Definition at line 56 of file torchttpservicetest.cpp.

QStringList TorcHTTPServiceTest::EchoStringList ( const QString &  Value1,
const QString &  Value2,
const QString &  Value3 
)
slot

Returns the given strings as a list or array.

Definition at line 80 of file torchttpservicetest.cpp.

unsigned long long TorcHTTPServiceTest::EchoUnsignedLongLong ( unsigned long long  Value)
slot

Returns the given large unsigned integer.

Definition at line 74 of file torchttpservicetest.cpp.

QDateTime TorcHTTPServiceTest::GetTimeNow ( void  )
slot

Returns the current time.

Definition at line 106 of file torchttpservicetest.cpp.

QDateTime TorcHTTPServiceTest::GetTimeNowUtc ( void  )
slot

Returns the current time in Utc.

Definition at line 112 of file torchttpservicetest.cpp.

QString TorcHTTPServiceTest::GetUIName ( void  )
virtual

Reimplemented from TorcHTTPService.

Definition at line 40 of file torchttpservicetest.cpp.

QVariantHash TorcHTTPServiceTest::GetUnsupportedHash ( void  )
slot

This function should be rejected at startup.

Definition at line 118 of file torchttpservicetest.cpp.

void TorcHTTPServiceTest::GetUnsupportedParameter ( QStringList  Unsupported)
slot

This function should be rejected at startup.

Definition at line 132 of file torchttpservicetest.cpp.

void * TorcHTTPServiceTest::GetUnsupportedPointer ( void  )
slot

This function should be rejected at startup.

Definition at line 126 of file torchttpservicetest.cpp.

QVariantMap TorcHTTPServiceTest::GetVariantMap ( void  )
slot

Returns a complex, nested data type.

Definition at line 88 of file torchttpservicetest.cpp.

void TorcHTTPServiceTest::GetVoid ( void  )
slot

Returns a void.

Definition at line 51 of file torchttpservicetest.cpp.

void TorcHTTPServiceTest::SubscriberDeleted ( QObject *  Subscriber)
slot

Definition at line 45 of file torchttpservicetest.cpp.


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