vdr  2.2.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
cSectionHandler Class Reference

#include <sections.h>

Public Member Functions

 cSectionHandler (cDevice *Device)
 
virtual ~cSectionHandler ()
 
int Source (void)
 
int Transponder (void)
 
const cChannelChannel (void)
 
void Attach (cFilter *Filter)
 
void Detach (cFilter *Filter)
 
void SetChannel (const cChannel *Channel)
 
void SetStatus (bool On)
 
- Public Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
 
virtual ~cThread ()
 
void SetDescription (const char *Description,...) __attribute__((format(printf
 
void bool Start (void)
 
bool Active (void)
 

Private Member Functions

void Add (const cFilterData *FilterData)
 
void Del (const cFilterData *FilterData)
 
virtual void Action (void)
 

Private Attributes

cSectionHandlerPrivateshp
 
cDevicedevice
 
int statusCount
 
bool on
 
bool waitForLock
 
time_t lastIncompleteSection
 
cList< cFilterfilters
 
cList< cFilterHandlefilterHandles
 

Friends

class cFilter
 

Additional Inherited Members

- Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 
- Protected Member Functions inherited from cThread
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 

Detailed Description

Definition at line 23 of file sections.h.

Constructor & Destructor Documentation

cSectionHandler::cSectionHandler ( cDevice Device)
cSectionHandler::~cSectionHandler ( )
virtual

Definition at line 55 of file sections.c.

References cThread::Cancel(), Detach(), filters, cList< T >::First(), and shp.

Member Function Documentation

void cSectionHandler::Action ( void  )
privatevirtual

A derived cThread class must implement the code it wants to execute as a separate thread in this function.

If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 166 of file sections.c.

References cListBase::Count(), device, dsyslog, cFilterHandle::filterData, filterHandles, filters, cList< T >::First(), cFilterHandle::handle, cDevice::HasLock(), lastIncompleteSection, cThread::Lock(), LOCK_THREAD, cList< T >::Next(), cFilterData::pid, cDevice::ReadFilter(), cThread::Running(), SetStatus(), cCondWait::SleepMs(), statusCount, cThread::Unlock(), and waitForLock.

void cSectionHandler::Add ( const cFilterData FilterData)
private
void cSectionHandler::Attach ( cFilter Filter)
const cChannel * cSectionHandler::Channel ( void  )

Definition at line 74 of file sections.c.

References cSectionHandlerPrivate::channel, and shp.

void cSectionHandler::Del ( const cFilterData FilterData)
private
void cSectionHandler::Detach ( cFilter Filter)
void cSectionHandler::SetChannel ( const cChannel Channel)

Definition at line 139 of file sections.c.

References cSectionHandlerPrivate::channel, cThread::Lock(), shp, and cThread::Unlock().

Referenced by cDevice::SetChannel().

void cSectionHandler::SetStatus ( bool  On)
int cSectionHandler::Source ( void  )

Definition at line 64 of file sections.c.

References cSectionHandlerPrivate::channel, shp, and cChannel::Source().

int cSectionHandler::Transponder ( void  )

Definition at line 69 of file sections.c.

References cSectionHandlerPrivate::channel, shp, and cChannel::Transponder().

Friends And Related Function Documentation

friend class cFilter
friend

Definition at line 24 of file sections.h.

Member Data Documentation

cDevice* cSectionHandler::device
private

Definition at line 27 of file sections.h.

Referenced by Action(), Add(), cSectionHandler(), Del(), and SetStatus().

cList<cFilterHandle> cSectionHandler::filterHandles
private

Definition at line 32 of file sections.h.

Referenced by Action(), Add(), and Del().

cList<cFilter> cSectionHandler::filters
private

Definition at line 31 of file sections.h.

Referenced by Action(), Attach(), Detach(), SetStatus(), and ~cSectionHandler().

time_t cSectionHandler::lastIncompleteSection
private

Definition at line 30 of file sections.h.

Referenced by Action(), and cSectionHandler().

bool cSectionHandler::on
private

Definition at line 29 of file sections.h.

Referenced by Attach(), cSectionHandler(), and SetStatus().

cSectionHandlerPrivate* cSectionHandler::shp
private

Definition at line 26 of file sections.h.

Referenced by Channel(), cSectionHandler(), SetChannel(), Source(), Transponder(), and ~cSectionHandler().

int cSectionHandler::statusCount
private

Definition at line 28 of file sections.h.

Referenced by Action(), Add(), Attach(), cSectionHandler(), Del(), Detach(), and SetStatus().

bool cSectionHandler::waitForLock
private

Definition at line 29 of file sections.h.

Referenced by Action(), cSectionHandler(), and SetStatus().


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