MythTV  master
inputinfo.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 #ifndef _INPUTINFO_H_
3 #define _INPUTINFO_H_
4 
5 // Qt headers
6 #include <QStringList>
7 #include <QMap>
8 
9 // MythTV headers
10 #include "channelinfo.h" // for ChannelInfoList
11 
13 {
14  public:
15  InputInfo() : sourceid(0), inputid(0), mplexid(0),
16  chanid(0), recPriority(0), scheduleOrder(0),
17  livetvorder(0), quickTune(false) {}
18  InputInfo(const QString &_name,
19  uint _sourceid, uint _inputid, uint _mplexid,
20  uint _chanid, uint _livetvorder) :
21  name(_name),
22  sourceid(_sourceid),
23  inputid(_inputid),
24  mplexid(_mplexid),
25  chanid(_chanid),
26  recPriority(0),
27  scheduleOrder(0),
28  livetvorder(_livetvorder),
29  quickTune(false) {}
30 
31  InputInfo(const InputInfo &other) :
32  name(other.name),
33  sourceid(other.sourceid),
34  inputid(other.inputid),
35  mplexid(other.mplexid),
36  chanid(other.chanid),
37  displayName(other.displayName),
38  recPriority(other.recPriority),
39  scheduleOrder(other.scheduleOrder),
40  livetvorder(other.livetvorder),
41  quickTune(other.quickTune) {}
42 
43  InputInfo &operator=(const InputInfo &other)
44  {
45  name = other.name;
46  sourceid = other.sourceid;
47  inputid = other.inputid;
48  mplexid = other.mplexid;
49  chanid = other.chanid;
50  displayName = other.displayName;
51  recPriority = other.recPriority;
52  scheduleOrder = other.scheduleOrder;
53  livetvorder = other.livetvorder;
54  quickTune = other.quickTune;
55  return *this;
56  }
57 
58  bool operator == (uint _inputid) const
59  { return inputid == _inputid; }
60 
61  bool operator == (const QString &_name) const
62  { return name == _name; }
63 
64  virtual ~InputInfo() = default;
65 
66  virtual bool FromStringList(QStringList::const_iterator &it,
67  QStringList::const_iterator end);
68  virtual void ToStringList(QStringList &list) const;
69 
70  virtual void Clear(void);
71  virtual bool IsEmpty(void) const { return name.isEmpty(); }
72 
73  public:
74  QString name;
79  QString displayName;
83  bool quickTune;
84 };
85 
86 #endif // _INPUTINFO_H_
uint scheduleOrder
Definition: inputinfo.h:81
int recPriority
Definition: inputinfo.h:80
InputInfo(const QString &_name, uint _sourceid, uint _inputid, uint _mplexid, uint _chanid, uint _livetvorder)
Definition: inputinfo.h:18
virtual bool IsEmpty(void) const
Definition: inputinfo.h:71
uint sourceid
associated channel listings source
Definition: inputinfo.h:75
unsigned int uint
Definition: compat.h:140
uint mplexid
mplexid restriction if applicable
Definition: inputinfo.h:77
QString displayName
Definition: inputinfo.h:79
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
#define MTV_PUBLIC
Definition: mythtvexp.h:15
uint livetvorder
order for live TV use
Definition: inputinfo.h:82
InputInfo(const InputInfo &other)
Definition: inputinfo.h:31
const char * name
Definition: ParseText.cpp:339
uint inputid
unique key in DB for this input
Definition: inputinfo.h:76
bool quickTune
Definition: inputinfo.h:83
bool operator==(const DialogCode &a, const QDialog::DialogCode &b)
Definition: mythdialogs.h:38
QString name
input name
Definition: inputinfo.h:74
InputInfo()
Definition: inputinfo.h:15
#define Clear(a)
InputInfo & operator=(const InputInfo &other)
Definition: inputinfo.h:43
uint chanid
chanid restriction if applicable
Definition: inputinfo.h:78