cTimer Class Reference

#include <timers.h>

Inheritance diagram for cTimer:

Inheritance graph
[legend]
Collaboration diagram for cTimer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cTimer (bool Instant=false, bool Pause=false, cChannel *Channel=NULL)
 cTimer (const cEvent *Event)
 cTimer (const cTimer &Timer)
virtual ~cTimer ()
cTimeroperator= (const cTimer &Timer)
virtual int Compare (const cListObject &ListObject) const
bool Recording (void) const
bool Pending (void) const
bool InVpsMargin (void) const
uint Flags (void) const
const cChannelChannel (void) const
time_t Day (void) const
int WeekDays (void) const
int Start (void) const
int Stop (void) const
int Priority (void) const
int Lifetime (void) const
const char * File (void) const
time_t FirstDay (void) const
const char * Aux (void) const
cString ToText (bool UseChannelID=false) const
cString ToDescr (void) const
const cEventEvent (void) const
bool Parse (const char *s)
bool Save (FILE *f)
bool IsSingleEvent (void) const
bool DayMatches (time_t t) const
char * SetFile (const char *File)
bool Matches (time_t t=0, bool Directly=false, int Margin=0) const
int Matches (const cEvent *Event, int *Overlap=NULL) const
bool Expired (void) const
time_t StartTime (void) const
time_t StopTime (void) const
void SetEventFromSchedule (const cSchedules *Schedules=NULL)
void SetEvent (const cEvent *Event)
void SetRecording (bool Recording)
void SetPending (bool Pending)
void SetInVpsMargin (bool InVpsMargin)
void SetPriority (int Priority)
void SetFlags (uint Flags)
void ClrFlags (uint Flags)
void InvFlags (uint Flags)
bool HasFlags (uint Flags) const
void Skip (void)
void OnOff (void)
cString PrintFirstDay (void) const

Static Public Member Functions

static int GetMDay (time_t t)
static int GetWDay (time_t t)
static time_t IncDay (time_t t, int Days)
static time_t SetTime (time_t t, int SecondsFromMidnight)
static int TimeToInt (int t)
static bool ParseDay (const char *s, time_t &Day, int &WeekDays)
static cString PrintDay (time_t Day, int WeekDays, bool SingleByteChars)

Private Attributes

time_t startTime
time_t stopTime
time_t lastSetEvent
bool recording
bool pending
bool inVpsMargin
uint flags
cChannelchannel
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]
char * aux
const cEventevent

Friends

class cMenuEditTimer


Detailed Description

Definition at line 27 of file timers.h.


Constructor & Destructor Documentation

cTimer::cTimer ( bool  Instant = false,
bool  Pause = false,
cChannel Channel = NULL 
)

cTimer::cTimer ( const cEvent Event  ) 

cTimer::cTimer ( const cTimer Timer  ) 

Definition at line 90 of file timers.c.

References aux, channel, flags, and tfNone.

cTimer::~cTimer (  )  [virtual]

Definition at line 99 of file timers.c.

References aux.


Member Function Documentation

cTimer & cTimer::operator= ( const cTimer Timer  ) 

int cTimer::Compare ( const cListObject ListObject  )  const [virtual]

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".

Reimplemented from cListObject.

Definition at line 130 of file timers.c.

References priority, and StartTime().

Referenced by cMenuTimerItem::Compare().

Here is the call graph for this function:

bool cTimer::Recording ( void   )  const [inline]

bool cTimer::Pending ( void   )  const [inline]

Definition at line 52 of file timers.h.

References pending.

Referenced by cRecordControls::Start().

bool cTimer::InVpsMargin ( void   )  const [inline]

Definition at line 53 of file timers.h.

References inVpsMargin.

uint cTimer::Flags ( void   )  const [inline]

Definition at line 54 of file timers.h.

References flags.

const cChannel* cTimer::Channel ( void   )  const [inline]

time_t cTimer::Day ( void   )  const [inline]

Definition at line 56 of file timers.h.

References day.

Referenced by cTimers::GetTimer(), and cMenuTimerItem::Set().

int cTimer::WeekDays ( void   )  const [inline]

Definition at line 57 of file timers.h.

References weekdays.

Referenced by cTimers::GetTimer(), and cMenuTimerItem::Set().

int cTimer::Start ( void   )  const [inline]

Definition at line 58 of file timers.h.

References start.

Referenced by cTimers::GetTimer(), and cMenuTimerItem::Set().

int cTimer::Stop ( void   )  const [inline]

Definition at line 59 of file timers.h.

References stop.

Referenced by cTimers::GetTimer(), and cMenuTimerItem::Set().

int cTimer::Priority ( void   )  const [inline]

int cTimer::Lifetime ( void   )  const [inline]

Definition at line 61 of file timers.h.

References lifetime.

Referenced by cRecording::cRecording().

const char* cTimer::File ( void   )  const [inline]

Definition at line 62 of file timers.h.

References file.

Referenced by cRecording::cRecording(), cShutdownHandler::DoShutdown(), and cMenuTimerItem::Set().

time_t cTimer::FirstDay ( void   )  const [inline]

Definition at line 63 of file timers.h.

References day, and weekdays.

Referenced by cMenuTimers::OnOff(), and cMenuTimerItem::Set().

const char* cTimer::Aux ( void   )  const [inline]

Definition at line 64 of file timers.h.

References aux.

Referenced by cRecording::cRecording().

cString cTimer::ToText ( bool  UseChannelID = false  )  const

Definition at line 141 of file timers.c.

References aux, Channel(), day, file, flags, itoa(), lifetime, PrintDay(), priority, cString::sprintf(), start, stop, strreplace(), and weekdays.

Referenced by cSVDRP::CmdLSTT(), cSVDRP::CmdMODT(), cSVDRP::CmdNEWT(), cSVDRP::CmdUPDT(), Save(), and cStatusTest::TimerChange().

Here is the call graph for this function:

cString cTimer::ToDescr ( void   )  const

const cEvent* cTimer::Event ( void   )  const [inline]

bool cTimer::Parse ( const char *  s  ) 

bool cTimer::Save ( FILE *  f  ) 

Definition at line 323 of file timers.c.

References ToText().

Here is the call graph for this function:

bool cTimer::IsSingleEvent ( void   )  const

int cTimer::GetMDay ( time_t  t  )  [static]

Definition at line 333 of file timers.c.

Referenced by ParseDay(), and cMenuTimerItem::Set().

int cTimer::GetWDay ( time_t  t  )  [static]

Definition at line 339 of file timers.c.

Referenced by DayMatches(), and cMenuEditDateItem::ProcessKey().

bool cTimer::DayMatches ( time_t  t  )  const

Definition at line 346 of file timers.c.

References day, GetWDay(), IsSingleEvent(), SetTime(), and weekdays.

Referenced by Matches().

Here is the call graph for this function:

time_t cTimer::IncDay ( time_t  t,
int  Days 
) [static]

Definition at line 351 of file timers.c.

Referenced by Matches(), ParseDay(), and Skip().

time_t cTimer::SetTime ( time_t  t,
int  SecondsFromMidnight 
) [static]

Definition at line 363 of file timers.c.

Referenced by cTimer(), DayMatches(), Matches(), ParseDay(), cMenuEditDateItem::ProcessKey(), and Skip().

char * cTimer::SetFile ( const char *  File  ) 

Definition at line 374 of file timers.c.

References file, isempty(), and Utf8Strn0Cpy().

Referenced by cRecording::cRecording().

Here is the call graph for this function:

bool cTimer::Matches ( time_t  t = 0,
bool  Directly = false,
int  Margin = 0 
) const

int cTimer::Matches ( const cEvent Event,
int *  Overlap = NULL 
) const

bool cTimer::Expired ( void   )  const

Definition at line 464 of file timers.c.

References event, EXPIRELATENCY, HasFlags(), IsSingleEvent(), Recording(), StopTime(), and tfVps.

Referenced by cTimers::DeleteExpired().

Here is the call graph for this function:

time_t cTimer::StartTime ( void   )  const

time_t cTimer::StopTime ( void   )  const

Definition at line 476 of file timers.c.

References Matches(), and stopTime.

Referenced by Expired(), cRecordControl::GetEvent(), cTimers::GetNextActiveTimer(), and SetEventFromSchedule().

Here is the call graph for this function:

void cTimer::SetEventFromSchedule ( const cSchedules Schedules = NULL  ) 

void cTimer::SetEvent ( const cEvent Event  ) 

Definition at line 544 of file timers.c.

References event, isyslog, cEvent::ToDescr(), and ToDescr().

Referenced by OnOff(), SetEventFromSchedule(), and Skip().

Here is the call graph for this function:

void cTimer::SetRecording ( bool  Recording  ) 

Definition at line 555 of file timers.c.

References ClrFlags(), isyslog, recording, SetFlags(), tfRecording, and ToDescr().

Referenced by cRecordControl::cRecordControl(), and cRecordControl::Stop().

Here is the call graph for this function:

void cTimer::SetPending ( bool  Pending  ) 

Definition at line 565 of file timers.c.

References pending.

Referenced by cRecordControl::cRecordControl(), main(), cRecordControl::Process(), and cRecordControls::Start().

void cTimer::SetInVpsMargin ( bool  InVpsMargin  ) 

Definition at line 570 of file timers.c.

References inVpsMargin, isyslog, and ToDescr().

Referenced by main().

Here is the call graph for this function:

void cTimer::SetPriority ( int  Priority  ) 

Definition at line 577 of file timers.c.

References priority.

void cTimer::SetFlags ( uint  Flags  ) 

Definition at line 582 of file timers.c.

References flags.

Referenced by cSVDRP::CmdMODT(), cMenuEditTimer::cMenuEditTimer(), cTimer(), OnOff(), and SetRecording().

void cTimer::ClrFlags ( uint  Flags  ) 

Definition at line 587 of file timers.c.

References flags.

Referenced by cSVDRP::CmdMODT(), OnOff(), Parse(), and SetRecording().

void cTimer::InvFlags ( uint  Flags  ) 

Definition at line 592 of file timers.c.

References flags.

Referenced by OnOff().

bool cTimer::HasFlags ( uint  Flags  )  const

void cTimer::Skip ( void   ) 

Definition at line 602 of file timers.c.

References day, IncDay(), SetEvent(), SetTime(), startTime, and StartTime().

Referenced by cMenuRecordings::Delete(), cMenuTimers::Delete(), and OnOff().

Here is the call graph for this function:

void cTimer::OnOff ( void   ) 

Definition at line 609 of file timers.c.

References ClrFlags(), day, HasFlags(), InvFlags(), IsSingleEvent(), Matches(), SetEvent(), SetFlags(), Skip(), and tfActive.

Referenced by cRecordControl::cRecordControl(), and cMenuTimers::OnOff().

Here is the call graph for this function:

cString cTimer::PrintFirstDay ( void   )  const

Definition at line 252 of file timers.c.

References day, PrintDay(), and weekdays.

Referenced by cMenuTimers::OnOff().

Here is the call graph for this function:

int cTimer::TimeToInt ( int  t  )  [static]

Definition at line 154 of file timers.c.

Referenced by Matches().

bool cTimer::ParseDay ( const char *  s,
time_t &  Day,
int &  WeekDays 
) [static]

Definition at line 159 of file timers.c.

References day, GetMDay(), IncDay(), SetTime(), and skipspace().

Referenced by Parse(), and ParseWeekDays().

Here is the call graph for this function:

cString cTimer::PrintDay ( time_t  Day,
int  WeekDays,
bool  SingleByteChars 
) [static]

Definition at line 218 of file timers.c.

References DAYBUFFERSIZE, tr, trNOOP, and Utf8CharLen().

Referenced by PrintFirstDay(), cMenuEditDateItem::Set(), cMenuTimerItem::Set(), and ToText().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class cMenuEditTimer [friend]

Definition at line 28 of file timers.h.


Member Data Documentation

time_t cTimer::startTime [mutable, private]

Definition at line 30 of file timers.h.

Referenced by cTimer(), Matches(), operator=(), Skip(), and StartTime().

time_t cTimer::stopTime [mutable, private]

Definition at line 30 of file timers.h.

Referenced by cTimer(), Matches(), operator=(), and StopTime().

time_t cTimer::lastSetEvent [private]

Definition at line 31 of file timers.h.

Referenced by cTimer(), operator=(), and SetEventFromSchedule().

bool cTimer::recording [private]

Definition at line 32 of file timers.h.

Referenced by cTimer(), operator=(), Recording(), and SetRecording().

bool cTimer::pending [private]

Definition at line 32 of file timers.h.

Referenced by cTimer(), operator=(), Pending(), and SetPending().

bool cTimer::inVpsMargin [private]

Definition at line 32 of file timers.h.

Referenced by cTimer(), InVpsMargin(), operator=(), and SetInVpsMargin().

uint cTimer::flags [private]

Definition at line 34 of file timers.h.

Referenced by Channel(), cTimer(), Matches(), operator=(), Parse(), and cMenuEditTimer::ProcessKey().

time_t cTimer::day [mutable, private]

midnight of the day this timer shall hit, or of the first day it shall hit in case of a repeating timer

Definition at line 35 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), Day(), DayMatches(), FirstDay(), Matches(), OnOff(), operator=(), Parse(), ParseDay(), PrintFirstDay(), cMenuEditTimer::SetFirstDayItem(), Skip(), and ToText().

int cTimer::weekdays [private]

bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)

Definition at line 36 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), DayMatches(), FirstDay(), IsSingleEvent(), operator=(), Parse(), PrintFirstDay(), ToText(), and WeekDays().

int cTimer::start [private]

int cTimer::stop [private]

int cTimer::priority [private]

int cTimer::lifetime [private]

Definition at line 40 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), Lifetime(), operator=(), Parse(), and ToText().

char cTimer::file[MaxFileName] [mutable, private]

char* cTimer::aux [private]

Definition at line 42 of file timers.h.

Referenced by Aux(), cTimer(), operator=(), Parse(), ToText(), and ~cTimer().

const cEvent* cTimer::event [private]

Definition at line 43 of file timers.h.

Referenced by Event(), Expired(), Matches(), SetEvent(), and SetEventFromSchedule().


The documentation for this class was generated from the following files:

Generated on Tue Jan 13 14:33:11 2009 for VDR by  doxygen 1.5.6