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;
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
const cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false) const
bool SetName(const char *Name, const char *ShortName, const char *Provider)
static const cChannels * GetChannelsRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for read access.
cString TransponderDataToString(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)
static tChannelID FromString(const char *s)
const char * Provider(void) const
bool SetPortalName(const char *PortalName)
const int * Caids(void) const
void SetNumber(int Number)
static int MaxShortChannelNameLength(void)
void CopyTransponderData(const cChannel *Channel)
uint16_t compositionPageIds[MAXSPIDS]
uint16_t ancillaryPageIds[MAXSPIDS]
static bool IsTerr(int Code)
static int maxChannelNameLength
const char * Alang(int i) const
uchar subtitlingTypes[MAXSPIDS]
const cLinkChannels * LinkChannels(void) const
bool operator==(const tChannelID &arg) const
bool SetId(cChannels *Channels, int Nid, int Tid, int Sid, int Rid=0)
cChannel & operator=(const cChannel &Channel)
tChannelID & ClrPolarization(void)
const char * Slang(int i) const
cChannel * GetByTransponderID(tChannelID ChannelID)
void ReNumber(void)
Recalculate 'number' based on channel type.
const int * Spids(void) const
static int MaxChannelNameLength(void)
int nid
actually the "original" network id
const char * Dlang(int i) const
int Ca(int Index=0) const
const cSchedule * schedule
static int MaxNumber(void)
const char * FileName(void)
const char * PortalName(void) const
static int maxShortChannelNameLength
const int * Apids(void) const
static bool Load(const char *FileName, bool AllowComments=false, bool MustExist=false)
bool SetTransponderData(int Source, int Frequency, int Srate, const char *Parameters, bool Quiet=false)
static cChannels * GetChannelsWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for write access.
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false)
cChannel * GetByNumber(int Number, int SkipGap=0)
static cChannels channels
void Del(cChannel *Channel)
Delete the given Channel from the list.
cChannel * NewChannel(const cChannel *Transponder, const char *Name, const char *ShortName, const char *Provider, int Nid, int Tid, int Sid, int Rid=0)
const int * Dpids(void) const
cChannel * GetByServiceID(int Source, int Transponder, unsigned short ServiceID)
bool HasUniqueChannelID(const cChannel *NewChannel, const cChannel *OldChannel=NULL) const
char alangs[MAXAPIDS][MAXLANGCODE2]
bool Parse(const char *s)
cString ToString(void) const
static bool IsAtsc(int Code)
tChannelID(int Source, int Nid, int Tid, int Sid, int Rid=0)
bool GroupSep(void) const
const cChannel * RefChannel(void) const
char dlangs[MAXDPIDS][MAXLANGCODE2]
static bool IsSat(int Code)
void DelLinkChannel(cChannel *LinkChannel)
const cChannel * GetByNumber(int Number, int SkipGap=0) const
bool SetSubtitlingDescriptors(uchar *SubtitlingTypes, uint16_t *CompositionPageIds, uint16_t *AncillaryPageIds)
uint16_t CompositionPageId(int i) const
const char * Name(void) const
int GetNextNormal(int Idx) const
Get next normal channel (not group)
uchar SubtitlingType(int i) const
static bool IsType(int Code, char Source)
bool ModifiedByUser(int &State) const
Returns true if the channels have been modified by the user since the last call to this function with...
void SetRefChannel(cChannel *RefChannel)
int Modification(int Mask=CHANNELMOD_ALL) const
cString ChannelString(const cChannel *Channel, int Number)
bool IsSourceType(char Source) const
void DeleteDuplicateChannels(void)
tChannelID GetChannelID(void) const
int Frequency(void) const
Returns the actual frequency, as given in 'channels.conf'.
static bool IsCable(int Code)
bool SetLinkChannels(cLinkChannels *LinkChannels)
char slangs[MAXSPIDS][MAXLANGCODE2]
bool SetSource(int Source)
cHash< cChannel > channelsHashSid
uint16_t AncillaryPageId(int i) const
static const tChannelID InvalidID
const cChannel * GetByServiceID(int Source, int Transponder, unsigned short ServiceID) const
void UnhashChannel(cChannel *Channel)
cString ToText(void) const
int GetNextGroup(int Idx) const
Get next channel group.
bool SwitchTo(int Number) const
bool SetCaIds(const int *CaIds)
const char * ShortName(bool OrName=false) const
cLinkChannel(cChannel *Channel)
const char * Parameters(void) const
bool MarkObsoleteChannels(int Source, int Nid, int Tid)
tChannelID & ClrRid(void)
cLinkChannels * linkChannels
int GetPrevNormal(int Idx) const
Get previous normal channel (not group)
const cChannel * GetByTransponderID(tChannelID ChannelID) const
void SetModifiedByUser(void)
void HashChannel(cChannel *Channel)
int GetPrevGroup(int Idx) const
Get previous channel group.
bool SetCaDescriptors(int Level)