MythTV
master
programs
mythbackend
servicesv2
v2encoder.h
Go to the documentation of this file.
1
// Program Name: encoder.h
3
// Created : Jan. 15, 2010
4
//
5
// Copyright (c) 2010 David Blain <dblain@mythtv.org>
6
//
7
// Licensed under the GPL v2 or later, see COPYING for details
8
//
10
11
#ifndef V2ENCODER_H_
12
#define V2ENCODER_H_
13
14
#include <QString>
15
16
#include "
libmythbase/http/mythhttpservice.h
"
17
18
#include "
v2input.h
"
19
#include "
v2programAndChannel.h
"
20
22
23
class
V2Encoder
:
public
QObject
24
{
25
Q_OBJECT
26
Q_CLASSINFO
(
"Version"
,
"1.0"
);
27
28
Q_CLASSINFO
(
"Inputs"
,
"type=V2Input"
);
29
30
SERVICE_PROPERTY2
(
int
, Id )
31
SERVICE_PROPERTY2
( QString , HostName )
32
SERVICE_PROPERTY2
(
bool
, Local )
33
SERVICE_PROPERTY2
(
bool
, Connected )
34
SERVICE_PROPERTY2
(
int
,
State
)
35
SERVICE_PROPERTY2
(
int
,
SleepStatus
)
36
SERVICE_PROPERTY2
(
bool
, LowOnFreeSpace )
37
Q_PROPERTY( QObject*
Recording
READ
Recording
USER
true
)
38
SERVICE_PROPERTY_PTR
(
V2Program
,
Recording
)
39
SERVICE_PROPERTY2
( QVariantList, Inputs )
40
41
public:
42
43
Q_INVOKABLE
V2Encoder
(QObject *parent =
nullptr
)
44
: QObject ( parent ),
45
m_Local (
true
)
46
{
47
}
48
49
void
Copy
(
const
V2Encoder
*src )
50
{
51
m_Id = src->m_Id ;
52
m_HostName = src->m_HostName ;
53
m_Local = src->m_Local ;
54
m_Connected = src->m_Connected ;
55
m_State = src->m_State ;
56
m_SleepStatus = src->m_SleepStatus ;
57
m_LowOnFreeSpace= src->m_LowOnFreeSpace;
58
m_Recording = nullptr ;
59
60
if
( src->m_Recording !=
nullptr
)
61
Recording
()->Copy( src->m_Recording );
62
63
CopyListContents< V2Input >(
this
, m_Inputs, src->m_Inputs );
64
}
65
66
V2Input
*
AddNewInput
()
67
{
68
// We must make sure the object added to the QVariantList has
69
// a parent of 'this'
70
71
auto
*pObject =
new
V2Input
(
this
);
72
m_Inputs.append( QVariant::fromValue<QObject *>( pObject ));
73
74
return
pObject;
75
}
76
77
private
:
78
Q_DISABLE_COPY
(
V2Encoder
);
79
};
80
81
Q_DECLARE_METATYPE
(
V2Encoder
*)
82
83
#endif
V2Encoder::AddNewInput
V2Input * AddNewInput()
Definition:
v2encoder.h:66
SleepStatus
SleepStatus
SleepStatus is an enumeration of the awake/sleep status of a slave.
Definition:
tv.h:97
v2programAndChannel.h
V2Encoder::Copy
void Copy(const V2Encoder *src)
Definition:
v2encoder.h:49
V2Encoder::Recording
QObject Recording
Definition:
v2encoder.h:37
true
VERBOSE_PREAMBLE Most true
Definition:
verbosedefs.h:95
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2Encoder::Q_DISABLE_COPY
Q_DISABLE_COPY(V2Encoder)
SERVICE_PROPERTY2
#define SERVICE_PROPERTY2(Type, Name)
Definition:
mythhttpservice.h:72
V2Encoder
Definition:
v2encoder.h:23
State
State
Definition:
zmserver.h:68
SERVICE_PROPERTY_PTR
#define SERVICE_PROPERTY_PTR(type, name)
Definition:
mythhttpservice.h:99
V2Encoder::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
mythhttpservice.h
v2input.h
V2Program
Definition:
v2programAndChannel.h:105
V2Input
Definition:
v2input.h:20
Generated on Sat May 27 2023 03:21:55 for MythTV by
1.8.17