MythTV
master
libs
libmythservicecontracts
services
guideServices.h
Go to the documentation of this file.
1
// Program Name: guideservices.h
3
// Created : Mar. 7, 2011
4
//
5
// Purpose - Program Guide Services API Interface definition
6
//
7
// Copyright (c) 2010 David Blain <dblain@mythtv.org>
8
//
9
// Licensed under the GPL v2 or later, see LICENSE for details
10
//
12
13
#ifndef GUIDESERVICES_H_
14
#define GUIDESERVICES_H_
15
16
#include <QFileInfo>
17
18
#include "
libmythservicecontracts/service.h
"
19
20
#include "
libmythservicecontracts/datacontracts/channelGroupList.h
"
21
#include "
libmythservicecontracts/datacontracts/programAndChannel.h
"
22
#include "
libmythservicecontracts/datacontracts/programGuide.h
"
23
#include "
libmythservicecontracts/datacontracts/programList.h
"
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
GuideServices
:
public
Service
//, public QScriptable ???
42
{
43
Q_OBJECT
44
Q_CLASSINFO(
"version"
,
"2.4"
)
45
Q_CLASSINFO(
"AddToChannelGroup_Method"
,
"POST"
)
46
Q_CLASSINFO(
"RemoveFromChannelGroup_Method"
,
"POST"
)
47
48
public
:
49
50
// Must call InitializeCustomTypes for each unique Custom Type used
51
// in public slots below.
52
53
GuideServices
( QObject *parent =
nullptr
) :
Service
( parent )
54
{
55
DTC::ProgramGuide::InitializeCustomTypes
();
56
DTC::ProgramList ::InitializeCustomTypes
();
57
DTC::Program ::InitializeCustomTypes
();
58
DTC::ChannelGroup::InitializeCustomTypes
();
59
DTC::ChannelGroupList::InitializeCustomTypes
();
60
}
61
62
public
slots:
63
64
virtual
DTC::ProgramGuide
* GetProgramGuide (
const
QDateTime &StartTime ,
65
const
QDateTime &EndTime ,
66
bool
Details,
67
int
ChannelGroupId,
68
int
StartIndex,
69
int
Count,
70
bool
WithInvisible) = 0;
71
72
virtual
DTC::ProgramList
* GetProgramList (
int
StartIndex,
73
int
Count,
74
const
QDateTime &StartTime ,
75
const
QDateTime &EndTime ,
76
int
ChanId,
77
const
QString &TitleFilter,
78
const
QString &
CategoryFilter
,
79
const
QString &PersonFilter,
80
const
QString &KeywordFilter,
81
bool
OnlyNew,
82
bool
Details,
83
const
QString &Sort,
84
bool
Descending,
85
bool
WithInvisible) = 0;
86
87
virtual
DTC::Program
* GetProgramDetails (
int
ChanId,
88
const
QDateTime &StartTime ) = 0;
89
90
virtual
QFileInfo GetChannelIcon (
int
ChanId,
91
int
Width ,
92
int
Height ) = 0;
93
94
virtual
DTC::ChannelGroupList
* GetChannelGroupList (
bool
IncludeEmpty ) = 0;
95
96
virtual
QStringList
GetCategoryList
( ) = 0;
97
98
virtual
QStringList GetStoredSearches (
const
QString &Type ) = 0;
99
100
virtual
bool
AddToChannelGroup (
int
ChannelGroupId,
101
int
ChanId ) = 0;
102
103
virtual
bool
RemoveFromChannelGroup (
int
ChannelGroupId,
104
int
ChanId ) = 0;
105
};
106
107
#endif
DTC::Program
Definition:
programAndChannel.h:145
service.h
DTC::ChannelGroup::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
channelGroup.h:60
DTC::ChannelGroupList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
channelGroupList.h:59
DTC::ProgramGuide::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
programGuide.h:115
channelGroupList.h
DTC::ChannelGroupList
Definition:
channelGroupList.h:16
GuideServices
Definition:
guideServices.h:41
DTC::ProgramList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
programList.h:94
CategoryFilter
CategoryFilter
Definition:
videofilter.h:36
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition:
serviceexp.h:9
programList.h
GuideServices::GuideServices
GuideServices(QObject *parent=nullptr)
Definition:
guideServices.h:53
programGuide.h
Service
Definition:
service.h:42
programAndChannel.h
GetCategoryList
int GetCategoryList(QStringList &list)
Definition:
browserdbutil.cpp:182
DTC::ProgramList
Definition:
programList.h:26
DTC::Program::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
programAndChannel.h:335
DTC::ProgramGuide
Definition:
programGuide.h:35
Generated on Sat Dec 2 2023 03:22:17 for MythTV by
1.8.17