vdr 2.7.2
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.6 2024/09/14 14:17:12 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 *title; // Title of this event
86 char *shortText; // Short description of this event (typically the episode name in case of a series)
87 char *description; // Description of this event
88 cComponents *components; // The stream components of this event
89 time_t startTime; // Start time of this event
90 int duration; // Duration of this event in seconds
91 uchar contents[MaxEventContents]; // Contents of this event
92 time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL)
93 time_t seen; // When this event was last seen in the data stream
94 char *aux; // Auxiliary data, for use with plugins
95public:
97 ~cEvent();
98 virtual int Compare(const cListObject &ListObject) const;
99 tChannelID ChannelID(void) const;
100 const cSchedule *Schedule(void) const { return schedule; }
101 tEventID EventID(void) const { return eventID; }
102 uchar TableID(void) const { return tableID; }
103 uchar Version(void) const { return version; }
104 int RunningStatus(void) const { return runningStatus; }
105 const char *Title(void) const { return title; }
106 const char *ShortText(void) const { return shortText; }
107 const char *Description(void) const { return description; }
108 const cComponents *Components(void) const { return components; }
109 uchar Contents(int i = 0) const { return (0 <= i && i < MaxEventContents) ? contents[i] : uchar(0); }
110 int ParentalRating(void) const { return parentalRating; }
111 time_t StartTime(void) const { return startTime; }
112 time_t EndTime(void) const { return startTime + duration; }
113 int Duration(void) const { return duration; }
114 time_t Vps(void) const { return vps; }
115 time_t Seen(void) const { return seen; }
116 bool SeenWithin(int Seconds) const { return time(NULL) - seen < Seconds; }
117 const char *Aux(void) const { return aux; }
118 void IncNumTimers(void) const;
119 void DecNumTimers(void) const;
120 bool HasTimer(void) const { return numTimers > 0; }
121 bool IsRunning(bool OrAboutToStart = false) const;
122 static const char *ContentToString(uchar Content);
124 cString GetDateString(void) const;
125 cString GetTimeString(void) const;
126 cString GetEndTimeString(void) const;
127 cString GetVpsString(void) const;
131 void SetRunningStatus(int RunningStatus, const cChannel *Channel = NULL);
132 void SetTitle(const char *Title);
133 void SetShortText(const char *ShortText);
134 void SetDescription(const char *Description);
135 void SetComponents(cComponents *Components); // Will take ownership of Components!
138 void SetStartTime(time_t StartTime);
139 void SetDuration(int Duration);
140 void SetVps(time_t Vps);
141 void SetSeen(void);
142 void SetAux(const char *Aux);
143 cString ToDescr(void) const;
144 void Dump(FILE *f, const char *Prefix = "", bool InfoOnly = false) const;
145 bool Parse(char *s);
146 static bool Read(FILE *f, cSchedule *Schedule, int &Line);
147 void FixEpgBugs(void);
148 };
149
150class cSchedules;
151
152class cSchedule : public cListObject {
153private:
154 static cMutex numTimersMutex; // Protects numTimers, because it might be accessed from parallel read locks
159 mutable u_int16_t numTimers;// The number of timers that use this schedule
163public:
165 tChannelID ChannelID(void) const { return channelID; }
166 bool Modified(int &State) const { bool Result = State != modified; State = modified; return Result; }
167 bool OnActualTp(uchar TableId);
168 time_t PresentSeen(void) const { return presentSeen; }
169 bool PresentSeenWithin(int Seconds) const { return time(NULL) - presentSeen < Seconds; }
170 void SetModified(void) { modified++; }
171 void SetPresentSeen(void) { presentSeen = time(NULL); }
172 void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel = NULL);
173 void ClrRunningStatus(cChannel *Channel = NULL);
174 void ResetVersions(void);
175 void Sort(void);
176 void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
177 void Cleanup(time_t Time);
178 void Cleanup(void);
179 void IncNumTimers(void) const;
180 void DecNumTimers(void) const;
181 bool HasTimer(void) const { return numTimers > 0; }
182 cEvent *AddEvent(cEvent *Event);
183 void DelEvent(cEvent *Event);
184 void HashEvent(cEvent *Event);
185 void UnhashEvent(cEvent *Event);
186 const cList<cEvent> *Events(void) const { return &events; }
187 const cEvent *GetPresentEvent(void) const;
188 const cEvent *GetFollowingEvent(void) const;
189#ifndef DEPRECATED_SCHEDULE_GET_EVENT
190#define DEPRECATED_SCHEDULE_GET_EVENT 0
191#endif
192#if DEPRECATED_SCHEDULE_GET_EVENT
193 [[deprecated("see HISTORY, version 2.5.2")]]
194 const cEvent *GetEvent(tEventID EventID, time_t StartTime = 0) const;
195#endif
196 const cEvent *GetEventById(tEventID EventID) const;
197 const cEvent *GetEventByTime(time_t StartTime) const;
198 const cEvent *GetEventAround(time_t Time) const;
199 void Dump(const cChannels *Channels, FILE *f, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0) const;
200 static bool Read(FILE *f, cSchedules *Schedules);
201 };
202
203class cSchedules : public cList<cSchedule> {
204 friend class cSchedule;
205private:
207 static char *epgDataFileName;
208 static time_t lastDump;
209public:
210 cSchedules(void);
211 static const cSchedules *GetSchedulesRead(cStateKey &StateKey, int TimeoutMs = 0);
214 static cSchedules *GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs = 0);
217 static void SetEpgDataFileName(const char *FileName);
218 static void Cleanup(bool Force = false);
219 static void ResetVersions(void);
220 static bool Dump(FILE *f = NULL, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0);
221 static bool Read(FILE *f = NULL);
222 cSchedule *AddSchedule(tChannelID ChannelID);
223 const cSchedule *GetSchedule(tChannelID ChannelID) const;
224 const cSchedule *GetSchedule(const cChannel *Channel, bool AddIfMissing = false) const;
225 };
226
227// Provide lock controlled access to the list:
228
229DEF_LIST_LOCK(Schedules);
230
231// These macros provide a convenient way of locking the global schedules list
232// and making sure the lock is released as soon as the current scope is left
233// (note that these macros wait forever to obtain the lock!):
234
235#define LOCK_SCHEDULES_READ USE_LIST_LOCK_READ(Schedules);
236#define LOCK_SCHEDULES_WRITE USE_LIST_LOCK_WRITE(Schedules);
237
238class cEpgDataReader : public cThread {
239public:
240 cEpgDataReader(void);
241 virtual void Action(void);
242 };
243
244void ReportEpgBugFixStats(bool Force = false);
245
246class cEpgHandler : public cListObject {
247public:
248 cEpgHandler(void);
257 virtual ~cEpgHandler();
258 virtual bool IgnoreChannel(const cChannel *Channel) { return false; }
263 virtual bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version) { return false; }
268 virtual bool HandledExternally(const cChannel *Channel) { return false; }
274 virtual bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version) { return false; }
278 virtual bool SetEventID(cEvent *Event, tEventID EventID) { return false; }
280 virtual bool SetTitle(cEvent *Event, const char *Title) { return false; }
281 virtual bool SetShortText(cEvent *Event, const char *ShortText) { return false; }
282 virtual bool SetDescription(cEvent *Event, const char *Description) { return false; }
283 virtual bool SetContents(cEvent *Event, uchar *Contents) { return false; }
284 virtual bool SetParentalRating(cEvent *Event, int ParentalRating) { return false; }
285 virtual bool SetStartTime(cEvent *Event, time_t StartTime) { return false; }
286 virtual bool SetDuration(cEvent *Event, int Duration) { return false; }
287 virtual bool SetVps(cEvent *Event, time_t Vps) { return false; }
288 virtual bool SetComponents(cEvent *Event, cComponents *Components) { return false; }
289 virtual bool FixEpgBugs(cEvent *Event) { return false; }
291 virtual bool HandleEvent(cEvent *Event) { return false; }
294 virtual bool SortSchedule(cSchedule *Schedule) { return false; }
296 virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version) { return false; }
299 virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy) { return true; } // TODO remove obsolete Dummy
306 virtual bool EndSegmentTransfer(bool Modified, bool Dummy) { return false; } // TODO remove obsolete Dummy
310 };
311
312class cEpgHandlers : public cList<cEpgHandler> {
313public:
314 bool IgnoreChannel(const cChannel *Channel);
315 bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version);
316 bool HandledExternally(const cChannel *Channel);
317 bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version);
318 void SetEventID(cEvent *Event, tEventID EventID);
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
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
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:1429
cEpgDataReader(void)
Definition epg.c:1424
virtual bool SetTitle(cEvent *Event, const char *Title)
Definition epg.h:280
virtual bool SetVps(cEvent *Event, time_t Vps)
Definition epg.h:287
virtual bool FixEpgBugs(cEvent *Event)
Fixes some known problems with EPG data.
Definition epg.h:289
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:274
virtual bool SetParentalRating(cEvent *Event, int ParentalRating)
Definition epg.h:284
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:263
virtual bool BeginSegmentTransfer(const cChannel *Channel, bool Dummy)
Definition epg.h:299
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:278
virtual bool SetComponents(cEvent *Event, cComponents *Components)
Definition epg.h:288
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:258
cEpgHandler(void)
Constructs a new EPG handler and adds it to the list of EPG handlers.
Definition epg.c:1436
virtual bool EndSegmentTransfer(bool Modified, bool Dummy)
< Called directly after IgnoreChannel() before any other handler method is called.
Definition epg.h:306
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:291
virtual bool SetContents(cEvent *Event, uchar *Contents)
Definition epg.h:283
virtual bool SetDescription(cEvent *Event, const char *Description)
Definition epg.h:282
virtual bool SortSchedule(cSchedule *Schedule)
Sorts the Schedule after the complete table has been processed.
Definition epg.h:294
virtual ~cEpgHandler()
Definition epg.c:1441
virtual bool SetStartTime(cEvent *Event, time_t StartTime)
Definition epg.h:285
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:296
virtual bool SetDuration(cEvent *Event, int Duration)
Definition epg.h:286
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:268
virtual bool SetShortText(cEvent *Event, const char *ShortText)
Definition epg.h:281
void SortSchedule(cSchedule *Schedule)
Definition epg.c:1593
void EndSegmentTransfer(bool Modified)
Definition epg.c:1620
bool IgnoreChannel(const cChannel *Channel)
Definition epg.c:1450
bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version)
Definition epg.c:1459
void SetStartTime(cEvent *Event, time_t StartTime)
Definition epg.c:1540
void SetTitle(cEvent *Event, const char *Title)
Definition epg.c:1495
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
Definition epg.c:1602
bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
Definition epg.c:1477
void FixEpgBugs(cEvent *Event)
Definition epg.c:1576
void HandleEvent(cEvent *Event)
Definition epg.c:1585
void SetComponents(cEvent *Event, cComponents *Components)
Definition epg.c:1567
void SetVps(cEvent *Event, time_t Vps)
Definition epg.c:1558
void SetParentalRating(cEvent *Event, int ParentalRating)
Definition epg.c:1531
bool BeginSegmentTransfer(const cChannel *Channel)
Definition epg.c:1611
bool HandledExternally(const cChannel *Channel)
Definition epg.c:1468
void SetContents(cEvent *Event, uchar *Contents)
Definition epg.c:1522
void SetShortText(cEvent *Event, const char *ShortText)
Definition epg.c:1504
void SetDuration(cEvent *Event, int Duration)
Definition epg.c:1549
void SetDescription(cEvent *Event, const char *Description)
Definition epg.c:1513
void SetEventID(cEvent *Event, tEventID EventID)
Definition epg.c:1486
Definition epg.h:73
const char * ShortText(void) const
Definition epg.h:106
char * shortText
Definition epg.h:86
cString ToDescr(void) const
Definition epg.c:251
~cEvent()
Definition epg.c:136
time_t Vps(void) const
Definition epg.h:114
time_t vps
Definition epg.h:92
static const char * ContentToString(uchar Content)
Definition epg.c:282
void SetSeen(void)
Definition epg.c:240
uchar TableID(void) const
Definition epg.h:102
void SetAux(const char *Aux)
Definition epg.c:245
time_t EndTime(void) const
Definition epg.h:112
static cMutex numTimersMutex
Definition epg.h:76
uchar parentalRating
Definition epg.h:84
cString GetDateString(void) const
Definition epg.c:431
int RunningStatus(void) const
Definition epg.h:104
const cComponents * Components(void) const
Definition epg.h:108
uchar Contents(int i=0) const
Definition epg.h:109
const char * Description(void) const
Definition epg.h:107
bool IsRunning(bool OrAboutToStart=false) const
Definition epg.c:277
cEvent(tEventID EventID)
Definition epg.c:115
void SetRunningStatus(int RunningStatus, const cChannel *Channel=NULL)
Definition epg.c:180
void IncNumTimers(void) const
Definition epg.c:259
int ParentalRating(void) const
Definition epg.h:110
time_t StartTime(void) const
Definition epg.h:111
tChannelID ChannelID(void) const
Definition epg.c:154
void SetVps(time_t Vps)
Definition epg.c:235
bool SeenWithin(int Seconds) const
Definition epg.h:116
bool Parse(char *s)
Definition epg.c:493
char * title
Definition epg.h:85
static bool Read(FILE *f, cSchedule *Schedule, int &Line)
Definition epg.c:535
time_t seen
Definition epg.h:93
char * description
Definition epg.h:87
const char * Aux(void) const
Definition epg.h:117
tEventID eventID
Definition epg.h:80
void SetShortText(const char *ShortText)
Definition epg.c:192
u_int16_t numTimers
Definition epg.h:79
cString GetTimeString(void) const
Definition epg.c:436
const char * Title(void) const
Definition epg.h:105
void DecNumTimers(void) const
Definition epg.c:268
tEventID EventID(void) const
Definition epg.h:101
virtual int Compare(const cListObject &ListObject) const
Must return 0 if this object is equal to ListObject, a positive value if it is "greater",...
Definition epg.c:145
cComponents * components
Definition epg.h:88
const cSchedule * Schedule(void) const
Definition epg.h:100
void SetStartTime(time_t StartTime)
Definition epg.c:219
bool HasTimer(void) const
Definition epg.h:120
void SetComponents(cComponents *Components)
Definition epg.c:202
int duration
Definition epg.h:90
void SetEventID(tEventID EventID)
Definition epg.c:159
cString GetEndTimeString(void) const
Definition epg.c:441
int Duration(void) const
Definition epg.h:113
cString GetVpsString(void) const
Definition epg.c:446
void SetVersion(uchar Version)
Definition epg.c:175
uchar tableID
Definition epg.h:81
void Dump(FILE *f, const char *Prefix="", bool InfoOnly=false) const
Definition epg.c:454
void SetDuration(int Duration)
Definition epg.c:230
void SetContents(uchar *Contents)
Definition epg.c:208
cSchedule * schedule
Definition epg.h:78
uchar Version(void) const
Definition epg.h:103
uchar runningStatus
Definition epg.h:83
void SetTitle(const char *Title)
Definition epg.c:187
time_t Seen(void) const
Definition epg.h:115
char * aux
Definition epg.h:94
uchar version
Definition epg.h:82
void SetTableID(uchar TableID)
Definition epg.c:170
uchar contents[MaxEventContents]
Definition epg.h:91
cString GetParentalRatingString(void) const
Definition epg.c:424
void FixEpgBugs(void)
Definition epg.c:693
void SetDescription(const char *Description)
Definition epg.c:197
time_t startTime
Definition epg.h:89
void SetParentalRating(int ParentalRating)
Definition epg.c:214
Definition tools.h:916
Definition tools.h:631
const cEvent * GetPresentEvent(void) const
Definition epg.c:1003
cHash< cEvent > eventsHashID
Definition epg.h:157
bool Modified(int &State) const
Definition epg.h:166
bool HasTimer(void) const
Definition epg.h:181
void SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel=NULL)
Definition epg.c:1071
void UnhashEvent(cEvent *Event)
Definition epg.c:996
const cEvent * GetEventAround(time_t Time) const
Definition epg.c:1057
const cEvent * GetEventByTime(time_t StartTime) const
Definition epg.c:1050
void DecNumTimers(void) const
Definition epg.c:946
bool OnActualTp(uchar TableId)
Definition epg.c:953
void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
Definition epg.c:1109
static bool Read(FILE *f, cSchedules *Schedules)
Definition epg.c:1196
cSchedule(tChannelID ChannelID)
Definition epg.c:929
void SetPresentSeen(void)
Definition epg.h:171
static cMutex numTimersMutex
Definition epg.h:154
bool PresentSeenWithin(int Seconds) const
Definition epg.h:169
void ClrRunningStatus(cChannel *Channel=NULL)
Definition epg.c:1086
void ResetVersions(void)
Definition epg.c:1097
cList< cEvent > events
Definition epg.h:156
void Cleanup(void)
Definition epg.c:1148
tChannelID channelID
Definition epg.h:155
time_t PresentSeen(void) const
Definition epg.h:168
const cEvent * GetEventById(tEventID EventID) const
Definition epg.c:1045
const cList< cEvent > * Events(void) const
Definition epg.h:186
void DelEvent(cEvent *Event)
Definition epg.c:968
void HashEvent(cEvent *Event)
Definition epg.c:984
u_int16_t numTimers
Definition epg.h:159
tChannelID ChannelID(void) const
Definition epg.h:165
void SetModified(void)
Definition epg.h:170
int modified
Definition epg.h:161
void Sort(void)
Definition epg.c:1103
bool onActualTp
Definition epg.h:160
cHash< cEvent > eventsHashStartTime
Definition epg.h:158
void IncNumTimers(void) const
Definition epg.c:939
time_t presentSeen
Definition epg.h:162
cEvent * AddEvent(cEvent *Event)
Definition epg.c:960
void Dump(const cChannels *Channels, FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
Definition epg.c:1164
const cEvent * GetFollowingEvent(void) const
Definition epg.c:1018
cSchedules(void)
Definition epg.c:1283
static cSchedules * GetSchedulesWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for write access.
Definition epg.c:1293
const cSchedule * GetSchedule(tChannelID ChannelID) const
Definition epg.c:1393
static const cSchedules * GetSchedulesRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for read access.
Definition epg.c:1288
static bool Dump(FILE *f=NULL, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0)
Definition epg.c:1326
static void SetEpgDataFileName(const char *FileName)
Definition epg.c:1298
static void Cleanup(bool Force=false)
Definition epg.c:1305
static time_t lastDump
Definition epg.h:208
static char * epgDataFileName
Definition epg.h:207
static void ResetVersions(void)
Definition epg.c:1319
cSchedule * AddSchedule(tChannelID ChannelID)
Definition epg.c:1382
static bool Read(FILE *f=NULL)
Definition epg.c:1350
static cSchedules schedules
Definition epg.h:206
@ MaxEventContents
Definition epg.h:25
cEpgHandlers EpgHandlers
Definition epg.c:1448
u_int32_t tEventID
Definition epg.h:71
void ReportEpgBugFixStats(bool Force=false)
Definition epg.c:614
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
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:686
unsigned char uchar
Definition tools.h:31