summaryrefslogtreecommitdiff
path: root/sections.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-01-11 15:54:37 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-01-11 15:54:37 +0100
commit7f9d14ee8b181a999afb997d74a24b3087fd9d33 (patch)
tree8c1c2238cb7137033ae68ba7d4e32a3d7a22f548 /sections.c
parent43ca916c20a72c9b47a15c460cced63b5c19c286 (diff)
downloadvdr-7f9d14ee8b181a999afb997d74a24b3087fd9d33.tar.gz
vdr-7f9d14ee8b181a999afb997d74a24b3087fd9d33.tar.bz2
The actual transponder data is now taken from the NIT1.3.1
Diffstat (limited to 'sections.c')
-rw-r--r--sections.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/sections.c b/sections.c
index a3eff9e1..fb934a8c 100644
--- a/sections.c
+++ b/sections.c
@@ -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();
}