summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
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;