diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-02-21 12:28:17 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-02-21 12:28:17 +0100 |
commit | e9c64251684c2883817f8967f1b99b9e8fdf4122 (patch) | |
tree | 72998d020f153b311726685e6df20bf804a7f3b2 /epg.c | |
parent | 062935a84477549c89c9cb978f0f296a1f12f6db (diff) | |
download | vdr-e9c64251684c2883817f8967f1b99b9e8fdf4122.tar.gz vdr-e9c64251684c2883817f8967f1b99b9e8fdf4122.tar.bz2 |
Added the 'running status' to the EPG events
Diffstat (limited to 'epg.c')
-rw-r--r-- | epg.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -7,10 +7,11 @@ * 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.c 1.5 2004/02/14 11:00:00 kls Exp $ + * $Id: epg.c 1.6 2004/02/21 12:21:18 kls Exp $ */ #include "epg.h" +#include "libsi/si.h" #include <ctype.h> #include <time.h> @@ -22,6 +23,7 @@ cEvent::cEvent(tChannelID ChannelID, u_int16_t EventID) eventID = EventID; tableID = 0; version = 0xFF; // actual version numbers are 0..31 + runningStatus = 0; isPresent = isFollowing = false; title = NULL; shortText = NULL; @@ -53,6 +55,11 @@ void cEvent::SetVersion(uchar Version) version = Version; } +void cEvent::SetRunningStatus(int RunningStatus) +{ + runningStatus = RunningStatus; +} + void cEvent::SetIsPresent(bool IsPresent) { isPresent = IsPresent; @@ -489,6 +496,16 @@ const cEvent *cSchedule::GetEventAround(time_t Time) const return pe; } +void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus) +{ + for (cEvent *p = events.First(); p; p = events.Next(p)) { + if (p == Event) + p->SetRunningStatus(RunningStatus); + else if (RunningStatus >= SI::RunningStatusPausing && p->RunningStatus() > SI::RunningStatusNotRunning) + p->SetRunningStatus(SI::RunningStatusNotRunning); + } +} + bool cSchedule::SetPresentEvent(cEvent *Event) { if (present) |