MythTV  master
v2guide.h
Go to the documentation of this file.
1 // Program Name: guide.h
3 // Created : Mar. 7, 2011
4 //
5 // Copyright (c) 2011 David Blain <dblain@mythtv.org>
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //
25 
26 #ifndef V2GUIDE_H
27 #define V2GUIDE_H
28 
29 // MythTV
32 
33 // MythBackend
34 #include "v2channelGroupList.h"
35 #include "v2programAndChannel.h"
36 #include "v2programGuide.h"
37 #include "v2programList.h"
38 #include "v2serviceUtil.h"
39 
40 #define GUIDE_SERVICE QString("/Guide/")
41 #define GUIDE_HANDLE QString("Guide")
42 
43 class V2Guide : public MythHTTPService
44 {
45  Q_OBJECT
46  Q_CLASSINFO("Version", "2.4")
47  Q_CLASSINFO("AddToChannelGroup", "methods=POST;name=bool")
48  Q_CLASSINFO("RemoveFromChannelGroup", "methods=POST;name=bool")
49 
50  public:
51  V2Guide();
52  ~V2Guide() override = default;
53  static void RegisterCustomTypes();
54 
55  public slots:
56 
57  static V2ProgramGuide* GetProgramGuide ( const QDateTime &StartTime ,
58  const QDateTime &EndTime ,
59  bool Details,
60  int ChannelGroupId,
61  int StartIndex,
62  int Count,
63  bool WithInvisible);
64 
65  static V2ProgramList* GetProgramList ( int StartIndex,
66  int Count,
67  const QDateTime &StartTime ,
68  const QDateTime &EndTime ,
69  int ChanId,
70  const QString &TitleFilter,
71  const QString &CategoryFilter,
72  const QString &PersonFilter,
73  const QString &KeywordFilter,
74  bool OnlyNew,
75  bool Details,
76  const QString &Sort,
77  bool Descending,
78  bool WithInvisible);
79 
80  static V2Program* GetProgramDetails ( int ChanId,
81  const QDateTime &StartTime );
82 
83  static QFileInfo GetChannelIcon ( int ChanId,
84  int Width ,
85  int Height );
86 
87  static V2ChannelGroupList* GetChannelGroupList ( bool IncludeEmpty );
88 
89  static QStringList GetCategoryList ( );
90 
91  static QStringList GetStoredSearches( const QString &Type );
92 
93  static bool AddToChannelGroup ( int ChannelGroupId,
94  int ChanId );
95 
96  static bool RemoveFromChannelGroup ( int ChannelGroupId,
97  int ChanId );
98  private:
99  Q_DISABLE_COPY(V2Guide)
100 
101 };
102 
103 
104 #endif
V2Guide::~V2Guide
~V2Guide() override=default
V2ProgramGuide
Definition: v2programGuide.h:31
v2programList.h
v2programAndChannel.h
v2programGuide.h
V2ProgramList
Definition: v2programList.h:22
V2Guide::V2Guide
V2Guide()
Definition: v2guide.cpp:80
CategoryFilter
CategoryFilter
Definition: videofilter.h:36
programinfo.h
v2serviceUtil.h
V2Guide::RemoveFromChannelGroup
static bool RemoveFromChannelGroup(int ChannelGroupId, int ChanId)
Definition: v2guide.cpp:631
V2Guide::GetProgramGuide
static V2ProgramGuide * GetProgramGuide(const QDateTime &StartTime, const QDateTime &EndTime, bool Details, int ChannelGroupId, int StartIndex, int Count, bool WithInvisible)
Definition: v2guide.cpp:84
v2channelGroupList.h
V2Guide
Definition: v2guide.h:43
V2ChannelGroupList
Definition: v2channelGroupList.h:13
MythHTTPService
Definition: mythhttpservice.h:19
V2Guide::RegisterCustomTypes
static void RegisterCustomTypes()
mythhttpservice.h
V2Guide::GetProgramList
static V2ProgramList * GetProgramList(int StartIndex, int Count, const QDateTime &StartTime, const QDateTime &EndTime, int ChanId, const QString &TitleFilter, const QString &CategoryFilter, const QString &PersonFilter, const QString &KeywordFilter, bool OnlyNew, bool Details, const QString &Sort, bool Descending, bool WithInvisible)
Definition: v2guide.cpp:206
V2Guide::GetChannelIcon
static QFileInfo GetChannelIcon(int ChanId, int Width, int Height)
Definition: v2guide.cpp:414
V2Guide::AddToChannelGroup
static bool AddToChannelGroup(int ChannelGroupId, int ChanId)
Definition: v2guide.cpp:614
V2Guide::GetChannelGroupList
static V2ChannelGroupList * GetChannelGroupList(bool IncludeEmpty)
Definition: v2guide.cpp:539
V2Program
Definition: v2programAndChannel.h:105
V2Guide::GetCategoryList
static QStringList GetCategoryList()
Definition: v2guide.cpp:558
V2Guide::GetProgramDetails
static V2Program * GetProgramDetails(int ChanId, const QDateTime &StartTime)
Definition: v2guide.cpp:383
V2Guide::GetStoredSearches
static QStringList GetStoredSearches(const QString &Type)
Definition: v2guide.cpp:581