summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-02-06 14:23:03 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-02-06 14:23:03 +0100
commit644a9f07f26df58b7d79cea8ea961c2232a092be (patch)
tree3f47c7be9bdb0af8ac5db55e2932c3e9cd0b153b /device.c
parent2517b2ee8df0a10ae03135a62a9356d4aebdfe64 (diff)
downloadvdr-644a9f07f26df58b7d79cea8ea961c2232a092be.tar.gz
vdr-644a9f07f26df58b7d79cea8ea961c2232a092be.tar.bz2
Implemented cDeviceHook
Diffstat (limited to 'device.c')
-rw-r--r--device.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/device.c b/device.c
index cb31b834..88c46736 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.32 2010/01/30 11:06:51 kls Exp $
+ * $Id: device.c 2.33 2010/02/06 13:55:50 kls Exp $
*/
#include "device.h"
@@ -44,6 +44,18 @@ void cLiveSubtitle::Receive(uchar *Data, int Length)
cDevice::PrimaryDevice()->PlayTs(Data, Length);
}
+// --- cDeviceHook -----------------------------------------------------------
+
+cDeviceHook::cDeviceHook(void)
+{
+ cDevice::deviceHooks.Add(this);
+}
+
+bool cDeviceHook::DeviceProvidesTransponder(const cDevice *Device, const cChannel *Channel) const
+{
+ return true;
+}
+
// --- cDevice ---------------------------------------------------------------
// The default priority for non-primary devices:
@@ -59,6 +71,7 @@ int cDevice::currentChannel = 1;
cDevice *cDevice::device[MAXDEVICES] = { NULL };
cDevice *cDevice::primaryDevice = NULL;
cDevice *cDevice::avoidDevice = NULL;
+cList<cDeviceHook> cDevice::deviceHooks;
cDevice::cDevice(void)
:patPmtParser(true)
@@ -570,6 +583,17 @@ bool cDevice::ProvidesSource(int Source) const
return false;
}
+bool cDevice::DeviceHooksProvidesTransponder(const cChannel *Channel) const
+{
+ cDeviceHook *Hook = deviceHooks.First();
+ while (Hook) {
+ if (!Hook->DeviceProvidesTransponder(this, Channel))
+ return false;
+ Hook = deviceHooks.Next(Hook);
+ }
+ return true;
+}
+
bool cDevice::ProvidesTransponder(const cChannel *Channel) const
{
return false;