summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/channels.h b/channels.h
index 7eb818c3..52e79b4d 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.3 2002/10/20 11:50:36 kls Exp $
+ * $Id: channels.h 1.4 2002/11/10 13:01:23 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -41,6 +41,7 @@ private:
static char *buffer;
static const char *ToText(cChannel *Channel);
enum { MaxChannelName = 32 }; // 31 chars + terminating 0!
+ int __BeginData__;
char name[MaxChannelName];
int frequency; // MHz
int source;
@@ -53,7 +54,6 @@ private:
int sid;
int number; // Sequence number assigned on load
bool groupSep;
- //XXX
char polarization;
int inversion;
int bandwidth;
@@ -63,13 +63,14 @@ private:
int transmission;
int guard;
int hierarchy;
+ int __EndData__;
const char *ParametersToString(void);
bool StringToParameters(const char *s);
public:
cChannel(void);
- cChannel(const cChannel *Channel);
+ cChannel& operator= (const cChannel &Channel);
const char *ToText(void);
- bool Parse(const char *s);
+ bool Parse(const char *s, bool AllowNonUniqueID = false);
bool Save(FILE *f);
const char *Name(void) const { return name; }
int Frequency(void) const { return frequency; }
@@ -86,7 +87,6 @@ public:
int Number(void) const { return number; }
void SetNumber(int Number) { number = Number; }
bool GroupSep(void) const { return groupSep; }
- //XXX
char Polarization(void) const { return polarization; }
int Inversion(void) const { return inversion; }
int Bandwidth(void) const { return bandwidth; }
@@ -96,10 +96,12 @@ public:
int Transmission(void) const { return transmission; }
int Guard(void) const { return guard; }
int Hierarchy(void) const { return hierarchy; }
- //XXX
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);
};
class cChannels : public cConfig<cChannel> {
@@ -113,7 +115,9 @@ public:
int GetNextNormal(int Idx); // Get next normal channel (not group)
void ReNumber(void); // Recalculate 'number' based on channel type
cChannel *GetByNumber(int Number, int SkipGap = 0);
- cChannel *GetByServiceID(unsigned short ServiceId);
+ cChannel *GetByServiceID(int Source, unsigned short ServiceID);
+ cChannel *GetByChannelID(uint64 ChannelID);
+ bool HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel = NULL);
bool SwitchTo(int Number);
int MaxNumber(void) { return maxNumber; }
};