diff --git a/client/device.c b/client/device.c index a2e4580..e2d857d 100644 --- a/client/device.c +++ b/client/device.c @@ -1,5 +1,5 @@ /* - * $Id: device.c,v 1.8 2007/01/15 12:15:12 schmirl Exp $ + * $Id: device.c,v 1.9 2007/04/23 11:42:16 schmirl Exp $ */ #include "client/device.h" @@ -59,13 +59,22 @@ cStreamdevDevice::~cStreamdevDevice() { bool cStreamdevDevice::ProvidesSource(int Source) const { Dprintf("ProvidesSource, Source=%d\n", Source); - return false; + return true; } bool cStreamdevDevice::ProvidesTransponder(const cChannel *Channel) const { Dprintf("ProvidesTransponder\n"); - return false; + return true; +} + +bool cStreamdevDevice::IsTunedToTransponder(const cChannel *Channel) +{ + bool res = false; + if (ClientSocket.DataSocket(siLive) != NULL + && TRANSPONDER(Channel, m_Channel)) + res = true; + return res; } bool cStreamdevDevice::ProvidesChannel(const cChannel *Channel, int Priority, diff --git a/client/device.h b/client/device.h index bdfabb6..3ef146f 100644 --- a/client/device.h +++ b/client/device.h @@ -1,5 +1,5 @@ /* - * $Id: device.h,v 1.3 2005/02/08 15:21:19 lordjaxom Exp $ + * $Id: device.h,v 1.4 2007/04/23 11:42:16 schmirl Exp $ */ #ifndef VDR_STREAMDEV_DEVICE_H @@ -51,9 +51,10 @@ public: virtual ~cStreamdevDevice(); virtual bool ProvidesSource(int Source) const; - virtual bool ProvidesTransponder(const cChannel *Channel) const; + virtual bool ProvidesTransponder(const cChannel *Channel) const; virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const; + virtual bool IsTunedToTransponder(const cChannel *Channel); static bool Init(void); static bool ReInit(void);