00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00021
00022 #ifndef DVR_H
00023 #define DVR_H
00024
00025 #include <QScriptEngine>
00026
00027 #include "services/dvrServices.h"
00028
00029 class Dvr : public DvrServices
00030 {
00031 Q_OBJECT
00032
00033 public:
00034
00035 Q_INVOKABLE Dvr( QObject *parent = 0 ) {}
00036
00037 public:
00038
00039 DTC::ProgramList* GetExpiringList ( int StartIndex,
00040 int Count );
00041
00042 DTC::ProgramList* GetRecordedList ( bool Descending,
00043 int StartIndex,
00044 int Count );
00045
00046 DTC::ProgramList* GetFilteredRecordedList ( bool Descending,
00047 int StartIndex,
00048 int Count,
00049 const QString &TitleRegEx,
00050 const QString &RecGroup,
00051 const QString &StorageGroup );
00052
00053 DTC::Program* GetRecorded ( int ChanId,
00054 const QDateTime &StartTime );
00055
00056 bool RemoveRecorded ( int ChanId,
00057 const QDateTime &StartTime );
00058
00059 DTC::ProgramList* GetConflictList ( int StartIndex,
00060 int Count );
00061
00062 DTC::ProgramList* GetUpcomingList ( int StartIndex,
00063 int Count,
00064 bool ShowAll );
00065
00066 DTC::EncoderList* GetEncoderList ( );
00067
00068
00069
00070 int AddRecordSchedule ( int ChanId,
00071 QDateTime StartTime,
00072 int ParentId,
00073 bool Inactive,
00074 uint Season,
00075 uint Episode,
00076 QString Inetref,
00077 int FindId,
00078 QString Type,
00079 QString SearchType,
00080 int RecPriority,
00081 uint PreferredInput,
00082 int StartOffset,
00083 int EndOffset,
00084 QString DupMethod,
00085 QString DupIn,
00086 uint Filter,
00087 QString RecProfile,
00088 QString RecGroup,
00089 QString StorageGroup,
00090 QString PlayGroup,
00091 bool AutoExpire,
00092 int MaxEpisodes,
00093 bool MaxNewest,
00094 bool AutoCommflag,
00095 bool AutoTranscode,
00096 bool AutoMetaLookup,
00097 bool AutoUserJob1,
00098 bool AutoUserJob2,
00099 bool AutoUserJob3,
00100 bool AutoUserJob4,
00101 int Transcoder);
00102
00103 bool RemoveRecordSchedule ( uint RecordId );
00104
00105 DTC::RecRuleList* GetRecordScheduleList( int StartIndex,
00106 int Count );
00107
00108 DTC::RecRule* GetRecordSchedule ( uint RecordId );
00109
00110 bool EnableRecordSchedule ( uint RecordId );
00111
00112 bool DisableRecordSchedule( uint RecordId );
00113 };
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 class ScriptableDvr : public QObject
00131 {
00132 Q_OBJECT
00133
00134 private:
00135
00136 Dvr m_obj;
00137
00138 public:
00139
00140 Q_INVOKABLE ScriptableDvr( QObject *parent = 0 ) : QObject( parent ) {}
00141
00142 public slots:
00143
00144 QObject* GetExpiringList ( int StartIndex,
00145 int Count )
00146 {
00147 return m_obj.GetExpiringList( StartIndex, Count );
00148 }
00149
00150 QObject* GetRecordedList ( bool Descending,
00151 int StartIndex,
00152 int Count )
00153 {
00154 return m_obj.GetRecordedList( Descending, StartIndex, Count );
00155 }
00156
00157 QObject* GetFilteredRecordedList ( bool Descending,
00158 int StartIndex,
00159 int Count,
00160 const QString &TitleRegEx,
00161 const QString &RecGroup,
00162 const QString &StorageGroup)
00163 {
00164 return m_obj.GetFilteredRecordedList( Descending, StartIndex, Count,
00165 TitleRegEx, RecGroup,
00166 StorageGroup);
00167 }
00168
00169 QObject* GetRecorded ( int ChanId,
00170 const QDateTime &StartTime )
00171 {
00172 return m_obj.GetRecorded( ChanId, StartTime );
00173 }
00174
00175 QObject* GetConflictList ( int StartIndex,
00176 int Count )
00177 {
00178 return m_obj.GetConflictList( StartIndex, Count );
00179 }
00180
00181 QObject* GetEncoderList () { return m_obj.GetEncoderList(); }
00182
00183
00184 };
00185
00186 Q_SCRIPT_DECLARE_QMETAOBJECT( ScriptableDvr, QObject*);
00187
00188 #endif