summaryrefslogtreecommitdiff
path: root/epg.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-01-03 12:20:37 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-01-03 12:20:37 +0100
commit56627cd12d9e01379d9104300fec837a4db8df48 (patch)
tree3a3029da935dfef7b4edee8be35c11cd83e281d5 /epg.h
parent4b5f232e59988e5c043b08210c3940a5bf82b360 (diff)
downloadvdr-56627cd12d9e01379d9104300fec837a4db8df48.tar.gz
vdr-56627cd12d9e01379d9104300fec837a4db8df48.tar.bz2
Implemented handling the "Content Descriptor"
Diffstat (limited to 'epg.h')
-rw-r--r--epg.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/epg.h b/epg.h
index 792bb136..b1eed7e6 100644
--- a/epg.h
+++ b/epg.h
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.h 1.35 2006/10/07 13:47:19 kls Exp $
+ * $Id: epg.h 2.1 2010/01/03 11:17:20 kls Exp $
*/
#ifndef __EPG_H
@@ -19,6 +19,20 @@
#define MAXEPGBUGFIXLEVEL 3
+#define MAXEVCONTENTS 4
+#define EVCONTENTMASK_MOVIEDRAMA 0x10
+#define EVCONTENTMASK_NEWSCURRENTAFFAIRS 0x20
+#define EVCONTENTMASK_SHOW 0x30
+#define EVCONTENTMASK_SPORTS 0x40
+#define EVCONTENTMASK_CHILDRENYOUTH 0x50
+#define EVCONTENTMASK_MUSICBALLETDANCE 0x60
+#define EVCONTENTMASK_ARTSCULTURE 0x70
+#define EVCONTENTMASK_SOCIALPOLITICALECONOMICS 0x80
+#define EVCONTENTMASK_EDUCATIONALSCIENCE 0x90
+#define EVCONTENTMASK_LEISUREHOBBIES 0xA0
+#define EVCONTENTMASK_SPECIAL 0xB0
+#define EVCONTENTMASK_USERDEFINED 0xF0
+
enum eDumpMode { dmAll, dmPresent, dmFollowing, dmAtTime };
struct tComponent {
@@ -62,6 +76,7 @@ private:
char *shortText; // Short description of this event (typically the episode name in case of a series)
char *description; // Description of this event
cComponents *components; // The stream components of this event
+ uchar contents[MAXEVCONTENTS]; // Contents of this event
time_t startTime; // Start time of this event
int duration; // Duration of this event in seconds
time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL)
@@ -80,6 +95,7 @@ public:
const char *ShortText(void) const { return shortText; }
const char *Description(void) const { return description; }
const cComponents *Components(void) const { return components; }
+ uchar Contents(int i = 0) const { return (0 <= i && i < MAXEVCONTENTS) ? contents[i] : 0; }
time_t StartTime(void) const { return startTime; }
time_t EndTime(void) const { return startTime + duration; }
int Duration(void) const { return duration; }
@@ -88,6 +104,7 @@ public:
bool SeenWithin(int Seconds) const { return time(NULL) - seen < Seconds; }
bool HasTimer(void) const;
bool IsRunning(bool OrAboutToStart = false) const;
+ static const char *ContentToString(uchar Content);
cString GetDateString(void) const;
cString GetTimeString(void) const;
cString GetEndTimeString(void) const;
@@ -100,6 +117,7 @@ public:
void SetShortText(const char *ShortText);
void SetDescription(const char *Description);
void SetComponents(cComponents *Components); // Will take ownership of Components!
+ void SetContents(uchar *Contents);
void SetStartTime(time_t StartTime);
void SetDuration(int Duration);
void SetVps(time_t Vps);