summaryrefslogtreecommitdiff
path: root/ci.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-01-14 12:21:17 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-01-14 12:21:17 +0100
commite7c86c676017a75f4c3d522a341ed95057be6820 (patch)
treeb000472c7281fc31d0152cc7f648d8a3684bc133 /ci.h
parentdbf342df3c401cfc4cd4d5df28c98c175ba252bc (diff)
downloadvdr-e7c86c676017a75f4c3d522a341ed95057be6820.tar.gz
vdr-e7c86c676017a75f4c3d522a341ed95057be6820.tar.bz2
Improved locking for CAM slots and made the pure functions of cCiAdapter have default implementations
Diffstat (limited to 'ci.h')
-rw-r--r--ci.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/ci.h b/ci.h
index 11237121..e3b85912 100644
--- a/ci.h
+++ b/ci.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.h 3.3 2014/01/02 10:14:39 kls Exp $
+ * $Id: ci.h 3.4 2014/01/14 11:53:52 kls Exp $
*/
#ifndef __CI_H
@@ -88,19 +88,19 @@ protected:
///< Handles the attached CAM slots in a separate thread.
///< The derived class must call the Start() function to
///< actually start CAM handling.
- virtual int Read(uint8_t *Buffer, int MaxLength) = 0;
+ virtual int Read(uint8_t *Buffer, int MaxLength) { return 0; }
///< Reads one chunk of data into the given Buffer, up to MaxLength bytes.
///< If no data is available immediately, wait for up to CAM_READ_TIMEOUT.
///< Returns the number of bytes read (in case of an error it will also
///< return 0).
- virtual void Write(const uint8_t *Buffer, int Length) = 0;
+ virtual void Write(const uint8_t *Buffer, int Length) {}
///< Writes Length bytes of the given Buffer.
- virtual bool Reset(int Slot) = 0;
+ virtual bool Reset(int Slot) { return false; }
///< Resets the CAM in the given Slot.
///< Returns true if the operation was successful.
- virtual eModuleStatus ModuleStatus(int Slot) = 0;
+ virtual eModuleStatus ModuleStatus(int Slot) { return msNone; }
///< Returns the status of the CAM in the given Slot.
- virtual bool Assign(cDevice *Device, bool Query = false) = 0;
+ virtual bool Assign(cDevice *Device, bool Query = false) { return false; }
///< Assigns this adapter to the given Device, if this is possible.
///< If Query is 'true', the adapter only checks whether it can be
///< assigned to the Device, but doesn't actually assign itself to it.