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,
76  const QString &HostName,
77  uint DVBSWFilter,
78  uint DVBSatType,
79  bool DVBWaitForSeqStart,
80  bool SkipBTAudio,
81  bool DVBOnDemand,
82  uint DVBDiSEqCType,
84  const QString &FirewireModel,
89  uint Contrast,
91  uint Colour,
92  uint Hue,
93  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 ( uint CardId,
105  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  uint RecPriority,
116  uint Quicktune,
117  uint SchedOrder,
118  uint LiveTVOrder) = 0;
119 
120  virtual bool UpdateCardInput ( int CardInputId,
121  const QString &Setting,
122  const QString &Value ) = 0;
123 };
124 
125 #endif
captureCardList.h
InputName
Definition: videosource.cpp:2709
CaptureServices::UpdateCardInput
virtual bool UpdateCardInput(int CardInputId, const QString &Setting, const QString &Value)=0
CaptureServices
Definition: captureServices.h:41
Brightness
Definition: channelsettings.cpp:483
Hue
Definition: channelsettings.cpp:505
service.h
VideoDevice
Definition: videosource.cpp:751
VBIDevice
Definition: videosource.cpp:868
Colour
Definition: channelsettings.cpp:494
CaptureServices::AddCaptureCard
virtual int AddCaptureCard(const QString &VideoDevice, const QString &AudioDevice, const QString &VBIDevice, const QString &CardType, uint AudioRateLimit, const QString &HostName, uint DVBSWFilter, uint DVBSatType, bool DVBWaitForSeqStart, bool SkipBTAudio, bool DVBOnDemand, uint DVBDiSEqCType, uint FirewireSpeed, const QString &FirewireModel, uint FirewireConnection, uint SignalTimeout, uint ChannelTimeout, uint DVBTuningDelay, uint Contrast, uint Brightness, uint Colour, uint Hue, uint DiSEqCId, bool DVBEITScan)=0
CaptureServices::GetCaptureCard
virtual DTC::CaptureCard * GetCaptureCard(int CardId)=0
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
AudioRateLimit
Definition: videosource.cpp:1022
DTC::CaptureCardList
Definition: captureCardList.h:25
DVBEITScan
Definition: videosource.cpp:1184
Service
Definition: service.h:43
AudioDevice
Definition: videosource.cpp:969
FirewireConnection
Definition: videosource.cpp:1299
LiveTVOrder
Definition: videosource.cpp:3061
FirewireSpeed
Definition: videosource.cpp:1312
Contrast
Definition: channelsettings.cpp:472
uint
unsigned int uint
Definition: compat.h:140
CaptureServices::UpdateCaptureCard
virtual bool UpdateCaptureCard(int CardId, const QString &Setting, const QString &Value)=0
CaptureServices::RemoveCardInput
virtual bool RemoveCardInput(int CardInputId)=0
DTC::CaptureCardList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: captureCardList.h:67
DVBTuningDelay
Definition: videosource.cpp:1200
FirewireModel
Definition: videosource.h:695
CardType
Definition: videosource.h:327
Setting
QMap< QString, bool > Setting
Definition: mythsystemlegacy.h:58
DVBOnDemand
Definition: videosource.cpp:1169
captureCard.h
CaptureServices::AddCardInput
virtual int AddCardInput(uint CardId, uint SourceId, const QString &InputName, const QString &ExternalCommand, const QString &ChangerDevice, const QString &ChangerModel, const QString &HostName, const QString &TuneChan, const QString &StartChan, const QString &DisplayName, bool DishnetEIT, uint RecPriority, uint Quicktune, uint SchedOrder, uint LiveTVOrder)=0
DTC::CaptureCard
Definition: captureCard.h:25
CaptureServices::RemoveCaptureCard
virtual bool RemoveCaptureCard(int CardId)=0
SignalTimeout
Definition: videosource.cpp:992
DTC::CaptureCard::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: captureCard.h:184
ChannelTimeout
Definition: videosource.cpp:1006
CaptureServices::Q_CLASSINFO
Q_CLASSINFO("version", "1.4")
CaptureServices::GetCaptureCardList
virtual DTC::CaptureCardList * GetCaptureCardList(const QString &HostName, const QString &CardType)=0