MythTV  master
captureServices.h
Go to the documentation of this file.
1 // Program Name: captureServices.h
3 // Created : Sep. 21, 2011
4 //
5 // Purpose - Capture Card Services API Interface definition
6 //
7 // Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
8 //
9 // Licensed under the GPL v2 or later, see COPYING for details
10 //
12 
13 #ifndef CAPTURESERVICES_H_
14 #define CAPTURESERVICES_H_
15 
16 #include <QFileInfo>
17 #include <QStringList>
18 
19 #include "service.h"
20 
23 
26 //
27 // Notes -
28 //
29 // * This implementation can't handle declared default parameters
30 //
31 // * When called, any missing params are sent default values for its datatype
32 //
33 // * Q_CLASSINFO( "<methodName>_Method", ...) is used to determine HTTP method
34 // type. Defaults to "BOTH", available values:
35 // "GET", "POST" or "BOTH"
36 //
39 
41 {
42  Q_OBJECT
43  Q_CLASSINFO( "version" , "1.4" );
44  Q_CLASSINFO( "RemoveCaptureCard_Method", "POST" )
45  Q_CLASSINFO( "AddCaptureCard_Method", "POST" )
46  Q_CLASSINFO( "UpdateCaptureCard_Method", "POST" )
47  Q_CLASSINFO( "RemoveCardInput_Method", "POST" )
48  Q_CLASSINFO( "AddCardInput_Method", "POST" )
49  Q_CLASSINFO( "UpdateCardInput_Method", "POST" )
50 
51  public:
52 
53  // Must call InitializeCustomTypes for each unique Custom Type used
54  // in public slots below.
55 
56  CaptureServices( QObject *parent = nullptr ) : Service( parent )
57  {
60  }
61 
62  public slots:
63 
64  virtual DTC::CaptureCardList* GetCaptureCardList ( const QString &HostName,
65  const QString &CardType ) = 0;
66 
67  virtual DTC::CaptureCard* GetCaptureCard ( int CardId ) = 0;
68 
69  virtual bool RemoveCaptureCard ( int CardId ) = 0;
70 
71  virtual int AddCaptureCard ( const QString &VideoDevice,
72  const QString &AudioDevice,
73  const QString &VBIDevice,
74  const QString &CardType,
75  const uint AudioRateLimit,
76  const QString &HostName,
77  const uint DVBSWFilter,
78  const uint DVBSatType,
79  bool DVBWaitForSeqStart,
80  bool SkipBTAudio,
81  bool DVBOnDemand,
82  const uint DVBDiSEqCType,
83  const uint FirewireSpeed,
84  const QString &FirewireModel,
86  const uint SignalTimeout,
87  const uint ChannelTimeout,
88  const uint DVBTuningDelay,
89  const uint Contrast,
90  const uint Brightness,
91  const uint Colour,
92  const uint Hue,
93  const uint DiSEqCId,
94  bool DVBEITScan) = 0;
95 
96  virtual bool UpdateCaptureCard ( int CardId,
97  const QString &Setting,
98  const QString &Value ) = 0;
99 
100  // Card Inputs
101 
102  virtual bool RemoveCardInput ( int CardInputId) = 0;
103 
104  virtual int AddCardInput ( const uint CardId,
105  const uint SourceId,
106  const QString &InputName,
107  const QString &ExternalCommand,
108  const QString &ChangerDevice,
109  const QString &ChangerModel,
110  const QString &HostName,
111  const QString &TuneChan,
112  const QString &StartChan,
113  const QString &DisplayName,
114  bool DishnetEIT,
115  const uint RecPriority,
116  const uint Quicktune,
117  const uint SchedOrder,
118  const uint LiveTVOrder) = 0;
119 
120  virtual bool UpdateCardInput ( int CardInputId,
121  const QString &Setting,
122  const QString &Value ) = 0;
123 };
124 
125 #endif
unsigned int slots[4]
Definition: element.c:38
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
static void InitializeCustomTypes()
Definition: captureCard.h:184
CaptureServices(QObject *parent=nullptr)
unsigned int uint
Definition: compat.h:140
static void InitializeCustomTypes()
QMap< QString, bool > Setting