From e7c86c676017a75f4c3d522a341ed95057be6820 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 14 Jan 2014 12:21:17 +0100 Subject: Improved locking for CAM slots and made the pure functions of cCiAdapter have default implementations --- ci.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ci.h') 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. -- cgit v1.2.3