vdr
2.4.1
|
#include <timers.h>
Public Member Functions | |
cTimer (bool Instant=false, bool Pause=false, const cChannel *Channel=NULL) | |
cTimer (const cEvent *Event) | |
cTimer (const cTimer &Timer) | |
virtual | ~cTimer () |
cTimer & | operator= (const cTimer &Timer) |
virtual int | Compare (const cListObject &ListObject) const |
int | Id (void) const |
bool | Recording (void) const |
bool | Pending (void) const |
bool | InVpsMargin (void) const |
uint | Flags (void) const |
const cChannel * | Channel (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 |
const char * | Remote (void) const |
bool | Local (void) const |
time_t | Deferred (void) const |
cString | ToText (bool UseChannelID=false) const |
cString | ToDescr (void) const |
const cEvent * | Event (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 |
eTimerMatch | Matches (const cEvent *Event, int *Overlap=NULL) const |
bool | Expired (void) const |
time_t | StartTime (void) const |
time_t | StopTime (void) const |
void | SetId (int Id) |
bool | SetEventFromSchedule (const cSchedules *Schedules) |
bool | 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 | SetRemote (const char *Remote) |
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 |
![]() | |
cListObject (void) | |
virtual | ~cListObject () |
void | Append (cListObject *Object) |
void | Insert (cListObject *Object) |
void | Unlink (void) |
int | Index (void) const |
cListObject * | Prev (void) const |
cListObject * | Next (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 | |
int | id |
time_t | startTime |
time_t | stopTime |
int | scheduleState |
time_t | deferred |
bool | pending |
bool | inVpsMargin |
uint | flags |
const cChannel * | channel |
time_t | day |
int | weekdays |
int | start |
int | stop |
int | priority |
int | lifetime |
char | file [NAME_MAX *2+1] |
char * | aux |
char * | remote |
const cEvent * | event |
Friends | |
class | cMenuEditTimer |
cTimer::cTimer | ( | bool | Instant = false , |
bool | Pause = false , |
||
const cChannel * | Channel = NULL |
||
) |
Definition at line 26 of file timers.c.
References aux, channel, Channel(), day, cSetup::DefaultLifetime, cSetup::DefaultPriority, deferred, DEFINSTRECTIME, cEvent::EndTime(), Event(), file, flags, cSetup::InstantRecordTime, inVpsMargin, lifetime, LOCK_CHANNELS_READ, LOCK_SCHEDULES_READ, cSetup::MarginStart, cSetup::MarginStop, cSetup::MarkInstantRecord, cChannel::Name(), cSetup::NameInstantRecord, cSetup::PauseLifetime, cSetup::PausePriority, pending, priority, remote, scheduleState, SetEvent(), SetFlags(), SetTime(), Setup, start, startTime, cEvent::StartTime(), stop, stopTime, tfActive, tfInstant, tfNone, tfVps, cSetup::UseVps, cEvent::Vps(), and weekdays.
cTimer::cTimer | ( | const cEvent * | Event | ) |
Definition at line 84 of file timers.c.
References aux, channel, cEvent::ChannelID(), day, cSetup::DefaultLifetime, cSetup::DefaultPriority, deferred, cEvent::Duration(), Event(), file, flags, HasFlags(), inVpsMargin, isempty(), lifetime, LOCK_CHANNELS_READ, cSetup::MarginStart, cSetup::MarginStop, pending, priority, remote, scheduleState, SetEvent(), SetFlags(), SetTime(), Setup, start, startTime, cEvent::StartTime(), stop, stopTime, tfActive, tfVps, cEvent::Title(), cSetup::UseVps, Utf8Strn0Cpy(), cEvent::Vps(), and weekdays.
cTimer::cTimer | ( | const cTimer & | Timer | ) |
|
virtual |
|
inline |
Definition at line 68 of file timers.h.
References aux.
Referenced by cRecording::cRecording(), and SetAux().
|
inline |
Definition at line 59 of file timers.h.
References channel.
Referenced by cMenuEditTimer::cMenuEditTimer(), cRecordControl::cRecordControl(), cRecording::cRecording(), cTimer(), cShutdownHandler::DoShutdown(), cSkinLCARSDisplayMenu::DrawTimer(), cRecordControl::GetEvent(), cTimers::GetTimer(), cMenuEditTimer::ProcessKey(), cMenuTimerItem::Set(), SetEventFromSchedule(), cRecordControls::Start(), ToDescr(), and ToText().
void cTimer::ClrFlags | ( | uint | Flags | ) |
Definition at line 686 of file timers.c.
References flags, and Flags().
Referenced by cSVDRPServer::CmdMODT(), cSVDRPServer::CmdNEWT(), cSVDRPServer::CmdUPDT(), HandleRemoteTimerModifications(), OnOff(), and SetRecording().
|
virtual |
Definition at line 173 of file timers.c.
References priority, and StartTime().
Referenced by cMenuTimerItem::Compare().
|
inline |
Definition at line 60 of file timers.h.
References day.
Referenced by cTimers::GetTimer(), ParseDay(), PrintDay(), cMenuTimerItem::Set(), and SetDay().
bool cTimer::DayMatches | ( | time_t | t | ) | const |
|
inline |
|
inline |
Definition at line 74 of file timers.h.
References event.
Referenced by cRecordControl::cRecordControl(), cTimer(), cSkinLCARSDisplayMenu::DrawTimer(), cMenuTimers::Info(), Matches(), SetEvent(), and SetEventFromSchedule().
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().
|
inline |
Definition at line 66 of file timers.h.
References file.
Referenced by cRecording::cRecording(), cShutdownHandler::DoShutdown(), cMenuTimerItem::Set(), and SetFile().
|
inline |
Definition at line 67 of file timers.h.
Referenced by cMenuTimers::OnOff(), and cMenuTimerItem::Set().
|
inline |
Definition at line 58 of file timers.h.
References flags.
Referenced by ClrFlags(), cSkinLCARSDisplayMenu::DrawTimer(), HasFlags(), InvFlags(), and SetFlags().
|
static |
Definition at line 366 of file timers.c.
Referenced by ParseDay(), and cMenuTimerItem::Set().
|
static |
Definition at line 372 of file timers.c.
Referenced by DayMatches(), and cMenuEditDateItem::ToggleRepeating().
bool cTimer::HasFlags | ( | uint | Flags | ) | const |
Definition at line 696 of file timers.c.
References flags, and Flags().
Referenced by cTimer(), Expired(), cRecordControl::GetEvent(), Matches(), OnOff(), cMenuTimers::OnOff(), Recording(), cMenuTimerItem::Set(), SetEventFromSchedule(), ToDescr(), and cMenuScheduleItem::Update().
|
inline |
Definition at line 54 of file timers.h.
References id.
Referenced by cSVDRPServer::CmdLSTT(), cSVDRPServer::CmdNEWT(), cSVDRPServer::CmdUPDT(), cRecordControl::cRecordControl(), HandleRemoteTimerModifications(), cMenuTimers::OnOff(), cMenuEditTimer::ProcessKey(), RecordingInUseMessage(), RemoteTimerError(), cMenuTimers::Set(), SetId(), and ToDescr().
|
static |
Definition at line 384 of file timers.c.
Referenced by Matches(), ParseDay(), and Skip().
void cTimer::InvFlags | ( | uint | Flags | ) |
|
inline |
bool cTimer::IsSingleEvent | ( | void | ) | const |
Definition at line 361 of file timers.c.
References weekdays.
Referenced by cRecording::cRecording(), DayMatches(), Expired(), Matches(), OnOff(), and cMenuEditTimer::SetFirstDayItem().
|
inline |
Definition at line 65 of file timers.h.
References lifetime.
Referenced by cRecording::cRecording(), and SetLifetime().
|
inline |
Definition at line 70 of file timers.h.
References remote.
Referenced by HandleRemoteTimerModifications(), and cMenuEditTimer::ProcessKey().
eTimerMatch cTimer::Matches | ( | const cEvent * | Event, |
int * | Overlap = NULL |
||
) | const |
Definition at line 477 of file timers.c.
References channel, cEvent::ChannelID(), cEvent::Duration(), cEvent::EndTime(), Event(), FULLMATCH, cChannel::GetChannelID(), HasFlags(), cEvent::IsRunning(), Matches(), max(), min(), cEvent::RunningStatus(), SI::RunningStatusNotRunning, startTime, StartTime(), cEvent::StartTime(), stopTime, tfVps, tmFull, tmNone, tmPartial, and cEvent::Vps().
bool cTimer::Matches | ( | time_t | t = 0 , |
bool | Directly = false , |
||
int | Margin = 0 |
||
) | const |
Definition at line 415 of file timers.c.
References day, DayMatches(), deferred, EITPRESENTFOLLOWINGRATE, event, HasFlags(), IncDay(), IsSingleEvent(), max(), cSchedule::PresentSeenWithin(), cEvent::Schedule(), SECSINDAY, SetTime(), start, startTime, stop, stopTime, tfActive, tfVps, TimeToInt(), and cEvent::Vps().
Referenced by cTimers::GetNextActiveTimer(), Matches(), OnOff(), cRecordControl::Process(), cMenuEditTimer::ProcessKey(), cMenuWhatsOn::Record(), cMenuSchedule::Record(), SetEventFromSchedule(), cRecordControls::Start(), StartTime(), and StopTime().
void cTimer::OnOff | ( | void | ) |
Definition at line 708 of file timers.c.
References ClrFlags(), day, HasFlags(), InvFlags(), IsSingleEvent(), Matches(), SetEvent(), SetFlags(), Skip(), and tfActive.
Referenced by cRecordControl::cRecordControl(), and cMenuTimers::OnOff().
bool cTimer::Parse | ( | const char * | s | ) |
Definition at line 305 of file timers.c.
References aux, channel, day, esyslog, file, flags, tChannelID::FromString(), isnumber(), lifetime, LOCK_CHANNELS_READ, MALLOC, ParseDay(), priority, skipspace(), start, stop, strn0cpy(), strreplace(), Utf8Strn0Cpy(), and weekdays.
Referenced by cSVDRPServer::CmdMODT(), cSVDRPServer::CmdNEWT(), cSVDRPServer::CmdUPDT(), and cTimers::StoreRemoteTimers().
|
static |
Definition at line 202 of file timers.c.
References day, Day(), GetMDay(), IncDay(), SetTime(), skipspace(), and WeekDays().
Referenced by Parse(), and ParseWeekDays().
|
inline |
Definition at line 56 of file timers.h.
References pending.
Referenced by cSkinLCARSDisplayMenu::DrawTimer(), SetPending(), and cRecordControls::Start().
|
static |
Definition at line 261 of file timers.c.
References Day(), DAYBUFFERSIZE, tr, trNOOP, SI::Utf8CharLen(), and WeekDays().
Referenced by PrintFirstDay(), cMenuEditDateItem::Set(), cMenuTimerItem::Set(), and ToText().
cString cTimer::PrintFirstDay | ( | void | ) | const |
Definition at line 295 of file timers.c.
References day, PrintDay(), and weekdays.
Referenced by cMenuTimers::OnOff().
|
inline |
Definition at line 64 of file timers.h.
References priority.
Referenced by cRecordControl::cRecordControl(), cRecording::cRecording(), cTimers::GetMatch(), SetPriority(), and cRecordControls::Start().
|
inline |
Definition at line 55 of file timers.h.
References HasFlags(), and tfRecording.
Referenced by cMenuTimers::Delete(), cSkinLCARSDisplayMenu::DrawTimer(), Expired(), cMenuEditTimer::ProcessKey(), cMenuTimerItem::Set(), and SetRecording().
|
inline |
Definition at line 69 of file timers.h.
References remote.
Referenced by cTimers::Add(), cSVDRPServer::CmdLSTT(), cMenuTimers::Delete(), cTimers::DeleteExpired(), cSkinLCARSDisplayMenu::DrawTimer(), HandleRemoteTimerModifications(), cMenuTimers::OnOff(), cMenuEditTimer::ProcessKey(), cMenuWhatsOn::Record(), cMenuSchedule::Record(), RemoteTimerError(), Save(), cMenuTimerItem::Set(), cMenuTimers::Set(), SetRemote(), and cTimers::StoreRemoteTimers().
bool cTimer::Save | ( | FILE * | f | ) |
void cTimer::SetAux | ( | const char * | Aux | ) |
void cTimer::SetDay | ( | time_t | Day | ) |
void cTimer::SetDeferred | ( | int | Seconds | ) |
bool cTimer::SetEvent | ( | const cEvent * | Event | ) |
Definition at line 592 of file timers.c.
References event, Event(), cEvent::IncNumTimers(), isyslog, cSchedule::Modified(), cEvent::Schedule(), scheduleState, ToDescr(), and cEvent::ToDescr().
Referenced by cTimer(), OnOff(), SetEventFromSchedule(), and Skip().
bool cTimer::SetEventFromSchedule | ( | const cSchedules * | Schedules | ) |
Definition at line 545 of file timers.c.
References Channel(), cEvent::Duration(), EPGLIMITAFTER, EPGLIMITBEFORE, Event(), cSchedule::Events(), FULLMATCH, cSchedules::GetSchedule(), HasFlags(), Matches(), cSchedule::Modified(), cList< T >::Next(), scheduleState, SetEvent(), StartTime(), StopTime(), tfVps, and tmFull.
Referenced by cMenuTimers::OnOff(), and cMenuEditTimer::ProcessKey().
void cTimer::SetFile | ( | const char * | File | ) |
Definition at line 407 of file timers.c.
References file, File(), isempty(), and Utf8Strn0Cpy().
Referenced by cRecording::cRecording().
void cTimer::SetFlags | ( | uint | Flags | ) |
Definition at line 681 of file timers.c.
References flags, and Flags().
Referenced by cSVDRPServer::CmdMODT(), cSVDRPServer::CmdUPDT(), cMenuEditTimer::cMenuEditTimer(), cTimer(), OnOff(), and SetRecording().
void cTimer::SetId | ( | int | Id | ) |
Definition at line 540 of file timers.c.
References Id().
Referenced by cTimers::Add(), HandleRemoteTimerModifications(), and cTimers::StoreRemoteTimers().
void cTimer::SetInVpsMargin | ( | bool | InVpsMargin | ) |
Definition at line 626 of file timers.c.
References inVpsMargin, InVpsMargin(), isyslog, and ToDescr().
void cTimer::SetLifetime | ( | int | Lifetime | ) |
Definition at line 658 of file timers.c.
References lifetime, and Lifetime().
void cTimer::SetPending | ( | bool | Pending | ) |
Definition at line 621 of file timers.c.
References pending, and Pending().
Referenced by cRecordControl::cRecordControl(), cRecordControl::Process(), and cRecordControls::Start().
void cTimer::SetPriority | ( | int | Priority | ) |
Definition at line 653 of file timers.c.
References priority, and Priority().
void cTimer::SetRecording | ( | bool | Recording | ) |
Definition at line 612 of file timers.c.
References ClrFlags(), isyslog, Recording(), SetFlags(), tfRecording, and ToDescr().
Referenced by cRecordControl::cRecordControl(), and cRecordControl::Stop().
void cTimer::SetRemote | ( | const char * | Remote | ) |
Definition at line 669 of file timers.c.
References remote, and Remote().
Referenced by cMenuTimers::New(), cMenuEditTimer::ProcessKey(), cMenuWhatsOn::Record(), cMenuSchedule::Record(), and cTimers::StoreRemoteTimers().
void cTimer::SetStart | ( | int | Start | ) |
void cTimer::SetStop | ( | int | Stop | ) |
|
static |
Definition at line 396 of file timers.c.
Referenced by cTimer(), DayMatches(), Matches(), ParseDay(), cMenuEditDateItem::ProcessKey(), Skip(), and cMenuEditDateItem::ToggleRepeating().
void cTimer::SetWeekDays | ( | int | WeekDays | ) |
Definition at line 638 of file timers.c.
References weekdays, and WeekDays().
void cTimer::Skip | ( | void | ) |
Definition at line 701 of file timers.c.
References day, IncDay(), SetEvent(), SetTime(), startTime, and StartTime().
Referenced by cMenuTimers::Delete(), OnOff(), and TimerStillRecording().
|
inline |
Definition at line 62 of file timers.h.
References start.
Referenced by cTimers::GetTimer(), cMenuTimerItem::Set(), and SetStart().
time_t cTimer::StartTime | ( | void | ) | const |
Definition at line 523 of file timers.c.
References Matches(), and startTime.
Referenced by Compare(), cShutdownHandler::ConfirmRestart(), cShutdownHandler::ConfirmShutdown(), cRecording::cRecording(), cShutdownHandler::DoShutdown(), cSkinLCARSDisplayMenu::DrawTimer(), cRecordControl::GetEvent(), Matches(), SetEventFromSchedule(), and Skip().
|
inline |
Definition at line 63 of file timers.h.
References stop.
Referenced by cTimers::GetTimer(), cMenuTimerItem::Set(), and SetStop().
time_t cTimer::StopTime | ( | void | ) | const |
Definition at line 530 of file timers.c.
References Matches(), and stopTime.
Referenced by cSkinLCARSDisplayMenu::DrawTimer(), Expired(), cRecordControl::GetEvent(), cTimers::GetNextActiveTimer(), and SetEventFromSchedule().
|
static |
cString cTimer::ToDescr | ( | void | ) | const |
Definition at line 192 of file timers.c.
References Channel(), file, HasFlags(), Id(), remote, cString::sprintf(), start, stop, and tfVps.
Referenced by cSVDRPServer::CmdNEWT(), cSVDRPServer::CmdUPDT(), cTimers::DeleteExpired(), HandleRemoteTimerModifications(), cMenuTimers::OnOff(), SetDeferred(), SetEvent(), SetInVpsMargin(), SetRecording(), cRecordControls::Start(), cRecordControls::Stop(), and cReplayControl::Stop().
cString cTimer::ToText | ( | bool | UseChannelID = false | ) | const |
Definition at line 184 of file timers.c.
References aux, Channel(), day, file, flags, itoa(), lifetime, PrintDay(), priority, cString::sprintf(), start, stop, strreplace(), and weekdays.
Referenced by cSVDRPServer::CmdNEWT(), cSVDRPServer::CmdUPDT(), HandleRemoteTimerModifications(), cMenuTimers::OnOff(), Save(), and cStatusTest::TimerChange().
|
inline |
Definition at line 61 of file timers.h.
References weekdays.
Referenced by cTimers::GetTimer(), ParseDay(), PrintDay(), cMenuTimerItem::Set(), and SetWeekDays().
|
friend |
|
private |
|
private |
Definition at line 36 of file timers.h.
Referenced by Channel(), cTimer(), Matches(), operator=(), Parse(), and cMenuEditTimer::ProcessKey().
|
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 37 of file timers.h.
Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), Day(), DayMatches(), FirstDay(), Matches(), OnOff(), operator=(), Parse(), ParseDay(), PrintFirstDay(), SetDay(), cMenuEditTimer::SetFirstDayItem(), Skip(), and ToText().
|
mutableprivate |
Matches(time_t, ...) will return false if the current time is before this value.
Definition at line 33 of file timers.h.
Referenced by cTimer(), Deferred(), Matches(), operator=(), and SetDeferred().
|
private |
Definition at line 46 of file timers.h.
Referenced by Event(), Matches(), operator=(), SetEvent(), and ~cTimer().
|
mutableprivate |
Definition at line 43 of file timers.h.
Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), File(), operator=(), Parse(), cMenuEditTimer::ProcessKey(), SetFile(), cMenuEditTimer::SetFolder(), ToDescr(), and ToText().
|
private |
Definition at line 35 of file timers.h.
Referenced by ClrFlags(), cMenuEditTimer::cMenuEditTimer(), cTimer(), Flags(), HasFlags(), InvFlags(), operator=(), Parse(), SetFlags(), and ToText().
|
private |
Definition at line 30 of file timers.h.
Referenced by Id(), and operator=().
|
private |
Definition at line 34 of file timers.h.
Referenced by cTimer(), InVpsMargin(), operator=(), and SetInVpsMargin().
|
private |
Definition at line 42 of file timers.h.
Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), Lifetime(), operator=(), Parse(), SetLifetime(), and ToText().
|
private |
Definition at line 34 of file timers.h.
Referenced by cTimer(), operator=(), Pending(), and SetPending().
|
private |
Definition at line 41 of file timers.h.
Referenced by cMenuEditTimer::cMenuEditTimer(), Compare(), cTimer(), operator=(), Parse(), Priority(), SetPriority(), and ToText().
|
private |
Definition at line 45 of file timers.h.
Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), Local(), operator=(), Remote(), SetRemote(), ToDescr(), and ~cTimer().
|
private |
Definition at line 32 of file timers.h.
Referenced by cTimer(), operator=(), SetEvent(), and SetEventFromSchedule().
|
private |
Definition at line 39 of file timers.h.
Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), Matches(), operator=(), Parse(), SetStart(), Start(), ToDescr(), and ToText().
|
mutableprivate |
Definition at line 31 of file timers.h.
Referenced by cTimer(), Matches(), operator=(), Skip(), and StartTime().
|
private |
|
private |
Definition at line 31 of file timers.h.
Referenced by cTimer(), Matches(), operator=(), and StopTime().
|
private |
bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)
Definition at line 38 of file timers.h.
Referenced by cMenuEditTimer::cMenuEditTimer(), cTimer(), DayMatches(), FirstDay(), IsSingleEvent(), operator=(), Parse(), PrintFirstDay(), cMenuEditTimer::SetHelpKeys(), SetWeekDays(), ToText(), and WeekDays().