diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-11 15:54:37 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-11 15:54:37 +0100 |
commit | 7f9d14ee8b181a999afb997d74a24b3087fd9d33 (patch) | |
tree | 8c1c2238cb7137033ae68ba7d4e32a3d7a22f548 /sections.c | |
parent | 43ca916c20a72c9b47a15c460cced63b5c19c286 (diff) | |
download | vdr-1.3.1.tar.gz vdr-1.3.1.tar.bz2 |
The actual transponder data is now taken from the NIT1.3.1
Diffstat (limited to 'sections.c')
-rw-r--r-- | sections.c | 34 |
1 files changed, 28 insertions, 6 deletions
@@ -4,11 +4,12 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sections.c 1.3 2004/01/10 11:45:42 kls Exp $ + * $Id: sections.c 1.4 2004/01/11 13:22:13 kls Exp $ */ #include "sections.h" #include <unistd.h> +#include "channels.h" #include "device.h" // --- cFilterHandle---------------------------------------------------------- @@ -28,15 +29,21 @@ cFilterHandle::cFilterHandle(const cFilterData &FilterData) used = 0; } +// --- cSectionHandlerPrivate ------------------------------------------------ + +class cSectionHandlerPrivate { +public: + cChannel channel; + }; + // --- cSectionHandler ------------------------------------------------------- cSectionHandler::cSectionHandler(cDevice *Device) :cThread("Section handler") { + shp = new cSectionHandlerPrivate; device = Device; active = false; - source = 0; - transponder = 0; statusCount = 0; on = false; lastIncompleteSection = 0; @@ -50,6 +57,22 @@ cSectionHandler::~cSectionHandler() cFilter *fi; while ((fi = filters.First()) != NULL) Detach(fi); + delete shp; +} + +int cSectionHandler::Source(void) +{ + return shp->channel.Source(); +} + +int cSectionHandler::Transponder(void) +{ + return shp->channel.Transponder(); +} + +const cChannel *cSectionHandler::Channel(void) +{ + return &shp->channel; } void cSectionHandler::Add(const cFilterData *FilterData) @@ -107,11 +130,10 @@ void cSectionHandler::Detach(cFilter *Filter) Unlock(); } -void cSectionHandler::SetSource(int Source, int Transponder) +void cSectionHandler::SetChannel(const cChannel *Channel) { Lock(); - source = Source; - transponder = Transponder; + shp->channel = Channel? *Channel : cChannel(); Unlock(); } |