From e9c64251684c2883817f8967f1b99b9e8fdf4122 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 21 Feb 2004 12:28:17 +0100 Subject: Added the 'running status' to the EPG events --- epg.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'epg.c') diff --git a/epg.c b/epg.c index dbbce74e..8454cebd 100644 --- a/epg.c +++ b/epg.c @@ -7,10 +7,11 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $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 #include @@ -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) -- cgit v1.2.3