vdr
1.7.27
|
#include <sections.h>
Public Member Functions | |
cSectionHandler (cDevice *Device) | |
virtual | ~cSectionHandler () |
int | Source (void) |
int | Transponder (void) |
const cChannel * | Channel (void) |
void | Attach (cFilter *Filter) |
void | Detach (cFilter *Filter) |
void | SetChannel (const cChannel *Channel) |
void | SetStatus (bool On) |
cSectionHandler (cDevice *Device) | |
virtual | ~cSectionHandler () |
int | Source (void) |
int | Transponder (void) |
const cChannel * | Channel (void) |
void | Attach (cFilter *Filter) |
void | Detach (cFilter *Filter) |
void | SetChannel (const cChannel *Channel) |
void | SetStatus (bool On) |
Private Member Functions | |
void | Add (const cFilterData *FilterData) |
void | Del (const cFilterData *FilterData) |
virtual void | Action (void) |
void | Add (const cFilterData *FilterData) |
void | Del (const cFilterData *FilterData) |
virtual void | Action (void) |
Private Attributes | |
cSectionHandlerPrivate * | shp |
cDevice * | device |
int | statusCount |
bool | on |
bool | waitForLock |
time_t | lastIncompleteSection |
cList< cFilter > | filters |
cList< cFilterHandle > | filterHandles |
Friends | |
class | cFilter |
Definition at line 23 of file include/vdr/sections.h.
cSectionHandler::cSectionHandler | ( | cDevice * | Device | ) |
Definition at line 42 of file sections.c.
References device, lastIncompleteSection, on, shp, cThread::Start(), statusCount, and waitForLock.
cSectionHandler::~cSectionHandler | ( | ) | [virtual] |
Definition at line 54 of file sections.c.
References cThread::Cancel(), Detach(), filters, cList< T >::First(), and shp.
cSectionHandler::cSectionHandler | ( | cDevice * | Device | ) |
virtual cSectionHandler::~cSectionHandler | ( | ) | [virtual] |
void cSectionHandler::Action | ( | void | ) | [private, virtual] |
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 165 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, cThread::Running(), safe_read(), cThread::SetPriority(), SetStatus(), cCondWait::SleepMs(), statusCount, cThread::Unlock(), and waitForLock.
virtual void cSectionHandler::Action | ( | void | ) | [private, virtual] |
void cSectionHandler::Add | ( | const cFilterData * | FilterData | ) | [private] |
void cSectionHandler::Add | ( | const cFilterData * | FilterData | ) | [private] |
Definition at line 78 of file sections.c.
References cListBase::Add(), device, cFilterHandle::filterData, filterHandles, cList< T >::First(), cFilterHandle::handle, cFilterData::Is(), cThread::Lock(), cFilterData::mask, cList< T >::Next(), cDevice::OpenFilter(), cFilterData::pid, statusCount, cFilterData::tid, cThread::Unlock(), and cFilterHandle::used.
Referenced by cFilter::Add(), and cFilter::SetStatus().
void cSectionHandler::Attach | ( | cFilter * | Filter | ) |
void cSectionHandler::Attach | ( | cFilter * | Filter | ) |
Definition at line 117 of file sections.c.
References cListBase::Add(), filters, cThread::Lock(), on, cFilter::sectionHandler, cFilter::SetStatus(), statusCount, and cThread::Unlock().
Referenced by cDevice::AttachFilter().
const cChannel* cSectionHandler::Channel | ( | void | ) |
const cChannel * cSectionHandler::Channel | ( | void | ) |
Definition at line 73 of file sections.c.
References cSectionHandlerPrivate::channel, and shp.
Referenced by cFilter::Channel().
void cSectionHandler::Del | ( | const cFilterData * | FilterData | ) | [private] |
Definition at line 100 of file sections.c.
References cDevice::CloseFilter(), cListBase::Del(), device, cFilterHandle::filterData, filterHandles, cList< T >::First(), cFilterHandle::handle, cFilterData::Is(), cThread::Lock(), cFilterData::mask, cList< T >::Next(), cFilterData::pid, statusCount, cFilterData::tid, cThread::Unlock(), and cFilterHandle::used.
Referenced by cFilter::Del(), and cFilter::SetStatus().
void cSectionHandler::Del | ( | const cFilterData * | FilterData | ) | [private] |
void cSectionHandler::Detach | ( | cFilter * | Filter | ) |
Definition at line 128 of file sections.c.
References cListBase::Del(), filters, cThread::Lock(), cFilter::sectionHandler, cFilter::SetStatus(), statusCount, and cThread::Unlock().
Referenced by cDevice::Detach(), cFilter::~cFilter(), and ~cSectionHandler().
void cSectionHandler::Detach | ( | cFilter * | Filter | ) |
void cSectionHandler::SetChannel | ( | const cChannel * | Channel | ) |
void cSectionHandler::SetChannel | ( | const cChannel * | Channel | ) |
Definition at line 138 of file sections.c.
References cSectionHandlerPrivate::channel, cThread::Lock(), shp, and cThread::Unlock().
Referenced by cDevice::SetChannel().
void cSectionHandler::SetStatus | ( | bool | On | ) |
Definition at line 145 of file sections.c.
References device, filters, cList< T >::First(), cDevice::HasLock(), cThread::Lock(), cList< T >::Next(), on, statusCount, cThread::Unlock(), and waitForLock.
Referenced by Action(), and cDevice::SetChannel().
void cSectionHandler::SetStatus | ( | bool | On | ) |
int cSectionHandler::Source | ( | void | ) |
Definition at line 63 of file sections.c.
References cSectionHandlerPrivate::channel, shp, and cChannel::Source().
Referenced by cFilter::Source().
int cSectionHandler::Source | ( | void | ) |
int cSectionHandler::Transponder | ( | void | ) |
Definition at line 68 of file sections.c.
References cSectionHandlerPrivate::channel, shp, and cChannel::Transponder().
Referenced by cFilter::Transponder().
int cSectionHandler::Transponder | ( | void | ) |
cFilter [friend] |
Definition at line 24 of file include/vdr/sections.h.
cDevice * cSectionHandler::device [private] |
Definition at line 27 of file include/vdr/sections.h.
Referenced by Action(), Add(), cSectionHandler(), Del(), and SetStatus().
cList< cFilterHandle > cSectionHandler::filterHandles [private] |
Definition at line 32 of file include/vdr/sections.h.
cList< cFilter > cSectionHandler::filters [private] |
Definition at line 31 of file include/vdr/sections.h.
Referenced by Action(), Attach(), Detach(), SetStatus(), and ~cSectionHandler().
time_t cSectionHandler::lastIncompleteSection [private] |
Definition at line 30 of file include/vdr/sections.h.
Referenced by Action(), and cSectionHandler().
bool cSectionHandler::on [private] |
Definition at line 29 of file include/vdr/sections.h.
Referenced by Attach(), cSectionHandler(), and SetStatus().
cSectionHandlerPrivate * cSectionHandler::shp [private] |
Definition at line 26 of file include/vdr/sections.h.
Referenced by Channel(), cSectionHandler(), SetChannel(), Source(), Transponder(), and ~cSectionHandler().
int cSectionHandler::statusCount [private] |
Definition at line 28 of file include/vdr/sections.h.
Referenced by Action(), Add(), Attach(), cSectionHandler(), Del(), Detach(), and SetStatus().
bool cSectionHandler::waitForLock [private] |
Definition at line 29 of file include/vdr/sections.h.
Referenced by Action(), cSectionHandler(), and SetStatus().