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
15{
16 public:
17 explicit DummyChannel(TVRec *parent): ChannelBase(parent)
18 { m_curChannelName.clear(); m_curInputName.clear(); }
19 ~DummyChannel(void) override = default;
20
21 bool IsTunable(const QString &/*channum*/) const override // ChannelBase
22 { return true; }
23
24 bool Open(void) override // ChannelBase
25 { return InitializeInput(); }
26 void Close(void) override { } // ChannelBase
27
28 // Sets
29 bool SetChannelByString(const QString &chan) override // ChannelBase
30 { m_curChannelName = chan; return true; }
31
32 // Gets
33 bool IsOpen(void) const override // ChannelBase
34 { return true; }
35 QString GetDevice(void) const override // ChannelBase
36 { return "/dev/dummy"; }
37 QString GetCurrentInput(void) const { return m_curInputName; }
38 static uint GetCurrentSourceID(void) { return 0; }
39
40 private:
42};
43
44#endif
Abstract class providing a generic interface to tuning hardware.
Definition: channelbase.h:32
QString m_curChannelName
Definition: channelbase.h:135
virtual bool InitializeInput(void)
Fills in input map from DB.
DummyChannel.
Definition: dummychannel.h:15
QString m_curInputName
Definition: dummychannel.h:41
DummyChannel(TVRec *parent)
Definition: dummychannel.h:17
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
Definition: dummychannel.h:35
bool IsTunable(const QString &) const override
Definition: dummychannel.h:21
QString GetCurrentInput(void) const
Definition: dummychannel.h:37
bool Open(void) override
Opens the channel changing hardware for use.
Definition: dummychannel.h:24
static uint GetCurrentSourceID(void)
Definition: dummychannel.h:38
void Close(void) override
Closes the channel changing hardware to use.
Definition: dummychannel.h:26
bool IsOpen(void) const override
Reports whether channel is already open.
Definition: dummychannel.h:33
bool SetChannelByString(const QString &chan) override
Definition: dummychannel.h:29
~DummyChannel(void) override=default
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:143
unsigned int uint
Definition: freesurround.h:24