MythTV
master
mythtv
programs
mythbackend
servicesv2
v2recRuleList.h
Go to the documentation of this file.
1
#ifndef V2RECRULELIST_H_
2
#define V2RECRULELIST_H_
3
4
#include <QVariantList>
5
#include <QDateTime>
6
7
#include "
libmythbase/http/mythhttpservice.h
"
8
9
#include "
v2recRule.h
"
10
11
class
V2RecRuleList
:
public
QObject
12
{
13
Q_OBJECT
14
Q_CLASSINFO
(
"Version"
,
"1.0"
);
15
16
Q_CLASSINFO
(
"RecRules"
,
"type=V2RecRule"
);
17
Q_CLASSINFO
(
"AsOf"
,
"transient=true"
);
18
19
SERVICE_PROPERTY2
(
int
, StartIndex )
20
SERVICE_PROPERTY2
(
int
, Count )
21
SERVICE_PROPERTY2
(
int
, TotalAvailable )
22
SERVICE_PROPERTY2
( QDateTime , AsOf )
23
SERVICE_PROPERTY2
( QString , Version )
24
SERVICE_PROPERTY2
( QString , ProtoVer )
25
SERVICE_PROPERTY2
( QVariantList, RecRules );
26
27
public
:
28
29
Q_INVOKABLE
V2RecRuleList
(QObject *parent =
nullptr
)
30
: QObject( parent )
31
{
32
}
33
34
void
Copy
(
const
V2RecRuleList
*src )
35
{
36
m_AsOf = src->m_AsOf ;
37
m_Version = src->m_Version ;
38
m_ProtoVer = src->m_ProtoVer ;
39
40
CopyListContents< V2RecRule >(
this
, m_RecRules, src->m_RecRules );
41
}
42
43
V2RecRule
*
AddNewRecRule
()
44
{
45
// We must make sure the object added to the QVariantList has
46
// a parent of 'this'
47
48
auto
*pObject =
new
V2RecRule
(
this
);
49
m_RecRules.append( QVariant::fromValue<QObject *>( pObject ));
50
51
return
pObject;
52
}
53
54
private
:
55
Q_DISABLE_COPY
(
V2RecRuleList
);
56
};
57
58
Q_DECLARE_METATYPE
(
V2RecRuleList
*)
59
60
#endif
V2RecRuleList::Copy
void Copy(const V2RecRuleList *src)
Definition:
v2recRuleList.h:34
V2RecRuleList::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
v2recRule.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(std::chrono::seconds)
V2RecRuleList::V2RecRuleList
Q_INVOKABLE V2RecRuleList(QObject *parent=nullptr)
Definition:
v2recRuleList.h:29
V2RecRuleList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, RecRules)
mythhttpservice.h
V2RecRuleList::AddNewRecRule
V2RecRule * AddNewRecRule()
Definition:
v2recRuleList.h:43
V2RecRuleList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2RecRuleList)
V2RecRuleList
Definition:
v2recRuleList.h:11
V2RecRule
Definition:
v2recRule.h:12
Generated on Wed Feb 26 2025 03:18:04 for MythTV by
1.8.17