00001
00002 #ifndef _INPUTINFO_H_
00003 #define _INPUTINFO_H_
00004
00005
00006 #include <QStringList>
00007 #include <QMap>
00008
00009
00010 #include "channelutil.h"
00011
00012 class MTV_PUBLIC InputInfo
00013 {
00014 public:
00015 InputInfo() : name(QString::null),
00016 sourceid(0), inputid(0), cardid(0), mplexid(0),
00017 livetvorder(0) {}
00018 InputInfo(const QString &name,
00019 uint sourceid, uint inputid, uint cardid, uint mplexid,
00020 uint livetvorder);
00021 InputInfo(const InputInfo &other);
00022 InputInfo &operator=(const InputInfo &other);
00023 virtual ~InputInfo() {}
00024
00025 virtual bool FromStringList(QStringList::const_iterator &it,
00026 QStringList::const_iterator end);
00027 virtual void ToStringList(QStringList &list) const;
00028
00029 virtual void Clear(void);
00030 virtual bool IsEmpty(void) const { return name.isEmpty(); }
00031
00032 bool operator == (uint _inputid) const
00033 { return inputid == _inputid; }
00034
00035 bool operator == (const QString &_name) const
00036 { return name == _name; }
00037
00038 public:
00039 QString name;
00040 uint sourceid;
00041 uint inputid;
00042 uint cardid;
00043 uint mplexid;
00044 uint livetvorder;
00045 };
00046
00047 class MTV_PUBLIC TunedInputInfo : public InputInfo
00048 {
00049 public:
00050 TunedInputInfo() : chanid(0) { }
00051 TunedInputInfo(const QString &name,
00052 uint _sourceid, uint _inputid,
00053 uint _cardid, uint _mplexid, uint _livetvorder,
00054 uint _chanid);
00055 TunedInputInfo(const TunedInputInfo &other);
00056 TunedInputInfo &operator=(const TunedInputInfo &other);
00057 virtual ~TunedInputInfo() {}
00058
00059 virtual bool FromStringList(QStringList::const_iterator &it,
00060 QStringList::const_iterator end);
00061 virtual void ToStringList(QStringList &list) const;
00062
00063 virtual void Clear(void);
00064
00065 public:
00066 uint chanid;
00067 };
00068
00069 class MTV_PUBLIC ChannelInputInfo : public InputInfo
00070 {
00071 public:
00072 ChannelInputInfo() :
00073 startChanNum(QString::null), tuneToChannel(QString::null),
00074 externalChanger(QString::null),
00075 inputNumV4L(-1),
00076 videoModeV4L1(0), videoModeV4L2(0) {}
00077 ChannelInputInfo(QString _name, QString _startChanNum,
00078 QString _tuneToChannel, QString _externalChanger,
00079 uint _sourceid, uint _cardid,
00080 uint _inputid, uint _mplexid,
00081 uint _livetvorder,
00082 const DBChanList &_channels) :
00083 InputInfo(_name, _sourceid, _inputid, _cardid, _mplexid, _livetvorder),
00084 startChanNum(_startChanNum),
00085 tuneToChannel(_tuneToChannel), externalChanger(_externalChanger),
00086 channels(_channels),
00087 inputNumV4L(-1),
00088 videoModeV4L1(0), videoModeV4L2(0) {}
00089 ChannelInputInfo(const ChannelInputInfo &other);
00090 ChannelInputInfo &operator=(const ChannelInputInfo &other);
00091 virtual ~ChannelInputInfo() {}
00092
00093 virtual void Clear(void);
00094
00095 public:
00096 QString startChanNum;
00097 QString tuneToChannel;
00098 QString externalChanger;
00099 DBChanList channels;
00100 vector<uint> groups;
00101 int inputNumV4L;
00102 int videoModeV4L1;
00103 int videoModeV4L2;
00104 };
00105 typedef QMap<uint, ChannelInputInfo*> InputMap;
00106
00107 #endif // _INPUTINFO_H_