MythTV
master
libs
libmythservicecontracts
services
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 LICENSE for details
10
//
12
13
#ifndef RTTISERVICES_H_
14
#define RTTISERVICES_H_
15
16
#include "
libmythservicecontracts/datacontracts/enum.h
"
17
#include "
libmythservicecontracts/service.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
{
47
DTC::Enum ::InitializeCustomTypes
();
48
}
49
50
public
slots:
51
52
virtual
DTC::Enum
* GetEnum (
const
QString &FQN ) = 0;
53
};
54
55
#endif
service.h
RttiServices
Definition:
rttiServices.h:35
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition:
serviceexp.h:9
Service
Definition:
service.h:42
DTC::Enum::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
enum.h:71
DTC::Enum
Definition:
enum.h:23
RttiServices::RttiServices
RttiServices(QObject *parent=nullptr)
Definition:
rttiServices.h:45
enum.h
Generated on Tue Apr 16 2024 03:18:52 for MythTV by
1.8.17