summaryrefslogtreecommitdiff
path: root/epghandler.h
blob: b37f7c273476eb2b6cd41c0cfd49f360d850af82 (plain)
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
/*
 * 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);

private:
    std::string origShortText;
    std::string origDescription;
    cEquivHandler* equivHandler;
    util::cCharsetFixer* charsetFixer;
    static const int _LONG_EVENT_HOURS = 10;
    bool modified;

};

#endif /*APIVERSNUM > 10725*/
#endif /* CEEPGHANDLER_H_ */