summaryrefslogtreecommitdiff
path: root/PLUGINS/src/epgtableid0/epgtableid0.c
blob: b2697c2b30ce27683e318bbfe802a3955536a1a7 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
 * epgtableid0.c: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id: epgtableid0.c 1.2 2012/12/27 10:32:52 kls Exp $
 */

#include <vdr/epg.h>
#include <vdr/plugin.h>

static const char *VERSION        = "0.0.2";
static const char *DESCRIPTION    = "EPG handler for events with table id 0x00";

// --- cTable0Handler --------------------------------------------------------

class cTable0Handler : public cEpgHandler {
private:
  bool Ignore(cEvent *Event) { return Event->TableID() == 0x00; }
public:
  virtual bool SetEventID(cEvent *Event, tEventID EventID);
  virtual bool SetStartTime(cEvent *Event, time_t StartTime);
  virtual bool SetDuration(cEvent *Event, int Duration);
  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 SetVps(cEvent *Event, time_t Vps);
  virtual bool FixEpgBugs(cEvent *Event);
  };

bool cTable0Handler::SetEventID(cEvent *Event, tEventID EventID)
{
  return Ignore(Event);
}

bool cTable0Handler::SetStartTime(cEvent *Event, time_t StartTime)
{
  return Ignore(Event);
}

bool cTable0Handler::SetDuration(cEvent *Event, int Duration)
{
  return Ignore(Event);
}

bool cTable0Handler::SetTitle(cEvent *Event, const char *Title)
{
  return Ignore(Event);
}

bool cTable0Handler::SetShortText(cEvent *Event, const char *ShortText)
{
  return Ignore(Event);
}

bool cTable0Handler::SetDescription(cEvent *Event, const char *Description)
{
  return Ignore(Event);
}

bool cTable0Handler::SetContents(cEvent *Event, uchar *Contents)
{
  return Ignore(Event);
}

bool cTable0Handler::SetParentalRating(cEvent *Event, int ParentalRating)
{
  return Ignore(Event);
}

bool cTable0Handler::SetVps(cEvent *Event, time_t Vps)
{
  return Ignore(Event);
}

bool cTable0Handler::FixEpgBugs(cEvent *Event)
{
  return Ignore(Event);
}

// --- cPluginEpgtableid0 ----------------------------------------------------

class cPluginEpgtableid0 : public cPlugin {
public:
  virtual const char *Version(void) { return VERSION; }
  virtual const char *Description(void) { return DESCRIPTION; }
  virtual bool Initialize(void);
  };

bool cPluginEpgtableid0::Initialize(void)
{
  new cTable0Handler;
  return true;
}

VDRPLUGINCREATOR(cPluginEpgtableid0); // Don't touch this!