summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-07 16:21:46 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-07 16:21:46 +0200
commit10a7cf33d67b138a31df0564e3fc9267beafe366 (patch)
treef3f0e9a259da1f9a85680554c599eb4404aefff4 /device.c
parent186ee74748ccbd2e917026fc71988f8bdd70d2ef (diff)
downloadvdr-10a7cf33d67b138a31df0564e3fc9267beafe366.tar.gz
vdr-10a7cf33d67b138a31df0564e3fc9267beafe366.tar.bz2
Added cDevice::DeviceNumber()
Diffstat (limited to 'device.c')
-rw-r--r--device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/device.c b/device.c
index 473b178e..3c94fa2e 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 1.25 2002/10/06 13:49:38 kls Exp $
+ * $Id: device.c 1.26 2002/10/07 16:21:46 kls Exp $
*/
#include "device.h"
@@ -87,6 +87,15 @@ int cDevice::NextCardIndex(int n)
return nextCardIndex;
}
+int cDevice::DeviceNumber(void) const
+{
+ for (int i = 0; i < numDevices; i++) {
+ if (device[i] == this)
+ return i;
+ }
+ return -1;
+}
+
void cDevice::MakePrimaryDevice(bool On)
{
}