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
34
35// MythBackend
36#include "v2channelGroupList.h"
37#include "v2programAndChannel.h"
38#include "v2programGuide.h"
39#include "v2programList.h"
40#include "v2serviceUtil.h"
41
42#define GUIDE_SERVICE QString("/Guide/")
43#define GUIDE_HANDLE QString("Guide")
44
46{
47 Q_OBJECT
48 Q_CLASSINFO("Version", "2.4")
49 Q_CLASSINFO("AddToChannelGroup", "methods=POST;name=bool")
50 Q_CLASSINFO("RemoveFromChannelGroup", "methods=POST;name=bool")
51 Q_CLASSINFO("AddChannelGroup", "methods=POST;name=int")
52 Q_CLASSINFO("RemoveChannelGroup", "methods=POST;name=bool")
53 Q_CLASSINFO("UpdateChannelGroup", "methods=POST;name=bool")
54
55 public:
56 V2Guide();
57 ~V2Guide() override = default;
58 static void RegisterCustomTypes();
59
60 public slots:
61
62 static V2ProgramGuide* GetProgramGuide ( const QDateTime &StartTime ,
63 const QDateTime &EndTime ,
64 bool Details,
65 int ChannelGroupId,
66 int StartIndex,
67 int Count,
68 bool WithInvisible);
69
70 static V2ProgramList* GetProgramList ( int StartIndex,
71 int Count,
72 const QDateTime &StartTime ,
73 const QDateTime &EndTime ,
74 int ChanId,
75 const QString &TitleFilter,
76 const QString &CategoryFilter,
77 const QString &PersonFilter,
78 const QString &KeywordFilter,
79 bool OnlyNew,
80 bool Details,
81 const QString &Sort,
82 bool Descending,
83 bool WithInvisible,
84 const QString &CatType,
85 const QString &GroupBy);
86
87 static V2Program* GetProgramDetails ( int ChanId,
88 const QDateTime &StartTime );
89
90 static QFileInfo GetChannelIcon ( int ChanId,
91 int Width ,
92 int Height,
93 const QString &FileName );
94
95 static V2ChannelGroupList* GetChannelGroupList ( bool IncludeEmpty );
96
97 static QStringList GetCategoryList ( );
98
99 static QStringList GetStoredSearches( const QString &Type );
100
101 static bool AddToChannelGroup ( int ChannelGroupId,
102 int ChanId );
103
104 static bool RemoveFromChannelGroup ( int ChannelGroupId,
105 int ChanId );
106
107 static int AddChannelGroup ( const QString &Name);
108
109 static bool RemoveChannelGroup ( const QString &Name);
110
111 static bool UpdateChannelGroup ( const QString &OldName,
112 const QString &NewName);
113
114 private:
115 Q_DISABLE_COPY(V2Guide)
116
117};
118
119
120#endif
static V2ChannelGroupList * GetChannelGroupList(bool IncludeEmpty)
Definition: v2guide.cpp:585
static QFileInfo GetChannelIcon(int ChanId, int Width, int Height, const QString &FileName)
Definition: v2guide.cpp:454
static bool UpdateChannelGroup(const QString &OldName, const QString &NewName)
Definition: v2guide.cpp:700
static V2ProgramGuide * GetProgramGuide(const QDateTime &StartTime, const QDateTime &EndTime, bool Details, int ChannelGroupId, int StartIndex, int Count, bool WithInvisible)
Definition: v2guide.cpp:87
static bool RemoveChannelGroup(const QString &Name)
Definition: v2guide.cpp:695
V2Guide()
Definition: v2guide.cpp:83
static int AddChannelGroup(const QString &Name)
Definition: v2guide.cpp:690
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:208
~V2Guide() override=default
static QStringList GetStoredSearches(const QString &Type)
Definition: v2guide.cpp:627
static void RegisterCustomTypes()
static QStringList GetCategoryList()
Definition: v2guide.cpp:604
static bool RemoveFromChannelGroup(int ChannelGroupId, int ChanId)
Definition: v2guide.cpp:677
static bool AddToChannelGroup(int ChannelGroupId, int ChanId)
Definition: v2guide.cpp:660
static V2Program * GetProgramDetails(int ChanId, const QDateTime &StartTime)
Definition: v2guide.cpp:423
CategoryFilter
Definition: videofilter.h:36