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.00" );
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( uint Filter READ Filter WRITE setFilter )
50 
51  Q_PROPERTY( QString RecProfile READ RecProfile WRITE setRecProfile )
52  Q_PROPERTY( QString RecGroup READ RecGroup WRITE setRecGroup )
53  Q_PROPERTY( QString StorageGroup READ StorageGroup WRITE setStorageGroup )
54  Q_PROPERTY( QString PlayGroup READ PlayGroup WRITE setPlayGroup )
55 
56  Q_PROPERTY( bool AutoExpire READ AutoExpire WRITE setAutoExpire )
57  Q_PROPERTY( int MaxEpisodes READ MaxEpisodes WRITE setMaxEpisodes )
58  Q_PROPERTY( bool MaxNewest READ MaxNewest WRITE setMaxNewest )
59 
60  Q_PROPERTY( bool AutoCommflag READ AutoCommflag WRITE setAutoCommflag )
61  Q_PROPERTY( bool AutoTranscode READ AutoTranscode WRITE setAutoTranscode )
62  Q_PROPERTY( bool AutoMetaLookup READ AutoMetaLookup WRITE setAutoMetaLookup )
63  Q_PROPERTY( bool AutoUserJob1 READ AutoUserJob1 WRITE setAutoUserJob1 )
64  Q_PROPERTY( bool AutoUserJob2 READ AutoUserJob2 WRITE setAutoUserJob2 )
65  Q_PROPERTY( bool AutoUserJob3 READ AutoUserJob3 WRITE setAutoUserJob3 )
66  Q_PROPERTY( bool AutoUserJob4 READ AutoUserJob4 WRITE setAutoUserJob4 )
67  Q_PROPERTY( int Transcoder READ Transcoder WRITE setTranscoder )
68 
69  Q_PROPERTY( QDateTime NextRecording READ NextRecording WRITE setNextRecording )
70  Q_PROPERTY( QDateTime LastRecorded READ LastRecorded WRITE setLastRecorded )
71  Q_PROPERTY( QDateTime LastDeleted READ LastDeleted WRITE setLastDeleted )
72  Q_PROPERTY( int AverageDelay READ Transcoder WRITE setTranscoder )
73 
74  PROPERTYIMP ( int , Id )
75  PROPERTYIMP ( int , ParentId )
76  PROPERTYIMP ( bool , Inactive )
77  PROPERTYIMP ( QString , Title )
78  PROPERTYIMP ( QString , SubTitle )
79  PROPERTYIMP ( QString , Description )
80  PROPERTYIMP ( uint , Season )
81  PROPERTYIMP ( uint , Episode )
82  PROPERTYIMP ( QString , Category )
83  PROPERTYIMP ( QDateTime , StartTime )
84  PROPERTYIMP ( QDateTime , EndTime )
85  PROPERTYIMP ( QString , SeriesId )
86  PROPERTYIMP ( QString , ProgramId )
87  PROPERTYIMP ( QString , Inetref )
88  PROPERTYIMP ( int , ChanId )
89  PROPERTYIMP ( QString , CallSign )
90  PROPERTYIMP ( int , FindDay )
91  PROPERTYIMP ( QTime , FindTime )
92  PROPERTYIMP ( QString , Type )
93  PROPERTYIMP ( QString , SearchType )
94  PROPERTYIMP ( int , RecPriority )
95  PROPERTYIMP ( uint , PreferredInput )
96  PROPERTYIMP ( int , StartOffset )
97  PROPERTYIMP ( int , EndOffset )
98  PROPERTYIMP ( QString , DupMethod )
99  PROPERTYIMP ( QString , DupIn )
100  PROPERTYIMP ( uint , Filter )
101  PROPERTYIMP ( QString , RecProfile )
102  PROPERTYIMP ( QString , RecGroup )
103  PROPERTYIMP ( QString , StorageGroup )
104  PROPERTYIMP ( QString , PlayGroup )
105  PROPERTYIMP ( bool , AutoExpire )
106  PROPERTYIMP ( int , MaxEpisodes )
107  PROPERTYIMP ( bool , MaxNewest )
108  PROPERTYIMP ( bool , AutoCommflag )
109  PROPERTYIMP ( bool , AutoTranscode )
110  PROPERTYIMP ( bool , AutoMetaLookup )
111  PROPERTYIMP ( bool , AutoUserJob1 )
112  PROPERTYIMP ( bool , AutoUserJob2 )
113  PROPERTYIMP ( bool , AutoUserJob3 )
114  PROPERTYIMP ( bool , AutoUserJob4 )
115  PROPERTYIMP ( int , Transcoder )
116  PROPERTYIMP ( QDateTime , NextRecording )
117  PROPERTYIMP ( QDateTime , LastRecorded )
118  PROPERTYIMP ( QDateTime , LastDeleted )
119  PROPERTYIMP ( int , AverageDelay )
120 
121  public:
122 
123  static inline void InitializeCustomTypes();
124 
125  Q_INVOKABLE RecRule(QObject *parent = nullptr)
126  : QObject ( parent ),
127  m_Id ( 0 ),
128  m_ParentId ( 0 ),
129  m_Inactive ( false ),
130  m_Season ( 0 ),
131  m_Episode ( 0 ),
132  m_ChanId ( 0 ),
133  m_FindDay ( 0 ),
134  m_RecPriority ( 0 ),
135  m_PreferredInput( 0 ),
136  m_StartOffset ( 0 ),
137  m_EndOffset ( 0 ),
138  m_Filter ( 0 ),
139  m_AutoExpire ( false ),
140  m_MaxEpisodes ( 0 ),
141  m_MaxNewest ( false ),
142  m_AutoCommflag ( false ),
143  m_AutoTranscode ( false ),
144  m_AutoMetaLookup( false ),
145  m_AutoUserJob1 ( false ),
146  m_AutoUserJob2 ( false ),
147  m_AutoUserJob3 ( false ),
148  m_AutoUserJob4 ( false ),
149  m_Transcoder ( 0 ),
150  m_AverageDelay ( 0 )
151  {
152  }
153 
154  void Copy( const RecRule *src )
155  {
156  m_Id = src->m_Id ;
157  m_ParentId = src->m_ParentId ;
158  m_Inactive = src->m_Inactive ;
159  m_Title = src->m_Title ;
160  m_SubTitle = src->m_SubTitle ;
161  m_Description = src->m_Description ;
162  m_Season = src->m_Season ;
163  m_Episode = src->m_Episode ;
164  m_Category = src->m_Category ;
165  m_StartTime = src->m_StartTime ;
166  m_EndTime = src->m_EndTime ;
167  m_SeriesId = src->m_SeriesId ;
168  m_ProgramId = src->m_ProgramId ;
169  m_Inetref = src->m_Inetref ;
170  m_ChanId = src->m_ChanId ;
171  m_CallSign = src->m_CallSign ;
172  m_FindDay = src->m_FindDay ;
173  m_FindTime = src->m_FindTime ;
174  m_Type = src->m_Type ;
175  m_SearchType = src->m_SearchType ;
176  m_RecPriority = src->m_RecPriority ;
177  m_PreferredInput= src->m_PreferredInput;
178  m_StartOffset = src->m_StartOffset ;
179  m_EndOffset = src->m_EndOffset ;
180  m_DupMethod = src->m_DupMethod ;
181  m_DupIn = src->m_DupIn ;
182  m_Filter = src->m_Filter ;
183  m_RecProfile = src->m_RecProfile ;
184  m_RecGroup = src->m_RecGroup ;
185  m_StorageGroup = src->m_StorageGroup ;
186  m_PlayGroup = src->m_PlayGroup ;
187  m_AutoExpire = src->m_AutoExpire ;
188  m_MaxEpisodes = src->m_MaxEpisodes ;
189  m_MaxNewest = src->m_MaxNewest ;
190  m_AutoCommflag = src->m_AutoCommflag ;
191  m_AutoTranscode = src->m_AutoTranscode ;
192  m_AutoMetaLookup= src->m_AutoMetaLookup;
193  m_AutoUserJob1 = src->m_AutoUserJob1 ;
194  m_AutoUserJob2 = src->m_AutoUserJob2 ;
195  m_AutoUserJob3 = src->m_AutoUserJob3 ;
196  m_AutoUserJob4 = src->m_AutoUserJob4 ;
197  m_Transcoder = src->m_Transcoder ;
198  m_NextRecording = src->m_NextRecording ;
199  m_LastRecorded = src->m_LastRecorded ;
200  m_LastDeleted = src->m_LastDeleted ;
201  m_AverageDelay = src->m_AverageDelay ;
202  }
203 
204  private:
205  Q_DISABLE_COPY(RecRule);
206 };
207 
209 {
210  qRegisterMetaType< RecRule* >();
211 }
212 
213 } // namespace DTC
214 
215 #endif
void Copy(const RecRule *src)
Definition: recRule.h:154
unsigned int uint
Definition: compat.h:140
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
static void InitializeCustomTypes()
Definition: recRule.h:208
Used to expire recordings to make space for new recordings.
Definition: autoexpire.h:61