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 // Qt
30 #include <QFileInfo>
31 
32 // MythTV
35 
36 // MythBackend
37 #include "v2channelGroupList.h"
38 #include "v2programAndChannel.h"
39 #include "v2programGuide.h"
40 #include "v2programList.h"
41 #include "v2serviceUtil.h"
42 
43 #define GUIDE_SERVICE QString("/Guide/")
44 #define GUIDE_HANDLE QString("Guide")
45 
46 class V2Guide : public MythHTTPService
47 {
48  Q_OBJECT
49  Q_CLASSINFO("Version", "2.4")
50  Q_CLASSINFO("AddToChannelGroup", "methods=POST;name=bool")
51  Q_CLASSINFO("RemoveFromChannelGroup", "methods=POST;name=bool")
52 
53  public:
54  V2Guide();
55  ~V2Guide() override = default;
56  static void RegisterCustomTypes();
57 
58  public slots:
59 
60  static V2ProgramGuide* GetProgramGuide ( const QDateTime &StartTime ,
61  const QDateTime &EndTime ,
62  bool Details,
63  int ChannelGroupId,
64  int StartIndex,
65  int Count,
66  bool WithInvisible);
67 
68  static V2ProgramList* GetProgramList ( int StartIndex,
69  int Count,
70  const QDateTime &StartTime ,
71  const QDateTime &EndTime ,
72  int ChanId,
73  const QString &TitleFilter,
74  const QString &CategoryFilter,
75  const QString &PersonFilter,
76  const QString &KeywordFilter,
77  bool OnlyNew,
78  bool Details,
79  const QString &Sort,
80  bool Descending,
81  bool WithInvisible);
82 
83  static V2Program* GetProgramDetails ( int ChanId,
84  const QDateTime &StartTime );
85 
86  static QFileInfo GetChannelIcon ( int ChanId,
87  int Width ,
88  int Height );
89 
90  static V2ChannelGroupList* GetChannelGroupList ( bool IncludeEmpty );
91 
92  static QStringList GetCategoryList ( );
93 
94  static QStringList GetStoredSearches( const QString &Type );
95 
96  static bool AddToChannelGroup ( int ChannelGroupId,
97  int ChanId );
98 
99  static bool RemoveFromChannelGroup ( int ChannelGroupId,
100  int ChanId );
101  private:
102  Q_DISABLE_COPY(V2Guide)
103 
104 };
105 
106 
107 #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:46
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