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);
const cEvent * GetPresentEvent(void) const
virtual bool EndSegmentTransfer(bool Modified, bool Dummy)
< Called directly after IgnoreChannel() before any other handler method is called.
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)
void IncNumTimers(void) const
static void ResetVersions(void)
static const cSchedules * GetSchedulesRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for read access.
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
static cMutex numTimersMutex
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
void ReportEpgBugFixStats(bool Force)
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 Dump(const cChannels *Channels, FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
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
bool BeginSegmentTransfer(const cChannel *Channel)
virtual bool SetDescription(cEvent *Event, const char *Description)
void ClrRunningStatus(cChannel *Channel=NULL)
virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy)
void SetComponents(cComponents *Components)
void HandleEvent(cEvent *Event)
virtual bool SetComponents(cEvent *Event, cComponents *Components)
cString GetVpsString(void) const
void SetTitle(const char *Title)
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...
bool Modified(int &State) const
static bool Read(FILE *f, cSchedules *Schedules)
tChannelID ChannelID(void) const
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
tEventID EventID(void) const
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...
void SetAux(const char *Aux)
bool FromString(const char *s)
void SetPresentSeen(void)
cEvent * AddEvent(cEvent *Event)
const char * Title(void) const
void SetVps(cEvent *Event, time_t Vps)
bool IgnoreChannel(const cChannel *Channel)
void HashEvent(cEvent *Event)
cString GetEndTimeString(void) const
const cSchedule * GetSchedule(tChannelID ChannelID) const
static cSchedules * GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for write access.
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 DecNumTimers(void) const
void SetRunningStatus(int RunningStatus, const cChannel *Channel=NULL)
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 Read(FILE *f, cSchedule *Schedule, int &Line)
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 char * Aux(void) const
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...
void DecNumTimers(void) const
static cMutex numTimersMutex
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 SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel=NULL)
bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
bool HasTimer(void) const
void UnhashEvent(cEvent *Event)
void EndSegmentTransfer(bool Modified)
uchar Version(void) const
void IncNumTimers(void) const
virtual bool SetEventID(cEvent *Event, tEventID EventID)
const cEvent * GetFollowingEvent(void) const