MythTV  master
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 COPYING for details
10 //
12 
13 #ifndef GUIDESERVICES_H_
14 #define GUIDESERVICES_H_
15 
16 #include <QFileInfo>
17 
18 #include "service.h"
23 
26 //
27 // Notes -
28 //
29 // * This implementation can't handle declared default parameters
30 //
31 // * When called, any missing params are sent default values for its datatype
32 //
33 // * Q_CLASSINFO( "<methodName>_Method", ...) is used to determine HTTP method
34 // type. Defaults to "BOTH", available values:
35 // "GET", "POST" or "BOTH"
36 //
39 
40 class SERVICE_PUBLIC GuideServices : public Service //, public QScriptable ???
41 {
42  Q_OBJECT
43  Q_CLASSINFO( "version" , "2.4" )
44  Q_CLASSINFO( "AddToChannelGroup_Method", "POST" )
45  Q_CLASSINFO( "RemoveFromChannelGroup_Method", "POST" )
46 
47  public:
48 
49  // Must call InitializeCustomTypes for each unique Custom Type used
50  // in public slots below.
51 
52  GuideServices( QObject *parent = nullptr ) : Service( parent )
53  {
59  }
60 
61  public slots:
62 
63  virtual DTC::ProgramGuide* GetProgramGuide ( const QDateTime &StartTime ,
64  const QDateTime &EndTime ,
65  bool Details,
66  int ChannelGroupId,
67  int StartIndex,
68  int Count,
69  bool WithInvisible) = 0;
70 
71  virtual DTC::ProgramList* GetProgramList ( int StartIndex,
72  int Count,
73  const QDateTime &StartTime ,
74  const QDateTime &EndTime ,
75  int ChanId,
76  const QString &TitleFilter,
77  const QString &CategoryFilter,
78  const QString &PersonFilter,
79  const QString &KeywordFilter,
80  bool OnlyNew,
81  bool Details,
82  const QString &Sort,
83  bool Descending,
84  bool WithInvisible) = 0;
85 
86  virtual DTC::Program* GetProgramDetails ( int ChanId,
87  const QDateTime &StartTime ) = 0;
88 
89  virtual QFileInfo GetChannelIcon ( int ChanId,
90  int Width ,
91  int Height ) = 0;
92 
93  virtual DTC::ChannelGroupList* GetChannelGroupList ( bool IncludeEmpty ) = 0;
94 
95  virtual QStringList GetCategoryList ( ) = 0;
96 
97  virtual QStringList GetStoredSearches ( const QString &Type ) = 0;
98 
99  virtual bool AddToChannelGroup ( int ChannelGroupId,
100  int ChanId ) = 0;
101 
102  virtual bool RemoveFromChannelGroup ( int ChannelGroupId,
103  int ChanId ) = 0;
104 };
105 
106 #endif
static void InitializeCustomTypes()
Definition: programList.h:94
unsigned int slots[4]
Definition: element.c:38
CategoryFilter
Definition: videofilter.h:35
static void InitializeCustomTypes()
static void InitializeCustomTypes()
Definition: programGuide.h:115
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
static void InitializeCustomTypes()
Definition: channelGroup.h:60
static void InitializeCustomTypes()
GuideServices(QObject *parent=nullptr)
Definition: guideServices.h:52
int GetCategoryList(QStringList &list)