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 
24 
27 //
28 // Notes -
29 //
30 // * This implementation can't handle declared default parameters
31 //
32 // * When called, any missing params are sent default values for its datatype
33 //
34 // * Q_CLASSINFO( "<methodName>_Method", ...) is used to determine HTTP method
35 // type. Defaults to "BOTH", available values:
36 // "GET", "POST" or "BOTH"
37 //
40 
41 class SERVICE_PUBLIC VideoServices : public Service //, public QScriptable ???
42 {
43  Q_OBJECT
44  Q_CLASSINFO( "version" , "1.5" );
45  Q_CLASSINFO( "AddVideo_Method", "POST" )
46  Q_CLASSINFO( "RemoveVideoFromDB_Method", "POST" )
47  Q_CLASSINFO( "UpdateVideoWatchedStatus_Method", "POST" )
48  Q_CLASSINFO( "UpdateVideoMetadata_Method", "POST" )
49 
50  public:
51 
52  // Must call InitializeCustomTypes for each unique Custom Type used
53  // in public slots below.
54 
55  VideoServices( QObject *parent = nullptr ) : Service( parent )
56  {
60  }
61 
62  public slots:
63 
64  // Video Metadata
65 
66  virtual DTC::VideoMetadataInfoList* GetVideoList ( const QString &Folder,
67  const QString &Sort,
68  bool Descending,
69  int StartIndex,
70  int Count ) = 0;
71 
72  virtual DTC::VideoMetadataInfo* GetVideo ( int Id ) = 0;
73 
74  virtual DTC::VideoMetadataInfo* GetVideoByFileName ( const QString &FileName ) = 0;
75 
76  virtual DTC::VideoLookupList* LookupVideo ( const QString &Title,
77  const QString &Subtitle,
78  const QString &Inetref,
79  int Season,
80  int Episode,
81  const QString &GrabberType,
82  bool AllowGeneric) = 0;
83 
84  virtual bool AddVideo ( const QString &FileName,
85  const QString &HostName ) = 0;
86 
87  virtual bool RemoveVideoFromDB ( int Id ) = 0;
88  // Bluray Metadata
89 
90  virtual DTC::BlurayInfo* GetBluray ( const QString &Path ) = 0;
91 
92  virtual bool UpdateVideoWatchedStatus ( int Id,
93  bool Watched ) = 0;
94 
95  virtual bool UpdateVideoMetadata ( int Id,
96  const QString &Title,
97  const QString &SubTitle,
98  const QString &TagLine,
99  const QString &Director,
100  const QString &Studio,
101  const QString &Plot,
102  const QString &Rating,
103  const QString &Inetref,
104  int CollectionRef,
105  const QString &HomePage,
106  int Year,
107  const QDate &ReleaseDate,
108  float UserRating,
109  int Length,
110  int PlayCount,
111  int Season,
112  int Episode,
113  int ShowLevel,
114  const QString &FileName,
115  const QString &Hash,
116  const QString &CoverFile,
117  int ChildID,
118  bool Browse,
119  bool Watched,
120  bool Processed,
121  const QString &PlayCommand,
122  int Category,
123  const QString &Trailer,
124  const QString &Host,
125  const QString &Screenshot,
126  const QString &Banner,
127  const QString &Fanart,
128  const QDate &InsertDate,
129  const QString &ContentType,
130  const QString &Genres,
131  const QString &Cast,
132  const QString &Countries) = 0;
133 };
134 
135 #endif
unsigned int slots[4]
Definition: element.c:38
GrabberType
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
static void InitializeCustomTypes()
Definition: blurayInfo.h:128
VideoServices(QObject *parent=nullptr)
Definition: videoServices.h:55
static void InitializeCustomTypes()