vdr  2.4.0
epg.h
Go to the documentation of this file.
1 /*
2  * epg.h: Electronic Program Guide
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * Original version (as used in VDR before 1.3.0) written by
8  * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
9  *
10  * $Id: epg.h 4.7 2017/05/28 12:59:20 kls Exp $
11  */
12 
13 #ifndef __EPG_H
14 #define __EPG_H
15 
16 #include "channels.h"
17 #include "libsi/section.h"
18 #include "thread.h"
19 #include "tools.h"
20 
21 #define MAXEPGBUGFIXLEVEL 3
22 
23 enum { MaxEventContents = 4 };
24 
26  ecgMovieDrama = 0x10,
28  ecgShow = 0x30,
29  ecgSports = 0x40,
36  ecgSpecial = 0xB0,
38  };
39 
41 
42 struct tComponent {
46  char *description;
47  cString ToString(void);
48  bool FromString(const char *s);
49  };
50 
51 class cComponents {
52 private:
55  bool Realloc(int Index);
56 public:
57  cComponents(void);
58  ~cComponents(void);
59  int NumComponents(void) const { return numComponents; }
60  void SetComponent(int Index, const char *s);
61  void SetComponent(int Index, uchar Stream, uchar Type, const char *Language, const char *Description);
62  tComponent *Component(int Index) const { return (Index < numComponents) ? &components[Index] : NULL; }
63  tComponent *GetComponent(int Index, uchar Stream, uchar Type); // Gets the Index'th component of Stream and Type, skipping other components
64  // In case of an audio stream the 'type' check actually just distinguishes between "normal" and "Dolby Digital"
65  };
66 
67 class cSchedule;
68 
69 typedef u_int32_t tEventID;
70 
71 class cEvent : public cListObject {
72  friend class cSchedule;
73 private:
74  static cMutex numTimersMutex; // Protects numTimers, because it might be accessed from parallel read locks
75  // The sequence of these parameters is optimized for minimal memory waste!
76  cSchedule *schedule; // The Schedule this event belongs to
77  mutable u_int16_t numTimers;// The number of timers that use this event
78  tEventID eventID; // Event ID of this event
79  uchar tableID; // Table ID this event came from
80  uchar version; // Version number of section this event came from
81  uchar runningStatus; // 0=undefined, 1=not running, 2=starts in a few seconds, 3=pausing, 4=running
82  uchar parentalRating; // Parental rating of this event
83  char *title; // Title of this event
84  char *shortText; // Short description of this event (typically the episode name in case of a series)
85  char *description; // Description of this event
86  cComponents *components; // The stream components of this event
87  time_t startTime; // Start time of this event
88  int duration; // Duration of this event in seconds
89  uchar contents[MaxEventContents]; // Contents of this event
90  time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL)
91  time_t seen; // When this event was last seen in the data stream
92  char *aux; // Auxiliary data, for use with plugins
93 public:
95  ~cEvent();
96  virtual int Compare(const cListObject &ListObject) const;
97  tChannelID ChannelID(void) const;
98  const cSchedule *Schedule(void) const { return schedule; }
99  tEventID EventID(void) const { return eventID; }
100  uchar TableID(void) const { return tableID; }
101  uchar Version(void) const { return version; }
102  int RunningStatus(void) const { return runningStatus; }
103  const char *Title(void) const { return title; }
104  const char *ShortText(void) const { return shortText; }
105  const char *Description(void) const { return description; }
106  const cComponents *Components(void) const { return components; }
107  uchar Contents(int i = 0) const { return (0 <= i && i < MaxEventContents) ? contents[i] : uchar(0); }
108  int ParentalRating(void) const { return parentalRating; }
109  time_t StartTime(void) const { return startTime; }
110  time_t EndTime(void) const { return startTime + duration; }
111  int Duration(void) const { return duration; }
112  time_t Vps(void) const { return vps; }
113  time_t Seen(void) const { return seen; }
114  bool SeenWithin(int Seconds) const { return time(NULL) - seen < Seconds; }
115  const char *Aux(void) const { return aux; }
116  void IncNumTimers(void) const;
117  void DecNumTimers(void) const;
118  bool HasTimer(void) const { return numTimers > 0; }
119  bool IsRunning(bool OrAboutToStart = false) const;
120  static const char *ContentToString(uchar Content);
121  cString GetParentalRatingString(void) const;
122  cString GetDateString(void) const;
123  cString GetTimeString(void) const;
124  cString GetEndTimeString(void) const;
125  cString GetVpsString(void) const;
127  void SetTableID(uchar TableID);
128  void SetVersion(uchar Version);
129  void SetRunningStatus(int RunningStatus, const cChannel *Channel = NULL);
130  void SetTitle(const char *Title);
131  void SetShortText(const char *ShortText);
132  void SetDescription(const char *Description);
133  void SetComponents(cComponents *Components); // Will take ownership of Components!
134  void SetContents(uchar *Contents);
136  void SetStartTime(time_t StartTime);
137  void SetDuration(int Duration);
138  void SetVps(time_t Vps);
139  void SetSeen(void);
140  void SetAux(const char *Aux);
141  cString ToDescr(void) const;
142  void Dump(FILE *f, const char *Prefix = "", bool InfoOnly = false) const;
143  bool Parse(char *s);
144  static bool Read(FILE *f, cSchedule *Schedule, int &Line);
145  void FixEpgBugs(void);
146  };
147 
148 class cSchedules;
149 
150 class cSchedule : public cListObject {
151 private:
152  static cMutex numTimersMutex; // Protects numTimers, because it might be accessed from parallel read locks
157  mutable u_int16_t numTimers;// The number of timers that use this schedule
159  int modified;
160  time_t presentSeen;
161 public:
163  tChannelID ChannelID(void) const { return channelID; }
164  bool Modified(int &State) const { bool Result = State != modified; State = modified; return Result; }
165  time_t PresentSeen(void) const { return presentSeen; }
166  bool PresentSeenWithin(int Seconds) const { return time(NULL) - presentSeen < Seconds; }
167  void SetModified(void) { modified++; }
168  void SetPresentSeen(void) { presentSeen = time(NULL); }
169  void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel = NULL);
170  void ClrRunningStatus(cChannel *Channel = NULL);
171  void ResetVersions(void);
172  void Sort(void);
173  void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
174  void Cleanup(time_t Time);
175  void Cleanup(void);
176  void IncNumTimers(void) const;
177  void DecNumTimers(void) const;
178  bool HasTimer(void) const { return numTimers > 0; }
179  cEvent *AddEvent(cEvent *Event);
180  void DelEvent(cEvent *Event);
181  void HashEvent(cEvent *Event);
182  void UnhashEvent(cEvent *Event);
183  const cList<cEvent> *Events(void) const { return &events; }
184  const cEvent *GetPresentEvent(void) const;
185  const cEvent *GetFollowingEvent(void) const;
186  const cEvent *GetEvent(tEventID EventID, time_t StartTime = 0) const;
187  const cEvent *GetEventAround(time_t Time) const;
188  void Dump(const cChannels *Channels, FILE *f, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0) const;
189  static bool Read(FILE *f, cSchedules *Schedules);
190  };
191 
192 class cSchedules : public cList<cSchedule> {
193  friend class cSchedule;
194 private:
196  static char *epgDataFileName;
197  static time_t lastDump;
198 public:
199  cSchedules(void);
200  static const cSchedules *GetSchedulesRead(cStateKey &StateKey, int TimeoutMs = 0);
203  static cSchedules *GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs = 0);
206  static void SetEpgDataFileName(const char *FileName);
207  static void Cleanup(bool Force = false);
208  static void ResetVersions(void);
209  static bool Dump(FILE *f = NULL, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0);
210  static bool Read(FILE *f = NULL);
213  const cSchedule *GetSchedule(const cChannel *Channel, bool AddIfMissing = false) const;
214  };
215 
216 // Provide lock controlled access to the list:
217 
218 DEF_LIST_LOCK(Schedules);
219 
220 // These macros provide a convenient way of locking the global schedules list
221 // and making sure the lock is released as soon as the current scope is left
222 // (note that these macros wait forever to obtain the lock!):
223 
224 #define LOCK_SCHEDULES_READ USE_LIST_LOCK_READ(Schedules);
225 #define LOCK_SCHEDULES_WRITE USE_LIST_LOCK_WRITE(Schedules);
226 
227 class cEpgDataReader : public cThread {
228 public:
229  cEpgDataReader(void);
230  virtual void Action(void);
231  };
232 
233 void ReportEpgBugFixStats(bool Force = false);
234 
235 class cEpgHandler : public cListObject {
236 public:
237  cEpgHandler(void);
246  virtual ~cEpgHandler();
247  virtual bool IgnoreChannel(const cChannel *Channel) { return false; }
252  virtual bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version) { 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; }
267  virtual bool SetEventID(cEvent *Event, tEventID EventID) { return false; }
268  virtual bool SetTitle(cEvent *Event, const char *Title) { return false; }
269  virtual bool SetShortText(cEvent *Event, const char *ShortText) { return false; }
270  virtual bool SetDescription(cEvent *Event, const char *Description) { return false; }
271  virtual bool SetContents(cEvent *Event, uchar *Contents) { return false; }
272  virtual bool SetParentalRating(cEvent *Event, int ParentalRating) { return false; }
273  virtual bool SetStartTime(cEvent *Event, time_t StartTime) { return false; }
274  virtual bool SetDuration(cEvent *Event, int Duration) { return false; }
275  virtual bool SetVps(cEvent *Event, time_t Vps) { return false; }
276  virtual bool SetComponents(cEvent *Event, cComponents *Components) { 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; }
287  virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy) { return true; } // TODO remove obsolete Dummy
294  virtual bool EndSegmentTransfer(bool Modified, bool Dummy) { return false; } // TODO remove obsolete Dummy
298  };
299 
300 class cEpgHandlers : public cList<cEpgHandler> {
301 public:
302  bool IgnoreChannel(const cChannel *Channel);
303  bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version);
304  bool HandledExternally(const cChannel *Channel);
305  bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version);
306  void SetEventID(cEvent *Event, tEventID EventID);
307  void SetTitle(cEvent *Event, const char *Title);
308  void SetShortText(cEvent *Event, const char *ShortText);
309  void SetDescription(cEvent *Event, const char *Description);
310  void SetContents(cEvent *Event, uchar *Contents);
311  void SetParentalRating(cEvent *Event, int ParentalRating);
312  void SetStartTime(cEvent *Event, time_t StartTime);
313  void SetDuration(cEvent *Event, int Duration);
314  void SetVps(cEvent *Event, time_t Vps);
315  void SetComponents(cEvent *Event, cComponents *Components);
316  void FixEpgBugs(cEvent *Event);
317  void HandleEvent(cEvent *Event);
318  void SortSchedule(cSchedule *Schedule);
319  void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
320  bool BeginSegmentTransfer(const cChannel *Channel);
321  void EndSegmentTransfer(bool Modified);
322  };
323 
325 
326 #endif //__EPG_H
virtual bool EndSegmentTransfer(bool Modified, bool Dummy)
< Called directly after IgnoreChannel() before any other handler method is called.
Definition: epg.h:294
unsigned char uchar
Definition: tools.h:31
Definition: epg.h:71
void SetContents(uchar *Contents)
Definition: epg.c:205
void SetContents(cEvent *Event, uchar *Contents)
Definition: epg.c:1458
virtual bool SortSchedule(cSchedule *Schedule)
Sorts the Schedule after the complete table has been processed.
Definition: epg.h:282
cEpgDataReader(void)
Definition: epg.c:1360
time_t presentSeen
Definition: epg.h:160
bool PresentSeenWithin(int Seconds) const
Definition: epg.h:166
tComponent * GetComponent(int Index, uchar Stream, uchar Type)
Definition: epg.c:97
bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version)
Definition: epg.c:1395
time_t StartTime(void) const
Definition: epg.h:109
void SetComponent(int Index, const char *s)
Definition: epg.c:77
u_int32_t tEventID
Definition: epg.h:67
static void ResetVersions(void)
Definition: epg.c:1262
time_t Seen(void) const
Definition: epg.h:113
void FixEpgBugs(void)
Definition: epg.c:690
Definition: epg.h:40
static const cSchedules * GetSchedulesRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for read access.
Definition: epg.c:1231
void SetDescription(cEvent *Event, const char *Description)
Definition: epg.c:1449
void SetStartTime(time_t StartTime)
Definition: epg.c:216
virtual bool SetContents(cEvent *Event, uchar *Contents)
Definition: epg.h:271
cSchedule(tChannelID ChannelID)
Definition: epg.c:909
void SetDuration(int Duration)
Definition: epg.c:227
RunningStatus
Definition: si.h:197
void SetTableID(uchar TableID)
Definition: epg.c:167
virtual bool SetTitle(cEvent *Event, const char *Title)
Definition: epg.h:268
cComponents(void)
Definition: epg.c:46
static cMutex numTimersMutex
Definition: epg.h:74
uchar tableID
Definition: epg.h:79
tChannelID ChannelID(void) const
Definition: epg.h:163
int NumComponents(void) const
Definition: epg.h:59
u_int16_t numTimers
Definition: epg.h:157
char language[MAXLANGCODE2]
Definition: epg.h:45
virtual bool SetDuration(cEvent *Event, int Duration)
Definition: epg.h:274
virtual bool SetParentalRating(cEvent *Event, int ParentalRating)
Definition: epg.h:272
static const char * ContentToString(uchar Content)
Definition: epg.c:279
~cComponents(void)
Definition: epg.c:52
cSchedules(void)
Definition: epg.c:1226
cString ToDescr(void) const
Definition: epg.c:248
tChannelID channelID
Definition: epg.h:153
~cEvent()
Definition: epg.c:136
time_t Vps(void) const
Definition: epg.h:112
tEventID EventID(void) const
Definition: epg.h:99
char * title
Definition: epg.h:83
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
Definition: epg.c:1538
void IncNumTimers(void) const
Definition: epg.c:919
void SetParentalRating(cEvent *Event, int ParentalRating)
Definition: epg.c:1467
bool hasRunning
Definition: epg.h:158
virtual bool HandleEvent(cEvent *Event)
After all modifications of the Event have been done, the EPG handler can take a final look at it...
Definition: epg.h:279
void SetTitle(cEvent *Event, const char *Title)
Definition: epg.c:1431
DEF_LIST_LOCK(Schedules)
void SetEventID(cEvent *Event, tEventID EventID)
Definition: epg.c:1422
cHash< cEvent > eventsHashID
Definition: epg.h:155
bool Realloc(int Index)
Definition: epg.c:59
cString GetVpsString(void) const
Definition: epg.c:443
bool HasTimer(void) const
Definition: epg.h:178
char * aux
Definition: epg.h:92
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...
Definition: epg.h:252
bool HandledExternally(const cChannel *Channel)
Definition: epg.c:1404
Definition: epg.h:36
static bool Dump(FILE *f=NULL, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0)
Definition: epg.c:1269
void SetShortText(const char *ShortText)
Definition: epg.c:189
static time_t lastDump
Definition: epg.h:197
static void SetEpgDataFileName(const char *FileName)
Definition: epg.c:1241
const char * Aux(void) const
Definition: epg.h:115
void ResetVersions(void)
Definition: epg.c:1048
bool BeginSegmentTransfer(const cChannel *Channel)
Definition: epg.c:1547
cString GetEndTimeString(void) const
Definition: epg.c:438
void SetSeen(void)
Definition: epg.c:237
Definition: epg.h:28
uchar Contents(int i=0) const
Definition: epg.h:107
virtual bool SetDescription(cEvent *Event, const char *Description)
Definition: epg.h:270
void ClrRunningStatus(cChannel *Channel=NULL)
Definition: epg.c:1035
virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy)
Definition: epg.h:287
void Dump(const cChannels *Channels, FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
Definition: epg.c:1107
cString GetParentalRatingString(void) const
Definition: epg.c:421
void SetComponents(cComponents *Components)
Definition: epg.c:199
cString GetDateString(void) const
Definition: epg.c:428
time_t startTime
Definition: epg.h:87
void HandleEvent(cEvent *Event)
Definition: epg.c:1521
Definition: epg.h:40
virtual bool SetComponents(cEvent *Event, cComponents *Components)
Definition: epg.h:276
void SetTitle(const char *Title)
Definition: epg.c:184
void SetStartTime(cEvent *Event, time_t StartTime)
Definition: epg.c:1476
cSchedule * schedule
Definition: epg.h:76
bool IsRunning(bool OrAboutToStart=false) const
Definition: epg.c:274
void DecNumTimers(void) const
Definition: epg.c:926
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...
Definition: epg.h:284
time_t EndTime(void) const
Definition: epg.h:110
static bool Read(FILE *f, cSchedules *Schedules)
Definition: epg.c:1139
int duration
Definition: epg.h:88
uchar type
Definition: epg.h:44
virtual void Action(void)
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
Definition: epg.c:1365
Definition: epg.h:40
void SetDuration(cEvent *Event, int Duration)
Definition: epg.c:1485
const char * ShortText(void) const
Definition: epg.h:104
static bool Read(FILE *f=NULL)
Definition: epg.c:1293
static char * epgDataFileName
Definition: epg.h:196
cComponents * components
Definition: epg.h:86
const cEvent * GetPresentEvent(void) const
Definition: epg.c:963
virtual bool SetStartTime(cEvent *Event, time_t StartTime)
Definition: epg.h:273
void FixEpgBugs(cEvent *Event)
Definition: epg.c:1512
static void Cleanup(bool Force=false)
Definition: epg.c:1248
int Duration(void) const
Definition: epg.h:111
cString ToString(void)
Definition: epg.c:24
const cSchedule * GetSchedule(tChannelID ChannelID) const
Definition: epg.c:1331
const cEvent * GetEvent(tEventID EventID, time_t StartTime=0) const
Definition: epg.c:993
void Cleanup(void)
Definition: epg.c:1091
void SortSchedule(cSchedule *Schedule)
Definition: epg.c:1529
void Sort(void)
Definition: epg.c:1054
Definition: thread.h:67
char * description
Definition: epg.h:46
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...
Definition: epg.h:257
void SetAux(const char *Aux)
Definition: epg.c:242
bool Modified(int &State) const
Definition: epg.h:164
cEvent(tEventID EventID)
Definition: epg.c:115
bool FromString(const char *s)
Definition: epg.c:31
void Dump(FILE *f, const char *Prefix="", bool InfoOnly=false) const
Definition: epg.c:451
void SetPresentSeen(void)
Definition: epg.h:168
cEvent * AddEvent(cEvent *Event)
Definition: epg.c:933
time_t PresentSeen(void) const
Definition: epg.h:165
#define MAXLANGCODE2
Definition: channels.h:37
char * shortText
Definition: epg.h:84
bool Parse(char *s)
Definition: epg.c:490
tChannelID ChannelID(void) const
Definition: epg.c:151
const cEvent * GetEventAround(time_t Time) const
Definition: epg.c:1003
void SetVps(cEvent *Event, time_t Vps)
Definition: epg.c:1494
void DecNumTimers(void) const
Definition: epg.c:265
bool IgnoreChannel(const cChannel *Channel)
Definition: epg.c:1386
void HashEvent(cEvent *Event)
Definition: epg.c:949
uchar version
Definition: epg.h:80
Definition: epg.h:42
const cComponents * Components(void) const
Definition: epg.h:106
int RunningStatus(void) const
Definition: epg.h:102
const char * Title(void) const
Definition: epg.h:103
static cSchedules * GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for write access.
Definition: epg.c:1236
void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
Definition: epg.c:1068
uchar parentalRating
Definition: epg.h:82
bool SeenWithin(int Seconds) const
Definition: epg.h:114
void SetParentalRating(int ParentalRating)
Definition: epg.c:211
const cSchedule * Schedule(void) const
Definition: epg.h:98
void SetDescription(const char *Description)
Definition: epg.c:194
Definition: epg.h:150
tComponent * components
Definition: epg.h:54
void SetRunningStatus(int RunningStatus, const cChannel *Channel=NULL)
Definition: epg.c:177
virtual ~cEpgHandler()
Definition: epg.c:1377
void ReportEpgBugFixStats(bool Force=false)
Definition: epg.c:611
static cSchedules schedules
Definition: epg.h:195
cEpgHandler(void)
Constructs a new EPG handler and adds it to the list of EPG handlers.
Definition: epg.c:1372
void IncNumTimers(void) const
Definition: epg.c:256
uchar contents[MaxEventContents]
Definition: epg.h:89
void DelEvent(cEvent *Event)
Definition: epg.c:941
time_t seen
Definition: epg.h:91
virtual bool SetShortText(cEvent *Event, const char *ShortText)
Definition: epg.h:269
uchar Version(void) const
Definition: epg.h:101
Definition: thread.h:79
static bool Read(FILE *f, cSchedule *Schedule, int &Line)
Definition: epg.c:532
eDumpMode
Definition: epg.h:40
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".
Definition: epg.c:145
virtual bool IgnoreChannel(const cChannel *Channel)
Before any EIT data for the given Channel is processed, the EPG handlers are asked whether this Chann...
Definition: epg.h:247
void SetVersion(uchar Version)
Definition: epg.c:172
void SetVps(time_t Vps)
Definition: epg.c:232
virtual bool SetVps(cEvent *Event, time_t Vps)
Definition: epg.h:275
cSchedule * AddSchedule(tChannelID ChannelID)
Definition: epg.c:1320
cString GetTimeString(void) const
Definition: epg.c:433
uchar runningStatus
Definition: epg.h:81
const cEvent * GetFollowingEvent(void) const
Definition: epg.c:978
void SetModified(void)
Definition: epg.h:167
uchar stream
Definition: epg.h:43
int ParentalRating(void) const
Definition: epg.h:108
virtual bool FixEpgBugs(cEvent *Event)
Fixes some known problems with EPG data.
Definition: epg.h:277
tEventID eventID
Definition: epg.h:78
cEpgHandlers EpgHandlers
Definition: epg.c:1384
void SetComponents(cEvent *Event, cComponents *Components)
Definition: epg.c:1503
void SetEventID(tEventID EventID)
Definition: epg.c:156
virtual bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
VDR can&#39;t perform the update check (version, tid) for externally handled events, therefore the EPG ha...
Definition: epg.h:263
static cMutex numTimersMutex
Definition: epg.h:152
cHash< cEvent > eventsHashStartTime
Definition: epg.h:156
const cList< cEvent > * Events(void) const
Definition: epg.h:183
tComponent * Component(int Index) const
Definition: epg.h:62
void SetShortText(cEvent *Event, const char *ShortText)
Definition: epg.c:1440
eEventContentGroup
Definition: epg.h:25
void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel=NULL)
Definition: epg.c:1017
Definition: epg.h:29
uchar TableID(void) const
Definition: epg.h:100
bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
Definition: epg.c:1413
char * description
Definition: epg.h:85
void UnhashEvent(cEvent *Event)
Definition: epg.c:956
bool HasTimer(void) const
Definition: epg.h:118
void EndSegmentTransfer(bool Modified)
Definition: epg.c:1556
time_t vps
Definition: epg.h:90
Definition: tools.h:176
int numComponents
Definition: epg.h:53
cList< cEvent > events
Definition: epg.h:154
virtual bool SetEventID(cEvent *Event, tEventID EventID)
Definition: epg.h:267
int modified
Definition: epg.h:159
u_int16_t numTimers
Definition: epg.h:77
const char * Description(void) const
Definition: epg.h:105