vdr  2.2.0
dvbci.h
Go to the documentation of this file.
1 /*
2  * dvbci.h: Common Interface for DVB devices
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: dvbci.h 3.0 2006/11/26 11:19:42 kls Exp $
8  */
9 
10 #ifndef __DVBCI_H
11 #define __DVBCI_H
12 
13 #include "ci.h"
14 
15 class cDvbCiAdapter : public cCiAdapter {
16 private:
18  int fd;
19  int adapter;
20  int frontend;
21  bool idle;
22 
23  bool OpenCa(void);
24  void CloseCa(void);
25 protected:
26  virtual int Read(uint8_t *Buffer, int MaxLength);
27  virtual void Write(const uint8_t *Buffer, int Length);
28  virtual bool Reset(int Slot);
29  virtual eModuleStatus ModuleStatus(int Slot);
30  virtual bool Assign(cDevice *Device, bool Query = false);
31  cDvbCiAdapter(cDevice *Device, int Fd, int Adapter = -1, int Frontend = -1);
32 public:
33  virtual ~cDvbCiAdapter();
34  virtual bool SetIdle(bool Idle, bool TestOnly);
35  virtual bool IsIdle(void) const { return idle; }
36  static cDvbCiAdapter *CreateCiAdapter(cDevice *Device, int Fd, int Adapter = -1, int Frontend = -1);
37  };
38 
39 #endif //__DVBCI_H
virtual bool Reset(int Slot)
Resets the CAM in the given Slot.
Definition: dvbci.c:109
virtual void Write(const uint8_t *Buffer, int Length)
Writes Length bytes of the given Buffer.
Definition: dvbci.c:99
void CloseCa(void)
Definition: dvbci.c:59
cDvbCiAdapter(cDevice *Device, int Fd, int Adapter=-1, int Frontend=-1)
Definition: dvbci.c:17
cDevice * device
Definition: dvbci.h:17
int adapter
Definition: dvbci.h:19
virtual bool SetIdle(bool Idle, bool TestOnly)
Definition: dvbci.c:67
bool idle
Definition: dvbci.h:21
Definition: ci.h:79
static cDvbCiAdapter * CreateCiAdapter(cDevice *Device, int Fd, int Adapter=-1, int Frontend=-1)
Definition: dvbci.c:145
bool OpenCa(void)
Definition: dvbci.c:51
int fd
Definition: dvbci.h:18
virtual bool Assign(cDevice *Device, bool Query=false)
Assigns this adapter to the given Device, if this is possible.
Definition: dvbci.c:137
virtual int Read(uint8_t *Buffer, int MaxLength)
Reads one chunk of data into the given Buffer, up to MaxLength bytes.
Definition: dvbci.c:81
virtual ~cDvbCiAdapter()
Definition: dvbci.c:44
virtual eModuleStatus ModuleStatus(int Slot)
Returns the status of the CAM in the given Slot.
Definition: dvbci.c:120
virtual bool IsIdle(void) const
Definition: dvbci.h:35
eModuleStatus
Definition: ci.h:77
The cDevice class is the base from which actual devices can be derived.
Definition: device.h:109
int frontend
Definition: dvbci.h:20