MythTV  master
channelServices.h
Go to the documentation of this file.
1 // Program Name: channelServices.h
3 // Created : Apr. 8, 2011
4 //
5 // Purpose - Channel Services API Interface definition
6 //
7 // Copyright (c) 2010 Robert McNamara <rmcnamara@mythtv.org>
8 //
9 // Licensed under the GPL v2 or later, see LICENSE for details
10 //
12 
13 #ifndef CHANNELSERVICES_H_
14 #define CHANNELSERVICES_H_
15 
17 
24 
27 //
28 // Notes -
29 //
30 // * This implementation can't handle declared default parameters
31 //
32 // * When called, any missing params are sent default values for its datatype
33 //
34 // * Q_CLASSINFO( "<methodName>_Method", ...) is used to determine HTTP method
35 // type. Defaults to "BOTH", available values:
36 // "GET", "POST" or "BOTH"
37 //
40 
42 {
43  Q_OBJECT
44  Q_CLASSINFO( "version" , "1.10" );
45  Q_CLASSINFO( "AddDBChannel_Method", "POST" )
46  Q_CLASSINFO( "UpdateDBChannel_Method", "POST" )
47  Q_CLASSINFO( "RemoveDBChannel_Method", "POST" )
48  Q_CLASSINFO( "AddVideoSource_Method", "POST" )
49  Q_CLASSINFO( "UpdateVideoSource_Method", "POST" )
50  Q_CLASSINFO( "RemoveVideoSource_Method", "POST" )
51 
52  public:
53 
54  // Must call InitializeCustomTypes for each unique Custom Type used
55  // in public slots below.
56 
57  ChannelServices( QObject *parent = nullptr ) : Service( parent )
58  {
66  }
67 
68  public slots:
69 
70  /* Channel Methods */
71 
72  virtual DTC::ChannelInfoList* GetChannelInfoList ( uint SourceID,
73  uint ChannelGroupID,
74  uint StartIndex,
75  uint Count,
76  bool OnlyVisible,
77  bool Details,
78  bool OrderByName,
79  bool GroupByCallsign,
80  bool OnlyTunable ) = 0;
81 
82  virtual DTC::ChannelInfo* GetChannelInfo ( uint ChanID ) = 0;
83 
84  virtual bool AddDBChannel ( uint MplexID,
85  uint SourceID,
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 ) = 0;
102 
103  virtual bool UpdateDBChannel ( uint MplexID,
104  uint SourceID,
105  uint ChannelID,
106  const QString &CallSign,
107  const QString &ChannelName,
108  const QString &ChannelNumber,
109  uint ServiceID,
110  uint ATSCMajorChannel,
111  uint ATSCMinorChannel,
112  bool UseEIT,
113  bool Visible,
114  const QString &ExtendedVisible,
115  const QString &FrequencyID,
116  const QString &Icon,
117  const QString &Format,
118  const QString &XMLTVID,
119  const QString &DefaultAuthority,
120  uint ServiceType ) = 0;
121 
122  virtual bool RemoveDBChannel ( uint ChannelID ) = 0;
123 
124  /* Video Source Methods */
125 
126  virtual DTC::VideoSourceList* GetVideoSourceList ( void ) = 0;
127 
128  virtual DTC::VideoSource* GetVideoSource ( uint SourceID ) = 0;
129 
130  virtual int AddVideoSource ( const QString &SourceName,
131  const QString &Grabber,
132  const QString &UserId,
133  const QString &FreqTable,
134  const QString &LineupId,
135  const QString &Password,
136  bool UseEIT,
137  const QString &ConfigPath,
138  int NITId,
139  uint BouquetId,
140  uint RegionId,
142  uint LCNOffset ) = 0;
143 
144  virtual bool RemoveVideoSource ( uint SourceID ) = 0;
145 
146  virtual bool UpdateVideoSource ( uint SourceID,
147  const QString &SourceName,
148  const QString &Grabber,
149  const QString &UserId,
150  const QString &FreqTable,
151  const QString &LineupId,
152  const QString &Password,
153  bool UseEIT,
154  const QString &ConfigPath,
155  int NITId,
156  uint BouquetId,
157  uint RegionId,
159  uint LCNOffset ) = 0;
160 
161  virtual DTC::LineupList* GetDDLineupList ( const QString &Source,
162  const QString &UserId,
163  const QString &Password ) = 0;
164 
165  virtual int FetchChannelsFromSource( uint SourceId,
166  uint CardId,
167  bool WaitForFinish ) = 0;
168 
169  /* Multiplex Methods */
170 
171  virtual DTC::VideoMultiplexList* GetVideoMultiplexList ( uint SourceID,
172  uint StartIndex,
173  uint Count ) = 0;
174 
175  virtual DTC::VideoMultiplex* GetVideoMultiplex ( uint MplexID ) = 0;
176 
177  virtual QStringList GetXMLTVIdList ( uint SourceID ) = 0;
178 };
179 
180 #endif
videoSource.h
Password
static StandardSetting * Password(bool enabled)
Setting for changing password.
Definition: galleryconfig.cpp:245
DTC::VideoSourceList
Definition: videoSourceList.h:15
videoMultiplex.h
DTC::VideoSource::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: videoSource.h:85
DTC::Lineup::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: lineup.h:107
UseEIT
Definition: videosource.cpp:594
service.h
ChannelServices
Definition: channelServices.h:41
DTC::VideoMultiplex
Definition: videoMultiplex.h:15
videoSourceList.h
DTC::VideoMultiplexList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: videoMultiplexList.h:86
MythDate::Format
Format
Definition: mythdate.h:15
SourceID
Definition: videosource.cpp:2860
DTC::ChannelInfoList
Definition: channelInfoList.h:14
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
Visible
Definition: channelsettings.cpp:416
ChannelID
Definition: channelsettings.h:20
DTC::ChannelInfoList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: channelInfoList.h:88
ServiceID
Definition: channelsettings.cpp:337
LCNOffset
Definition: videosource.cpp:484
Source
Definition: channelsettings.cpp:93
Service
Definition: service.h:42
DTC::VideoSource
Definition: videoSource.h:14
DTC::LineupList
Definition: lineup.h:66
FreqTable
static GlobalComboBoxSetting * FreqTable()
Definition: backendsettings.cpp:251
ScanFrequency
Definition: channelscanmiscsettings.h:280
uint
unsigned int uint
Definition: compat.h:81
lineup.h
videoMultiplexList.h
DTC::LineupList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: lineup.h:112
ChannelServices::ChannelServices
ChannelServices(QObject *parent=nullptr)
Definition: channelServices.h:57
Icon
Definition: channelsettings.cpp:233
DTC::VideoSourceList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: videoSourceList.h:71
DTC::VideoMultiplexList
Definition: videoMultiplexList.h:15
DTC::ChannelInfo
Definition: programAndChannel.h:30
channelInfoList.h
DTC::VideoMultiplex::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: videoMultiplex.h:119