21 #define MAXEPGBUGFIXLEVEL 3
23 #define EPG_LINGER_TIME (max(Setup.EPGLinger, 180) * 60)
117 const char *
Aux(
void)
const {
return aux; }
121 bool IsRunning(
bool OrAboutToStart =
false)
const;
144 void Dump(FILE *f,
const char *Prefix =
"",
bool InfoOnly =
false)
const;
190 #define DEPRECATED_SCHEDULE_GET_EVENT 1
191 #if DEPRECATED_SCHEDULE_GET_EVENT
216 static void Cleanup(
bool Force =
false);
218 static bool Dump(FILE *f = NULL,
const char *Prefix =
"",
eDumpMode DumpMode =
dmAll, time_t AtTime = 0);
219 static bool Read(FILE *f = NULL);
233 #define LOCK_SCHEDULES_READ USE_LIST_LOCK_READ(Schedules);
234 #define LOCK_SCHEDULES_WRITE USE_LIST_LOCK_WRITE(Schedules);
239 virtual void Action(
void);
tComponent * Component(int Index) const
tComponent * GetComponent(int Index, uchar Stream, uchar Type)
int NumComponents(void) const
void SetComponent(int Index, const char *s)
virtual void Action(void)
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
virtual bool SetTitle(cEvent *Event, const char *Title)
virtual bool SetVps(cEvent *Event, time_t Vps)
virtual bool FixEpgBugs(cEvent *Event)
Fixes some known problems with EPG data.
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 SetParentalRating(cEvent *Event, int ParentalRating)
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...
virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy)
virtual bool SetEventID(cEvent *Event, tEventID EventID)
Important note: if you want VPS to work, do not mess with the event ids!
virtual bool SetComponents(cEvent *Event, cComponents *Components)
virtual bool IgnoreChannel(const cChannel *Channel)
Before any EIT data for the given Channel is processed, the EPG handlers are asked whether this Chann...
cEpgHandler(void)
Constructs a new EPG handler and adds it to the list of EPG handlers.
virtual bool EndSegmentTransfer(bool Modified, bool Dummy)
< Called directly after IgnoreChannel() before any other handler method is called.
virtual bool HandleEvent(cEvent *Event)
After all modifications of the Event have been done, the EPG handler can take a final look at it.
virtual bool SetContents(cEvent *Event, uchar *Contents)
virtual bool SetDescription(cEvent *Event, const char *Description)
virtual bool SortSchedule(cSchedule *Schedule)
Sorts the Schedule after the complete table has been processed.
virtual bool SetStartTime(cEvent *Event, time_t StartTime)
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.
virtual bool SetDuration(cEvent *Event, int Duration)
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...
virtual bool SetShortText(cEvent *Event, const char *ShortText)
void SortSchedule(cSchedule *Schedule)
void EndSegmentTransfer(bool Modified)
bool IgnoreChannel(const cChannel *Channel)
bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version)
void SetStartTime(cEvent *Event, time_t StartTime)
void SetTitle(cEvent *Event, const char *Title)
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
void FixEpgBugs(cEvent *Event)
void HandleEvent(cEvent *Event)
void SetComponents(cEvent *Event, cComponents *Components)
void SetVps(cEvent *Event, time_t Vps)
void SetParentalRating(cEvent *Event, int ParentalRating)
bool BeginSegmentTransfer(const cChannel *Channel)
bool HandledExternally(const cChannel *Channel)
void SetContents(cEvent *Event, uchar *Contents)
void SetShortText(cEvent *Event, const char *ShortText)
void SetDuration(cEvent *Event, int Duration)
void SetDescription(cEvent *Event, const char *Description)
void SetEventID(cEvent *Event, tEventID EventID)
cString ToDescr(void) const
static const char * ContentToString(uchar Content)
uchar TableID(void) const
void SetAux(const char *Aux)
const char * Aux(void) const
time_t EndTime(void) const
static cMutex numTimersMutex
cString GetDateString(void) const
int RunningStatus(void) const
uchar Contents(int i=0) const
bool IsRunning(bool OrAboutToStart=false) const
void SetRunningStatus(int RunningStatus, const cChannel *Channel=NULL)
void IncNumTimers(void) const
int ParentalRating(void) const
time_t StartTime(void) const
tChannelID ChannelID(void) const
bool SeenWithin(int Seconds) const
static bool Read(FILE *f, cSchedule *Schedule, int &Line)
void SetShortText(const char *ShortText)
cString GetTimeString(void) const
const cComponents * Components(void) const
void DecNumTimers(void) const
tEventID EventID(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",...
void SetStartTime(time_t StartTime)
bool HasTimer(void) const
const char * Title(void) const
void SetComponents(cComponents *Components)
void SetEventID(tEventID EventID)
const cSchedule * Schedule(void) const
cString GetEndTimeString(void) const
cString GetVpsString(void) const
void SetVersion(uchar Version)
void Dump(FILE *f, const char *Prefix="", bool InfoOnly=false) const
void SetDuration(int Duration)
void SetContents(uchar *Contents)
uchar Version(void) const
const char * ShortText(void) const
void SetTitle(const char *Title)
void SetTableID(uchar TableID)
uchar contents[MaxEventContents]
cString GetParentalRatingString(void) const
void SetDescription(const char *Description)
const char * Description(void) const
void SetParentalRating(int ParentalRating)
const cEvent * GetPresentEvent(void) const
cHash< cEvent > eventsHashID
bool Modified(int &State) const
bool HasTimer(void) const
void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel=NULL)
void UnhashEvent(cEvent *Event)
const cEvent * GetEventAround(time_t Time) const
const cEvent * GetEventByTime(time_t StartTime) const
void DecNumTimers(void) const
const cList< cEvent > * Events(void) const
const cEvent * GetEvent(tEventID EventID, time_t StartTime=0) const
bool OnActualTp(uchar TableId)
void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
static bool Read(FILE *f, cSchedules *Schedules)
cSchedule(tChannelID ChannelID)
void SetPresentSeen(void)
static cMutex numTimersMutex
bool PresentSeenWithin(int Seconds) const
void ClrRunningStatus(cChannel *Channel=NULL)
time_t PresentSeen(void) const
const cEvent * GetEventById(tEventID EventID) const
void DelEvent(cEvent *Event)
void HashEvent(cEvent *Event)
tChannelID ChannelID(void) const
cHash< cEvent > eventsHashStartTime
void IncNumTimers(void) const
cEvent * AddEvent(cEvent *Event)
void Dump(const cChannels *Channels, FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
const cEvent * GetFollowingEvent(void) const
static cSchedules * GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for write access.
const cSchedule * GetSchedule(tChannelID ChannelID) const
static const cSchedules * GetSchedulesRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for read access.
static bool Dump(FILE *f=NULL, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0)
static void SetEpgDataFileName(const char *FileName)
static void Cleanup(bool Force=false)
static char * epgDataFileName
static void ResetVersions(void)
cSchedule * AddSchedule(tChannelID ChannelID)
static bool Read(FILE *f=NULL)
static cSchedules schedules
void ReportEpgBugFixStats(bool Force=false)
@ ecgSocialPoliticalEconomics
bool FromString(const char *s)
char language[MAXLANGCODE2]