summaryrefslogtreecommitdiff
path: root/timers.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-03-20 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-03-20 18:00:00 +0100
commit782b517c51eaa6d2641fe9b6801afdad50be8586 (patch)
tree0d7b59865417ded6a8dfcb22b97ad2e32260982a /timers.h
parent05402c740765e6e0ca2aaf1760c77d9e3d3ed5a5 (diff)
downloadvdr-patch-lnbsharing-782b517c51eaa6d2641fe9b6801afdad50be8586.tar.gz
vdr-patch-lnbsharing-782b517c51eaa6d2641fe9b6801afdad50be8586.tar.bz2
Version 1.3.23vdr-1.3.23
- The setup option "DVB/Video display format" is now only available if "Video format" is set to "4:3" (suggested by Mikko Salo). - Updated the Russian OSD texts (thanks to Vyacheslav Dikonov). - Dropped CA support for the old '-icam' firmware. - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Updated the Swedish OSD texts (thanks to Tomas Prybil). - Fixed a few French OSD texts that were in the wrong place. - Improved matching timers to EPG events, especially in case there are several events with the same VPS time. - Fixed cDolbyRepacker to allow recording ProSieben HD broadcasts (thanks to Reinhard Nissl). - Fixed cDvbDevice::SetVideoDisplayFormat() in case of 16:9 (thanks to Marco Schlüßler). - The running status of a VPS event is now only taken seriously if that event has been seen within the last 30 seconds - otherwise recording is done as if no VPS was available. - The day of a timer is now stored as a full date in ISO notation ("YYYY-MM-DD") in 'timers.conf' and for the result of the SVDRP command LSTT (based in parts on a patch by Roman Krenický). - Some fixes to avoid compiler warnings in gcc 4.0 (thanks to Ville Skyttä for reporting these). - Single shot timers are now reliably deleted when they have expired. - Fixed setting the colored button help after deleting a recording in case the next menu entry is a directory (thanks to Steffen Beyer). - Improved falling back to normal recording if the VPS data hasn't been seen for more than 30 seconds. - Added a missing cMutexLock to cRemote::HasKeys() (thanks to Wolfgang Rohdewald). - All log entries regarding timers now contain a short description of the timer.
Diffstat (limited to 'timers.h')
-rw-r--r--timers.h50
1 files changed, 27 insertions, 23 deletions
diff --git a/timers.h b/timers.h
index 7dcaf16..ae83f5b 100644
--- a/timers.h
+++ b/timers.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.h 1.13 2004/12/26 12:21:29 kls Exp $
+ * $Id: timers.h 1.18 2005/03/20 14:47:45 kls Exp $
*/
#ifndef __TIMERS_H
@@ -30,14 +30,15 @@ private:
bool recording, pending, inVpsMargin;
int flags;
cChannel *channel;
- int day;
+ mutable time_t day; ///< midnight of the day this timer shall hit, or of the first day it shall hit in case of a repeating timer
+ int weekdays; ///< bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)
int start;
int stop;
int priority;
int lifetime;
char file[MaxFileName];
- mutable time_t firstday;
char *summary;
+ const cSchedule *schedule;
const cEvent *event;
public:
cTimer(bool Instant = false, bool Pause = false);
@@ -45,36 +46,38 @@ public:
virtual ~cTimer();
cTimer& operator= (const cTimer &Timer);
virtual int Compare(const cListObject &ListObject) const;
- bool Recording(void) { return recording; }
- bool Pending(void) { return pending; }
- bool InVpsMargin(void) { return inVpsMargin; }
- int Flags(void) { return flags; }
- const cChannel *Channel(void) { return channel; }
- int Day(void) { return day; }
- int Start(void) { return start; }
- int Stop(void) { return stop; }
- int Priority(void) { return priority; }
- int Lifetime(void) { return lifetime; }
- const char *File(void) { return file; }
- time_t FirstDay(void) { return firstday; }
- const char *Summary(void) { return summary; }
+ bool Recording(void) const { return recording; }
+ bool Pending(void) const { return pending; }
+ bool InVpsMargin(void) const { return inVpsMargin; }
+ int Flags(void) const { return flags; }
+ const cChannel *Channel(void) const { return channel; }
+ time_t Day(void) const { return day; }
+ int WeekDays(void) const { return weekdays; }
+ int Start(void) const { return start; }
+ int Stop(void) const { return stop; }
+ int Priority(void) const { return priority; }
+ int Lifetime(void) const { return lifetime; }
+ const char *File(void) const { return file; }
+ time_t FirstDay(void) const { return weekdays ? day : 0; }
+ const char *Summary(void) const { return summary; }
cString ToText(bool UseChannelID = false);
- const cEvent *Event(void) { return event; }
+ cString ToDescr(void) const;
+ const cEvent *Event(void) const { return event; }
bool Parse(const char *s);
bool Save(FILE *f);
bool IsSingleEvent(void) const;
static int GetMDay(time_t t);
static int GetWDay(time_t t);
- static int GetWDayFromMDay(int MDay);
bool DayMatches(time_t t) const;
static time_t IncDay(time_t t, int Days);
static time_t SetTime(time_t t, int SecondsFromMidnight);
char *SetFile(const char *File);
bool Matches(time_t t = 0, bool Directly = false) const;
- int Matches(const cEvent *Event);
+ int Matches(const cEvent *Event, int *Overlap = NULL) const;
+ bool Expired(void) const;
time_t StartTime(void) const;
time_t StopTime(void) const;
- void SetEvent(const cEvent *Event);
+ void SetEvent(const cSchedule *Schedule, const cEvent *Event);
void SetRecording(bool Recording);
void SetPending(bool Pending);
void SetInVpsMargin(bool InVpsMargin);
@@ -84,10 +87,10 @@ public:
bool HasFlags(int Flags) const;
void Skip(void);
void OnOff(void);
- cString PrintFirstDay(void);
+ cString PrintFirstDay(void) const;
static int TimeToInt(int t);
- static int ParseDay(const char *s, time_t *FirstDay = NULL);
- static cString PrintDay(int d, time_t FirstDay = 0);
+ static bool ParseDay(const char *s, time_t &Day, int &WeekDays);
+ static cString PrintDay(time_t Day, int WeekDays);
};
class cTimers : public cConfig<cTimer> {
@@ -109,6 +112,7 @@ public:
///< Returns true if any of the timers have been modified.
///< Calling this function resets the 'modified' flag to false.
void SetEvents(void);
+ void DeleteExpired(void);
};
extern cTimers Timers;