vdr 2.7.9
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 5.11 2026/02/04 10:06:06 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#define EPG_LINGER_TIME (max(Setup.EPGLinger, 180) * 60) // seconds to keep old EPG data (internal, must be at least Setup.EPGLinger)
24
25enum { MaxEventContents = 4 };
26
41
43
44struct tComponent {
49 cString ToString(void);
50 bool FromString(const char *s);
51 };
52
54private:
57 bool Realloc(int Index);
58public:
59 cComponents(void);
60 ~cComponents(void);
61 int NumComponents(void) const { return numComponents; }
62 void SetComponent(int Index, const char *s);
63 void SetComponent(int Index, uchar Stream, uchar Type, const char *Language, const char *Description);
64 tComponent *Component(int Index) const { return (Index < numComponents) ? &components[Index] : NULL; }
65 tComponent *GetComponent(int Index, uchar Stream, uchar Type); // Gets the Index'th component of Stream and Type, skipping other components
66 // In case of an audio stream the 'type' check actually just distinguishes between "normal" and "Dolby Digital"
67 };
68
69class cSchedule;
70
71typedef u_int32_t tEventID;
72
73class cEvent : public cListObject {
74 friend class cSchedule;
75private:
76 static cMutex numTimersMutex; // Protects numTimers, because it might be accessed from parallel read locks
77 // The sequence of these parameters is optimized for minimal memory waste!
78 cSchedule *schedule; // The Schedule this event belongs to
79 mutable u_int16_t numTimers;// The number of timers that use this event
80 tEventID eventID; // Event ID of this event
81 uchar tableID; // Table ID this event came from
82 uchar version; // Version number of section this event came from
83 uchar runningStatus; // 0=undefined, 1=not running, 2=starts in a few seconds, 3=pausing, 4=running
84 uchar parentalRating; // Parental rating of this event
85 char language[MAXLANGCODE1]; // ISO 639-2/T three character language code of the language of title and shortText, 0 terminated!//XXX description?
86 char *title; // Title of this event
87 char *shortText; // Short description of this event (typically the episode name in case of a series)
88 char *description; // Description of this event
89 cComponents *components; // The stream components of this event
90 time_t startTime; // Start time of this event
91 int duration; // Duration of this event in seconds
92 uchar contents[MaxEventContents]; // Contents of this event
93 time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL)
94 time_t seen; // When this event was last seen in the data stream
95 char *aux; // Auxiliary data, for use with plugins
96public:
98 ~cEvent();
99 virtual int Compare(const cListObject &ListObject) const override;
100 tChannelID ChannelID(void) const;
101 const cSchedule *Schedule(void) const { return schedule; }
102 tEventID EventID(void) const { return eventID; }
103 uchar TableID(void) const { return tableID; }
104 uchar Version(void) const { return version; }
105 int RunningStatus(void) const { return runningStatus; }
106 const char *Language(void) const { return language; }
107 const char *Title(void) const { return title ? title : ""; }
108 const char *ShortText(void) const { return shortText; }
109 const char *Description(void) const { return description; }
110 const cComponents *Components(void) const { return components; }
111 uchar Contents(int i = 0) const { return (0 <= i && i < MaxEventContents) ? contents[i] : uchar(0); }
112 int ParentalRating(void) const { return parentalRating; }
113 time_t StartTime(void) const { return startTime; }
114 time_t EndTime(void) const { return startTime + duration; }
115 int Duration(void) const { return duration; }
116 time_t Vps(void) const { return vps; }
117 time_t Seen(void) const { return seen; }
118 bool SeenWithin(int Seconds) const { return time(NULL) - seen < Seconds; }
119 const char *Aux(void) const { return aux; }
120 void IncNumTimers(void) const;
121 void DecNumTimers(void) const;
122 bool HasTimer(void) const { return numTimers > 0; }
123 bool IsRunning(bool OrAboutToStart = false) const;
124 static const char *ContentToString(uchar Content);
126 cString GetDateString(void) const;
127 cString GetTimeString(void) const;
128 cString GetEndTimeString(void) const;
129 cString GetVpsString(void) const;
133 void SetRunningStatus(int RunningStatus, const cChannel *Channel = NULL);
134 void SetLanguage(const char *Language);
135 void SetTitle(const char *Title);
136 void SetShortText(const char *ShortText);
137 void SetDescription(const char *Description);
138 void SetComponents(cComponents *Components); // Will take ownership of Components!
141 void SetStartTime(time_t StartTime);
142 void SetDuration(int Duration);
143 void SetVps(time_t Vps);
144 void SetSeen(void);
145 void SetAux(const char *Aux);
146 cString ToDescr(void) const;
147 void Dump(FILE *f, const char *Prefix = "", bool InfoOnly = false) const;
148 bool Parse(char *s);
149 static bool Read(FILE *f, cSchedule *Schedule, int &Line);
150 void FixEpgBugs(void);
151 };
152
153class cSchedules;
154
155class cSchedule : public cListObject {
156private:
157 static cMutex numTimersMutex; // Protects numTimers, because it might be accessed from parallel read locks
162 mutable u_int16_t numTimers;// The number of timers that use this schedule
166public:
168 tChannelID ChannelID(void) const { return channelID; }
169 bool Modified(int &State) const { bool Result = State != modified; State = modified; return Result; }
170 bool OnActualTp(uchar TableId);
171 time_t PresentSeen(void) const { return presentSeen; }
172 bool PresentSeenWithin(int Seconds) const { return time(NULL) - presentSeen < Seconds; }
173 void SetModified(void) { modified++; }
174 void SetPresentSeen(void) { presentSeen = time(NULL); }
175 void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel = NULL);
176 void ClrRunningStatus(cChannel *Channel = NULL);
177 void ResetVersions(void);
178 void Sort(void);
179 void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
180 void Cleanup(time_t Time);
181 void Cleanup(void);
182 void IncNumTimers(void) const;
183 void DecNumTimers(void) const;
184 bool HasTimer(void) const { return numTimers > 0; }
185 cEvent *AddEvent(cEvent *Event);
186 void DelEvent(cEvent *Event);
187 void HashEvent(cEvent *Event);
188 void UnhashEvent(cEvent *Event);
189 const cList<cEvent> *Events(void) const { return &events; }
190 const cEvent *GetPresentEvent(void) const;
191 const cEvent *GetFollowingEvent(void) const;
192 const cEvent *GetEventById(tEventID EventID) const;
193 const cEvent *GetEventByTime(time_t StartTime) const;
194 const cEvent *GetEventAround(time_t Time) const;
195 void Dump(const cChannels *Channels, FILE *f, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0) const;
196 static bool Read(FILE *f, cSchedules *Schedules);
197 };
198
199class cSchedules : public cList<cSchedule> {
200 friend class cSchedule;
201private:
203 static char *epgDataFileName;
204 static time_t lastDump;
205public:
206 cSchedules(void);
207 static const cSchedules *GetSchedulesRead(cStateKey &StateKey, int TimeoutMs = 0);
210 static cSchedules *GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs = 0);
213 static void SetEpgDataFileName(const char *FileName);
214 static void Cleanup(bool Force = false);
215 static void ResetVersions(void);
216 static bool Dump(FILE *f = NULL, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0);
217 static bool Read(FILE *f = NULL);
218 cSchedule *AddSchedule(tChannelID ChannelID);
219 const cSchedule *GetSchedule(tChannelID ChannelID) const;
220 const cSchedule *GetSchedule(const cChannel *Channel, bool AddIfMissing = false) const;
221 };
222
223// Provide lock controlled access to the list:
224
225DEF_LIST_LOCK(Schedules);
226
227// These macros provide a convenient way of locking the global schedules list
228// and making sure the lock is released as soon as the current scope is left
229// (note that these macros wait forever to obtain the lock!):
230
231#define LOCK_SCHEDULES_READ USE_LIST_LOCK_READ(Schedules);
232#define LOCK_SCHEDULES_WRITE USE_LIST_LOCK_WRITE(Schedules);
233
234class cEpgDataReader : public cThread {
235public:
236 cEpgDataReader(void);
237 virtual void Action(void) override;
238 };
239
240void ReportEpgBugFixStats(bool Force = false);
241
242class cEpgHandler : public cListObject {
243public:
244 cEpgHandler(void);
253 virtual ~cEpgHandler() override;
254 virtual bool IgnoreChannel(const cChannel *Channel) { return false; }
259 virtual bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version) { return false; }
264 virtual bool HandledExternally(const cChannel *Channel) { return false; }
270 virtual bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version) { return false; }
274 virtual bool SetEventID(cEvent *Event, tEventID EventID) { return false; }
276 virtual bool SetLanguage(cEvent *Event, const char *Language) { return false; }
278 virtual bool SetTitle(cEvent *Event, const char *Title) { return false; }
279 virtual bool SetShortText(cEvent *Event, const char *ShortText) { return false; }
280 virtual bool SetDescription(cEvent *Event, const char *Description) { return false; }
281 virtual bool SetContents(cEvent *Event, uchar *Contents) { return false; }
282 virtual bool SetParentalRating(cEvent *Event, int ParentalRating) { return false; }
283 virtual bool SetStartTime(cEvent *Event, time_t StartTime) { return false; }
284 virtual bool SetDuration(cEvent *Event, int Duration) { return false; }
285 virtual bool SetVps(cEvent *Event, time_t Vps) { return false; }
286 virtual bool SetComponents(cEvent *Event, cComponents *Components) { return false; }
287 virtual bool FixEpgBugs(cEvent *Event) { return false; }
289 virtual bool HandleEvent(cEvent *Event) { return false; }
292 virtual bool SortSchedule(cSchedule *Schedule) { return false; }
294 virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version) { return false; }
297 virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy) { return true; } // TODO remove obsolete Dummy
304 virtual bool EndSegmentTransfer(bool Modified, bool Dummy) { return false; } // TODO remove obsolete Dummy
308 };
309
310class cEpgHandlers : public cList<cEpgHandler> {
311public:
312 bool IgnoreChannel(const cChannel *Channel);
313 bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version);
314 bool HandledExternally(const cChannel *Channel);
315 bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version);
316 void SetEventID(cEvent *Event, tEventID EventID);
317 void SetLanguage(cEvent *Event, const char *Language);
318 void SetTitle(cEvent *Event, const char *Title);
319 void SetShortText(cEvent *Event, const char *ShortText);
320 void SetDescription(cEvent *Event, const char *Description);
321 void SetContents(cEvent *Event, uchar *Contents);
322 void SetParentalRating(cEvent *Event, int ParentalRating);
323 void SetStartTime(cEvent *Event, time_t StartTime);
324 void SetDuration(cEvent *Event, int Duration);
325 void SetVps(cEvent *Event, time_t Vps);
326 void SetComponents(cEvent *Event, cComponents *Components);
327 void FixEpgBugs(cEvent *Event);
328 void HandleEvent(cEvent *Event);
329 void SortSchedule(cSchedule *Schedule);
330 void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
331 bool BeginSegmentTransfer(const cChannel *Channel);
332 void EndSegmentTransfer(bool Modified);
333 };
334
336
337#endif //__EPG_H
#define MAXLANGCODE2
Definition channels.h:37
#define MAXLANGCODE1
Definition channels.h:36
tComponent * GetComponent(int Index, uchar Stream, uchar Type)
Definition epg.c:97
tComponent * Component(int Index) const
Definition epg.h:64
int numComponents
Definition epg.h:55
cComponents(void)
Definition epg.c:46
bool Realloc(int Index)
Definition epg.c:59
~cComponents(void)
Definition epg.c:52
int NumComponents(void) const
Definition epg.h:61
tComponent * components
Definition epg.h:56
void SetComponent(int Index, const char *s)
Definition epg.c:77
cEpgDataReader(void)
Definition epg.c:1427
virtual void Action(void) override
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
Definition epg.c:1432
virtual ~cEpgHandler() override
Definition epg.c:1448
virtual bool SetTitle(cEvent *Event, const char *Title)
Definition epg.h:278
virtual bool SetVps(cEvent *Event, time_t Vps)
Definition epg.h:285
virtual bool FixEpgBugs(cEvent *Event)
Fixes some known problems with EPG data.
Definition epg.h:287
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...
Definition epg.h:270
virtual bool SetParentalRating(cEvent *Event, int ParentalRating)
Definition epg.h:282
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:259
virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy)
Definition epg.h:297
virtual bool SetEventID(cEvent *Event, tEventID EventID)
Important note: if you want VPS to work, do not mess with the event ids!
Definition epg.h:274
virtual bool SetComponents(cEvent *Event, cComponents *Components)
Definition epg.h:286
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:254
cEpgHandler(void)
Constructs a new EPG handler and adds it to the list of EPG handlers.
Definition epg.c:1441
virtual bool EndSegmentTransfer(bool Modified, bool Dummy)
< Called directly after IgnoreChannel() before any other handler method is called.
Definition epg.h:304
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:289
virtual bool SetLanguage(cEvent *Event, const char *Language)
ISO 639-2/T three character language code of the language of title and shortText.
Definition epg.h:276
virtual bool SetContents(cEvent *Event, uchar *Contents)
Definition epg.h:281
virtual bool SetDescription(cEvent *Event, const char *Description)
Definition epg.h:280
virtual bool SortSchedule(cSchedule *Schedule)
Sorts the Schedule after the complete table has been processed.
Definition epg.h:292
virtual bool SetStartTime(cEvent *Event, time_t StartTime)
Definition epg.h:283
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:294
virtual bool SetDuration(cEvent *Event, int Duration)
Definition epg.h:284
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:264
virtual bool SetShortText(cEvent *Event, const char *ShortText)
Definition epg.h:279
void SortSchedule(cSchedule *Schedule)
Definition epg.c:1611
void EndSegmentTransfer(bool Modified)
Definition epg.c:1638
bool IgnoreChannel(const cChannel *Channel)
Definition epg.c:1459
bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version)
Definition epg.c:1468
void SetStartTime(cEvent *Event, time_t StartTime)
Definition epg.c:1558
void SetTitle(cEvent *Event, const char *Title)
Definition epg.c:1504
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
Definition epg.c:1620
bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
Definition epg.c:1486
void FixEpgBugs(cEvent *Event)
Definition epg.c:1594
void HandleEvent(cEvent *Event)
Definition epg.c:1603
void SetComponents(cEvent *Event, cComponents *Components)
Definition epg.c:1585
void SetVps(cEvent *Event, time_t Vps)
Definition epg.c:1576
void SetParentalRating(cEvent *Event, int ParentalRating)
Definition epg.c:1549
bool BeginSegmentTransfer(const cChannel *Channel)
Definition epg.c:1629
bool HandledExternally(const cChannel *Channel)
Definition epg.c:1477
void SetContents(cEvent *Event, uchar *Contents)
Definition epg.c:1540
void SetShortText(cEvent *Event, const char *ShortText)
Definition epg.c:1522
void SetDuration(cEvent *Event, int Duration)
Definition epg.c:1567
void SetDescription(cEvent *Event, const char *Description)
Definition epg.c:1531
void SetLanguage(cEvent *Event, const char *Language)
Definition epg.c:1513
void SetEventID(cEvent *Event, tEventID EventID)
Definition epg.c:1495
Definition epg.h:73
const char * ShortText(void) const
Definition epg.h:108
char * shortText
Definition epg.h:87
cString ToDescr(void) const
Definition epg.c:257
~cEvent()
Definition epg.c:137
time_t Vps(void) const
Definition epg.h:116
time_t vps
Definition epg.h:93
static const char * ContentToString(uchar Content)
Definition epg.c:288
void SetSeen(void)
Definition epg.c:246
uchar TableID(void) const
Definition epg.h:103
void SetAux(const char *Aux)
Definition epg.c:251
time_t EndTime(void) const
Definition epg.h:114
const char * Language(void) const
Definition epg.h:106
static cMutex numTimersMutex
Definition epg.h:76
uchar parentalRating
Definition epg.h:84
cString GetDateString(void) const
Definition epg.c:437
int RunningStatus(void) const
Definition epg.h:105
const cComponents * Components(void) const
Definition epg.h:110
uchar Contents(int i=0) const
Definition epg.h:111
const char * Description(void) const
Definition epg.h:109
bool IsRunning(bool OrAboutToStart=false) const
Definition epg.c:283
cEvent(tEventID EventID)
Definition epg.c:115
void SetRunningStatus(int RunningStatus, const cChannel *Channel=NULL)
Definition epg.c:181
void IncNumTimers(void) const
Definition epg.c:265
int ParentalRating(void) const
Definition epg.h:112
time_t StartTime(void) const
Definition epg.h:113
tChannelID ChannelID(void) const
Definition epg.c:155
void SetVps(time_t Vps)
Definition epg.c:241
bool SeenWithin(int Seconds) const
Definition epg.h:118
bool Parse(char *s)
Definition epg.c:501
char * title
Definition epg.h:86
void SetLanguage(const char *Language)
Definition epg.c:188
static bool Read(FILE *f, cSchedule *Schedule, int &Line)
Definition epg.c:550
time_t seen
Definition epg.h:94
char * description
Definition epg.h:88
const char * Aux(void) const
Definition epg.h:119
tEventID eventID
Definition epg.h:80
void SetShortText(const char *ShortText)
Definition epg.c:198
u_int16_t numTimers
Definition epg.h:79
cString GetTimeString(void) const
Definition epg.c:442
const char * Title(void) const
Definition epg.h:107
void DecNumTimers(void) const
Definition epg.c:274
tEventID EventID(void) const
Definition epg.h:102
cComponents * components
Definition epg.h:89
const cSchedule * Schedule(void) const
Definition epg.h:101
void SetStartTime(time_t StartTime)
Definition epg.c:225
bool HasTimer(void) const
Definition epg.h:122
void SetComponents(cComponents *Components)
Definition epg.c:208
int duration
Definition epg.h:91
void SetEventID(tEventID EventID)
Definition epg.c:160
cString GetEndTimeString(void) const
Definition epg.c:447
int Duration(void) const
Definition epg.h:115
cString GetVpsString(void) const
Definition epg.c:452
void SetVersion(uchar Version)
Definition epg.c:176
uchar tableID
Definition epg.h:81
void Dump(FILE *f, const char *Prefix="", bool InfoOnly=false) const
Definition epg.c:460
void SetDuration(int Duration)
Definition epg.c:236
void SetContents(uchar *Contents)
Definition epg.c:214
cSchedule * schedule
Definition epg.h:78
uchar Version(void) const
Definition epg.h:104
uchar runningStatus
Definition epg.h:83
void SetTitle(const char *Title)
Definition epg.c:193
time_t Seen(void) const
Definition epg.h:117
char * aux
Definition epg.h:95
char language[MAXLANGCODE1]
Definition epg.h:85
uchar version
Definition epg.h:82
void SetTableID(uchar TableID)
Definition epg.c:171
uchar contents[MaxEventContents]
Definition epg.h:92
cString GetParentalRatingString(void) const
Definition epg.c:430
void FixEpgBugs(void)
Definition epg.c:708
friend class cSchedule
Definition epg.h:74
void SetDescription(const char *Description)
Definition epg.c:203
time_t startTime
Definition epg.h:90
void SetParentalRating(int ParentalRating)
Definition epg.c:220
virtual int Compare(const cListObject &ListObject) const override
Must return 0 if this object is equal to ListObject, a positive value if it is "greater",...
Definition epg.c:146
Definition tools.h:932
cListObject(const cListObject &ListObject)
Definition tools.h:547
Definition tools.h:644
cList(const char *NeedsLocking=NULL)
Definition tools.h:646
const cEvent * GetPresentEvent(void) const
Definition epg.c:1018
cHash< cEvent > eventsHashID
Definition epg.h:160
bool Modified(int &State) const
Definition epg.h:169
bool HasTimer(void) const
Definition epg.h:184
void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel=NULL)
Definition epg.c:1074
void UnhashEvent(cEvent *Event)
Definition epg.c:1011
const cEvent * GetEventAround(time_t Time) const
Definition epg.c:1060
const cEvent * GetEventByTime(time_t StartTime) const
Definition epg.c:1053
void DecNumTimers(void) const
Definition epg.c:961
bool OnActualTp(uchar TableId)
Definition epg.c:968
void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
Definition epg.c:1112
static bool Read(FILE *f, cSchedules *Schedules)
Definition epg.c:1199
cSchedule(tChannelID ChannelID)
Definition epg.c:944
void SetPresentSeen(void)
Definition epg.h:174
static cMutex numTimersMutex
Definition epg.h:157
bool PresentSeenWithin(int Seconds) const
Definition epg.h:172
void ClrRunningStatus(cChannel *Channel=NULL)
Definition epg.c:1089
void ResetVersions(void)
Definition epg.c:1100
cList< cEvent > events
Definition epg.h:159
void Cleanup(void)
Definition epg.c:1151
tChannelID channelID
Definition epg.h:158
time_t PresentSeen(void) const
Definition epg.h:171
const cEvent * GetEventById(tEventID EventID) const
Definition epg.c:1048
const cList< cEvent > * Events(void) const
Definition epg.h:189
void DelEvent(cEvent *Event)
Definition epg.c:983
void HashEvent(cEvent *Event)
Definition epg.c:999
u_int16_t numTimers
Definition epg.h:162
tChannelID ChannelID(void) const
Definition epg.h:168
void SetModified(void)
Definition epg.h:173
int modified
Definition epg.h:164
void Sort(void)
Definition epg.c:1106
bool onActualTp
Definition epg.h:163
cHash< cEvent > eventsHashStartTime
Definition epg.h:161
void IncNumTimers(void) const
Definition epg.c:954
time_t presentSeen
Definition epg.h:165
cEvent * AddEvent(cEvent *Event)
Definition epg.c:975
void Dump(const cChannels *Channels, FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
Definition epg.c:1167
const cEvent * GetFollowingEvent(void) const
Definition epg.c:1033
cSchedules(void)
Definition epg.c:1286
static cSchedules * GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for write access.
Definition epg.c:1296
const cSchedule * GetSchedule(tChannelID ChannelID) const
Definition epg.c:1396
static const cSchedules * GetSchedulesRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for read access.
Definition epg.c:1291
static bool Dump(FILE *f=NULL, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0)
Definition epg.c:1329
static void SetEpgDataFileName(const char *FileName)
Definition epg.c:1301
static void Cleanup(bool Force=false)
Definition epg.c:1308
static time_t lastDump
Definition epg.h:204
static char * epgDataFileName
Definition epg.h:203
static void ResetVersions(void)
Definition epg.c:1322
cSchedule * AddSchedule(tChannelID ChannelID)
Definition epg.c:1385
static bool Read(FILE *f=NULL)
Definition epg.c:1353
static cSchedules schedules
Definition epg.h:202
friend class cSchedule
Definition epg.h:200
cThread(const char *Description=NULL, bool LowPriority=false)
Creates a new thread.
Definition thread.c:239
cEpgHandlers EpgHandlers
Definition epg.c:1457
u_int32_t tEventID
Definition epg.h:71
void ReportEpgBugFixStats(bool Force=false)
Definition epg.c:629
eDumpMode
Definition epg.h:42
@ dmAtTime
Definition epg.h:42
@ dmPresent
Definition epg.h:42
@ dmFollowing
Definition epg.h:42
@ dmAll
Definition epg.h:42
@ MaxEventContents
Definition epg.h:25
eEventContentGroup
Definition epg.h:27
@ ecgSocialPoliticalEconomics
Definition epg.h:35
@ ecgNewsCurrentAffairs
Definition epg.h:29
@ ecgEducationalScience
Definition epg.h:36
@ ecgMovieDrama
Definition epg.h:28
@ ecgArtsCulture
Definition epg.h:34
@ ecgShow
Definition epg.h:30
@ ecgSports
Definition epg.h:31
@ ecgLeisureHobbies
Definition epg.h:37
@ ecgMusicBalletDance
Definition epg.h:33
@ ecgSpecial
Definition epg.h:38
@ ecgUserDefined
Definition epg.h:39
@ ecgChildrenYouth
Definition epg.h:32
bool FromString(const char *s)
Definition epg.c:31
char language[MAXLANGCODE2]
Definition epg.h:47
uchar stream
Definition epg.h:45
cString ToString(void)
Definition epg.c:24
uchar type
Definition epg.h:46
char * description
Definition epg.h:48
#define DEF_LIST_LOCK(Class)
Definition tools.h:699
unsigned char uchar
Definition tools.h:31