50 mutable char file[NAME_MAX * 2 + 1];
62 int Id(
void)
const {
return id; }
68 time_t
Day(
void)
const {
return day; }
77 const char *
Aux(
void)
const {
return aux; }
85 bool Parse(
const char *s);
91 static time_t
IncDay(time_t t,
int Days);
92 static time_t
SetTime(time_t t,
int SecondsFromMidnight);
96 bool Matches(time_t t = 0,
bool Directly =
false,
int Margin = 0)
const;
189 const cTimer *
GetById(
int Id,
const char *Remote = NULL)
const;
209 void Del(
cTimer *Timer,
bool DeleteObject =
true);
244#define LOCK_TIMERS_READ USE_LIST_LOCK_READ(Timers)
245#define LOCK_TIMERS_WRITE USE_LIST_LOCK_WRITE(Timers)
const char * FileName(void)
cSortedTimers(const cTimers *Timers)
void SetAux(const char *Aux)
time_t stopTime
the time_t value calculated from 'day', 'start' and 'stop'
const char * Aux(void) const
void SetLifetime(int Lifetime)
const char * File(void) const
cString PrintFirstDay(void) const
time_t Deferred(void) const
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...
int weekdays
bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)
bool IsSingleEvent(void) const
void SetPending(bool Pending)
cTimer(bool Instant=false, bool Pause=false, const cChannel *Channel=NULL)
time_t StopTime(void) const
the stop time as given by the user
time_t FirstDay(void) const
cString PatternAndFile(void) const
bool Recording(void) const
static time_t SetTime(time_t t, int SecondsFromMidnight)
void ClrFlags(uint Flags)
virtual int Compare(const cListObject &ListObject) const
Must return 0 if this object is equal to ListObject, a positive value if it is "greater",...
void SetFile(const char *File)
void SetFlags(uint Flags)
int start
the start and stop time of this timer as given by the user,
void SetPriority(int Priority)
void SetDeferred(int Seconds)
time_t StopTimeEvent(void) const
or by the user (for normal timers)
bool AdjustSpawnedTimer(void)
void SetInVpsMargin(bool InVpsMargin)
bool IsPatternTimer(void) const
static int GetWDay(time_t t)
const char * Pattern(void) const
static cString PrintDay(time_t Day, int WeekDays, bool SingleByteChars)
void TriggerRespawn(void)
bool DayMatches(time_t t) const
void SetRemote(const char *Remote)
bool InVpsMargin(void) const
bool SetEvent(const cEvent *Event)
void InvFlags(uint Flags)
int stop
in the form hhmm, with hh (00..23) and mm (00..59) added as hh*100+mm
const cEvent * Event(void) const
static bool ParseDay(const char *s, time_t &Day, int &WeekDays)
cTimer * SpawnPatternTimer(const cEvent *Event, cTimers *Timers)
time_t StartTime(void) const
the start time as given by the user
const cChannel * Channel(void) const
void CalcMargins(int &MarginStart, int &MarginStop, const cEvent *Event)
cString ToDescr(void) const
bool SetEventFromSchedule(const cSchedules *Schedules)
void SetRecording(bool Recording)
time_t StartTimeEvent(void) const
the start/stop times as given by the event (for VPS timers), by event plus margins (for spawned non-V...
void SetPattern(const char *Pattern)
char pattern[NAME_MAX *2+1]
static int TimeToInt(int t)
time_t deferred
Matches(time_t, ...) will return false if the current time is before this value.
static int GetMDay(time_t t)
bool HasFlags(uint Flags) const
const char * Remote(void) const
cTimer & operator=(const cTimer &Timer)
void SetWeekDays(int WeekDays)
bool Matches(time_t t=0, bool Directly=false, int Margin=0) const
bool Parse(const char *s)
cString ToText(bool UseChannelID=false) const
static time_t IncDay(time_t t, int Days)
bool SpawnPatternTimers(const cSchedules *Schedules, cTimers *Timers)
static bool Load(const char *FileName)
int GetMaxPriority(void) const
Returns the maximum priority of all local timers that are currently recording.
const cTimer * UsesChannel(const cChannel *Channel) const
bool StoreRemoteTimers(const char *ServerName=NULL, const cStringList *RemoteTimers=NULL)
Stores the given list of RemoteTimers, which come from the VDR ServerName, in this list.
const cTimer * GetById(int Id, const char *Remote=NULL) const
void Add(cTimer *Timer, cTimer *After=NULL)
static cTimers * GetTimersWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of timers for write access.
cTimer * GetMatch(time_t t)
void Del(cTimer *Timer, bool DeleteObject=true)
static const cTimers * GetTimersRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of timers for read access.
const cTimer * GetTimer(const cTimer *Timer) const
const cTimer * GetMatch(time_t t) const
const cTimer * GetTimerForEvent(const cEvent *Event, eTimerFlags Flags=tfNone) const
cTimer * GetTimer(const cTimer *Timer)
void Ins(cTimer *Timer, cTimer *Before=NULL)
bool SpawnPatternTimers(const cSchedules *Schedules)
const cTimer * GetNextActiveTimer(void) const
cTimer * GetById(int Id, const char *Remote=NULL)
cTimer * GetMatch(const cEvent *Event, eTimerMatch *Match=NULL)
bool DeleteExpired(bool Force)
bool SetEvents(const cSchedules *Schedules)
bool AdjustSpawnedTimers(void)
static int NewTimerId(void)
bool HandleRemoteTimerModifications(cTimer *NewTimer, cTimer *OldTimer=NULL, cString *Msg=NULL)
Performs any operations necessary to synchronize changes to a timer between peer VDR machines.