client_device.patch by Petri Hintukainen

- Implement virtual IsTunedToTransponder()
- Return true from Provides... functions
Modified Files:
	client/device.c client/device.h
This commit is contained in:
schmirl 2007-04-23 11:42:16 +00:00
parent 35bfac507b
commit e55981c9e1
2 changed files with 15 additions and 5 deletions

View File

@ -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,

View File

@ -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
@ -54,6 +54,7 @@ public:
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);