예제 #1
0
void cSchedule::DelEvent(cEvent *Event)
{
  if (Event->schedule == this) {
     UnhashEvent(Event);
     events.Del(Event);
     }
}
예제 #2
0
파일: epg.c 프로젝트: piotrasd/vdr
void cSchedule::DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
{
  if (SegmentStart > 0 && SegmentEnd > 0) {
     for (cEvent *p = events.First(); p; p = events.Next(p)) {
         if (p->EndTime() > SegmentStart) {
            if (p->StartTime() < SegmentEnd) {
               // The event overlaps with the given time segment.
               if (p->TableID() > TableID || p->TableID() == TableID && p->Version() != Version) {
                  // The segment overwrites all events from tables with higher ids, and
                  // within the same table id all events must have the same version.
                  // We can't delete the event right here because a timer might have
                  // a pointer to it, so let's set its id and start time to 0 to have it
                  // "phased out":
                  if (hasRunning && p->IsRunning())
                     ClrRunningStatus();
                  UnhashEvent(p);
                  p->eventID = 0;
                  p->startTime = 0;
                  }
               }
            else
               break;
            }
         }
     }
}
예제 #3
0
파일: epg.c 프로젝트: piotrasd/vdr
void cSchedule::DelEvent(cEvent *Event)
{
  if (Event->schedule == this) {
     if (hasRunning && Event->IsRunning())
        ClrRunningStatus();
     UnhashEvent(Event);
     events.Del(Event);
     }
}