mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added DeleteEvent() to the EPG handler interface, so that an EPG handler can trigger deleting of an event
This commit is contained in:
parent
78e11d8c6f
commit
ad5ef06857
@ -2895,3 +2895,6 @@ Marco Skambraks <marco@ammec.de>
|
|||||||
Christian Richter <cr@crichter.net>
|
Christian Richter <cr@crichter.net>
|
||||||
for extending the interface to the script that gets called for recordings, so that in
|
for extending the interface to the script that gets called for recordings, so that in
|
||||||
the "edited" case it also provides the name of the original recording
|
the "edited" case it also provides the name of the original recording
|
||||||
|
|
||||||
|
Christian Kaiser <christian.kaiser@teleservice.com>
|
||||||
|
for adding DeleteEvent() to the EPG handler interface
|
||||||
|
2
HISTORY
2
HISTORY
@ -7142,3 +7142,5 @@ Video Disk Recorder Revision History
|
|||||||
- Extended the interface to the script that gets called for recordings, so that in
|
- Extended the interface to the script that gets called for recordings, so that in
|
||||||
the "edited" case it also provides the name of the original recording (thanks to
|
the "edited" case it also provides the name of the original recording (thanks to
|
||||||
Christian Richter).
|
Christian Richter).
|
||||||
|
- Added DeleteEvent() to the EPG handler interface, so that an EPG handler can trigger
|
||||||
|
deleting of an event (thanks to Christian Kaiser).
|
||||||
|
7
eit.c
7
eit.c
@ -8,7 +8,7 @@
|
|||||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||||
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
|
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
|
||||||
*
|
*
|
||||||
* $Id: eit.c 2.16 2012/03/14 10:11:15 kls Exp $
|
* $Id: eit.c 2.17 2012/06/02 14:05:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
@ -290,6 +290,11 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
|
|||||||
channel->SetLinkChannels(LinkChannels);
|
channel->SetLinkChannels(LinkChannels);
|
||||||
Modified = true;
|
Modified = true;
|
||||||
EpgHandlers.HandleEvent(pEvent);
|
EpgHandlers.HandleEvent(pEvent);
|
||||||
|
|
||||||
|
if (EpgHandlers.DeleteEvent(pEvent)) {
|
||||||
|
pSchedule->DelEvent(pEvent);
|
||||||
|
pEvent = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Tid == 0x4E) {
|
if (Tid == 0x4E) {
|
||||||
if (Empty && getSectionNumber() == 0)
|
if (Empty && getSectionNumber() == 0)
|
||||||
|
11
epg.c
11
epg.c
@ -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.c 2.13 2012/05/13 13:46:56 kls Exp $
|
* $Id: epg.c 2.14 2012/06/02 14:08:12 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "epg.h"
|
#include "epg.h"
|
||||||
@ -1429,6 +1429,15 @@ void cEpgHandlers::HandleEvent(cEvent *Event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cEpgHandlers::DeleteEvent(const cEvent *Event)
|
||||||
|
{
|
||||||
|
for (cEpgHandler *eh = First(); eh; eh = Next(eh)) {
|
||||||
|
if (eh->DeleteEvent(Event))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void cEpgHandlers::SortSchedule(cSchedule *Schedule)
|
void cEpgHandlers::SortSchedule(cSchedule *Schedule)
|
||||||
{
|
{
|
||||||
for (cEpgHandler *eh = First(); eh; eh = Next(eh)) {
|
for (cEpgHandler *eh = First(); eh; eh = Next(eh)) {
|
||||||
|
6
epg.h
6
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 2.9 2012/05/13 13:45:50 kls Exp $
|
* $Id: epg.h 2.10 2012/06/02 14:07:51 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __EPG_H
|
#ifndef __EPG_H
|
||||||
@ -258,6 +258,9 @@ public:
|
|||||||
virtual bool HandleEvent(cEvent *Event) { return false; }
|
virtual bool HandleEvent(cEvent *Event) { return false; }
|
||||||
///< After all modifications of the Event have been done, the EPG handler
|
///< After all modifications of the Event have been done, the EPG handler
|
||||||
///< can take a final look at it.
|
///< can take a final look at it.
|
||||||
|
virtual bool DeleteEvent(const cEvent *Event) { return false; }
|
||||||
|
///< After the complete processing of the Event is finished, an EPG handler
|
||||||
|
///< can decide that this Event shall be deleted from its schedule.
|
||||||
virtual bool SortSchedule(cSchedule *Schedule) { return false; }
|
virtual bool SortSchedule(cSchedule *Schedule) { return false; }
|
||||||
///< Sorts the Schedule after the complete table has been processed.
|
///< Sorts the Schedule after the complete table has been processed.
|
||||||
virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version) { return false; }
|
virtual bool DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version) { return false; }
|
||||||
@ -280,6 +283,7 @@ public:
|
|||||||
void SetVps(cEvent *Event, time_t Vps);
|
void SetVps(cEvent *Event, time_t Vps);
|
||||||
void FixEpgBugs(cEvent *Event);
|
void FixEpgBugs(cEvent *Event);
|
||||||
void HandleEvent(cEvent *Event);
|
void HandleEvent(cEvent *Event);
|
||||||
|
bool DeleteEvent(const cEvent *Event);
|
||||||
void SortSchedule(cSchedule *Schedule);
|
void SortSchedule(cSchedule *Schedule);
|
||||||
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
|
void DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user