43 mutable char file[NAME_MAX * 2 + 1];
54 int Id(
void)
const {
return id; }
60 time_t
Day(
void)
const {
return day; }
67 time_t
FirstDay(
void)
const {
return weekdays ? day : 0; }
68 const char *
Aux(
void)
const {
return aux; }
75 bool Parse(
const char *s);
81 static time_t
IncDay(time_t t,
int Days);
82 static time_t
SetTime(time_t t,
int SecondsFromMidnight);
84 bool Matches(time_t t = 0,
bool Directly =
false,
int Margin = 0)
const;
112 static bool ParseDay(
const char *s, time_t &Day,
int &WeekDays);
113 static cString PrintDay(time_t Day,
int WeekDays,
bool SingleByteChars);
123 static const cTimers *GetTimersRead(
cStateKey &StateKey,
int TimeoutMs = 0);
169 static bool Load(
const char *FileName);
170 static int NewTimerId(
void);
175 const cTimer *GetMatch(time_t t)
const;
179 int GetMaxPriority(
void)
const;
181 const cTimer *GetNextActiveTimer(
void)
const;
184 bool DeleteExpired(
void);
187 void Del(
cTimer *Timer,
bool DeleteObject =
true);
188 bool StoreRemoteTimers(
const char *ServerName = NULL,
const cStringList *RemoteTimers = NULL);
222 #define LOCK_TIMERS_READ USE_LIST_LOCK_READ(Timers) 223 #define LOCK_TIMERS_WRITE USE_LIST_LOCK_WRITE(Timers)
void SetWeekDays(int WeekDays)
void SetRecording(bool Recording)
static int TimeToInt(int t)
cTimer * GetMatch(const cEvent *Event, eTimerMatch *Match=NULL)
bool DayMatches(time_t t) const
cTimer * GetMatch(time_t t)
cString PrintFirstDay(void) const
const cEvent * Event(void) const
bool Matches(time_t t=0, bool Directly=false, int Margin=0) const
bool Parse(const char *s)
void SetInVpsMargin(bool InVpsMargin)
bool HandleRemoteTimerModifications(cTimer *NewTimer, cTimer *OldTimer=NULL, cString *Msg=NULL)
Performs any operations necessary to synchronize changes to a timer between peer VDR machines...
bool SetEventFromSchedule(const cSchedules *Schedules)
time_t Deferred(void) const
void SetPending(bool Pending)
time_t StartTime(void) const
int weekdays
bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)
const cChannel * Channel(void) const
cTimer(bool Instant=false, bool Pause=false, const cChannel *Channel=NULL)
virtual int Compare(const cListObject &ListObject) const
Must return 0 if this object is equal to ListObject, a positive value if it is "greater", and a negative value if it is "smaller".
static time_t SetTime(time_t t, int SecondsFromMidnight)
bool Recording(void) const
void SetRemote(const char *Remote)
static int GetMDay(time_t t)
bool HasFlags(uint Flags) const
void SetLifetime(int Lifetime)
const char * Remote(void) const
void SetAux(const char *Aux)
cTimer & operator=(const cTimer &Timer)
time_t day
midnight of the day this timer shall hit, or of the first day it shall hit in case of a repeating tim...
static time_t IncDay(time_t t, int Days)
bool InVpsMargin(void) const
static int GetWDay(time_t t)
void SetPriority(int Priority)
time_t deferred
Matches(time_t, ...) will return false if the current time is before this value.
cString ToDescr(void) const
time_t StopTime(void) const
void InvFlags(uint Flags)
void SetFlags(uint Flags)
void SetDeferred(int Seconds)
const char * File(void) const
bool SetEvent(const cEvent *Event)
bool IsSingleEvent(void) const
static bool ParseDay(const char *s, time_t &Day, int &WeekDays)
cTimer * GetById(int Id, const char *Remote=NULL)
void ClrFlags(uint Flags)
time_t FirstDay(void) const
cString ToText(bool UseChannelID=false) const
const char * Aux(void) const
void SetFile(const char *File)
cTimer * GetTimer(const cTimer *Timer)
static cString PrintDay(time_t Day, int WeekDays, bool SingleByteChars)