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