vdr 2.6.8
cSchedule Class Reference

#include <epg.h>

Public Member Functions

 cSchedule (tChannelID ChannelID)
 
tChannelID ChannelID (void) const
 
bool Modified (int &State) const
 
bool OnActualTp (uchar TableId)
 
time_t PresentSeen (void) const
 
bool PresentSeenWithin (int Seconds) const
 
void SetModified (void)
 
void SetPresentSeen (void)
 
void SetRunningStatus (cEvent *Event, int RunningStatus, const cChannel *Channel=NULL)
 
void ClrRunningStatus (cChannel *Channel=NULL)
 
void ResetVersions (void)
 
void Sort (void)
 
void DropOutdated (time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)
 
void Cleanup (time_t Time)
 
void Cleanup (void)
 
void IncNumTimers (void) const
 
void DecNumTimers (void) const
 
bool HasTimer (void) const
 
cEventAddEvent (cEvent *Event)
 
void DelEvent (cEvent *Event)
 
void HashEvent (cEvent *Event)
 
void UnhashEvent (cEvent *Event)
 
const cList< cEvent > * Events (void) const
 
const cEventGetPresentEvent (void) const
 
const cEventGetFollowingEvent (void) const
 
const cEventGetEvent (tEventID EventID, time_t StartTime=0) const
 
const cEventGetEventById (tEventID EventID) const
 
const cEventGetEventByTime (time_t StartTime) const
 
const cEventGetEventAround (time_t Time) const
 
void Dump (const cChannels *Channels, FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) const
 
- Public Member Functions inherited from cListObject
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 

Static Public Member Functions

static bool Read (FILE *f, cSchedules *Schedules)
 

Private Attributes

tChannelID channelID
 
cList< cEventevents
 
cHash< cEventeventsHashID
 
cHash< cEventeventsHashStartTime
 
u_int16_t numTimers
 
bool hasRunning
 
bool onActualTp
 
int modified
 
time_t presentSeen
 

Static Private Attributes

static cMutex numTimersMutex
 

Detailed Description

Definition at line 152 of file epg.h.

Constructor & Destructor Documentation

◆ cSchedule()

cSchedule::cSchedule ( tChannelID ChannelID)

Member Function Documentation

◆ AddEvent()

cEvent * cSchedule::AddEvent ( cEvent * Event)

Definition at line 958 of file epg.c.

References cListBase::Add(), events, HashEvent(), and cEvent::schedule.

Referenced by cEIT::cEIT(), and cEvent::Read().

◆ ChannelID()

tChannelID cSchedule::ChannelID ( void ) const
inline

Definition at line 166 of file epg.h.

References channelID.

Referenced by cEvent::ChannelID(), and cSchedule().

◆ Cleanup() [1/2]

void cSchedule::Cleanup ( time_t Time)

◆ Cleanup() [2/2]

void cSchedule::Cleanup ( void )

Definition at line 1146 of file epg.c.

References Cleanup().

Referenced by Cleanup().

◆ ClrRunningStatus()

void cSchedule::ClrRunningStatus ( cChannel * Channel = NULL)

◆ DecNumTimers()

void cSchedule::DecNumTimers ( void ) const

Definition at line 944 of file epg.c.

References cMutex::Lock(), numTimers, numTimersMutex, and cMutex::Unlock().

Referenced by cEvent::DecNumTimers().

◆ DelEvent()

void cSchedule::DelEvent ( cEvent * Event)

◆ DropOutdated()

void cSchedule::DropOutdated ( time_t SegmentStart,
time_t SegmentEnd,
uchar TableID,
uchar Version )

◆ Dump()

void cSchedule::Dump ( const cChannels * Channels,
FILE * f,
const char * Prefix = "",
eDumpMode DumpMode = dmAll,
time_t AtTime = 0 ) const

◆ Events()

const cList< cEvent > * cSchedule::Events ( void ) const
inline

Definition at line 187 of file epg.h.

References events.

Referenced by cTimer::SetEventFromSchedule(), and cTimer::SpawnPatternTimers().

◆ GetEvent()

const cEvent * cSchedule::GetEvent ( tEventID EventID,
time_t StartTime = 0 ) const

Definition at line 1032 of file epg.c.

References eventsHashID, eventsHashStartTime, and cHash< T >::Get().

◆ GetEventAround()

const cEvent * cSchedule::GetEventAround ( time_t Time) const

Definition at line 1055 of file epg.c.

References events, cList< T >::First(), cList< T >::Next(), and cEvent::StartTime().

Referenced by Dump().

◆ GetEventById()

const cEvent * cSchedule::GetEventById ( tEventID EventID) const

Definition at line 1043 of file epg.c.

References eventsHashID, and cHash< T >::Get().

Referenced by cEIT::cEIT().

◆ GetEventByTime()

const cEvent * cSchedule::GetEventByTime ( time_t StartTime) const

Definition at line 1048 of file epg.c.

References eventsHashStartTime, and cHash< T >::Get().

Referenced by cEIT::cEIT(), and cEvent::Read().

◆ GetFollowingEvent()

const cEvent * cSchedule::GetFollowingEvent ( void ) const

Definition at line 1016 of file epg.c.

References events, cList< T >::First(), GetPresentEvent(), cList< T >::Next(), and cEvent::StartTime().

Referenced by Dump().

◆ GetPresentEvent()

const cEvent * cSchedule::GetPresentEvent ( void ) const

◆ HashEvent()

void cSchedule::HashEvent ( cEvent * Event)

◆ HasTimer()

bool cSchedule::HasTimer ( void ) const
inline

Definition at line 182 of file epg.h.

References numTimers.

Referenced by cEvent::SetRunningStatus().

◆ IncNumTimers()

void cSchedule::IncNumTimers ( void ) const

Definition at line 937 of file epg.c.

References cMutex::Lock(), numTimers, numTimersMutex, and cMutex::Unlock().

Referenced by cEvent::IncNumTimers().

◆ Modified()

bool cSchedule::Modified ( int & State) const
inline

Definition at line 167 of file epg.h.

References modified.

Referenced by cTimer::SetEvent(), cTimer::SetEventFromSchedule(), and cTimer::SpawnPatternTimers().

◆ OnActualTp()

bool cSchedule::OnActualTp ( uchar TableId)

Definition at line 951 of file epg.c.

References onActualTp.

Referenced by cEIT::cEIT().

◆ PresentSeen()

time_t cSchedule::PresentSeen ( void ) const
inline

Definition at line 169 of file epg.h.

References presentSeen.

◆ PresentSeenWithin()

bool cSchedule::PresentSeenWithin ( int Seconds) const
inline

Definition at line 170 of file epg.h.

References presentSeen.

Referenced by main(), and cTimer::Matches().

◆ Read()

bool cSchedule::Read ( FILE * f,
cSchedules * Schedules )
static

◆ ResetVersions()

void cSchedule::ResetVersions ( void )

Definition at line 1101 of file epg.c.

References events, cList< T >::First(), and cList< T >::Next().

◆ SetModified()

void cSchedule::SetModified ( void )
inline

Definition at line 171 of file epg.h.

References modified.

Referenced by ClrRunningStatus(), and Sort().

◆ SetPresentSeen()

void cSchedule::SetPresentSeen ( void )
inline

Definition at line 172 of file epg.h.

References presentSeen.

Referenced by cEIT::cEIT(), and SetRunningStatus().

◆ SetRunningStatus()

void cSchedule::SetRunningStatus ( cEvent * Event,
int RunningStatus,
const cChannel * Channel = NULL )

◆ Sort()

◆ UnhashEvent()

void cSchedule::UnhashEvent ( cEvent * Event)

Member Data Documentation

◆ channelID

tChannelID cSchedule::channelID
private

Definition at line 155 of file epg.h.

Referenced by ChannelID(), cSchedule(), Dump(), and Read().

◆ events

◆ eventsHashID

cHash<cEvent> cSchedule::eventsHashID
private

Definition at line 157 of file epg.h.

Referenced by GetEvent(), GetEventById(), HashEvent(), and UnhashEvent().

◆ eventsHashStartTime

cHash<cEvent> cSchedule::eventsHashStartTime
private

Definition at line 158 of file epg.h.

Referenced by GetEvent(), GetEventByTime(), HashEvent(), and UnhashEvent().

◆ hasRunning

bool cSchedule::hasRunning
private

Definition at line 160 of file epg.h.

Referenced by ClrRunningStatus(), cSchedule(), SetRunningStatus(), and Sort().

◆ modified

int cSchedule::modified
private

Definition at line 162 of file epg.h.

Referenced by cSchedule(), Modified(), and SetModified().

◆ numTimers

u_int16_t cSchedule::numTimers
mutableprivate

Definition at line 159 of file epg.h.

Referenced by cSchedule(), DecNumTimers(), DelEvent(), HasTimer(), and IncNumTimers().

◆ numTimersMutex

cMutex cSchedule::numTimersMutex
staticprivate

Definition at line 154 of file epg.h.

Referenced by DecNumTimers(), DelEvent(), and IncNumTimers().

◆ onActualTp

bool cSchedule::onActualTp
private

Definition at line 161 of file epg.h.

Referenced by cSchedule(), and OnActualTp().

◆ presentSeen

time_t cSchedule::presentSeen
private

Definition at line 163 of file epg.h.

Referenced by cSchedule(), PresentSeen(), PresentSeenWithin(), and SetPresentSeen().


The documentation for this class was generated from the following files: