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(); curinputname.clear(); return; }
21  ~DummyChannel(void) { return; }
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  { return; }
30 
31  // Sets
32  bool SetChannelByString(const QString &chan) override // ChannelBase
33  { m_curchannelname = chan; return true; }
34 
35  // Gets
36  bool IsOpen(void) const override // ChannelBase
37  { return true; }
38  QString GetDevice(void) const override // ChannelBase
39  { return "/dev/dummy"; }
40  QString GetCurrentInput(void) const { return curinputname; }
41  uint GetCurrentSourceID(void) const { return 0; }
42 
43  private:
44  QString curinputname;
45 };
46 
47 #endif
void Close(void) override
Closes the channel changing hardware to use.
Definition: dummychannel.h:28
QString GetCurrentInput(void) const
Definition: dummychannel.h:40
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:141
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
Definition: dummychannel.h:38
bool IsTunable(const QString &) const override
Definition: dummychannel.h:23
unsigned int uint
Definition: compat.h:140
QString curinputname
Definition: dummychannel.h:44
Abstract class providing a generic interface to tuning hardware.
Definition: channelbase.h:31
bool Open(void) override
Opens the channel changing hardware for use.
Definition: dummychannel.h:26
~DummyChannel(void)
Definition: dummychannel.h:21
bool SetChannelByString(const QString &chan) override
Definition: dummychannel.h:32
bool IsOpen(void) const override
Reports whether channel is already open.
Definition: dummychannel.h:36
uint GetCurrentSourceID(void) const
Definition: dummychannel.h:41
DummyChannel(TVRec *parent)
Definition: dummychannel.h:19