1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

cTimer no longer has its own 'schedule' member

This commit is contained in:
Klaus Schmidinger 2005-12-27 14:39:14 +01:00
parent 0b3d9a95fd
commit 1314d03411
4 changed files with 10 additions and 9 deletions

View File

@ -4000,3 +4000,5 @@ Video Disk Recorder Revision History
- Schedules are now cleaned up once every hour (not only at 05:00).
- The "Schedules" and "What's on now/next?" menus are now updated if a timer
is set or modified.
- cTimer no longer has its own 'schedule' member, it rather uses that of the
event it has been set to.

3
epg.h
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
* $Id: epg.h 1.27 2005/12/26 11:59:44 kls Exp $
* $Id: epg.h 1.28 2005/12/27 14:31:24 kls Exp $
*/
#ifndef __EPG_H
@ -67,6 +67,7 @@ public:
~cEvent();
virtual int Compare(const cListObject &ListObject) const;
tChannelID ChannelID(void) const;
const cSchedule *Schedule(void) const { return schedule; }
u_int16_t EventID(void) const { return eventID; }
uchar TableID(void) const { return tableID; }
uchar Version(void) const { return version; }

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: timers.c 1.36 2005/09/09 15:22:33 kls Exp $
* $Id: timers.c 1.37 2005/12/27 14:33:14 kls Exp $
*/
#include "timers.h"
@ -363,7 +363,7 @@ bool cTimer::Matches(time_t t, bool Directly) const
}
if (HasFlags(tfActive)) {
if (HasFlags(tfVps) && !Directly && event && event->Vps() && schedule && schedule->PresentSeenWithin(30)) {
if (HasFlags(tfVps) && !Directly && event && event->Vps() && event->Schedule() && event->Schedule()->PresentSeenWithin(30)) {
startTime = event->StartTime();
stopTime = event->EndTime();
return event->IsRunning(true);
@ -425,7 +425,7 @@ time_t cTimer::StopTime(void) const
return stopTime;
}
void cTimer::SetEvent(const cSchedule *Schedule, const cEvent *Event)
void cTimer::SetEvent(const cEvent *Event)
{
if (event != Event) { //XXX TODO check event data, too???
if (Event) {
@ -436,7 +436,6 @@ void cTimer::SetEvent(const cSchedule *Schedule, const cEvent *Event)
}
else
isyslog("timer %s set to no event", *ToDescr());
schedule = Event ? Schedule : NULL;
event = Event;
}
}
@ -629,7 +628,7 @@ void cTimers::SetEvents(void)
}
if (Event && Event->EndTime() < now - EXPIRELATENCY && !Event->IsRunning())
Event = NULL;
ti->SetEvent(Schedule, Event);
ti->SetEvent(Event);
}
}
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: timers.h 1.19 2005/05/07 10:36:35 kls Exp $
* $Id: timers.h 1.20 2005/12/27 14:27:26 kls Exp $
*/
#ifndef __TIMERS_H
@ -39,7 +39,6 @@ private:
int lifetime;
char file[MaxFileName];
char *summary;
const cSchedule *schedule;
const cEvent *event;
public:
cTimer(bool Instant = false, bool Pause = false);
@ -78,7 +77,7 @@ public:
bool Expired(void) const;
time_t StartTime(void) const;
time_t StopTime(void) const;
void SetEvent(const cSchedule *Schedule, const cEvent *Event);
void SetEvent(const cEvent *Event);
void SetRecording(bool Recording);
void SetPending(bool Pending);
void SetInVpsMargin(bool InVpsMargin);