vdr  1.7.31
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
cTimer Class Reference

#include <timers.h>

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
time_t Deferred (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
void 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 SetDay (time_t Day)
void SetWeekDays (int WeekDays)
void SetStart (int Start)
void SetStop (int Stop)
void SetPriority (int Priority)
void SetLifetime (int Lifetime)
void SetAux (const char *Aux)
void SetDeferred (int Seconds)
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
 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
time_t Deferred (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
void 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 SetDay (time_t Day)
void SetWeekDays (int WeekDays)
void SetStart (int Start)
void SetStop (int Stop)
void SetPriority (int Priority)
void SetLifetime (int Lifetime)
void SetAux (const char *Aux)
void SetDeferred (int Seconds)
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
- Public Member Functions inherited from cListObject
 cListObject (void)
virtual ~cListObject ()
void Append (cListObject *Object)
void Insert (cListObject *Object)
void Unlink (void)
int Index (void) const
cListObjectPrev (void) const
cListObjectNext (void) const
 cListObject (void)
virtual ~cListObject ()
void Append (cListObject *Object)
void Insert (cListObject *Object)
void Unlink (void)
int Index (void) const
cListObjectPrev (void) const
cListObjectNext (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)
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
time_t deferred
bool recording
bool pending
bool inVpsMargin
uint flags
cChannelchannel
time_t day
int weekdays
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 include/vdr/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 131 of file timers.c.

References aux, channel, flags, and tfNone.

cTimer::~cTimer ( )
virtual

Definition at line 140 of file timers.c.

References aux.

cTimer::cTimer ( bool  Instant = false,
bool  Pause = false,
cChannel Channel = NULL 
)
cTimer::cTimer ( const cEvent Event)
cTimer::cTimer ( const cTimer Timer)
virtual cTimer::~cTimer ( )
virtual

Member Function Documentation

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

Definition at line 65 of file include/vdr/timers.h.

References aux.

Referenced by cRecording::cRecording().

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

Definition at line 65 of file timers.h.

References aux.

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

Definition at line 56 of file timers.h.

References channel.

void cTimer::ClrFlags ( uint  Flags)

Definition at line 675 of file timers.c.

References flags.

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

void cTimer::ClrFlags ( uint  Flags)
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 172 of file timers.c.

References priority, and StartTime().

Referenced by cMenuTimerItem::Compare().

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

time_t cTimer::Day ( void  ) const
inline

Definition at line 57 of file include/vdr/timers.h.

References day.

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

time_t cTimer::Day ( void  ) const
inline

Definition at line 57 of file timers.h.

References day.

bool cTimer::DayMatches ( time_t  t) const
bool cTimer::DayMatches ( time_t  t) const

Definition at line 388 of file timers.c.

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

Referenced by cMenuTimers::ActualiseDiskStatus(), and Matches().

time_t cTimer::Deferred ( void  ) const
inline

Definition at line 66 of file include/vdr/timers.h.

References deferred.

time_t cTimer::Deferred ( void  ) const
inline

Definition at line 66 of file timers.h.

References deferred.

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

Definition at line 69 of file timers.h.

References event.

const cEvent* cTimer::Event ( void  ) const
inline
bool cTimer::Expired ( void  ) const

Definition at line 515 of file timers.c.

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

Referenced by cTimers::DeleteExpired().

bool cTimer::Expired ( void  ) const
const char* cTimer::File ( void  ) const
inline

Definition at line 63 of file timers.h.

References file.

const char* cTimer::File ( void  ) const
inline
time_t cTimer::FirstDay ( void  ) const
inline

Definition at line 64 of file timers.h.

References day, and weekdays.

time_t cTimer::FirstDay ( void  ) const
inline

Definition at line 64 of file include/vdr/timers.h.

References day, and weekdays.

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

uint cTimer::Flags ( void  ) const
inline

Definition at line 55 of file include/vdr/timers.h.

References flags.

Referenced by cSkinLCARSDisplayMenu::DrawTimer(), HasFlags(), InvFlags(), and SetFlags().

uint cTimer::Flags ( void  ) const
inline

Definition at line 55 of file timers.h.

References flags.

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

Definition at line 375 of file timers.c.

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

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

Definition at line 381 of file timers.c.

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

bool cTimer::HasFlags ( uint  Flags) const
bool cTimer::HasFlags ( uint  Flags) const
static time_t cTimer::IncDay ( time_t  t,
int  Days 
)
static
time_t cTimer::IncDay ( time_t  t,
int  Days 
)
static

Definition at line 393 of file timers.c.

Referenced by cMenuTimers::ActualiseDiskStatus(), Matches(), ParseDay(), and Skip().

void cTimer::InvFlags ( uint  Flags)

Definition at line 680 of file timers.c.

References flags, and Flags().

Referenced by OnOff().

void cTimer::InvFlags ( uint  Flags)
bool cTimer::InVpsMargin ( void  ) const
inline

Definition at line 54 of file include/vdr/timers.h.

References inVpsMargin.

Referenced by SetInVpsMargin().

bool cTimer::InVpsMargin ( void  ) const
inline

Definition at line 54 of file timers.h.

References inVpsMargin.

bool cTimer::IsSingleEvent ( void  ) const
bool cTimer::IsSingleEvent ( void  ) const
int cTimer::Lifetime ( void  ) const
inline

Definition at line 62 of file timers.h.

References lifetime.

int cTimer::Lifetime ( void  ) const
inline

Definition at line 62 of file include/vdr/timers.h.

References lifetime.

Referenced by cRecording::cRecording(), and SetLifetime().

bool cTimer::Matches ( time_t  t = 0,
bool  Directly = false,
int  Margin = 0 
) const
bool cTimer::Matches ( time_t  t = 0,
bool  Directly = false,
int  Margin = 0 
) const
int cTimer::Matches ( const cEvent Event,
int *  Overlap = NULL 
) const
int cTimer::Matches ( const cEvent Event,
int *  Overlap = NULL 
) const
void cTimer::OnOff ( void  )
void cTimer::OnOff ( void  )
cTimer & cTimer::operator= ( const cTimer Timer)
cTimer& cTimer::operator= ( const cTimer Timer)
bool cTimer::Parse ( const char *  s)
bool cTimer::Parse ( const char *  s)
bool cTimer::ParseDay ( const char *  s,
time_t &  Day,
int &  WeekDays 
)
static

Definition at line 201 of file timers.c.

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

Referenced by Parse(), and ParseWeekDays().

static bool cTimer::ParseDay ( const char *  s,
time_t &  Day,
int &  WeekDays 
)
static
bool cTimer::Pending ( void  ) const
inline

Definition at line 53 of file include/vdr/timers.h.

References pending.

Referenced by cSkinLCARSDisplayMenu::DrawTimer(), SetPending(), and cRecordControls::Start().

bool cTimer::Pending ( void  ) const
inline

Definition at line 53 of file timers.h.

References pending.

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

Definition at line 260 of file timers.c.

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

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

cString cTimer::PrintFirstDay ( void  ) const
cString cTimer::PrintFirstDay ( void  ) const

Definition at line 294 of file timers.c.

References day, PrintDay(), and weekdays.

Referenced by cMenuTimers::OnOff().

int cTimer::Priority ( void  ) const
inline

Definition at line 61 of file timers.h.

References priority.

int cTimer::Priority ( void  ) const
inline
bool cTimer::Recording ( void  ) const
inline
bool cTimer::Recording ( void  ) const
inline

Definition at line 52 of file timers.h.

References recording.

bool cTimer::Save ( FILE *  f)
bool cTimer::Save ( FILE *  f)

Definition at line 365 of file timers.c.

References ToText().

void cTimer::SetAux ( const char *  Aux)
void cTimer::SetAux ( const char *  Aux)

Definition at line 658 of file timers.c.

References aux.

void cTimer::SetDay ( time_t  Day)

Definition at line 628 of file timers.c.

References day, and Day().

void cTimer::SetDay ( time_t  Day)
void cTimer::SetDeferred ( int  Seconds)

Definition at line 664 of file timers.c.

References deferred, isyslog, and ToDescr().

Referenced by cRecordControl::cRecordControl().

void cTimer::SetDeferred ( int  Seconds)
void cTimer::SetEvent ( const cEvent Event)

Definition at line 595 of file timers.c.

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

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

void cTimer::SetEvent ( const cEvent Event)
void cTimer::SetEventFromSchedule ( const cSchedules Schedules = NULL)
void cTimer::SetEventFromSchedule ( const cSchedules Schedules = NULL)
void cTimer::SetFile ( const char *  File)
void cTimer::SetFile ( const char *  File)

Definition at line 416 of file timers.c.

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

Referenced by cRecording::cRecording().

void cTimer::SetFlags ( uint  Flags)

Definition at line 670 of file timers.c.

References flags, and Flags().

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

void cTimer::SetFlags ( uint  Flags)
void cTimer::SetInVpsMargin ( bool  InVpsMargin)

Definition at line 621 of file timers.c.

References inVpsMargin, InVpsMargin(), isyslog, and ToDescr().

Referenced by main().

void cTimer::SetInVpsMargin ( bool  InVpsMargin)
void cTimer::SetLifetime ( int  Lifetime)

Definition at line 653 of file timers.c.

References lifetime, and Lifetime().

void cTimer::SetLifetime ( int  Lifetime)
void cTimer::SetPending ( bool  Pending)

Definition at line 616 of file timers.c.

References pending, and Pending().

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

void cTimer::SetPending ( bool  Pending)
void cTimer::SetPriority ( int  Priority)
void cTimer::SetPriority ( int  Priority)

Definition at line 648 of file timers.c.

References priority, and Priority().

void cTimer::SetRecording ( bool  Recording)
void cTimer::SetRecording ( bool  Recording)
void cTimer::SetStart ( int  Start)

Definition at line 638 of file timers.c.

References start, and Start().

void cTimer::SetStart ( int  Start)
void cTimer::SetStop ( int  Stop)

Definition at line 643 of file timers.c.

References stop, and Stop().

void cTimer::SetStop ( int  Stop)
static time_t cTimer::SetTime ( time_t  t,
int  SecondsFromMidnight 
)
static
time_t cTimer::SetTime ( time_t  t,
int  SecondsFromMidnight 
)
static
void cTimer::SetWeekDays ( int  WeekDays)
void cTimer::SetWeekDays ( int  WeekDays)

Definition at line 633 of file timers.c.

References weekdays, and WeekDays().

void cTimer::Skip ( void  )

Definition at line 690 of file timers.c.

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

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

void cTimer::Skip ( void  )
int cTimer::Start ( void  ) const
inline

Definition at line 59 of file timers.h.

References start.

int cTimer::Start ( void  ) const
inline

Definition at line 59 of file include/vdr/timers.h.

References start.

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

time_t cTimer::StartTime ( void  ) const
time_t cTimer::StartTime ( void  ) const
int cTimer::Stop ( void  ) const
inline

Definition at line 60 of file include/vdr/timers.h.

References stop.

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

int cTimer::Stop ( void  ) const
inline

Definition at line 60 of file timers.h.

References stop.

time_t cTimer::StopTime ( void  ) const
time_t cTimer::StopTime ( void  ) const
static int cTimer::TimeToInt ( int  t)
static
int cTimer::TimeToInt ( int  t)
static

Definition at line 196 of file timers.c.

Referenced by Matches().

cString cTimer::ToDescr ( void  ) const
cString cTimer::ToDescr ( void  ) const
cString cTimer::ToText ( bool  UseChannelID = false) const
cString cTimer::ToText ( bool  UseChannelID = false) const
int cTimer::WeekDays ( void  ) const
inline

Definition at line 58 of file include/vdr/timers.h.

References weekdays.

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

int cTimer::WeekDays ( void  ) const
inline

Definition at line 58 of file timers.h.

References weekdays.

Friends And Related Function Documentation

Definition at line 28 of file include/vdr/timers.h.

Member Data Documentation

char * cTimer::aux
private

Definition at line 43 of file include/vdr/timers.h.

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

cChannel * cTimer::channel
private
time_t cTimer::day
mutableprivate

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 36 of file include/vdr/timers.h.

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

time_t cTimer::deferred
mutableprivate

Matches(time_t, ...) will return false if the current time is before this value.

Definition at line 32 of file include/vdr/timers.h.

Referenced by cTimer(), Deferred(), Matches(), operator=(), and SetDeferred().

const cEvent * cTimer::event
private

Definition at line 44 of file include/vdr/timers.h.

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

char cTimer::file
mutableprivate
uint cTimer::flags
private
bool cTimer::inVpsMargin
private

Definition at line 33 of file include/vdr/timers.h.

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

time_t cTimer::lastSetEvent
private

Definition at line 31 of file include/vdr/timers.h.

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

int cTimer::lifetime
private
bool cTimer::pending
private

Definition at line 33 of file include/vdr/timers.h.

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

int cTimer::priority
private
bool cTimer::recording
private

Definition at line 33 of file include/vdr/timers.h.

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

int cTimer::start
private
time_t cTimer::startTime
mutableprivate

Definition at line 30 of file include/vdr/timers.h.

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

int cTimer::stop
private
time_t cTimer::stopTime
mutableprivate

Definition at line 30 of file include/vdr/timers.h.

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

int cTimer::weekdays
private

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