summaryrefslogtreecommitdiff
path: root/ci.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-01-15 09:28:37 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-01-15 09:28:37 +0100
commitb3954aefd5290babbc2aa97b8f62b6112ff494f0 (patch)
tree3887b265796f646f3e94ab519e8d281eb23b8e46 /ci.h
parent555fe68a018e193193f916c5e7c888c0a386e9fe (diff)
downloadvdr-b3954aefd5290babbc2aa97b8f62b6112ff494f0.tar.gz
vdr-b3954aefd5290babbc2aa97b8f62b6112ff494f0.tar.bz2
Modified the CAM API so that it is possible to implement CAMs that can be freely assigned to any devices
Diffstat (limited to 'ci.h')
-rw-r--r--ci.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/ci.h b/ci.h
index 4d558537..8fea34f1 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.8 2014/03/26 11:42:17 kls Exp $
+ * $Id: ci.h 3.9 2015/01/15 09:18:09 kls Exp $
*/
#ifndef __CI_H
@@ -79,11 +79,14 @@ enum eModuleStatus { msNone, msReset, msPresent, msReady };
class cCiAdapter : public cThread {
friend class cCamSlot;
private:
- cDevice *assignedDevice;
cCamSlot *camSlots[MAX_CAM_SLOTS_PER_ADAPTER];
void AddCamSlot(cCamSlot *CamSlot);
///< Adds the given CamSlot to this CI adapter.
protected:
+ cCamSlot *ItCamSlot(int &Iter);
+ ///< Iterates over all added CAM slots of this adapter. Iter has to be
+ ///< initialized to 0 and is required to store the iteration state.
+ ///< Returns NULL if no further CAM slot is found.
virtual void Action(void);
///< Handles the attached CAM slots in a separate thread.
///< The derived class must call the Start() function to
@@ -128,6 +131,7 @@ private:
cMutex mutex;
cCondVar processed;
cCiAdapter *ciAdapter;
+ cDevice *assignedDevice;
cCaPidReceiver *caPidReceiver;
int slotIndex;
int slotNumber;
@@ -164,7 +168,7 @@ public:
///< device it was previously assigned to. The value of Query
///< is ignored in that case, and this function always returns
///< 'true'.
- cDevice *Device(void);
+ cDevice *Device(void) { return assignedDevice; }
///< Returns the device this CAM slot is currently assigned to.
bool WantsTsData(void) const { return caPidReceiver != NULL; }
///< Returns true if this CAM slot wants to receive the TS data through