MythTV  master
captureCard.h
Go to the documentation of this file.
1 // Program Name: captureCard.h
3 // Created : Sep. 21, 2011
4 //
5 // Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef CAPTURECARD_H_
12 #define CAPTURECARD_H_
13 
14 #include <QString>
15 
16 #include "serviceexp.h"
17 #include "datacontracthelper.h"
18 
19 namespace DTC
20 {
21 
23 
24 class SERVICE_PUBLIC CaptureCard : public QObject
25 {
26  Q_OBJECT
27  Q_CLASSINFO( "version" , "1.2" );
28 
29  Q_PROPERTY( uint CardId READ CardId WRITE setCardId )
30  Q_PROPERTY( uint ParentId READ ParentId WRITE setParentId )
31  Q_PROPERTY( QString VideoDevice READ VideoDevice WRITE setVideoDevice )
32  Q_PROPERTY( QString AudioDevice READ AudioDevice WRITE setAudioDevice )
33  Q_PROPERTY( QString VBIDevice READ VBIDevice WRITE setVBIDevice )
34  Q_PROPERTY( QString CardType READ CardType WRITE setCardType )
35  Q_PROPERTY( QString DefaultInput READ DefaultInput WRITE setDefaultInput )
36  Q_PROPERTY( uint AudioRateLimit READ AudioRateLimit WRITE setAudioRateLimit )
37  Q_PROPERTY( QString HostName READ HostName WRITE setHostName )
38  Q_PROPERTY( uint DVBSWFilter READ DVBSWFilter WRITE setDVBSWFilter )
39  Q_PROPERTY( uint DVBSatType READ DVBSatType WRITE setDVBSatType )
40  Q_PROPERTY( bool DVBWaitForSeqStart READ DVBWaitForSeqStart WRITE setDVBWaitForSeqStart )
41  Q_PROPERTY( bool SkipBTAudio READ SkipBTAudio WRITE setSkipBTAudio )
42  Q_PROPERTY( bool DVBOnDemand READ DVBOnDemand WRITE setDVBOnDemand )
43  Q_PROPERTY( uint DVBDiSEqCType READ DVBDiSEqCType WRITE setDVBDiSEqCType )
44  Q_PROPERTY( uint FirewireSpeed READ FirewireSpeed WRITE setFirewireSpeed )
45  Q_PROPERTY( QString FirewireModel READ FirewireModel WRITE setFirewireModel )
46  Q_PROPERTY( uint FirewireConnection READ FirewireConnection WRITE setFirewireConnection )
47  Q_PROPERTY( uint SignalTimeout READ SignalTimeout WRITE setSignalTimeout )
48  Q_PROPERTY( uint ChannelTimeout READ ChannelTimeout WRITE setChannelTimeout )
49  Q_PROPERTY( uint DVBTuningDelay READ DVBTuningDelay WRITE setDVBTuningDelay )
50  Q_PROPERTY( uint Contrast READ Contrast WRITE setContrast )
51  Q_PROPERTY( uint Brightness READ Brightness WRITE setBrightness )
52  Q_PROPERTY( uint Colour READ Colour WRITE setColour )
53  Q_PROPERTY( uint Hue READ Hue WRITE setHue )
54  Q_PROPERTY( uint DiSEqCId READ DiSEqCId WRITE setDiSEqCId )
55  Q_PROPERTY( bool DVBEITScan READ DVBEITScan WRITE setDVBEITScan )
56  Q_PROPERTY( QString InputName READ InputName WRITE setInputName )
57  Q_PROPERTY( uint SourceId READ SourceId WRITE setSourceId )
58  Q_PROPERTY( QString ExternalCommand READ ExternalCommand WRITE setExternalCommand )
59  Q_PROPERTY( QString ChangerDevice READ ChangerDevice WRITE setChangerDevice )
60  Q_PROPERTY( QString ChangerModel READ ChangerModel WRITE setChangerModel )
61  Q_PROPERTY( QString TuneChannel READ TuneChannel WRITE setTuneChannel )
62  Q_PROPERTY( QString StartChannel READ StartChannel WRITE setStartChannel )
63  Q_PROPERTY( QString DisplayName READ DisplayName WRITE setDisplayName )
64  Q_PROPERTY( bool DishnetEit READ DishnetEit WRITE setDishnetEit )
65  Q_PROPERTY( int RecPriority READ RecPriority WRITE setRecPriority )
66  Q_PROPERTY( bool QuickTune READ QuickTune WRITE setQuickTune )
67  Q_PROPERTY( uint SchedOrder READ SchedOrder WRITE setSchedOrder )
68  Q_PROPERTY( uint LiveTVOrder READ LiveTVOrder WRITE setLiveTVOrder )
69  Q_PROPERTY( uint RecLimit READ RecLimit WRITE setRecLimit )
70  Q_PROPERTY( bool SchedGroup READ SchedGroup WRITE setSchedGroup )
71 
72  PROPERTYIMP( uint , CardId )
73  PROPERTYIMP( uint , ParentId )
74  PROPERTYIMP( QString , VideoDevice )
75  PROPERTYIMP( QString , AudioDevice )
76  PROPERTYIMP( QString , VBIDevice )
77  PROPERTYIMP( QString , CardType )
78  PROPERTYIMP( QString , DefaultInput )
80  PROPERTYIMP( QString , HostName )
81  PROPERTYIMP( uint , DVBSWFilter )
82  PROPERTYIMP( uint , DVBSatType )
83  PROPERTYIMP( bool , DVBWaitForSeqStart)
84  PROPERTYIMP( bool , SkipBTAudio )
85  PROPERTYIMP( bool , DVBOnDemand )
86  PROPERTYIMP( uint , DVBDiSEqCType )
88  PROPERTYIMP( QString , FirewireModel )
96  PROPERTYIMP( uint , Hue )
97  PROPERTYIMP( uint , DiSEqCId )
98  PROPERTYIMP( bool , DVBEITScan )
99  PROPERTYIMP( QString , InputName )
100  PROPERTYIMP( uint , SourceId )
101  PROPERTYIMP( QString , ExternalCommand )
102  PROPERTYIMP( QString , ChangerDevice )
103  PROPERTYIMP( QString , ChangerModel )
104  PROPERTYIMP( QString , TuneChannel )
105  PROPERTYIMP( QString , StartChannel )
106  PROPERTYIMP( QString , DisplayName )
107  PROPERTYIMP( bool , DishnetEit )
108  PROPERTYIMP( int , RecPriority )
109  PROPERTYIMP( bool , QuickTune )
110  PROPERTYIMP( uint , SchedOrder )
112  PROPERTYIMP( uint , RecLimit )
113  PROPERTYIMP( bool , SchedGroup );
114 
115  public:
116 
117  static inline void InitializeCustomTypes();
118 
119  Q_INVOKABLE CaptureCard(QObject *parent = nullptr)
120  : QObject ( parent ), m_CardId(0), m_ParentId(0),
121  m_AudioRateLimit(0), m_DVBSWFilter(0),
122  m_DVBSatType(0), m_DVBWaitForSeqStart(false),
123  m_SkipBTAudio(false), m_DVBOnDemand(false),
124  m_DVBDiSEqCType(0), m_FirewireSpeed(0),
125  m_FirewireConnection(0), m_SignalTimeout(1000),
126  m_ChannelTimeout(3000), m_DVBTuningDelay(0),
127  m_Contrast(0), m_Brightness(0), m_Colour(0),
128  m_Hue(0), m_DiSEqCId(0), m_DVBEITScan(true),
129  m_SourceId(0), m_DishnetEit(false), m_RecPriority(0),
130  m_QuickTune(false), m_SchedOrder(0), m_LiveTVOrder(0),
131  m_RecLimit(0), m_SchedGroup(false)
132  {
133  }
134 
135  void Copy( const CaptureCard *src )
136  {
137  m_CardId = src->m_CardId;
138  m_ParentId = src->m_ParentId;
139  m_VideoDevice = src->m_VideoDevice;
140  m_AudioDevice = src->m_AudioDevice;
141  m_CardType = src->m_CardType;
142  m_DefaultInput = src->m_DefaultInput;
143  m_AudioRateLimit = src->m_AudioRateLimit;
144  m_HostName = src->m_HostName;
145  m_DVBSWFilter = src->m_DVBSWFilter;
146  m_DVBSatType = src->m_DVBSatType;
147  m_DVBWaitForSeqStart = src->m_DVBWaitForSeqStart;
148  m_SkipBTAudio = src->m_SkipBTAudio;
149  m_DVBOnDemand = src->m_DVBOnDemand;
150  m_DVBDiSEqCType = src->m_DVBDiSEqCType;
151  m_FirewireSpeed = src->m_FirewireSpeed;
152  m_FirewireModel = src->m_FirewireModel;
153  m_FirewireConnection = src->m_FirewireConnection;
154  m_SignalTimeout = src->m_SignalTimeout;
155  m_ChannelTimeout = src->m_ChannelTimeout;
156  m_DVBTuningDelay = src->m_DVBTuningDelay;
157  m_Contrast = src->m_Contrast;
158  m_Brightness = src->m_Brightness;
159  m_Colour = src->m_Colour;
160  m_Hue = src->m_Hue;
161  m_DiSEqCId = src->m_DiSEqCId;
162  m_DVBEITScan = src->m_DVBEITScan;
163  m_InputName = src->m_InputName;
164  m_SourceId = src->m_SourceId;
165  m_ExternalCommand = src->m_ExternalCommand;
166  m_ChangerDevice = src->m_ChangerDevice;
167  m_ChangerModel = src->m_ChangerModel;
168  m_TuneChannel = src->m_TuneChannel;
169  m_StartChannel = src->m_StartChannel;
170  m_DisplayName = src->m_DisplayName;
171  m_DishnetEit = src->m_DishnetEit;
172  m_RecPriority = src->m_RecPriority;
173  m_QuickTune = src->m_QuickTune;
174  m_SchedOrder = src->m_SchedOrder;
175  m_LiveTVOrder = src->m_LiveTVOrder;
176  m_RecLimit = src->m_RecLimit;
177  m_SchedGroup = src->m_SchedGroup;
178  }
179 
180  private:
181  Q_DISABLE_COPY(CaptureCard);
182 };
183 
185 {
186  qRegisterMetaType< CaptureCard* >();
187 }
188 
189 } // namespace DTC
190 
191 #endif
VERBOSE_PREAMBLE Most true
Definition: verbosedefs.h:91
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
static void InitializeCustomTypes()
Definition: captureCard.h:184
void Copy(const CaptureCard *src)
Definition: captureCard.h:135
unsigned int uint
Definition: compat.h:140