21 #define MAXEPGBUGFIXLEVEL 3
113 bool IsRunning(
bool OrAboutToStart =
false)
const;
135 void Dump(FILE *f,
const char *Prefix =
"",
bool InfoOnly =
false)
const;
176 void Dump(FILE *f,
const char *Prefix =
"",
eDumpMode DumpMode =
dmAll, time_t AtTime = 0)
const;
206 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);
219 virtual void Action(
void);
const cEvent * GetPresentEvent(void) const
void SetContents(uchar *Contents)
void SetContents(cEvent *Event, uchar *Contents)
virtual bool SortSchedule(cSchedule *Schedule)
Sorts the Schedule after the complete table has been processed.
tComponent * GetComponent(int Index, uchar Stream, uchar Type)
bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version)
time_t EndTime(void) const
void SetComponent(int Index, const char *s)
static void ResetVersions(void)
void SetDescription(cEvent *Event, const char *Description)
void SetStartTime(time_t StartTime)
virtual bool SetContents(cEvent *Event, uchar *Contents)
cSchedule(tChannelID ChannelID)
void SetDuration(int Duration)
void SetTableID(uchar TableID)
tChannelID ChannelID(void) const
virtual bool SetTitle(cEvent *Event, const char *Title)
cString ToDescr(void) const
char language[MAXLANGCODE2]
virtual bool SetDuration(cEvent *Event, int Duration)
virtual bool SetParentalRating(cEvent *Event, int ParentalRating)
static const char * ContentToString(uchar Content)
const cSchedule * Schedule(void) const
cString GetParentalRatingString(void) const
static bool Read(FILE *f, cSchedule *Schedule)
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
void SetParentalRating(cEvent *Event, int ParentalRating)
virtual bool HandleEvent(cEvent *Event)
After all modifications of the Event have been done, the EPG handler can take a final look at it...
void SetTitle(cEvent *Event, const char *Title)
time_t PresentSeen(void) const
void SetEventID(cEvent *Event, tEventID EventID)
cHash< cEvent > eventsHashID
uchar Contents(int i=0) const
tComponent * Component(int Index) const
time_t StartTime(void) const
virtual bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version)
Before the raw EitEvent for the given Schedule is processed, the EPG handlers are queried to see if a...
bool HandledExternally(const cChannel *Channel)
static bool Dump(FILE *f=NULL, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0)
void SetShortText(const char *ShortText)
static void SetEpgDataFileName(const char *FileName)
bool PresentSeenWithin(int Seconds) const
static const cSchedules * Schedules(cSchedulesLock &SchedulesLock)
Caller must provide a cSchedulesLock which has to survive the entire time the returned cSchedules is ...
virtual bool SetDescription(cEvent *Event, const char *Description)
void ClrRunningStatus(cChannel *Channel=NULL)
void SetComponents(cComponents *Components)
void HandleEvent(cEvent *Event)
virtual bool SetComponents(cEvent *Event, cComponents *Components)
cString GetVpsString(void) const
void SetTitle(const char *Title)
virtual bool EndSegmentTransfer(bool Modified, bool OnlyRunningStatus)
Called after the segment data has been processed.
void SetStartTime(cEvent *Event, time_t StartTime)
int ParentalRating(void) const
uchar TableID(void) const
virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
Takes a look at all EPG events between SegmentStart and SegmentEnd and drops outdated events...
static time_t Modified(void)
static bool Read(FILE *f, cSchedules *Schedules)
tChannelID ChannelID(void) const
void SetRunningStatus(int RunningStatus, cChannel *Channel=NULL)
virtual void Action(void)
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
const cEvent * GetEvent(tEventID EventID, time_t StartTime=0) const
const cList< cEvent > * Events(void) const
void SetDuration(cEvent *Event, int Duration)
const cEvent * GetEventAround(time_t Time) const
static bool Read(FILE *f=NULL)
static char * epgDataFileName
virtual bool SetStartTime(cEvent *Event, time_t StartTime)
void FixEpgBugs(cEvent *Event)
static void Cleanup(bool Force=false)
int RunningStatus(void) const
time_t Modified(void) const
tEventID EventID(void) const
void SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel=NULL)
void SortSchedule(cSchedule *Schedule)
virtual bool HandledExternally(const cChannel *Channel)
If any EPG handler returns true in this function, it is assumed that the EPG for the given Channel is...
bool FromString(const char *s)
static void SetModified(cSchedule *Schedule)
void SetPresentSeen(void)
cEvent * AddEvent(cEvent *Event)
const char * Title(void) const
void SetVps(cEvent *Event, time_t Vps)
void BeginSegmentTransfer(const cChannel *Channel, bool OnlyRunningStatus)
bool IgnoreChannel(const cChannel *Channel)
void HashEvent(cEvent *Event)
cString GetEndTimeString(void) const
const cSchedule * GetSchedule(tChannelID ChannelID) const
void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
void SetParentalRating(int ParentalRating)
void SetDescription(const char *Description)
void Dump(FILE *f, const char *Prefix="", bool InfoOnly=false) const
void ReportEpgBugFixStats(bool Force=false)
static cSchedules schedules
cEpgHandler(void)
Constructs a new EPG handler and adds it to the list of EPG handlers.
uchar contents[MaxEventContents]
void DelEvent(cEvent *Event)
virtual bool SetShortText(cEvent *Event, const char *ShortText)
cString GetTimeString(void) const
int NumComponents(void) const
static bool ClearAll(void)
const char * Description(void) const
virtual bool IgnoreChannel(const cChannel *Channel)
Before any EIT data for the given Channel is processed, the EPG handlers are asked whether this Chann...
void SetVersion(uchar Version)
virtual bool SetVps(cEvent *Event, time_t Vps)
cSchedule * AddSchedule(tChannelID ChannelID)
const cComponents * Components(void) const
bool IsRunning(bool OrAboutToStart=false) const
bool SeenWithin(int Seconds) const
virtual bool FixEpgBugs(cEvent *Event)
Fixes some known problems with EPG data.
void SetComponents(cEvent *Event, cComponents *Components)
void SetEventID(tEventID EventID)
virtual bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
VDR can't perform the update check (version, tid) for externally handled events, therefore the EPG ha...
virtual bool BeginSegmentTransfer(const cChannel *Channel, bool OnlyRunningStatus)
Called directly after IgnoreChannel() before any other handler method is called.
cString GetDateString(void) const
cHash< cEvent > eventsHashStartTime
bool HasTimer(void) const
virtual int Compare(const cListObject &ListObject) const
Must return 0 if this object is equal to ListObject, a positive value if it is "greater", and a negative value if it is "smaller".
void SetShortText(cEvent *Event, const char *ShortText)
const char * ShortText(void) const
void Dump(FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
void UnhashEvent(cEvent *Event)
uchar Version(void) const
cSchedulesLock(bool WriteLock=false, int TimeoutMs=0)
void EndSegmentTransfer(bool Modified, bool OnlyRunningStatus)
virtual bool SetEventID(cEvent *Event, tEventID EventID)
const cEvent * GetFollowingEvent(void) const