MythTV  master
dummychannel.h
Go to the documentation of this file.
1 
6 #ifndef DUMMYCHANNEL_H
7 #define DUMMYCHANNEL_H
8 
9 #include <QString>
10 
11 #include "tv_rec.h"
12 #include "channelbase.h"
13 
14 using namespace std;
15 
16 class DummyChannel : public ChannelBase
17 {
18  public:
19  explicit DummyChannel(TVRec *parent): ChannelBase(parent)
20  { (void)parent; m_curChannelName.clear(); m_curInputName.clear(); }
21  ~DummyChannel(void) override { }
22 
23  bool IsTunable(const QString &/*channum*/) const override // ChannelBase
24  { return true; }
25 
26  bool Open(void) override // ChannelBase
27  { return InitializeInput(); }
28  void Close(void) override { } // ChannelBase
29 
30  // Sets
31  bool SetChannelByString(const QString &chan) override // ChannelBase
32  { m_curChannelName = chan; return true; }
33 
34  // Gets
35  bool IsOpen(void) const override // ChannelBase
36  { return true; }
37  QString GetDevice(void) const override // ChannelBase
38  { return "/dev/dummy"; }
39  QString GetCurrentInput(void) const { return m_curInputName; }
40  static uint GetCurrentSourceID(void) { return 0; }
41 
42  private:
43  QString m_curInputName;
44 };
45 
46 #endif
void Close(void) override
Closes the channel changing hardware to use.
Definition: dummychannel.h:28
QString GetCurrentInput(void) const
Definition: dummychannel.h:39
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:142
static uint GetCurrentSourceID(void)
Definition: dummychannel.h:40
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
Definition: dummychannel.h:37
bool IsTunable(const QString &) const override
Definition: dummychannel.h:23
unsigned int uint
Definition: compat.h:140
QString m_curInputName
Definition: dummychannel.h:43
Abstract class providing a generic interface to tuning hardware.
Definition: channelbase.h:31
~DummyChannel(void) override
Definition: dummychannel.h:21
bool Open(void) override
Opens the channel changing hardware for use.
Definition: dummychannel.h:26
bool SetChannelByString(const QString &chan) override
Definition: dummychannel.h:31
bool IsOpen(void) const override
Reports whether channel is already open.
Definition: dummychannel.h:35
DummyChannel(TVRec *parent)
Definition: dummychannel.h:19