vdr
1.7.27
|
00001 /* 00002 * epgtableid0.c: A plugin for the Video Disk Recorder 00003 * 00004 * See the README file for copyright information and how to reach the author. 00005 * 00006 * $Id: epgtableid0.c 1.1 2012/03/10 15:10:43 kls Exp $ 00007 */ 00008 00009 #include <vdr/epg.h> 00010 #include <vdr/plugin.h> 00011 00012 static const char *VERSION = "0.0.1"; 00013 static const char *DESCRIPTION = "EPG handler for events with table id 0x00"; 00014 00015 // --- cTable0Handler -------------------------------------------------------- 00016 00017 class cTable0Handler : public cEpgHandler { 00018 private: 00019 bool Ignore(cEvent *Event) { return Event->TableID() == 0x00; } 00020 public: 00021 virtual bool SetEventID(cEvent *Event, tEventID EventID); 00022 virtual bool SetStartTime(cEvent *Event, time_t StartTime); 00023 virtual bool SetDuration(cEvent *Event, int Duration); 00024 virtual bool SetTitle(cEvent *Event, const char *Title); 00025 virtual bool SetShortText(cEvent *Event, const char *ShortText); 00026 virtual bool SetDescription(cEvent *Event, const char *Description); 00027 virtual bool SetContents(cEvent *Event, uchar *Contents); 00028 virtual bool SetParentalRating(cEvent *Event, int ParentalRating); 00029 virtual bool SetVps(cEvent *Event, time_t Vps); 00030 virtual bool FixEpgBugs(cEvent *Event); 00031 }; 00032 00033 bool cTable0Handler::SetEventID(cEvent *Event, tEventID EventID) 00034 { 00035 return Ignore(Event); 00036 } 00037 00038 bool cTable0Handler::SetStartTime(cEvent *Event, time_t StartTime) 00039 { 00040 return Ignore(Event); 00041 } 00042 00043 bool cTable0Handler::SetDuration(cEvent *Event, int Duration) 00044 { 00045 return Ignore(Event); 00046 } 00047 00048 bool cTable0Handler::SetTitle(cEvent *Event, const char *Title) 00049 { 00050 return Ignore(Event); 00051 } 00052 00053 bool cTable0Handler::SetShortText(cEvent *Event, const char *ShortText) 00054 { 00055 return Ignore(Event); 00056 } 00057 00058 bool cTable0Handler::SetDescription(cEvent *Event, const char *Description) 00059 { 00060 return Ignore(Event); 00061 } 00062 00063 bool cTable0Handler::SetContents(cEvent *Event, uchar *Contents) 00064 { 00065 return Ignore(Event); 00066 } 00067 00068 bool cTable0Handler::SetParentalRating(cEvent *Event, int ParentalRating) 00069 { 00070 return Ignore(Event); 00071 } 00072 00073 bool cTable0Handler::SetVps(cEvent *Event, time_t Vps) 00074 { 00075 return Ignore(Event); 00076 } 00077 00078 bool cTable0Handler::FixEpgBugs(cEvent *Event) 00079 { 00080 return Ignore(Event); 00081 } 00082 00083 // --- cPluginEpgtableid0 ---------------------------------------------------- 00084 00085 class cPluginEpgtableid0 : public cPlugin { 00086 public: 00087 virtual const char *Version(void) { return VERSION; } 00088 virtual const char *Description(void) { return DESCRIPTION; } 00089 virtual bool Initialize(void); 00090 }; 00091 00092 bool cPluginEpgtableid0::Initialize(void) 00093 { 00094 new cTable0Handler; 00095 return true; 00096 } 00097 00098 VDRPLUGINCREATOR(cPluginEpgtableid0); // Don't touch this!