From c05277882c111760d4e275b8521bb057e913a946 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Tue, 21 Dec 2004 18:35:54 +0000 Subject: - dunno --- common.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'common.c') diff --git a/common.c b/common.c index e589235..1e319e9 100644 --- a/common.c +++ b/common.c @@ -1,5 +1,5 @@ /* - * $Id: common.c,v 1.1 2004/12/19 22:03:09 lordjaxom Exp $ + * $Id: common.c,v 1.2 2004/12/21 18:35:54 lordjaxom Exp $ */ #include "common.h" @@ -89,6 +89,28 @@ const char *ChannelBouquet(const cChannel *Channel, int Number) { #endif } */ + +bool StoppedTimer(const char *Name) +{ + cTimer *timer = Timers.First(); + while (timer) { + if (strcmp(Name, timer->File()) == 0) + break; + timer = Timers.Next(timer); + } + return timer == NULL || !timer->Recording(); +} + +const cRecording *GetRecordingByName(const char *Name) +{ + const cRecording *rec = Recordings.First(); + for (; rec != NULL; rec = Recordings.Next(rec)) { + if (strcmp(rec->Name(), Name) == 0) + return rec; + } + return NULL; +} + cxType TimeType(time_t Time, const std::string &Format) { static char result[1000]; -- cgit v1.2.3