MythTV
master
mythtv
libs
libmythservicecontracts
services
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 LICENSE for details
10
//
12
13
#ifndef VIDEOSERVICES_H_
14
#define VIDEOSERVICES_H_
15
16
#include <QFileInfo>
17
#include <QStringList>
18
19
#include "
libmythservicecontracts/service.h
"
20
21
#include "
libmythservicecontracts/datacontracts/blurayInfo.h
"
22
#include "
libmythservicecontracts/datacontracts/videoLookupInfoList.h
"
23
#include "
libmythservicecontracts/datacontracts/videoMetadataInfoList.h
"
24
#include "
libmythservicecontracts/datacontracts/videoStreamInfoList.h
"
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
{
59
DTC::VideoMetadataInfoList::InitializeCustomTypes
();
60
DTC::VideoLookupList::InitializeCustomTypes
();
61
DTC::BlurayInfo::InitializeCustomTypes
();
62
DTC::VideoStreamInfoList::InitializeCustomTypes
();
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
137
virtual
DTC::VideoStreamInfoList
* GetStreamInfo (
const
QString &
StorageGroup
,
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
VideoServices
Definition:
videoServices.h:42
DTC::VideoStreamInfoList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
videoStreamInfoList.h:90
service.h
DTC::VideoLookupList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
videoLookupInfoList.h:84
VideoServices::VideoServices
VideoServices(QObject *parent=nullptr)
Definition:
videoServices.h:57
DTC::VideoLookupList
Definition:
videoLookupInfoList.h:24
DTC::VideoStreamInfoList
Definition:
videoStreamInfoList.h:24
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition:
serviceexp.h:9
GrabberType
GrabberType
Definition:
metadatagrabber.h:20
videoStreamInfoList.h
DTC::BlurayInfo::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
blurayInfo.h:128
DTC::BlurayInfo
Definition:
blurayInfo.h:24
Service
Definition:
service.h:42
DTC::VideoMetadataInfoList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
videoMetadataInfoList.h:98
DTC::VideoMetadataInfo
Definition:
videoMetadataInfo.h:29
videoLookupInfoList.h
StorageGroup
Definition:
storagegroup.h:11
blurayInfo.h
DTC::VideoMetadataInfoList
Definition:
videoMetadataInfoList.h:24
videoMetadataInfoList.h
Generated on Mon Nov 25 2024 03:16:05 for MythTV by
1.8.17