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() = default;
16  InputInfo(const QString &_name,
17  uint _sourceid, uint _inputid, uint _mplexid,
18  uint _chanid, uint _livetvorder) :
19  m_name(_name),
20  m_sourceid(_sourceid),
21  m_inputid(_inputid),
22  m_mplexid(_mplexid),
23  m_chanid(_chanid),
24  m_livetvorder(_livetvorder) {}
25 
26  InputInfo(const InputInfo &other) :
27  m_name(other.m_name),
28  m_sourceid(other.m_sourceid),
29  m_inputid(other.m_inputid),
30  m_mplexid(other.m_mplexid),
31  m_chanid(other.m_chanid),
32  m_displayName(other.m_displayName),
33  m_recPriority(other.m_recPriority),
34  m_scheduleOrder(other.m_scheduleOrder),
35  m_livetvorder(other.m_livetvorder),
36  m_quickTune(other.m_quickTune) {}
37 
38  InputInfo &operator=(const InputInfo &other)
39  {
40  m_name = other.m_name;
41  m_sourceid = other.m_sourceid;
42  m_inputid = other.m_inputid;
43  m_mplexid = other.m_mplexid;
44  m_chanid = other.m_chanid;
45  m_displayName = other.m_displayName;
46  m_recPriority = other.m_recPriority;
47  m_scheduleOrder = other.m_scheduleOrder;
48  m_livetvorder = other.m_livetvorder;
49  m_quickTune = other.m_quickTune;
50  return *this;
51  }
52 
53  bool operator == (uint inputid) const
54  { return m_inputid == inputid; }
55 
56  bool operator == (const QString &name) const
57  { return m_name == name; }
58 
59  virtual ~InputInfo() = default;
60 
61  virtual bool FromStringList(QStringList::const_iterator &it,
62  QStringList::const_iterator end);
63  virtual void ToStringList(QStringList &list) const;
64 
65  virtual void Clear(void);
66  virtual bool IsEmpty(void) const { return m_name.isEmpty(); }
67 
68  public:
69  QString m_name;
70  uint m_sourceid {0};
71  uint m_inputid {0};
72  uint m_mplexid {0};
73  uint m_chanid {0};
74  QString m_displayName;
75  int m_recPriority {0};
76  uint m_scheduleOrder {0};
77  uint m_livetvorder {0};
78  bool m_quickTune {false};
79 };
80 
81 #endif // _INPUTINFO_H_
QString m_displayName
Definition: inputinfo.h:74
InputInfo(const QString &_name, uint _sourceid, uint _inputid, uint _mplexid, uint _chanid, uint _livetvorder)
Definition: inputinfo.h:16
virtual bool IsEmpty(void) const
Definition: inputinfo.h:66
uint m_livetvorder
order for live TV use
Definition: inputinfo.h:77
bool operator==(MusicMetadata &a, MusicMetadata &b)
uint m_inputid
unique key in DB for this input
Definition: inputinfo.h:71
unsigned int uint
Definition: compat.h:140
uint m_mplexid
mplexid restriction if applicable
Definition: inputinfo.h:72
#define MTV_PUBLIC
Definition: mythtvexp.h:15
int m_recPriority
Definition: inputinfo.h:75
InputInfo(const InputInfo &other)
Definition: inputinfo.h:26
const char * name
Definition: ParseText.cpp:328
QString m_name
input name
Definition: inputinfo.h:69
uint m_chanid
chanid restriction if applicable
Definition: inputinfo.h:73
uint m_sourceid
associated channel listings source
Definition: inputinfo.h:70
bool m_quickTune
Definition: inputinfo.h:78
uint m_scheduleOrder
Definition: inputinfo.h:76
#define Clear(a)
InputInfo & operator=(const InputInfo &other)
Definition: inputinfo.h:38