vdr  2.4.0
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
cSchedule Class Reference

#include <epg.h>

Collaboration diagram for cSchedule:
[legend]

Public Member Functions

 cSchedule (tChannelID ChannelID)
 
tChannelID ChannelID (void) const
 
bool Modified (int &State) const
 
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 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
 
int modified
 
time_t presentSeen
 

Static Private Attributes

static cMutex numTimersMutex
 

Detailed Description

Definition at line 150 of file epg.h.

Constructor & Destructor Documentation

◆ cSchedule()

cSchedule::cSchedule ( tChannelID  ChannelID)

Member Function Documentation

◆ AddEvent()

cEvent * cSchedule::AddEvent ( cEvent Event)

Definition at line 933 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 163 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 1091 of file epg.c.

◆ ClrRunningStatus()

void cSchedule::ClrRunningStatus ( cChannel Channel = NULL)

◆ DecNumTimers()

void cSchedule::DecNumTimers ( void  ) const

Definition at line 926 of file epg.c.

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

Referenced by cEvent::DecNumTimers().

◆ DelEvent()

void cSchedule::DelEvent ( cEvent Event)

Definition at line 941 of file epg.c.

References cListBase::Del(), events, cEvent::schedule, and UnhashEvent().

Referenced by Cleanup(), and DropOutdated().

◆ 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 183 of file epg.h.

References events.

Referenced by cTimer::SetEventFromSchedule().

◆ GetEvent()

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

Definition at line 993 of file epg.c.

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

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

◆ GetEventAround()

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

Definition at line 1003 of file epg.c.

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

Referenced by Dump().

◆ GetFollowingEvent()

const cEvent * cSchedule::GetFollowingEvent ( void  ) const

Definition at line 978 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 178 of file epg.h.

References numTimers.

Referenced by cEvent::SetRunningStatus().

◆ IncNumTimers()

void cSchedule::IncNumTimers ( void  ) const

Definition at line 919 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 164 of file epg.h.

References modified.

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

◆ PresentSeen()

time_t cSchedule::PresentSeen ( void  ) const
inline

Definition at line 165 of file epg.h.

References presentSeen.

◆ PresentSeenWithin()

bool cSchedule::PresentSeenWithin ( int  Seconds) const
inline

Definition at line 166 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 1048 of file epg.c.

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

◆ SetModified()

void cSchedule::SetModified ( void  )
inline

Definition at line 167 of file epg.h.

References modified.

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

◆ SetPresentSeen()

void cSchedule::SetPresentSeen ( void  )
inline

Definition at line 168 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()

void cSchedule::Sort ( void  )

◆ UnhashEvent()

void cSchedule::UnhashEvent ( cEvent Event)

Member Data Documentation

◆ channelID

tChannelID cSchedule::channelID
private

Definition at line 153 of file epg.h.

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

◆ events

cList<cEvent> cSchedule::events
private

◆ eventsHashID

cHash<cEvent> cSchedule::eventsHashID
private

Definition at line 155 of file epg.h.

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

◆ eventsHashStartTime

cHash<cEvent> cSchedule::eventsHashStartTime
private

Definition at line 156 of file epg.h.

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

◆ hasRunning

bool cSchedule::hasRunning
private

Definition at line 158 of file epg.h.

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

◆ modified

int cSchedule::modified
private

Definition at line 159 of file epg.h.

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

◆ numTimers

u_int16_t cSchedule::numTimers
mutableprivate

Definition at line 157 of file epg.h.

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

◆ numTimersMutex

cMutex cSchedule::numTimersMutex
staticprivate

Definition at line 152 of file epg.h.

Referenced by DecNumTimers(), and IncNumTimers().

◆ presentSeen

time_t cSchedule::presentSeen
private

Definition at line 160 of file epg.h.

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


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