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:
parent
0b3d9a95fd
commit
1314d03411
2
HISTORY
2
HISTORY
@ -4000,3 +4000,5 @@ Video Disk Recorder Revision History
|
|||||||
- Schedules are now cleaned up once every hour (not only at 05:00).
|
- 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
|
- The "Schedules" and "What's on now/next?" menus are now updated if a timer
|
||||||
is set or modified.
|
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
3
epg.h
@ -7,7 +7,7 @@
|
|||||||
* Original version (as used in VDR before 1.3.0) written by
|
* Original version (as used in VDR before 1.3.0) written by
|
||||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
* 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
|
#ifndef __EPG_H
|
||||||
@ -67,6 +67,7 @@ public:
|
|||||||
~cEvent();
|
~cEvent();
|
||||||
virtual int Compare(const cListObject &ListObject) const;
|
virtual int Compare(const cListObject &ListObject) const;
|
||||||
tChannelID ChannelID(void) const;
|
tChannelID ChannelID(void) const;
|
||||||
|
const cSchedule *Schedule(void) const { return schedule; }
|
||||||
u_int16_t EventID(void) const { return eventID; }
|
u_int16_t EventID(void) const { return eventID; }
|
||||||
uchar TableID(void) const { return tableID; }
|
uchar TableID(void) const { return tableID; }
|
||||||
uchar Version(void) const { return version; }
|
uchar Version(void) const { return version; }
|
||||||
|
9
timers.c
9
timers.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "timers.h"
|
||||||
@ -363,7 +363,7 @@ bool cTimer::Matches(time_t t, bool Directly) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (HasFlags(tfActive)) {
|
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();
|
startTime = event->StartTime();
|
||||||
stopTime = event->EndTime();
|
stopTime = event->EndTime();
|
||||||
return event->IsRunning(true);
|
return event->IsRunning(true);
|
||||||
@ -425,7 +425,7 @@ time_t cTimer::StopTime(void) const
|
|||||||
return stopTime;
|
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 != Event) { //XXX TODO check event data, too???
|
||||||
if (Event) {
|
if (Event) {
|
||||||
@ -436,7 +436,6 @@ void cTimer::SetEvent(const cSchedule *Schedule, const cEvent *Event)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
isyslog("timer %s set to no event", *ToDescr());
|
isyslog("timer %s set to no event", *ToDescr());
|
||||||
schedule = Event ? Schedule : NULL;
|
|
||||||
event = Event;
|
event = Event;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -629,7 +628,7 @@ void cTimers::SetEvents(void)
|
|||||||
}
|
}
|
||||||
if (Event && Event->EndTime() < now - EXPIRELATENCY && !Event->IsRunning())
|
if (Event && Event->EndTime() < now - EXPIRELATENCY && !Event->IsRunning())
|
||||||
Event = NULL;
|
Event = NULL;
|
||||||
ti->SetEvent(Schedule, Event);
|
ti->SetEvent(Event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5
timers.h
5
timers.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __TIMERS_H
|
||||||
@ -39,7 +39,6 @@ private:
|
|||||||
int lifetime;
|
int lifetime;
|
||||||
char file[MaxFileName];
|
char file[MaxFileName];
|
||||||
char *summary;
|
char *summary;
|
||||||
const cSchedule *schedule;
|
|
||||||
const cEvent *event;
|
const cEvent *event;
|
||||||
public:
|
public:
|
||||||
cTimer(bool Instant = false, bool Pause = false);
|
cTimer(bool Instant = false, bool Pause = false);
|
||||||
@ -78,7 +77,7 @@ public:
|
|||||||
bool Expired(void) const;
|
bool Expired(void) const;
|
||||||
time_t StartTime(void) const;
|
time_t StartTime(void) const;
|
||||||
time_t StopTime(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 SetRecording(bool Recording);
|
||||||
void SetPending(bool Pending);
|
void SetPending(bool Pending);
|
||||||
void SetInVpsMargin(bool InVpsMargin);
|
void SetInVpsMargin(bool InVpsMargin);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user