Home

Dokumentation

Impressum

Dokumentation VDR
 

Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

cTimer Class Reference

#include <timers.h>

Inheritance diagram for cTimer:

Inheritance graph
[legend]
Collaboration diagram for cTimer:

Collaboration graph
[legend]

Detailed Description

list timer in menu ?

Definition at line 33 of file timers.h.

Public Methods

 cTimer (bool Instant=false)
 cTimer (const cEventInfo *EventInfo)
virtual ~cTimer ()
cTimer & operator= (const cTimer &Timer)
virtual bool operator< (const cListObject &ListObject)
bool Recording (void)
bool Pending (void)
int Active (void)
const cChannelChannel (void)
int Day (void)
int Start (void)
int Stop (void)
int Priority (void)
int Lifetime (void)
const char * File (void)
time_t FirstDay (void)
const char * Summary (void)
const char * ToText (bool UseChannelID=false)
bool Parse (const char *s)
bool Save (FILE *f)
bool IsSingleEvent (void)
int GetMDay (time_t t)
int GetWDay (time_t t)
bool DayMatches (time_t t)
char * SetFile (const char *File)
bool Matches (time_t t=0)
time_t StartTime (void)
time_t StopTime (void)
void SetRecording (bool Recording)
void SetPending (bool Pending)
void SetActive (int Active)
void Skip (void)
void OnOff (void)
const char * PrintFirstDay (void)

Static Public Methods

time_t IncDay (time_t t, int Days)
time_t SetTime (time_t t, int SecondsFromMidnight)
int TimeToInt (int t)
int ParseDay (const char *s, time_t *FirstDay=NULL)
const char * PrintDay (int d, time_t FirstDay=0)

Private Attributes

time_t startTime
time_t stopTime
bool recording
bool pending
int active
cChannelchannel
int day
int start
int stop
int priority
int lifetime
char file [MaxFileName]
time_t firstday
char * summary

Static Private Attributes

char * buffer = NULL

Friends

class cMenuEditTimer


Constructor & Destructor Documentation

cTimer::cTimer bool    Instant = false
 

Definition at line 23 of file timers.c.

References active, channel, day, file, firstday, lifetime, cChannel::Name(), pending, priority, recording, start, startTime, stop, stopTime, summary, taActInst, and taInactive.

cTimer::cTimer const cEventInfo   EventInfo
 

Definition at line 47 of file timers.c.

References active, channel, day, file, firstday, cEventInfo::GetChannelID(), cEventInfo::GetDuration(), cEventInfo::GetTime(), cEventInfo::GetTitle(), isempty(), lifetime, pending, priority, recording, start, startTime, stop, stopTime, strn0cpy(), and summary.

cTimer::~cTimer   [virtual]
 

Definition at line 74 of file timers.c.


Member Function Documentation

int cTimer::Active void    [inline]
 

query for timer activity

Definition at line 110 of file timers.h.

Referenced by cSVDRP::CmdMODT(), cRecordControl::GetEventInfo(), cTimers::GetNextActiveTimer(), cMenuTimers::OnOff(), and cMenuTimerItem::Set().

const cChannel* cTimer::Channel void    [inline]
 

query for recording channel

Definition at line 115 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cRecordControl::cRecordControl(), cRecording::cRecording(), cMenuChannels::Delete(), cRecordControl::GetEventInfo(), cTimers::GetTimer(), main(), cMenuEditTimer::ProcessKey(), cMenuTimerItem::Set(), cRecordControls::Start(), and ToText().

int cTimer::Day void    [inline]
 

query for recording date (day)

Definition at line 120 of file timers.h.

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

bool cTimer::DayMatches time_t    t
 

query, if actual day matches with fixed day

Definition at line 256 of file timers.c.

References day, GetMDay(), GetWDay(), and IsSingleEvent().

Referenced by Matches().

const char* cTimer::File void    [inline]
 

Definition at line 125 of file timers.h.

Referenced by cRecording::cRecording(), main(), and cMenuTimerItem::Set().

time_t cTimer::FirstDay void    [inline]
 

Definition at line 126 of file timers.h.

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

int cTimer::GetMDay time_t    t
 

get day of the month (1..31)

Definition at line 243 of file timers.c.

Referenced by DayMatches().

int cTimer::GetWDay time_t    t
 

get day of the week (monday = 0)

Definition at line 249 of file timers.c.

Referenced by DayMatches().

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

increasing date while setting timer

Definition at line 261 of file timers.c.

Referenced by Matches(), and Skip().

bool cTimer::IsSingleEvent void   
 

recognizes events

Definition at line 238 of file timers.c.

References day.

Referenced by cRecording::cRecording(), DayMatches(), Matches(), OnOff(), cMenuEditTimer::SetFirstDayItem(), and cRecordControl::Stop().

int cTimer::Lifetime void    [inline]
 

Definition at line 124 of file timers.h.

Referenced by cRecording::cRecording().

bool cTimer::Matches time_t    t = 0
 

refresh start and end time

Definition at line 291 of file timers.c.

References active, DayMatches(), firstday, IncDay(), IsSingleEvent(), SECSINDAY, SetTime(), startTime, stopTime, and TimeToInt().

Referenced by cTimers::GetMatch(), OnOff(), cRecordControl::Process(), StartTime(), and StopTime().

void cTimer::OnOff void   
 

sets timer on or off

Definition at line 357 of file timers.c.

References active, firstday, IsSingleEvent(), Matches(), and Skip().

Referenced by cMenuTimers::OnOff().

bool cTimer::operator< const cListObject   ListObject [virtual]
 

Reimplemented from cListObject.

Definition at line 87 of file timers.c.

References priority, and StartTime().

cTimer & cTimer::operator= const cTimer &    Timer
 

Definition at line 79 of file timers.c.

References summary.

bool cTimer::Parse const char *    s
 

Definition at line 185 of file timers.c.

References channel, day, esyslog, tChannelID::FromString(), MALLOC, ParseDay(), skipspace(), strn0cpy(), strreplace(), summary, and tChannelID::Valid().

Referenced by cSVDRP::CmdMODT(), cSVDRP::CmdNEWT(), and cSVDRP::CmdUPDT().

int cTimer::ParseDay const char *    s,
time_t *    FirstDay = NULL
[static]
 

Definition at line 111 of file timers.c.

Referenced by Parse().

bool cTimer::Pending void    [inline]
 

get actual timer status

Definition at line 105 of file timers.h.

Referenced by cRecordControls::Start().

const char * cTimer::PrintDay int    d,
time_t    FirstDay = 0
[static]
 

Definition at line 151 of file timers.c.

References buffer, and tr.

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

const char * cTimer::PrintFirstDay void   
 

Definition at line 175 of file timers.c.

References PrintDay().

Referenced by cMenuTimers::OnOff().

int cTimer::Priority void    [inline]
 

Definition at line 123 of file timers.h.

Referenced by cRecordControl::cRecordControl(), cRecording::cRecording(), cTimers::GetMatch(), cRecordControl::Process(), and cRecordControls::Start().

bool cTimer::Recording void    [inline]
 

Definition at line 100 of file timers.h.

Referenced by cSVDRP::CmdDELT(), cMenuTimers::Delete(), cTimers::GetMatch(), and cMenuTimerItem::Set().

bool cTimer::Save FILE *    f
 

Definition at line 233 of file timers.c.

References ToText().

Referenced by cSVDRP::CmdMODT().

void cTimer::SetActive int    Active
 

sets timer to active

Definition at line 347 of file timers.c.

References active.

Referenced by cSVDRP::CmdMODT().

char * cTimer::SetFile const char *    File
 

Definition at line 284 of file timers.c.

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

Referenced by cRecording::cRecording().

void cTimer::SetPending bool    Pending
 

Definition at line 342 of file timers.c.

References pending.

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

void cTimer::SetRecording bool    Recording
 

Definition at line 336 of file timers.c.

References cListObject::Index(), isyslog, and recording.

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

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

set recording time

Definition at line 273 of file timers.c.

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

void cTimer::Skip void   
 

Definition at line 352 of file timers.c.

References firstday, IncDay(), SetTime(), and StartTime().

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

int cTimer::Start void    [inline]
 

Definition at line 121 of file timers.h.

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

time_t cTimer::StartTime void   
 

Definition at line 322 of file timers.c.

References Matches(), and startTime.

Referenced by cSVDRP::CmdNEXT(), cRecording::cRecording(), cRecordControl::GetEventInfo(), main(), operator<(), and Skip().

int cTimer::Stop void    [inline]
 

Definition at line 122 of file timers.h.

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

time_t cTimer::StopTime void   
 

Definition at line 329 of file timers.c.

References Matches(), and stopTime.

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

const char* cTimer::Summary void    [inline]
 

Definition at line 127 of file timers.h.

Referenced by cRecording::cRecording(), and cMenuTimers::Summary().

int cTimer::TimeToInt int    t [static]
 

Definition at line 106 of file timers.c.

Referenced by Matches().

const char * cTimer::ToText bool    UseChannelID = false
 

Definition at line 95 of file timers.c.

References buffer, Channel(), itoa(), PrintDay(), and strreplace().

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


Friends And Related Function Documentation

friend class cMenuEditTimer [friend]
 

Definition at line 34 of file timers.h.


Field Documentation

int cTimer::active [private]
 

timer activity from eTimerActive (four condition: 0 inactive, 1 active, 2 instant, 3 active instant)

Definition at line 51 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), Matches(), OnOff(), cMenuEditTimer::ProcessKey(), and SetActive().

char * cTimer::buffer = NULL [static, private]
 

Definition at line 21 of file timers.c.

Referenced by PrintDay(), and ToText().

cChannel* cTimer::channel [private]
 

recording channel

Definition at line 56 of file timers.h.

Referenced by cTimer(), Parse(), and cMenuEditTimer::ProcessKey().

int cTimer::day [private]
 

day of recording

Definition at line 61 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), DayMatches(), IsSingleEvent(), and Parse().

char cTimer::file[MaxFileName] [private]
 

name of recording file

Definition at line 84 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), cMenuEditTimer::ProcessKey(), and SetFile().

time_t cTimer::firstday [private]
 

Definition at line 85 of file timers.h.

Referenced by cTimer(), Matches(), OnOff(), cMenuEditTimer::SetFirstDayItem(), and Skip().

int cTimer::lifetime [private]
 

Definition at line 79 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), and cTimer().

bool cTimer::pending [private]
 

recording state (true means recording, false means pending)

Definition at line 46 of file timers.h.

Referenced by cTimer(), and SetPending().

int cTimer::priority [private]
 

timer priority when more then one timer matches at the same time, the first one in the list with the highest 'Priority' is selected

Definition at line 78 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), and operator<().

bool cTimer::recording [private]
 

recording state (true means recording, false means pending)

Definition at line 46 of file timers.h.

Referenced by cTimer(), and SetRecording().

int cTimer::start [private]
 

actual time when recordings starts

Definition at line 66 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), and cTimer().

time_t cTimer::startTime [private]
 

starting/ending time of recording (default = 0)

Definition at line 40 of file timers.h.

Referenced by cTimer(), Matches(), and StartTime().

int cTimer::stop [private]
 

actual time when recording stops

Definition at line 71 of file timers.h.

Referenced by cMenuEditTimer::cMenuEditTimer(), and cTimer().

time_t cTimer::stopTime [private]
 

starting/ending time of recording (default = 0)

Definition at line 40 of file timers.h.

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

char* cTimer::summary [private]
 

recording summary descriptive text, displayed in recordings menu, can only filled in directly by editing the "timers.conf" file with a text editor or defining/modifying the timer via svdrp interface

Definition at line 93 of file timers.h.

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


The documentation for this class was generated from the following files:
Generated on Wed Feb 5 23:31:59 2003 for VDR by doxygen1.3-rc2