Torc  0.1
torchttpservicetest.h
Go to the documentation of this file.
1 #ifndef TORCHTTPSERVICETEST_H
2 #define TORCHTTPSERVICETEST_H
3 
4 // Qt
5 #include <QObject>
6 #include <QDateTime>
7 #include <QStringList>
8 #include <QVariantMap>
9 
10 // Torc
11 #include "torchttpservice.h"
12 
13 class TorcHTTPServiceTest : public QObject, public TorcHTTPService
14 {
15  Q_OBJECT
16  Q_CLASSINFO("Version", "1.0.0")
17  Q_CLASSINFO("EchoInt", "methods=GET&HEAD")
18  Q_CLASSINFO("EchoBool", "methods=GET&HEAD")
19  Q_CLASSINFO("EchoFloat", "methods=GET&HEAD")
20  Q_CLASSINFO("EchoUnsignedLongLong", "methods=GET&HEAD")
21  Q_CLASSINFO("EchoStringList", "methods=GET&HEAD,type=strings")
22  Q_CLASSINFO("GetVariantMap", "type=LevelOne")
23 
24  public:
26  QString GetUIName (void);
27 
28  public slots:
29  void SubscriberDeleted (QObject *Subscriber);
30  void GetVoid (void);
31  int EchoInt (int Value);
32  bool EchoBool (bool Value);
33  float EchoFloat (float Value);
34  unsigned long long EchoUnsignedLongLong (unsigned long long Value);
35  QStringList EchoStringList (const QString &Value1, const QString &Value2, const QString &Value3);
36 
37  QVariantMap GetVariantMap (void);
38  QDateTime GetTimeNow (void);
39  QDateTime GetTimeNowUtc (void);
40 
41  QVariantHash GetUnsupportedHash (void);
42  void* GetUnsupportedPointer (void);
43 
44  void GetUnsupportedParameter (QStringList Unsupported);
45 };
46 
47 #endif // TORCHTTPSERVICETEST_H
void GetUnsupportedParameter(QStringList Unsupported)
This function should be rejected at startup.
QDateTime GetTimeNow(void)
Returns the current time.
QVariantHash GetUnsupportedHash(void)
This function should be rejected at startup.
void GetVoid(void)
Returns a void.
void SubscriberDeleted(QObject *Subscriber)
QStringList EchoStringList(const QString &Value1, const QString &Value2, const QString &Value3)
Returns the given strings as a list or array.
QVariantMap GetVariantMap(void)
Returns a complex, nested data type.
QDateTime GetTimeNowUtc(void)
Returns the current time in Utc.
unsigned long long EchoUnsignedLongLong(unsigned long long Value)
Returns the given large unsigned integer.
void * GetUnsupportedPointer(void)
This function should be rejected at startup.
float EchoFloat(float Value)
Returns the given float.
bool EchoBool(bool Value)
Returns the given Boolean value.
int EchoInt(int Value)
Returns the given Integer.
Implements an HTTP service for testing purposes.