MythTV  master
recRule.h
Go to the documentation of this file.
1 #ifndef RECRULE_H_
2 #define RECRULE_H_
3 
4 #include <QString>
5 #include <QDateTime>
6 
7 #include "serviceexp.h"
8 #include "datacontracthelper.h"
9 
10 namespace DTC
11 {
12 
14 
15 class SERVICE_PUBLIC RecRule : public QObject
16 {
17  Q_OBJECT
18  Q_CLASSINFO( "version" , "2.10" );
19 
20  Q_PROPERTY( int Id READ Id WRITE setId )
21  Q_PROPERTY( int ParentId READ ParentId WRITE setParentId )
22  Q_PROPERTY( bool Inactive READ Inactive WRITE setInactive )
23  Q_PROPERTY( QString Title READ Title WRITE setTitle )
24  Q_PROPERTY( QString SubTitle READ SubTitle WRITE setSubTitle )
25  Q_PROPERTY( QString Description READ Description WRITE setDescription )
26  Q_PROPERTY( uint Season READ Season WRITE setSeason )
27  Q_PROPERTY( uint Episode READ Episode WRITE setEpisode )
28  Q_PROPERTY( QString Category READ Category WRITE setCategory )
29 
30  Q_PROPERTY( QDateTime StartTime READ StartTime WRITE setStartTime )
31  Q_PROPERTY( QDateTime EndTime READ EndTime WRITE setEndTime )
32 
33  Q_PROPERTY( QString SeriesId READ SeriesId WRITE setSeriesId )
34  Q_PROPERTY( QString ProgramId READ ProgramId WRITE setProgramId )
35  Q_PROPERTY( QString Inetref READ Inetref WRITE setInetref )
36 
37  Q_PROPERTY( int ChanId READ ChanId WRITE setChanId )
38  Q_PROPERTY( QString CallSign READ CallSign WRITE setCallSign )
39  Q_PROPERTY( int FindDay READ FindDay WRITE setFindDay )
40  Q_PROPERTY( QTime FindTime READ FindTime WRITE setFindTime )
41  Q_PROPERTY( QString Type READ Type WRITE setType )
42  Q_PROPERTY( QString SearchType READ SearchType WRITE setSearchType )
43  Q_PROPERTY( int RecPriority READ RecPriority WRITE setRecPriority )
44  Q_PROPERTY( uint PreferredInput READ PreferredInput WRITE setPreferredInput )
45  Q_PROPERTY( int StartOffset READ StartOffset WRITE setStartOffset )
46  Q_PROPERTY( int EndOffset READ EndOffset WRITE setEndOffset )
47  Q_PROPERTY( QString DupMethod READ DupMethod WRITE setDupMethod )
48  Q_PROPERTY( QString DupIn READ DupIn WRITE setDupIn )
49  Q_PROPERTY( bool NewEpisOnly READ NewEpisOnly WRITE setNewEpisOnly )
50  Q_PROPERTY( uint Filter READ Filter WRITE setFilter )
51 
52  Q_PROPERTY( QString RecProfile READ RecProfile WRITE setRecProfile )
53  Q_PROPERTY( QString RecGroup READ RecGroup WRITE setRecGroup )
54  Q_PROPERTY( QString StorageGroup READ StorageGroup WRITE setStorageGroup )
55  Q_PROPERTY( QString PlayGroup READ PlayGroup WRITE setPlayGroup )
56 
57  Q_PROPERTY( bool AutoExpire READ AutoExpire WRITE setAutoExpire )
58  Q_PROPERTY( int MaxEpisodes READ MaxEpisodes WRITE setMaxEpisodes )
59  Q_PROPERTY( bool MaxNewest READ MaxNewest WRITE setMaxNewest )
60 
61  Q_PROPERTY( bool AutoCommflag READ AutoCommflag WRITE setAutoCommflag )
62  Q_PROPERTY( bool AutoTranscode READ AutoTranscode WRITE setAutoTranscode )
63  Q_PROPERTY( bool AutoMetaLookup READ AutoMetaLookup WRITE setAutoMetaLookup )
64  Q_PROPERTY( bool AutoUserJob1 READ AutoUserJob1 WRITE setAutoUserJob1 )
65  Q_PROPERTY( bool AutoUserJob2 READ AutoUserJob2 WRITE setAutoUserJob2 )
66  Q_PROPERTY( bool AutoUserJob3 READ AutoUserJob3 WRITE setAutoUserJob3 )
67  Q_PROPERTY( bool AutoUserJob4 READ AutoUserJob4 WRITE setAutoUserJob4 )
68  Q_PROPERTY( int Transcoder READ Transcoder WRITE setTranscoder )
69 
70  Q_PROPERTY( QDateTime NextRecording READ NextRecording WRITE setNextRecording )
71  Q_PROPERTY( QDateTime LastRecorded READ LastRecorded WRITE setLastRecorded )
72  Q_PROPERTY( QDateTime LastDeleted READ LastDeleted WRITE setLastDeleted )
73  Q_PROPERTY( int AverageDelay READ Transcoder WRITE setTranscoder )
74 
75  PROPERTYIMP ( int , Id )
76  PROPERTYIMP ( int , ParentId )
77  PROPERTYIMP ( bool , Inactive )
78  PROPERTYIMP_REF( QString , Title )
79  PROPERTYIMP_REF( QString , SubTitle )
80  PROPERTYIMP_REF( QString , Description )
81  PROPERTYIMP ( uint , Season )
82  PROPERTYIMP ( uint , Episode )
83  PROPERTYIMP_REF( QString , Category )
84  PROPERTYIMP_REF( QDateTime , StartTime )
85  PROPERTYIMP_REF( QDateTime , EndTime )
86  PROPERTYIMP_REF( QString , SeriesId )
87  PROPERTYIMP_REF( QString , ProgramId )
88  PROPERTYIMP_REF( QString , Inetref )
89  PROPERTYIMP ( int , ChanId )
90  PROPERTYIMP_REF( QString , CallSign )
91  PROPERTYIMP ( int , FindDay )
92  PROPERTYIMP ( QTime , FindTime )
93  PROPERTYIMP_REF( QString , Type )
94  PROPERTYIMP_REF( QString , SearchType )
95  PROPERTYIMP ( int , RecPriority )
96  PROPERTYIMP ( uint , PreferredInput )
97  PROPERTYIMP ( int , StartOffset )
98  PROPERTYIMP ( int , EndOffset )
99  PROPERTYIMP_REF( QString , DupMethod )
100  PROPERTYIMP_REF( QString , DupIn )
101  PROPERTYIMP ( bool , NewEpisOnly )
102  PROPERTYIMP ( uint , Filter )
103  PROPERTYIMP_REF( QString , RecProfile )
104  PROPERTYIMP_REF( QString , RecGroup )
105  PROPERTYIMP_REF( QString , StorageGroup )
106  PROPERTYIMP_REF( QString , PlayGroup )
107  PROPERTYIMP ( bool , AutoExpire )
108  PROPERTYIMP ( int , MaxEpisodes )
109  PROPERTYIMP ( bool , MaxNewest )
110  PROPERTYIMP ( bool , AutoCommflag )
111  PROPERTYIMP ( bool , AutoTranscode )
112  PROPERTYIMP ( bool , AutoMetaLookup )
113  PROPERTYIMP ( bool , AutoUserJob1 )
114  PROPERTYIMP ( bool , AutoUserJob2 )
115  PROPERTYIMP ( bool , AutoUserJob3 )
116  PROPERTYIMP ( bool , AutoUserJob4 )
117  PROPERTYIMP ( int , Transcoder )
118  PROPERTYIMP_REF( QDateTime , NextRecording )
119  PROPERTYIMP_REF( QDateTime , LastRecorded )
120  PROPERTYIMP_REF( QDateTime , LastDeleted )
121  PROPERTYIMP ( int , AverageDelay )
122 
123  public:
124 
125  static inline void InitializeCustomTypes();
126 
127  Q_INVOKABLE explicit RecRule(QObject *parent = nullptr)
128  : QObject ( parent ),
129  m_Id ( 0 ),
130  m_ParentId ( 0 ),
131  m_Inactive ( false ),
132  m_Season ( 0 ),
133  m_Episode ( 0 ),
134  m_ChanId ( 0 ),
135  m_FindDay ( 0 ),
136  m_RecPriority ( 0 ),
137  m_PreferredInput( 0 ),
138  m_StartOffset ( 0 ),
139  m_EndOffset ( 0 ),
140  m_NewEpisOnly ( false ),
141  m_Filter ( 0 ),
142  m_AutoExpire ( false ),
143  m_MaxEpisodes ( 0 ),
144  m_MaxNewest ( false ),
145  m_AutoCommflag ( false ),
146  m_AutoTranscode ( false ),
147  m_AutoMetaLookup( false ),
148  m_AutoUserJob1 ( false ),
149  m_AutoUserJob2 ( false ),
150  m_AutoUserJob3 ( false ),
151  m_AutoUserJob4 ( false ),
152  m_Transcoder ( 0 ),
153  m_AverageDelay ( 0 )
154  {
155  }
156 
157  void Copy( const RecRule *src )
158  {
159  m_Id = src->m_Id ;
160  m_ParentId = src->m_ParentId ;
161  m_Inactive = src->m_Inactive ;
162  m_Title = src->m_Title ;
163  m_SubTitle = src->m_SubTitle ;
164  m_Description = src->m_Description ;
165  m_Season = src->m_Season ;
166  m_Episode = src->m_Episode ;
167  m_Category = src->m_Category ;
168  m_StartTime = src->m_StartTime ;
169  m_EndTime = src->m_EndTime ;
170  m_SeriesId = src->m_SeriesId ;
171  m_ProgramId = src->m_ProgramId ;
172  m_Inetref = src->m_Inetref ;
173  m_ChanId = src->m_ChanId ;
174  m_CallSign = src->m_CallSign ;
175  m_FindDay = src->m_FindDay ;
176  m_FindTime = src->m_FindTime ;
177  m_Type = src->m_Type ;
178  m_SearchType = src->m_SearchType ;
179  m_RecPriority = src->m_RecPriority ;
180  m_PreferredInput= src->m_PreferredInput;
181  m_StartOffset = src->m_StartOffset ;
182  m_EndOffset = src->m_EndOffset ;
183  m_DupMethod = src->m_DupMethod ;
184  m_DupIn = src->m_DupIn ;
185  m_NewEpisOnly = src->m_NewEpisOnly ;
186  m_Filter = src->m_Filter ;
187  m_RecProfile = src->m_RecProfile ;
188  m_RecGroup = src->m_RecGroup ;
189  m_StorageGroup = src->m_StorageGroup ;
190  m_PlayGroup = src->m_PlayGroup ;
191  m_AutoExpire = src->m_AutoExpire ;
192  m_MaxEpisodes = src->m_MaxEpisodes ;
193  m_MaxNewest = src->m_MaxNewest ;
194  m_AutoCommflag = src->m_AutoCommflag ;
195  m_AutoTranscode = src->m_AutoTranscode ;
196  m_AutoMetaLookup= src->m_AutoMetaLookup;
197  m_AutoUserJob1 = src->m_AutoUserJob1 ;
198  m_AutoUserJob2 = src->m_AutoUserJob2 ;
199  m_AutoUserJob3 = src->m_AutoUserJob3 ;
200  m_AutoUserJob4 = src->m_AutoUserJob4 ;
201  m_Transcoder = src->m_Transcoder ;
202  m_NextRecording = src->m_NextRecording ;
203  m_LastRecorded = src->m_LastRecorded ;
204  m_LastDeleted = src->m_LastDeleted ;
205  m_AverageDelay = src->m_AverageDelay ;
206  }
207 
208  private:
209  Q_DISABLE_COPY(RecRule);
210 };
211 
213 {
214  qRegisterMetaType< RecRule* >();
215 }
216 
217 } // namespace DTC
218 
219 #endif
DTC::RecRule::Copy
void Copy(const RecRule *src)
Definition: recRule.h:157
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
AutoExpire
Used to expire recordings to make space for new recordings.
Definition: autoexpire.h:60
DTC::RecRule::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: recRule.h:212
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
datacontracthelper.h
serviceexp.h
AutoTranscode
Definition: recordingprofile.cpp:1177
uint
unsigned int uint
Definition: compat.h:144
PlayGroup
Definition: playgroup.h:11
DTC::RecRule
Definition: recRule.h:15
PROPERTYIMP
#define PROPERTYIMP(type, name)
Definition: datacontracthelper.h:56
DTC
Definition: datacontracthelper.h:123
StorageGroup
Definition: storagegroup.h:11
PROPERTYIMP_REF
#define PROPERTYIMP_REF(type, name)
Definition: datacontracthelper.h:70