00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00021
00022 #ifndef VIDEO_H
00023 #define VIDEO_H
00024
00025 #include <QScriptEngine>
00026 #include <QDateTime>
00027
00028 #include "videometadatalistmanager.h"
00029
00030 #include "services/videoServices.h"
00031
00032 class Video : public VideoServices
00033 {
00034 Q_OBJECT
00035
00036 public:
00037
00038 Q_INVOKABLE Video( QObject *parent = 0 ) {}
00039
00040 public:
00041
00042
00043
00044 DTC::VideoMetadataInfoList* GetVideoList ( bool Descending,
00045 int StartIndex,
00046 int Count );
00047
00048 DTC::VideoMetadataInfo* GetVideo ( int Id );
00049
00050 DTC::VideoMetadataInfo* GetVideoByFileName ( const QString &FileName );
00051
00052 DTC::VideoLookupList* LookupVideo ( const QString &Title,
00053 const QString &Subtitle,
00054 const QString &Inetref,
00055 int Season,
00056 int Episode,
00057 const QString &GrabberType,
00058 bool AllowGeneric );
00059
00060 bool RemoveVideoFromDB ( int Id );
00061
00062 bool AddVideo ( const QString &FileName,
00063 const QString &HostName );
00064
00065
00066
00067 DTC::BlurayInfo* GetBluray ( const QString &Path );
00068
00069 };
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 class ScriptableVideo : public QObject
00087 {
00088 Q_OBJECT
00089
00090 private:
00091
00092 Video m_obj;
00093
00094 public:
00095
00096 Q_INVOKABLE ScriptableVideo( QObject *parent = 0 ) : QObject( parent ) {}
00097
00098 public slots:
00099
00100 QObject* GetVideoList( bool Descending,
00101 int StartIndex,
00102 int Count )
00103 {
00104 return m_obj.GetVideoList( Descending, StartIndex, Count );
00105 }
00106
00107 QObject* GetVideo( int Id )
00108 {
00109 return m_obj.GetVideo( Id );
00110 }
00111
00112 QObject* GetVideoByFileName( const QString &FileName )
00113 {
00114 return m_obj.GetVideoByFileName( FileName );
00115 }
00116
00117 QObject* LookupVideo( const QString &Title,
00118 const QString &Subtitle,
00119 const QString &Inetref,
00120 int Season,
00121 int Episode,
00122 const QString &GrabberType,
00123 bool AllowGeneric )
00124 {
00125 return m_obj.LookupVideo( Title, Subtitle, Inetref,
00126 Season, Episode, GrabberType,
00127 AllowGeneric );
00128 }
00129
00130 bool RemoveVideoFromDB( int Id )
00131 {
00132 return m_obj.RemoveVideoFromDB( Id );
00133 }
00134
00135 bool AddVideo( const QString &FileName,
00136 const QString &HostName )
00137 {
00138 return m_obj.AddVideo( FileName, HostName );
00139 }
00140 };
00141
00142
00143 Q_SCRIPT_DECLARE_QMETAOBJECT( ScriptableVideo, QObject*);
00144
00145 #endif