Go to the documentation of this file.
21 #define MAXEPGBUGFIXLEVEL 3
115 const char *
Aux(
void)
const {
return aux; }
119 bool IsRunning(
bool OrAboutToStart =
false)
const;
142 void Dump(FILE *f,
const char *Prefix =
"",
bool InfoOnly =
false)
const;
207 static void Cleanup(
bool Force =
false);
209 static bool Dump(FILE *f = NULL,
const char *Prefix =
"",
eDumpMode DumpMode =
dmAll, time_t AtTime = 0);
210 static bool Read(FILE *f = NULL);
224 #define LOCK_SCHEDULES_READ USE_LIST_LOCK_READ(Schedules);
225 #define LOCK_SCHEDULES_WRITE USE_LIST_LOCK_WRITE(Schedules);
230 virtual void Action(
void);
247 virtual bool IgnoreChannel(
const cChannel *Channel) {
return false; }
257 virtual bool HandledExternally(
const cChannel *Channel) {
return false; }
263 virtual bool IsUpdate(
tEventID EventID, time_t StartTime,
uchar TableID,
uchar Version) {
return false; }
277 virtual bool FixEpgBugs(
cEvent *Event) {
return false; }
279 virtual bool HandleEvent(
cEvent *Event) {
return false; }
282 virtual bool SortSchedule(
cSchedule *Schedule) {
return false; }
284 virtual bool DropOutdated(
cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd,
uchar TableID,
uchar Version) {
return false; }
bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version)
tComponent * GetComponent(int Index, uchar Stream, uchar Type)
void UnhashEvent(cEvent *Event)
cHash< cEvent > eventsHashStartTime
char language[MAXLANGCODE2]
void SetEventID(tEventID EventID)
static bool Dump(FILE *f=NULL, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0)
int ParentalRating(void) const
void SortSchedule(cSchedule *Schedule)
virtual bool SetTitle(cEvent *Event, const char *Title)
void IncNumTimers(void) const
void DecNumTimers(void) const
virtual bool SetParentalRating(cEvent *Event, int ParentalRating)
static cSchedules schedules
uchar TableID(void) const
bool HasTimer(void) const
static const cSchedules * GetSchedulesRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for read access.
const char * Aux(void) const
const cEvent * GetEventAround(time_t Time) const
const cComponents * Components(void) const
void SetParentalRating(int ParentalRating)
void SetContents(cEvent *Event, uchar *Contents)
virtual bool SetContents(cEvent *Event, uchar *Contents)
bool PresentSeenWithin(int Seconds) const
void SetRunningStatus(int RunningStatus, const cChannel *Channel=NULL)
bool SeenWithin(int Seconds) const
void Dump(FILE *f, const char *Prefix="", bool InfoOnly=false) const
uchar Contents(int i=0) const
bool IgnoreChannel(const cChannel *Channel)
cSchedule(tChannelID ChannelID)
static bool Read(FILE *f, cSchedule *Schedule, int &Line)
void SetComponent(int Index, const char *s)
const cEvent * GetPresentEvent(void) const
const char * Title(void) const
void ReportEpgBugFixStats(bool Force=false)
void SetTableID(uchar TableID)
uchar contents[MaxEventContents]
void SetEventID(cEvent *Event, tEventID EventID)
const cSchedule * Schedule(void) const
int NumComponents(void) const
void SetDescription(const char *Description)
static void Cleanup(bool Force=false)
virtual bool SetDescription(cEvent *Event, const char *Description)
virtual bool SetDuration(cEvent *Event, int Duration)
virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy)
time_t EndTime(void) const
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
virtual void Action(void)
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
time_t PresentSeen(void) const
const cSchedule * GetSchedule(tChannelID ChannelID) const
virtual int Compare(const cListObject &ListObject) const
cString ToDescr(void) const
void SetVersion(uchar Version)
const cList< cEvent > * Events(void) const
bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
tChannelID ChannelID(void) const
virtual bool SetComponents(cEvent *Event, cComponents *Components)
void Dump(const cChannels *Channels, FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
static void ResetVersions(void)
void SetAux(const char *Aux)
tChannelID ChannelID(void) const
void SetDuration(cEvent *Event, int Duration)
void DelEvent(cEvent *Event)
void FixEpgBugs(cEvent *Event)
void SetPresentSeen(void)
void EndSegmentTransfer(bool Modified)
static bool Read(FILE *f=NULL)
void SetStartTime(time_t StartTime)
cHash< cEvent > eventsHashID
bool FromString(const char *s)
void SetContents(uchar *Contents)
void SetTitle(const char *Title)
time_t StartTime(void) const
static cSchedules * GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for write access.
void SetVps(cEvent *Event, time_t Vps)
cString GetParentalRatingString(void) const
static const char * ContentToString(uchar Content)
void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel=NULL)
void IncNumTimers(void) const
cEpgHandler(void)
Constructs a new EPG handler and adds it to the list of EPG handlers.
static cMutex numTimersMutex
void SetDescription(cEvent *Event, const char *Description)
uchar Version(void) const
static char * epgDataFileName
cString GetTimeString(void) const
static void SetEpgDataFileName(const char *FileName)
const cEvent * GetEvent(tEventID EventID, time_t StartTime=0) const
const cEvent * GetFollowingEvent(void) const
virtual bool SetStartTime(cEvent *Event, time_t StartTime)
cString GetVpsString(void) const
bool HasTimer(void) const
void HashEvent(cEvent *Event)
void SetTitle(cEvent *Event, const char *Title)
virtual bool SetShortText(cEvent *Event, const char *ShortText)
cEvent * AddEvent(cEvent *Event)
static cMutex numTimersMutex
void SetParentalRating(cEvent *Event, int ParentalRating)
void SetShortText(const char *ShortText)
const char * Description(void) const
cSchedule * AddSchedule(tChannelID ChannelID)
cString GetDateString(void) const
bool BeginSegmentTransfer(const cChannel *Channel)
void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
void SetShortText(cEvent *Event, const char *ShortText)
cString GetEndTimeString(void) const
virtual bool SetEventID(cEvent *Event, tEventID EventID)
tComponent * Component(int Index) const
int RunningStatus(void) const
bool IsRunning(bool OrAboutToStart=false) const
void ClrRunningStatus(cChannel *Channel=NULL)
virtual bool SetVps(cEvent *Event, time_t Vps)
bool HandledExternally(const cChannel *Channel)
void SetStartTime(cEvent *Event, time_t StartTime)
void SetComponents(cComponents *Components)
@ ecgSocialPoliticalEconomics
bool Modified(int &State) const
void DecNumTimers(void) const
void SetDuration(int Duration)
void HandleEvent(cEvent *Event)
const char * ShortText(void) const
virtual bool EndSegmentTransfer(bool Modified, bool Dummy)
< Called directly after IgnoreChannel() before any other handler method is called.
tEventID EventID(void) const
static bool Read(FILE *f, cSchedules *Schedules)
void SetComponents(cEvent *Event, cComponents *Components)