summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-11-24 14:48:38 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-11-24 14:48:38 +0100
commit82ccabff8a06c79fe282c63ab9e4d8cb033ac44a (patch)
treed8fe05d62a0e68def27da2582b825c7a1f10655d /channels.h
parent08e4f36ccdee163b6925f09f591fbc8ce8c2611b (diff)
downloadvdr-82ccabff8a06c79fe282c63ab9e4d8cb033ac44a.tar.gz
vdr-82ccabff8a06c79fe282c63ab9e4d8cb033ac44a.tar.bz2
Added NID, TID and RID to the channel definitions
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/channels.h b/channels.h
index 52e79b4d..0f6feb10 100644
--- a/channels.h
+++ b/channels.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.h 1.4 2002/11/10 13:01:23 kls Exp $
+ * $Id: channels.h 1.5 2002/11/24 14:27:51 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -35,6 +35,24 @@ extern const tChannelParameterMap TransmissionValues[];
extern const tChannelParameterMap GuardValues[];
extern const tChannelParameterMap HierarchyValues[];
+struct tChannelID {
+private:
+ int source;
+ int nid;
+ int tid;
+ int sid;
+ int rid;
+public:
+ tChannelID(void) { source = nid = tid = sid = rid = 0; }
+ tChannelID(int Source, int Nid, int Tid, int Sid, int Rid = 0) { source = Source; nid = Nid; tid = Tid; sid = Sid; rid = Rid; }
+ bool operator== (const tChannelID &arg) const;
+ bool Valid(void) { return source && tid && sid; } // nid and rid are optional
+ tChannelID &ClrRid(void) { rid = 0; return *this; }
+ static tChannelID FromString(const char *s);
+ const char *ToString(void);
+ static const tChannelID InvalidID;
+ };
+
class cChannel : public cListObject {
friend class cMenuEditChannel;
private:
@@ -51,7 +69,10 @@ private:
int dpid1, dpid2;
int tpid;
int ca;
+ int nid;
+ int tid;
int sid;
+ int rid;
int number; // Sequence number assigned on load
bool groupSep;
char polarization;
@@ -99,9 +120,7 @@ public:
bool IsCable(void) { return (source & cSource::st_Mask) == cSource::stCable; }
bool IsSat(void) { return (source & cSource::st_Mask) == cSource::stSat; }
bool IsTerr(void) { return (source & cSource::st_Mask) == cSource::stTerr; }
- uint64 GetChannelID(void) const;
- const char *GetChannelIDStr(void) const;
- static uint64 StringToChannelID(const char *s);
+ tChannelID GetChannelID(void) const;
};
class cChannels : public cConfig<cChannel> {
@@ -116,7 +135,7 @@ public:
void ReNumber(void); // Recalculate 'number' based on channel type
cChannel *GetByNumber(int Number, int SkipGap = 0);
cChannel *GetByServiceID(int Source, unsigned short ServiceID);
- cChannel *GetByChannelID(uint64 ChannelID);
+ cChannel *GetByChannelID(tChannelID ChannelID, bool TryWithoutRid = false);
bool HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel = NULL);
bool SwitchTo(int Number);
int MaxNumber(void) { return maxNumber; }