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