-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathepghandler.h
61 lines (55 loc) · 2.01 KB
/
epghandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* cEEpgHandler.h
*
* Created on: 11.3.2012
* Author: d.petrovski
*/
#ifndef CEEPGHANDLER_H_
#define CEEPGHANDLER_H_
#include <vdr/config.h>
#if APIVERSNUM > 10725
#include <vdr/epg.h>
#include <string>
class cEquivHandler;
namespace util {
class cCharsetFixer;
}
class cEEpgHandler : public cEpgHandler {
public:
cEEpgHandler();
virtual ~cEEpgHandler();
virtual bool IgnoreChannel(const cChannel *Channel);
virtual bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version);
virtual bool SetEventID(cEvent *Event, tEventID EventID);
virtual bool SetTitle(cEvent *Event, const char *Title);
virtual bool SetShortText(cEvent *Event, const char *ShortText);
virtual bool SetDescription(cEvent *Event, const char *Description);
virtual bool SetContents(cEvent *Event, uchar *Contents);
virtual bool SetParentalRating(cEvent *Event, int ParentalRating);
virtual bool SetStartTime(cEvent *Event, time_t StartTime);
virtual bool SetDuration(cEvent *Event, int Duration);
virtual bool SetVps(cEvent *Event, time_t Vps);
virtual bool FixEpgBugs(cEvent *Event);
virtual bool HandleEvent(cEvent *Event);
virtual bool SortSchedule(cSchedule *Schedule);
virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
// bool ParseEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version);
private:
std::string ExtractAttribute(const char* attr);
void FindDuplicate(cEvent* Event, const char* newTitle);
/*
* Extract the date from duplicate event and remove it
*/
void RemoveEvent(cEvent* ev);
private:
std::string origShortText;
std::string origDescription;
cEquivHandler* equivHandler;
util::cCharsetFixer* charsetFixer;
cSchedule* schedule;
static const int _LONG_EVENT_HOURS = 10;
bool modified;
bool searchDuplicates;
};
#endif /*APIVERSNUM > 10725*/
#endif /* CEEPGHANDLER_H_ */