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 COPYING for details
10 //
12 
13 #ifndef CHANNELSERVICES_H_
14 #define CHANNELSERVICES_H_
15 
16 #include "service.h"
17 
23 #include "datacontracts/lineup.h"
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.9" );
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,
141  uint ScanFrequency ) = 0;
142 
143  virtual bool RemoveVideoSource ( uint SourceID ) = 0;
144 
145  virtual bool UpdateVideoSource ( uint SourceID,
146  const QString &SourceName,
147  const QString &Grabber,
148  const QString &UserId,
149  const QString &FreqTable,
150  const QString &LineupId,
151  const QString &Password,
152  bool UseEIT,
153  const QString &ConfigPath,
154  int NITId,
155  uint BouquetId,
156  uint RegionId,
157  uint ScanFrequency ) = 0;
158 
159  virtual DTC::LineupList* GetDDLineupList ( const QString &Source,
160  const QString &UserId,
161  const QString &Password ) = 0;
162 
163  virtual int FetchChannelsFromSource( const uint SourceId,
164  const uint CardId,
165  bool WaitForFinish ) = 0;
166 
167  /* Multiplex Methods */
168 
169  virtual DTC::VideoMultiplexList* GetVideoMultiplexList ( uint SourceID,
170  uint StartIndex,
171  uint Count ) = 0;
172 
173  virtual DTC::VideoMultiplex* GetVideoMultiplex ( uint MplexID ) = 0;
174 
175  virtual QStringList GetXMLTVIdList ( uint SourceID ) = 0;
176 };
177 
178 #endif
static void InitializeCustomTypes()
Definition: lineup.h:107
unsigned int slots[4]
Definition: element.c:38
static void InitializeCustomTypes()
static void InitializeCustomTypes()
static GlobalComboBoxSetting * FreqTable()
static void InitializeCustomTypes()
Definition: videoSource.h:83
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
unsigned int uint
Definition: compat.h:140
static StandardSetting * Password(bool enabled)
Setting for changing password.
static void InitializeCustomTypes()
ChannelServices(QObject *parent=nullptr)
static void InitializeCustomTypes()
Definition: lineup.h:112
static void InitializeCustomTypes()