MythTV master
v2guide.h
Go to the documentation of this file.
1
2// 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
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 Q_CLASSINFO("AddChannelGroup", "methods=POST;name=int")
53 Q_CLASSINFO("RemoveChannelGroup", "methods=POST;name=bool")
54 Q_CLASSINFO("UpdateChannelGroup", "methods=POST;name=bool")
55
56 public:
57 V2Guide();
58 ~V2Guide() override = default;
59 static void RegisterCustomTypes();
60
61 public slots:
62
63 static V2ProgramGuide* GetProgramGuide ( const QDateTime &StartTime ,
64 const QDateTime &EndTime ,
65 bool Details,
66 int ChannelGroupId,
67 int StartIndex,
68 int Count,
69 bool WithInvisible);
70
71 static V2ProgramList* 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,
85 const QString &CatType,
86 const QString &GroupBy);
87
88 static V2Program* GetProgramDetails ( int ChanId,
89 const QDateTime &StartTime );
90
91 static QFileInfo GetChannelIcon ( int ChanId,
92 int Width ,
93 int Height,
94 const QString &FileName );
95
96 static V2ChannelGroupList* GetChannelGroupList ( bool IncludeEmpty );
97
98 static QStringList GetCategoryList ( );
99
100 static QStringList GetStoredSearches( const QString &Type );
101
102 static bool AddToChannelGroup ( int ChannelGroupId,
103 int ChanId );
104
105 static bool RemoveFromChannelGroup ( int ChannelGroupId,
106 int ChanId );
107
108 static int AddChannelGroup ( const QString &Name);
109
110 static bool RemoveChannelGroup ( const QString &Name);
111
112 static bool UpdateChannelGroup ( const QString &OldName,
113 const QString &NewName);
114
115 private:
116 Q_DISABLE_COPY(V2Guide)
117
118};
119
120
121#endif
static V2ChannelGroupList * GetChannelGroupList(bool IncludeEmpty)
Definition: v2guide.cpp:584
static QFileInfo GetChannelIcon(int ChanId, int Width, int Height, const QString &FileName)
Definition: v2guide.cpp:453
static bool UpdateChannelGroup(const QString &OldName, const QString &NewName)
Definition: v2guide.cpp:699
static V2ProgramGuide * GetProgramGuide(const QDateTime &StartTime, const QDateTime &EndTime, bool Details, int ChannelGroupId, int StartIndex, int Count, bool WithInvisible)
Definition: v2guide.cpp:86
static bool RemoveChannelGroup(const QString &Name)
Definition: v2guide.cpp:694
V2Guide()
Definition: v2guide.cpp:82
static int AddChannelGroup(const QString &Name)
Definition: v2guide.cpp:689
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, const QString &CatType, const QString &GroupBy)
Definition: v2guide.cpp:207
~V2Guide() override=default
static QStringList GetStoredSearches(const QString &Type)
Definition: v2guide.cpp:626
static void RegisterCustomTypes()
static QStringList GetCategoryList()
Definition: v2guide.cpp:603
static bool RemoveFromChannelGroup(int ChannelGroupId, int ChanId)
Definition: v2guide.cpp:676
static bool AddToChannelGroup(int ChannelGroupId, int ChanId)
Definition: v2guide.cpp:659
static V2Program * GetProgramDetails(int ChanId, const QDateTime &StartTime)
Definition: v2guide.cpp:422
CategoryFilter
Definition: videofilter.h:36