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