MythTV  0.28pre
videoMetadataInfo.h
Go to the documentation of this file.
1 // Program Name: videoMetadataInfo.h
3 // Created : Apr. 21, 2011
4 //
5 // Copyright (c) 2010 Robert McNamara <rmcnamara@mythtv.org>
6 // Copyright (c) 2013 Stuart Morgan <smorgan@mythtv.org>
7 //
8 // Licensed under the GPL v2 or later, see COPYING for details
9 //
11 
12 #ifndef VIDEOMETADATAINFO_H_
13 #define VIDEOMETADATAINFO_H_
14 
15 #include <QString>
16 #include <QDateTime>
17 
18 #include "serviceexp.h"
19 #include "datacontracthelper.h"
20 #include "artworkInfoList.h"
21 #include "castMemberList.h"
22 
23 namespace DTC
24 {
25 
27 
28 class SERVICE_PUBLIC VideoMetadataInfo : public QObject
29 {
30  Q_OBJECT
31  Q_CLASSINFO( "version" , "2.0" );
32 
33  Q_PROPERTY( int Id READ Id WRITE setId )
34  Q_PROPERTY( QString Title READ Title WRITE setTitle )
35  Q_PROPERTY( QString SubTitle READ SubTitle WRITE setSubTitle )
36  Q_PROPERTY( QString Tagline READ Tagline WRITE setTagline )
37  Q_PROPERTY( QString Director READ Director WRITE setDirector )
38  Q_PROPERTY( QString Studio READ Studio WRITE setStudio )
39  Q_PROPERTY( QString Description READ Description WRITE setDescription )
40  Q_PROPERTY( QString Certification READ Certification WRITE setCertification )
41  Q_PROPERTY( QString Inetref READ Inetref WRITE setInetref )
42  Q_PROPERTY( int Collectionref READ Collectionref WRITE setCollectionref )
43  Q_PROPERTY( QString HomePage READ HomePage WRITE setHomePage )
44  Q_PROPERTY( QDateTime ReleaseDate READ ReleaseDate WRITE setReleaseDate )
45  Q_PROPERTY( QDateTime AddDate READ AddDate WRITE setAddDate )
46  Q_PROPERTY( float UserRating READ UserRating WRITE setUserRating )
47  Q_PROPERTY( int ChildID READ ChildID WRITE setChildID )
48  Q_PROPERTY( int Length READ Length WRITE setLength )
49  Q_PROPERTY( int PlayCount READ PlayCount WRITE setPlayCount )
50  Q_PROPERTY( int Season READ Season WRITE setSeason )
51  Q_PROPERTY( int Episode READ Episode WRITE setEpisode )
52  Q_PROPERTY( int ParentalLevel READ ParentalLevel WRITE setParentalLevel )
53  Q_PROPERTY( bool Visible READ Visible WRITE setVisible )
54  Q_PROPERTY( bool Watched READ Watched WRITE setWatched )
55  Q_PROPERTY( bool Processed READ Processed WRITE setProcessed )
56  Q_PROPERTY( QString ContentType READ ContentType WRITE setContentType )
57  Q_PROPERTY( QString FileName READ FileName WRITE setFileName )
58  Q_PROPERTY( QString Hash READ Hash WRITE setHash )
59  Q_PROPERTY( QString HostName READ HostName WRITE setHostName )
60  Q_PROPERTY( QString Coverart READ Coverart WRITE setCoverart )
61  Q_PROPERTY( QString Fanart READ Fanart WRITE setFanart )
62  Q_PROPERTY( QString Banner READ Banner WRITE setBanner )
63  Q_PROPERTY( QString Screenshot READ Screenshot WRITE setScreenshot )
64  Q_PROPERTY( QString Trailer READ Trailer WRITE setTrailer )
65 
66  Q_PROPERTY( QObject* Artwork READ Artwork DESIGNABLE SerializeArtwork )
67  Q_PROPERTY( QObject* Cast READ Cast DESIGNABLE SerializeCast )
68 
69  PROPERTYIMP ( int , Id )
70  PROPERTYIMP ( QString , Title )
71  PROPERTYIMP ( QString , SubTitle )
72  PROPERTYIMP ( QString , Tagline )
73  PROPERTYIMP ( QString , Director )
74  PROPERTYIMP ( QString , Studio )
75  PROPERTYIMP ( QString , Description )
76  PROPERTYIMP ( QString , Certification )
77  PROPERTYIMP ( QString , Inetref )
78  PROPERTYIMP ( int , Collectionref )
79  PROPERTYIMP ( QString , HomePage )
80  PROPERTYIMP ( QDateTime , ReleaseDate )
81  PROPERTYIMP ( QDateTime , AddDate )
82  PROPERTYIMP ( float , UserRating )
83  PROPERTYIMP ( int , ChildID )
84  PROPERTYIMP ( int , Length )
85  PROPERTYIMP ( int , PlayCount )
86  PROPERTYIMP ( int , Season )
87  PROPERTYIMP ( int , Episode )
88  PROPERTYIMP ( int , ParentalLevel )
89  PROPERTYIMP ( bool , Visible )
90  PROPERTYIMP ( bool , Watched )
91  PROPERTYIMP ( bool , Processed )
92  PROPERTYIMP ( QString , ContentType )
93  PROPERTYIMP ( QString , FileName )
94  PROPERTYIMP ( QString , Hash )
95  PROPERTYIMP ( QString , HostName )
96  PROPERTYIMP ( QString , Coverart )
97  PROPERTYIMP ( QString , Fanart )
98  PROPERTYIMP ( QString , Banner )
99  PROPERTYIMP ( QString , Screenshot )
100  PROPERTYIMP ( QString , Trailer )
101 
102  PROPERTYIMP_PTR( ArtworkInfoList, Artwork )
103  PROPERTYIMP_PTR( CastMemberList , Cast )
104 
105  PROPERTYIMP ( bool , SerializeArtwork)
106  PROPERTYIMP ( bool , SerializeCast )
107 
108  public:
109 
110  static inline void InitializeCustomTypes();
111 
112  public:
113 
114  VideoMetadataInfo(QObject *parent = 0)
115  : QObject ( parent ),
116  m_Id ( 0 ),
117  m_Collectionref ( 0 ),
118  m_UserRating ( 0 ),
119  m_ChildID ( 0 ),
120  m_Length ( 0 ),
121  m_PlayCount ( 0 ),
122  m_Season ( 0 ),
123  m_Episode ( 0 ),
124  m_ParentalLevel ( 0 ),
125  m_Visible ( false ),
126  m_Watched ( false ),
127  m_Processed ( false ),
128  m_Artwork ( NULL ),
129  m_Cast ( NULL ),
130  m_SerializeArtwork( true ),
131  m_SerializeCast ( true )
132  {
133  }
134 
136  {
137  Copy( src );
138  }
139 
140  void Copy( const VideoMetadataInfo &src )
141  {
142  m_Id = src.m_Id;
143  m_SerializeArtwork = src.m_SerializeArtwork;
144  m_SerializeCast = src.m_SerializeCast;
145 
146  if ( src.m_Artwork != NULL)
147  Artwork()->Copy( src.m_Artwork );
148 
149  if (src.m_Cast != NULL)
150  Cast()->Copy( src.m_Cast );
151  }
152 };
153 
154 } // namespace DTC
155 
158 
159 namespace DTC
160 {
162 {
163  qRegisterMetaType< VideoMetadataInfo >();
164  qRegisterMetaType< VideoMetadataInfo* >();
165 
166  if (QMetaType::type( "DTC::ArtworkInfoList" ) == 0)
167  ArtworkInfoList::InitializeCustomTypes();
168 
169  if (QMetaType::type( "DTC::CastMemberList" ) == 0)
170  CastMemberList::InitializeCustomTypes();
171 }
172 }
173 
174 #endif
static void InitializeCustomTypes()
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
Q_DECLARE_METATYPE(GrabberScript *)
__u32 type
Definition: videodev2.h:1038
VideoMetadataInfo(const VideoMetadataInfo &src)
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
ContentType
Definition: httprequest.h:61
void Copy(const VideoMetadataInfo &src)