MythTV  master
videoServices.h
Go to the documentation of this file.
1 // Program Name: contentServices.h
3 // Created : Apr. 21, 2011
4 //
5 // Purpose - Imported Video Services API Interface definition
6 //
7 // Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
8 //
9 // Licensed under the GPL v2 or later, see COPYING for details
10 //
12 
13 #ifndef VIDEOSERVICES_H_
14 #define VIDEOSERVICES_H_
15 
16 #include <QFileInfo>
17 #include <QStringList>
18 
19 #include "service.h"
20 
25 
28 //
29 // Notes -
30 //
31 // * This implementation can't handle declared default parameters
32 //
33 // * When called, any missing params are sent default values for its datatype
34 //
35 // * Q_CLASSINFO( "<methodName>_Method", ...) is used to determine HTTP method
36 // type. Defaults to "BOTH", available values:
37 // "GET", "POST" or "BOTH"
38 //
41 
42 class SERVICE_PUBLIC VideoServices : public Service //, public QScriptable ???
43 {
44  Q_OBJECT
45  Q_CLASSINFO( "version" , "1.5" );
46  Q_CLASSINFO( "AddVideo_Method", "POST" )
47  Q_CLASSINFO( "RemoveVideoFromDB_Method", "POST" )
48  Q_CLASSINFO( "UpdateVideoWatchedStatus_Method", "POST" )
49  Q_CLASSINFO( "UpdateVideoMetadata_Method", "POST" )
50  Q_CLASSINFO( "SetSavedBookmark_Method", "POST" )
51 
52  public:
53 
54  // Must call InitializeCustomTypes for each unique Custom Type used
55  // in public slots below.
56 
57  VideoServices( QObject *parent = nullptr ) : Service( parent )
58  {
63  }
64 
65  public slots:
66 
67  // Video Metadata
68 
69  virtual DTC::VideoMetadataInfoList* GetVideoList ( const QString &Folder,
70  const QString &Sort,
71  bool Descending,
72  int StartIndex,
73  int Count ) = 0;
74 
75  virtual DTC::VideoMetadataInfo* GetVideo ( int Id ) = 0;
76 
77  virtual DTC::VideoMetadataInfo* GetVideoByFileName ( const QString &FileName ) = 0;
78 
79  virtual DTC::VideoLookupList* LookupVideo ( const QString &Title,
80  const QString &Subtitle,
81  const QString &Inetref,
82  int Season,
83  int Episode,
84  const QString &GrabberType,
85  bool AllowGeneric) = 0;
86 
87  virtual bool AddVideo ( const QString &FileName,
88  const QString &HostName ) = 0;
89 
90  virtual bool RemoveVideoFromDB ( int Id ) = 0;
91  // Bluray Metadata
92 
93  virtual DTC::BlurayInfo* GetBluray ( const QString &Path ) = 0;
94 
95  virtual bool UpdateVideoWatchedStatus ( int Id,
96  bool Watched ) = 0;
97 
98  virtual bool UpdateVideoMetadata ( int Id,
99  const QString &Title,
100  const QString &SubTitle,
101  const QString &TagLine,
102  const QString &Director,
103  const QString &Studio,
104  const QString &Plot,
105  const QString &Rating,
106  const QString &Inetref,
107  int CollectionRef,
108  const QString &HomePage,
109  int Year,
110  const QDate &ReleaseDate,
111  float UserRating,
112  int Length,
113  int PlayCount,
114  int Season,
115  int Episode,
116  int ShowLevel,
117  const QString &FileName,
118  const QString &Hash,
119  const QString &CoverFile,
120  int ChildID,
121  bool Browse,
122  bool Watched,
123  bool Processed,
124  const QString &PlayCommand,
125  int Category,
126  const QString &Trailer,
127  const QString &Host,
128  const QString &Screenshot,
129  const QString &Banner,
130  const QString &Fanart,
131  const QDate &InsertDate,
132  const QString &ContentType,
133  const QString &Genres,
134  const QString &Cast,
135  const QString &Countries) = 0;
136 
138  const QString &FileName ) = 0;
139 
140  virtual long GetSavedBookmark ( int Id) = 0;
141 
142  virtual bool SetSavedBookmark ( int Id,
143  long Offset ) = 0;
144 
145 };
146 
147 #endif
GrabberType
GrabberType
Definition: metadatagrabber.h:20
VideoServices
Definition: videoServices.h:43
DTC::VideoStreamInfoList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: videoStreamInfoList.h:90
service.h
VideoServices::GetVideoByFileName
virtual DTC::VideoMetadataInfo * GetVideoByFileName(const QString &FileName)=0
DTC::VideoLookupList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: videoLookupInfoList.h:84
DTC::VideoLookupList
Definition: videoLookupInfoList.h:25
slots
unsigned int slots[4]
Definition: element.cpp:38
DTC::VideoStreamInfoList
Definition: videoStreamInfoList.h:25
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
VideoServices::GetVideoList
virtual DTC::VideoMetadataInfoList * GetVideoList(const QString &Folder, const QString &Sort, bool Descending, int StartIndex, int Count)=0
VideoServices::RemoveVideoFromDB
virtual bool RemoveVideoFromDB(int Id)=0
videoStreamInfoList.h
DTC::BlurayInfo::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: blurayInfo.h:128
VideoServices::SetSavedBookmark
virtual bool SetSavedBookmark(int Id, long Offset)=0
DTC::BlurayInfo
Definition: blurayInfo.h:25
VideoServices::GetSavedBookmark
virtual long GetSavedBookmark(int Id)=0
Service
Definition: service.h:43
VideoServices::LookupVideo
virtual DTC::VideoLookupList * LookupVideo(const QString &Title, const QString &Subtitle, const QString &Inetref, int Season, int Episode, const QString &GrabberType, bool AllowGeneric)=0
DTC::VideoMetadataInfoList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: videoMetadataInfoList.h:98
VideoServices::GetVideo
virtual DTC::VideoMetadataInfo * GetVideo(int Id)=0
DTC::VideoMetadataInfo
Definition: videoMetadataInfo.h:30
videoLookupInfoList.h
StorageGroup
Definition: storagegroup.h:12
VideoServices::GetStreamInfo
virtual DTC::VideoStreamInfoList * GetStreamInfo(const QString &StorageGroup, const QString &FileName)=0
VideoServices::UpdateVideoWatchedStatus
virtual bool UpdateVideoWatchedStatus(int Id, bool Watched)=0
VideoServices::UpdateVideoMetadata
virtual bool UpdateVideoMetadata(int Id, const QString &Title, const QString &SubTitle, const QString &TagLine, const QString &Director, const QString &Studio, const QString &Plot, const QString &Rating, const QString &Inetref, int CollectionRef, const QString &HomePage, int Year, const QDate &ReleaseDate, float UserRating, int Length, int PlayCount, int Season, int Episode, int ShowLevel, const QString &FileName, const QString &Hash, const QString &CoverFile, int ChildID, bool Browse, bool Watched, bool Processed, const QString &PlayCommand, int Category, const QString &Trailer, const QString &Host, const QString &Screenshot, const QString &Banner, const QString &Fanart, const QDate &InsertDate, const QString &ContentType, const QString &Genres, const QString &Cast, const QString &Countries)=0
blurayInfo.h
DTC::VideoMetadataInfoList
Definition: videoMetadataInfoList.h:25
videoMetadataInfoList.h
VideoServices::GetBluray
virtual DTC::BlurayInfo * GetBluray(const QString &Path)=0
VideoServices::Q_CLASSINFO
Q_CLASSINFO("version", "1.5")
VideoServices::AddVideo
virtual bool AddVideo(const QString &FileName, const QString &HostName)=0