MythTV
master
mythtv
programs
mythbackend
servicesv2
v2channelScan.h
Go to the documentation of this file.
1
#ifndef V2CHANNELSCAN_H_
2
#define V2CHANNELSCAN_H_
3
4
#include "
libmythbase/http/mythhttpservice.h
"
5
6
class
V2ScanStatus
:
public
QObject
7
{
8
Q_OBJECT
9
Q_CLASSINFO
(
"Version"
,
"1.0"
);
10
11
SERVICE_PROPERTY2
(
int
, CardId )
12
SERVICE_PROPERTY2
( QString , Status )
13
SERVICE_PROPERTY2
(
bool
, SignalLock )
14
SERVICE_PROPERTY2
(
int
, Progress )
15
SERVICE_PROPERTY2
(
int
, SignalNoise )
16
SERVICE_PROPERTY2
(
int
, SignalStrength)
17
SERVICE_PROPERTY2
( QString , StatusLog )
18
SERVICE_PROPERTY2
( QString , StatusText )
19
SERVICE_PROPERTY2
( QString , StatusTitle )
20
SERVICE_PROPERTY2
( QString , DialogMsg )
21
SERVICE_PROPERTY2
(
bool
, DialogInputReq )
22
SERVICE_PROPERTY2
( QStringList , DialogButtons )
23
24
25
public
:
26
27
Q_INVOKABLE
V2ScanStatus
(QObject *parent =
nullptr
)
28
: QObject( parent )
29
{
30
}
31
32
private
:
33
Q_DISABLE_COPY
(
V2ScanStatus
);
34
};
35
36
Q_DECLARE_METATYPE
(
V2ScanStatus
*)
37
38
class
V2Scan
: public QObject
39
{
40
Q_OBJECT
41
Q_CLASSINFO(
"Version"
,
"1.0"
);
42
43
SERVICE_PROPERTY2
(
int
, ScanId )
44
SERVICE_PROPERTY2
(
int
, CardId )
45
SERVICE_PROPERTY2
(
int
, SourceId )
46
SERVICE_PROPERTY2
(
bool
, Processed )
47
SERVICE_PROPERTY2
( QDateTime , ScanDate )
48
49
public
:
50
51
Q_INVOKABLE
V2Scan
(QObject *parent =
nullptr
)
52
: QObject( parent )
53
{
54
}
55
56
private
:
57
Q_DISABLE_COPY(
V2Scan
);
58
};
59
60
Q_DECLARE_METATYPE
(
V2Scan
*)
61
62
class
V2ScanList
: public QObject
63
{
64
Q_OBJECT
65
Q_CLASSINFO(
"Version"
,
"1.0"
);
66
Q_CLASSINFO(
"Scans"
,
"type=V2Scan"
);
67
68
SERVICE_PROPERTY2
( QVariantList , Scans )
69
70
public
:
71
72
Q_INVOKABLE
V2ScanList
(QObject *parent =
nullptr
)
73
: QObject( parent )
74
{
75
}
76
77
V2Scan
*
AddNewScan
()
78
{
79
// We must make sure the object added to the QVariantList has
80
// a parent of 'this'
81
82
auto
*pObject =
new
V2Scan
(
this
);
83
m_Scans.append( QVariant::fromValue<QObject *>( pObject ));
84
85
return
pObject;
86
}
87
88
89
private
:
90
Q_DISABLE_COPY(
V2ScanList
);
91
};
92
93
Q_DECLARE_METATYPE
(
V2ScanList
*)
94
95
#endif // V2CHANNELSCAN_H_
V2ScanStatus::Q_DISABLE_COPY
Q_DISABLE_COPY(V2ScanStatus)
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(std::chrono::seconds)
SERVICE_PROPERTY2
#define SERVICE_PROPERTY2(Type, Name)
Definition:
mythhttpservice.h:72
V2Scan
Definition:
v2channelScan.h:38
mythhttpservice.h
V2ScanList
Definition:
v2channelScan.h:62
V2ScanList::AddNewScan
V2Scan * AddNewScan()
Definition:
v2channelScan.h:77
V2Scan::V2Scan
Q_INVOKABLE V2Scan(QObject *parent=nullptr)
Definition:
v2channelScan.h:51
V2ScanStatus
Definition:
v2channelScan.h:6
V2ScanStatus::V2ScanStatus
Q_INVOKABLE V2ScanStatus(QObject *parent=nullptr)
Definition:
v2channelScan.h:27
V2ScanStatus::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
V2ScanList::V2ScanList
Q_INVOKABLE V2ScanList(QObject *parent=nullptr)
Definition:
v2channelScan.h:72
Generated on Sun Jan 19 2025 03:17:00 for MythTV by
1.8.17