MythTV  master
rttiServices.h
Go to the documentation of this file.
1 // Program Name: rttiServices.h
3 // Created : July 25, 2014
4 //
5 // Purpose - Myth Services API Interface definition
6 //
7 // Copyright (c) 2014 David Blain <dblain@mythtv.org>
8 //
9 // Licensed under the GPL v2 or later, see COPYING for details
10 //
12 
13 #ifndef RTTISERVICES_H_
14 #define RTTISERVICES_H_
15 
16 #include "service.h"
17 #include "datacontracts/enum.h"
18 
21 //
22 // Notes -
23 //
24 // * This implementation can't handle declared default parameters
25 //
26 // * When called, any missing params are sent default values for its datatype
27 //
28 // * Q_CLASSINFO( "<methodName>_Method", ...) is used to determine HTTP method
29 // type. Defaults to "BOTH", available values:
30 // "GET", "POST" or "BOTH"
31 //
34 
35 class SERVICE_PUBLIC RttiServices : public Service //, public QScriptable ???
36 {
37  Q_OBJECT
38  Q_CLASSINFO( "version" , "4.0" );
39 
40  public:
41 
42  // Must call InitializeCustomTypes for each unique Custom Type used
43  // in public slots below.
44 
45  explicit RttiServices( QObject *parent = nullptr ) : Service( parent )
46  {
48  }
49 
50  public slots:
51 
52  virtual DTC::Enum* GetEnum ( const QString &FQN ) = 0;
53 };
54 
55 #endif
unsigned int slots[4]
Definition: element.c:38
static void InitializeCustomTypes()
Definition: enum.h:72
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
RttiServices(QObject *parent=nullptr)
Definition: rttiServices.h:45
Definition: enum.h:24