00001
00002
00003
00004
00005
00006
00007
00008
00010
00011 #ifndef RECORDING_H_
00012 #define RECORDING_H_
00013
00014 #include <QDateTime>
00015 #include <QString>
00016
00017 #include "serviceexp.h"
00018 #include "datacontracthelper.h"
00019 #include "programtypes.h"
00020
00021 namespace DTC
00022 {
00023
00024 class SERVICE_PUBLIC RecordingInfo : public QObject
00025 {
00026 Q_OBJECT
00027 Q_CLASSINFO( "version", "1.01" );
00028
00029 Q_PROPERTY( int Status READ Status WRITE setStatus )
00030 Q_PROPERTY( int Priority READ Priority WRITE setPriority )
00031 Q_PROPERTY( QDateTime StartTs READ StartTs WRITE setStartTs )
00032 Q_PROPERTY( QDateTime EndTs READ EndTs WRITE setEndTs )
00033
00034 Q_PROPERTY( int RecordId READ RecordId WRITE setRecordId DESIGNABLE SerializeDetails )
00035 Q_PROPERTY( QString RecGroup READ RecGroup WRITE setRecGroup DESIGNABLE SerializeDetails )
00036 Q_PROPERTY( QString PlayGroup READ PlayGroup WRITE setPlayGroup DESIGNABLE SerializeDetails )
00037 Q_PROPERTY( QString StorageGroup READ StorageGroup WRITE setStorageGroup DESIGNABLE SerializeDetails )
00038 Q_PROPERTY( int RecType READ RecType WRITE setRecType DESIGNABLE SerializeDetails )
00039 Q_PROPERTY( int DupInType READ DupInType WRITE setDupInType DESIGNABLE SerializeDetails )
00040 Q_PROPERTY( int DupMethod READ DupMethod WRITE setDupMethod DESIGNABLE SerializeDetails )
00041 Q_PROPERTY( int EncoderId READ EncoderId WRITE setEncoderId DESIGNABLE SerializeDetails )
00042 Q_PROPERTY( QString Profile READ Profile WRITE setProfile DESIGNABLE SerializeDetails )
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 PROPERTYIMP_ENUM( RecStatusType , Status )
00054 PROPERTYIMP ( int , Priority )
00055 PROPERTYIMP ( QDateTime , StartTs )
00056 PROPERTYIMP ( QDateTime , EndTs )
00057
00058 PROPERTYIMP ( int , RecordId )
00059 PROPERTYIMP ( QString , RecGroup )
00060 PROPERTYIMP ( QString , StorageGroup)
00061 PROPERTYIMP ( QString , PlayGroup )
00062 PROPERTYIMP_ENUM( RecordingType , RecType )
00063 PROPERTYIMP_ENUM( RecordingDupInType , DupInType )
00064 PROPERTYIMP_ENUM( RecordingDupMethodType , DupMethod )
00065 PROPERTYIMP ( int , EncoderId )
00066 PROPERTYIMP ( QString , Profile )
00067
00068
00069 PROPERTYIMP( bool, SerializeDetails )
00070
00071 public:
00072
00073 static void InitializeCustomTypes()
00074 {
00075 qRegisterMetaType< RecordingInfo >();
00076 qRegisterMetaType< RecordingInfo* >();
00077 }
00078
00079 public:
00080
00081 RecordingInfo(QObject *parent = 0)
00082 : QObject ( parent ),
00083 m_Status ( rsUnknown ),
00084 m_Priority ( 0 ),
00085 m_RecordId ( 0 ),
00086 m_RecType ( kNotRecording ),
00087 m_DupInType ( kDupsInRecorded ),
00088 m_DupMethod ( kDupCheckNone ),
00089 m_EncoderId ( 0 ),
00090 m_SerializeDetails( true )
00091 {
00092 }
00093
00094 RecordingInfo( const RecordingInfo &src )
00095 {
00096 Copy( src );
00097 }
00098
00099 void Copy( const RecordingInfo &src )
00100 {
00101 m_Status = src.m_Status ;
00102 m_Priority = src.m_Priority ;
00103 m_StartTs = src.m_StartTs ;
00104 m_EndTs = src.m_EndTs ;
00105 m_RecordId = src.m_RecordId ;
00106 m_RecGroup = src.m_RecGroup ;
00107 m_StorageGroup = src.m_StorageGroup ;
00108 m_PlayGroup = src.m_PlayGroup ;
00109 m_RecType = src.m_RecType ;
00110 m_DupInType = src.m_DupInType ;
00111 m_DupMethod = src.m_DupMethod ;
00112 m_EncoderId = src.m_EncoderId ;
00113 m_Profile = src.m_Profile ;
00114 m_SerializeDetails= src.m_SerializeDetails ;
00115 }
00116 };
00117
00118 }
00119
00120 Q_DECLARE_METATYPE( DTC::RecordingInfo )
00121 Q_DECLARE_METATYPE( DTC::RecordingInfo* )
00122
00123 #endif