Go to the documentation of this file.
18 #define ISTRANSPONDER(f1, f2) (abs((f1) - (f2)) < 4) //XXX
20 #define CHANNELMOD_NONE 0x00
21 #define CHANNELMOD_ALL 0xFF
22 #define CHANNELMOD_NAME 0x01
23 #define CHANNELMOD_PIDS 0x02
24 #define CHANNELMOD_ID 0x04
25 #define CHANNELMOD_AUX 0x08
26 #define CHANNELMOD_CA 0x10
27 #define CHANNELMOD_TRANSP 0x20
28 #define CHANNELMOD_LANGS 0x40
29 #define CHANNELMOD_RETUNE (CHANNELMOD_PIDS | CHANNELMOD_CA | CHANNELMOD_TRANSP)
31 #define MAXAPIDS 32 // audio
32 #define MAXDPIDS 16 // dolby (AC3 + DTS)
33 #define MAXSPIDS 32 // subtitles
34 #define MAXCAIDS 12 // conditional access
36 #define MAXLANGCODE1 4 // a 3 letter language code, zero terminated
37 #define MAXLANGCODE2 8 // up to two 3 letter language codes, separated by '+' and zero terminated
40 #define CA_DVB_MIN 0x0001
41 #define CA_DVB_MAX 0x000F
42 #define CA_USER_MIN 0x0010
43 #define CA_USER_MAX 0x00FF
44 #define CA_ENCRYPTED_MIN 0x0100
45 #define CA_ENCRYPTED_MAX 0xFFFF
47 #define LCN_OVERFLOW_OFFSET 1024
143 bool Parse(
const char *s);
145 const char *
Name(
void)
const;
146 const char *
ShortName(
bool OrName =
false)
const;
149 int Frequency(
void)
const {
return frequency; }
151 static int Transponder(
int Frequency,
char Polarization);
200 bool SetPids(
int Vpid,
int Ppid,
int Vtype,
int *
Apids,
int *Atypes,
char ALangs[][
MAXLANGCODE2],
int *
Dpids,
int *Dtypes,
char DLangs[][
MAXLANGCODE2],
int *
Spids,
char SLangs[][
MAXLANGCODE2],
int Tpid);
227 static bool Load(
const char *
FileName,
bool AllowComments =
false,
bool MustExist =
false);
255 cChannel *
NewChannel(
const cChannel *Transponder,
const char *Name,
const char *ShortName,
const char *Provider,
int Nid,
int Tid,
int Sid,
int Rid = 0);
267 #define LOCK_CHANNELS_READ USE_LIST_LOCK_READ(Channels)
268 #define LOCK_CHANNELS_WRITE USE_LIST_LOCK_WRITE(Channels)
272 #endif //__CHANNELS_H
bool SwitchTo(int Number) const
const int * Caids(void) const
const char * PortalName(void) const
bool ModifiedByUser(int &State) const
Returns true if the channels have been modified by the user since the last call to this function with...
cChannel & operator=(const cChannel &Channel)
void DelLinkChannel(cChannel *LinkChannel)
const char * Provider(void) const
void ReNumber(void)
Recalculate 'number' based on channel type.
bool SetName(const char *Name, const char *ShortName, const char *Provider)
bool SetCaIds(const int *CaIds)
tChannelID & ClrPolarization(void)
const char * Name(void) const
uchar SubtitlingType(int i) const
const char * Parameters(void) const
bool SetPids(int Vpid, int Ppid, int Vtype, int *Apids, int *Atypes, char ALangs[][MAXLANGCODE2], int *Dpids, int *Dtypes, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid)
void SetNumber(int Number)
cString TransponderDataToString(void) const
const char * Alang(int i) const
cChannel * GetByNumber(int Number, int SkipGap=0)
cHash< cChannel > channelsHashSid
const cLinkChannels * LinkChannels(void) const
const cChannel * RefChannel(void) const
int GetNextNormal(int Idx) const
Get next normal channel (not group)
void HashChannel(cChannel *Channel)
void CopyTransponderData(const cChannel *Channel)
bool operator==(const tChannelID &arg) const
void SetModifiedByUser(void)
const cChannel * GetByNumber(int Number, int SkipGap=0) const
const char * FileName(void)
static int MaxShortChannelNameLength(void)
static int maxShortChannelNameLength
const cSchedule * schedule
int nid
actually the "original" network id
static cChannels * GetChannelsWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for write access.
uint16_t AncillaryPageId(int i) const
bool SetId(cChannels *Channels, int Nid, int Tid, int Sid, int Rid=0)
int GetPrevGroup(int Idx) const
Get previous channel group.
bool SetLinkChannels(cLinkChannels *LinkChannels)
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
int Modification(int Mask=CHANNELMOD_ALL) const
int GetPrevNormal(int Idx) const
Get previous normal channel (not group)
cString ChannelString(const cChannel *Channel, int Number)
static int MaxChannelNameLength(void)
const int * Dpids(void) const
bool SetTransponderData(int Source, int Frequency, int Srate, const char *Parameters, bool Quiet=false)
static int MaxNumber(void)
bool MarkObsoleteChannels(int Source, int Nid, int Tid)
tChannelID(int Source, int Nid, int Tid, int Sid, int Rid=0)
const char * Dlang(int i) const
static bool IsCable(int Code)
const cChannel * GetByTransponderID(tChannelID ChannelID) const
bool IsSourceType(char Source) const
cString ToString(void) const
const cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false) const
bool SetPortalName(const char *PortalName)
bool Parse(const char *s)
void Del(cChannel *Channel)
Delete the given Channel from the list.
cString ToText(void) const
bool GroupSep(void) const
uint16_t CompositionPageId(int i) const
cChannel * NewChannel(const cChannel *Transponder, const char *Name, const char *ShortName, const char *Provider, int Nid, int Tid, int Sid, int Rid=0)
static cChannels channels
cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false)
bool HasUniqueChannelID(const cChannel *NewChannel, const cChannel *OldChannel=NULL) const
static const tChannelID InvalidID
uint16_t compositionPageIds[MAXSPIDS]
static bool IsTerr(int Code)
void DeleteDuplicateChannels(void)
static bool Load(const char *FileName, bool AllowComments=false, bool MustExist=false)
const char * Slang(int i) const
char dlangs[MAXDPIDS][MAXLANGCODE2]
char slangs[MAXSPIDS][MAXLANGCODE2]
cLinkChannels * linkChannels
int GetNextGroup(int Idx) const
Get next channel group.
cLinkChannel(cChannel *Channel)
static bool IsType(int Code, char Source)
int Ca(int Index=0) const
static bool IsAtsc(int Code)
char alangs[MAXAPIDS][MAXLANGCODE2]
void SetRefChannel(cChannel *RefChannel)
tChannelID GetChannelID(void) const
bool SetSubtitlingDescriptors(uchar *SubtitlingTypes, uint16_t *CompositionPageIds, uint16_t *AncillaryPageIds)
static const cChannels * GetChannelsRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for read access.
bool SetCaDescriptors(int Level)
const char * ShortName(bool OrName=false) const
const int * Spids(void) const
bool SetSource(int Source)
static bool IsSat(int Code)
uchar subtitlingTypes[MAXSPIDS]
void UnhashChannel(cChannel *Channel)
static tChannelID FromString(const char *s)
cChannel * GetByTransponderID(tChannelID ChannelID)
tChannelID & ClrRid(void)
cChannel * GetByServiceID(int Source, int Transponder, unsigned short ServiceID)
uint16_t ancillaryPageIds[MAXSPIDS]
const cChannel * GetByServiceID(int Source, int Transponder, unsigned short ServiceID) const
const int * Apids(void) const
static int maxChannelNameLength