MythTV master
v2channel.h
Go to the documentation of this file.
1
2// Program Name: channel.h
3// Created : Apr. 8, 2011
4//
5// Copyright (c) 2011 Robert McNamara <rmcnamara@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 V2CHANNEL_H
27#define V2CHANNEL_H
28
30#include "v2channelInfoList.h"
31#include "v2videoSourceList.h"
33#include "v2lineup.h"
34#include "v2grabber.h"
35#include "v2commMethod.h"
36#include "v2channelScan.h"
37#include "v2channelRestore.h"
38
39#define CHANNEL_SERVICE QString("/Channel/")
40#define CHANNEL_HANDLE QString("Channel")
41
42
44{
45 Q_OBJECT
46 Q_CLASSINFO("Version", "1.12")
47 Q_CLASSINFO("UpdateDBChannel", "methods=POST;name=bool")
48 Q_CLASSINFO("AddDBChannel", "methods=POST;name=bool")
49 Q_CLASSINFO("RemoveDBChannel", "methods=POST;name=bool")
50 Q_CLASSINFO("UpdateVideoSource", "methods=POST;name=bool")
51 Q_CLASSINFO("AddVideoSource", "methods=POST;name=int")
52 Q_CLASSINFO("RemoveAllVideoSources", "methods=POST;name=bool")
53 Q_CLASSINFO("RemoveVideoSource", "methods=POST;name=bool")
54 Q_CLASSINFO("FetchChannelsFromSource","methods=GET,POST;name=int")
55 Q_CLASSINFO("GetAvailableChanid", "methods=GET,POST;name=int")
56 Q_CLASSINFO("GetXMLTVIdList", "methods=GET,POST,HEAD;name=StringList")
57 Q_CLASSINFO("StartScan", "methods=POST;name=bool")
58 Q_CLASSINFO("StopScan", "methods=POST;name=bool")
59 Q_CLASSINFO("SendScanDialogResponse", "methods=POST;name=bool")
60 Q_CLASSINFO("SaveRestoreData", "methods=POST;name=bool")
61 Q_CLASSINFO("CopyIconToBackend", "methods=POST")
62
63 public:
64 V2Channel();
65 ~V2Channel() override = default;
66 static void RegisterCustomTypes();
67
68 public slots:
69
70 /* Channel Methods */
71
73 uint ChannelGroupID,
74 uint StartIndex,
75 uint Count,
76 bool OnlyVisible,
77 bool Details,
78 bool OrderByName,
79 bool GroupByCallsign,
80 bool OnlyTunable );
81
82 static V2ChannelInfo* GetChannelInfo ( uint ChanID );
83
84 bool UpdateDBChannel ( uint MplexID,
87 const QString &CallSign,
88 const QString &ChannelName,
89 const QString &ChannelNumber,
91 uint ATSCMajorChannel,
92 uint ATSCMinorChannel,
93 bool UseEIT,
94 bool Visible,
95 const QString &ExtendedVisible,
96 const QString &FrequencyID,
97 const QString &Icon,
98 const QString &Format,
99 const QString &XMLTVID,
100 const QString &DefaultAuthority,
101 uint ServiceType,
102 int RecPriority,
103 int TimeOffset,
104 int CommMethod );
105
106 bool AddDBChannel ( uint MplexID,
109 const QString &CallSign,
110 const QString &ChannelName,
111 const QString &ChannelNumber,
113 uint ATSCMajorChannel,
114 uint ATSCMinorChannel,
115 bool UseEIT,
116 bool Visible,
117 const QString &ExtendedVisible,
118 const QString &FrequencyID,
119 const QString &Icon,
120 const QString &Format,
121 const QString &XMLTVID,
122 const QString &DefaultAuthority,
123 uint ServiceType,
124 int RecPriority,
125 int TimeOffset,
126 int CommMethod );
127
128 static bool RemoveDBChannel ( uint ChannelID );
129
130 static uint GetAvailableChanid ( void );
131
132 static V2CommMethodList* GetCommMethodList ( void );
133
134 /* Video Source Methods */
135
136 static V2VideoSourceList* GetVideoSourceList ( void );
137
139
141 const QString &SourceName,
142 const QString &Grabber,
143 const QString &UserId,
144 const QString &FreqTable,
145 const QString &LineupId,
146 const QString &Password,
147 bool UseEIT,
148 const QString &ConfigPath,
149 int NITId,
150 uint BouquetId,
151 uint RegionId,
153 uint LCNOffset );
154
155 static int AddVideoSource ( const QString &SourceName,
156 const QString &Grabber,
157 const QString &UserId,
158 const QString &FreqTable,
159 const QString &LineupId,
160 const QString &Password,
161 bool UseEIT,
162 const QString &ConfigPath,
163 int NITId,
164 uint BouquetId,
165 uint RegionId,
167 uint LCNOffset );
168
169 static bool RemoveAllVideoSources ( void );
170 static bool RemoveVideoSource ( uint SourceID );
171
172 static V2LineupList* GetDDLineupList ( const QString &Source,
173 const QString &UserId,
174 const QString &Password );
175
176 static int FetchChannelsFromSource( uint SourceId,
177 uint CardId,
178 bool WaitForFinish );
179
180 /* Multiplex Methods */
181
183 uint StartIndex,
184 uint Count );
185
186 static V2VideoMultiplex* GetVideoMultiplex ( uint MplexID );
187
188 static QStringList GetXMLTVIdList ( uint SourceID );
189
190 static V2GrabberList* GetGrabberList ( );
191
192 static QStringList GetFreqTableList ( );
193
194 static bool StartScan ( uint CardId,
195 const QString &DesiredServices,
196 bool FreeToAirOnly,
200 bool RemoveDuplicates,
201 bool AddFullTS,
202 bool TestDecryptable,
203 const QString &ScanType,
204 const QString &FreqTable,
205 const QString &Modulation,
206 const QString &FirstChan,
207 const QString &LastChan,
208 uint ScanId,
210 bool FollowNITSetting,
211 uint MplexId,
212 const QString &Frequency,
213 const QString &Bandwidth,
214 const QString &Polarity,
215 const QString &SymbolRate,
216 const QString &Inversion,
217 const QString &Constellation,
218 const QString &ModSys,
219 const QString &CodeRateLP,
220 const QString &CodeRateHP,
221 const QString &FEC,
222 const QString &TransmissionMode,
223 const QString &GuardInterval,
224 const QString &Hierarchy,
225 const QString &RollOff);
226
227 static V2ScanStatus* GetScanStatus ( );
228
229 static bool StopScan ( uint Cardid);
230
231 static V2ScanList* GetScanList ( uint SourceId);
232
233 static bool SendScanDialogResponse ( uint Cardid,
234 const QString &DialogString,
235 int DialogButton );
236
237 static V2ChannelRestore* GetRestoreData ( uint SourceId,
238 bool XmltvId,
239 bool Icon,
240 bool Visible);
241
242 static bool SaveRestoreData ( uint SourceId);
243
244 static bool CopyIconToBackend ( const QString& Url,
245 const QString& ChanId);
246 private:
247 Q_DISABLE_COPY(V2Channel)
248
249};
250
251
252#endif
static GlobalComboBoxSetting * FreqTable()
static V2ScanStatus * GetScanStatus()
Definition: v2channel.cpp:1096
static bool CopyIconToBackend(const QString &Url, const QString &ChanId)
Definition: v2channel.cpp:1186
static QStringList GetFreqTableList()
Definition: v2channel.cpp:1011
static uint GetAvailableChanid(void)
Definition: v2channel.cpp:304
static V2ScanList * GetScanList(uint SourceId)
Definition: v2channel.cpp:1126
static V2VideoMultiplex * GetVideoMultiplex(uint MplexID)
Definition: v2channel.cpp:835
static int FetchChannelsFromSource(uint SourceId, uint CardId, bool WaitForFinish)
Definition: v2channel.cpp:672
static QStringList GetXMLTVIdList(uint SourceID)
Definition: v2channel.cpp:897
static bool RemoveAllVideoSources(void)
Definition: v2channel.cpp:642
static void RegisterCustomTypes()
static V2VideoMultiplexList * GetVideoMultiplexList(uint SourceID, uint StartIndex, uint Count)
Definition: v2channel.cpp:703
static V2CommMethodList * GetCommMethodList(void)
Definition: v2channel.cpp:366
bool UpdateDBChannel(uint MplexID, uint SourceID, uint ChannelID, const QString &CallSign, const QString &ChannelName, const QString &ChannelNumber, uint ServiceID, uint ATSCMajorChannel, uint ATSCMinorChannel, bool UseEIT, bool Visible, const QString &ExtendedVisible, const QString &FrequencyID, const QString &Icon, const QString &Format, const QString &XMLTVID, const QString &DefaultAuthority, uint ServiceType, int RecPriority, int TimeOffset, int CommMethod)
Definition: v2channel.cpp:203
static bool StartScan(uint CardId, const QString &DesiredServices, bool FreeToAirOnly, bool ChannelNumbersOnly, bool CompleteChannelsOnly, bool FullChannelSearch, bool RemoveDuplicates, bool AddFullTS, bool TestDecryptable, const QString &ScanType, const QString &FreqTable, const QString &Modulation, const QString &FirstChan, const QString &LastChan, uint ScanId, bool IgnoreSignalTimeout, bool FollowNITSetting, uint MplexId, const QString &Frequency, const QString &Bandwidth, const QString &Polarity, const QString &SymbolRate, const QString &Inversion, const QString &Constellation, const QString &ModSys, const QString &CodeRateLP, const QString &CodeRateHP, const QString &FEC, const QString &TransmissionMode, const QString &GuardInterval, const QString &Hierarchy, const QString &RollOff)
Definition: v2channel.cpp:1024
bool AddDBChannel(uint MplexID, uint SourceID, uint ChannelID, const QString &CallSign, const QString &ChannelName, const QString &ChannelNumber, uint ServiceID, uint ATSCMajorChannel, uint ATSCMinorChannel, bool UseEIT, bool Visible, const QString &ExtendedVisible, const QString &FrequencyID, const QString &Icon, const QString &Format, const QString &XMLTVID, const QString &DefaultAuthority, uint ServiceType, int RecPriority, int TimeOffset, int CommMethod)
Definition: v2channel.cpp:320
static V2ChannelInfoList * GetChannelInfoList(uint SourceID, uint ChannelGroupID, uint StartIndex, uint Count, bool OnlyVisible, bool Details, bool OrderByName, bool GroupByCallsign, bool OnlyTunable)
Definition: v2channel.cpp:108
static bool SendScanDialogResponse(uint Cardid, const QString &DialogString, int DialogButton)
Definition: v2channel.cpp:1142
static int AddVideoSource(const QString &SourceName, const QString &Grabber, const QString &UserId, const QString &FreqTable, const QString &LineupId, const QString &Password, bool UseEIT, const QString &ConfigPath, int NITId, uint BouquetId, uint RegionId, uint ScanFrequency, uint LCNOffset)
Definition: v2channel.cpp:616
static V2VideoSource * GetVideoSource(uint SourceID)
Definition: v2channel.cpp:447
static bool StopScan(uint Cardid)
Definition: v2channel.cpp:1117
~V2Channel() override=default
static V2ChannelRestore * GetRestoreData(uint SourceId, bool XmltvId, bool Icon, bool Visible)
Definition: v2channel.cpp:1160
static V2VideoSourceList * GetVideoSourceList(void)
Definition: v2channel.cpp:388
static V2GrabberList * GetGrabberList()
Definition: v2channel.cpp:953
static bool RemoveDBChannel(uint ChannelID)
Definition: v2channel.cpp:358
static V2ChannelInfo * GetChannelInfo(uint ChanID)
Definition: v2channel.cpp:186
static V2LineupList * GetDDLineupList(const QString &Source, const QString &UserId, const QString &Password)
Definition: v2channel.cpp:660
bool UpdateVideoSource(uint SourceID, const QString &SourceName, const QString &Grabber, const QString &UserId, const QString &FreqTable, const QString &LineupId, const QString &Password, bool UseEIT, const QString &ConfigPath, int NITId, uint BouquetId, uint RegionId, uint ScanFrequency, uint LCNOffset)
Definition: v2channel.cpp:501
static bool RemoveVideoSource(uint SourceID)
Definition: v2channel.cpp:649
static bool SaveRestoreData(uint SourceId)
Definition: v2channel.cpp:1177
unsigned int uint
Definition: freesurround.h:24
static StandardSetting * Password(bool enabled)
Setting for changing password.