vdr  2.2.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
cDvbCiAdapter Class Reference

#include <dvbci.h>

Collaboration diagram for cDvbCiAdapter:
[legend]

Public Member Functions

virtual ~cDvbCiAdapter ()
 
virtual bool SetIdle (bool Idle, bool TestOnly)
 
virtual bool IsIdle (void) const
 
- Public Member Functions inherited from cCiAdapter
 cCiAdapter (void)
 
virtual ~cCiAdapter ()
 
- Public Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
 
virtual ~cThread ()
 
void SetDescription (const char *Description,...) __attribute__((format(printf
 
void bool Start (void)
 
bool Active (void)
 

Static Public Member Functions

static cDvbCiAdapterCreateCiAdapter (cDevice *Device, int Fd, int Adapter=-1, int Frontend=-1)
 
- Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 

Protected Member Functions

virtual int Read (uint8_t *Buffer, int MaxLength)
 
virtual void Write (const uint8_t *Buffer, int Length)
 
virtual bool Reset (int Slot)
 
virtual eModuleStatus ModuleStatus (int Slot)
 
virtual bool Assign (cDevice *Device, bool Query=false)
 
 cDvbCiAdapter (cDevice *Device, int Fd, int Adapter=-1, int Frontend=-1)
 
- Protected Member Functions inherited from cCiAdapter
cCamSlotItCamSlot (int &Iter)
 
virtual void Action (void)
 
- Protected Member Functions inherited from cThread
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 

Private Member Functions

bool OpenCa (void)
 
void CloseCa (void)
 

Private Attributes

cDevicedevice
 
int fd
 
int adapter
 
int frontend
 
bool idle
 

Detailed Description

Definition at line 15 of file dvbci.h.

Constructor & Destructor Documentation

cDvbCiAdapter::cDvbCiAdapter ( cDevice Device,
int  Fd,
int  Adapter = -1,
int  Frontend = -1 
)
protected
cDvbCiAdapter::~cDvbCiAdapter ( )
virtual

Member Function Documentation

bool cDvbCiAdapter::Assign ( cDevice Device,
bool  Query = false 
)
protectedvirtual

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. Returns true if the adapter can be assigned to the Device. If Device is NULL, the adapter will be unassigned from any device it was previously assigned to. The value of Query is ignored in that case, and this function always returns 'true'.

Reimplemented from cCiAdapter.

Definition at line 137 of file dvbci.c.

References device.

void cDvbCiAdapter::CloseCa ( void  )
private

Definition at line 59 of file dvbci.c.

References fd.

Referenced by SetIdle(), and ~cDvbCiAdapter().

cDvbCiAdapter * cDvbCiAdapter::CreateCiAdapter ( cDevice Device,
int  Fd,
int  Adapter = -1,
int  Frontend = -1 
)
static

Definition at line 145 of file dvbci.c.

References cDvbCiAdapter().

Referenced by cDvbDevice::cDvbDevice(), and IsIdle().

virtual bool cDvbCiAdapter::IsIdle ( void  ) const
inlinevirtual

Reimplemented from cCiAdapter.

Definition at line 35 of file dvbci.h.

References CreateCiAdapter(), and idle.

eModuleStatus cDvbCiAdapter::ModuleStatus ( int  Slot)
protectedvirtual

Returns the status of the CAM in the given Slot.

Reimplemented from cCiAdapter.

Definition at line 120 of file dvbci.c.

References device, cDevice::DeviceNumber(), esyslog, fd, idle, msNone, msPresent, and msReady.

bool cDvbCiAdapter::OpenCa ( void  )
private

Definition at line 51 of file dvbci.c.

References adapter, DEV_DVB_CA, cDvbDevice::DvbOpen(), fd, and frontend.

Referenced by SetIdle().

int cDvbCiAdapter::Read ( uint8_t *  Buffer,
int  MaxLength 
)
protectedvirtual

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).

Reimplemented from cCiAdapter.

Definition at line 81 of file dvbci.c.

References CAM_READ_TIMEOUT, device, cDevice::DeviceNumber(), esyslog, fd, idle, and safe_read().

bool cDvbCiAdapter::Reset ( int  Slot)
protectedvirtual

Resets the CAM in the given Slot.

Returns true if the operation was successful.

Reimplemented from cCiAdapter.

Definition at line 109 of file dvbci.c.

References device, cDevice::DeviceNumber(), esyslog, fd, and idle.

bool cDvbCiAdapter::SetIdle ( bool  Idle,
bool  TestOnly 
)
virtual

Reimplemented from cCiAdapter.

Definition at line 67 of file dvbci.c.

References adapter, CloseCa(), frontend, idle, and OpenCa().

void cDvbCiAdapter::Write ( const uint8_t *  Buffer,
int  Length 
)
protectedvirtual

Writes Length bytes of the given Buffer.

Reimplemented from cCiAdapter.

Definition at line 99 of file dvbci.c.

References device, cDevice::DeviceNumber(), esyslog, fd, idle, and safe_write().

Member Data Documentation

int cDvbCiAdapter::adapter
private

Definition at line 19 of file dvbci.h.

Referenced by cDvbCiAdapter(), OpenCa(), and SetIdle().

cDevice* cDvbCiAdapter::device
private

Definition at line 17 of file dvbci.h.

Referenced by Assign(), cDvbCiAdapter(), ModuleStatus(), Read(), Reset(), Write(), and ~cDvbCiAdapter().

int cDvbCiAdapter::fd
private

Definition at line 18 of file dvbci.h.

Referenced by cDvbCiAdapter(), CloseCa(), ModuleStatus(), OpenCa(), Read(), Reset(), and Write().

int cDvbCiAdapter::frontend
private

Definition at line 20 of file dvbci.h.

Referenced by cDvbCiAdapter(), OpenCa(), and SetIdle().

bool cDvbCiAdapter::idle
private

Definition at line 21 of file dvbci.h.

Referenced by cDvbCiAdapter(), IsIdle(), ModuleStatus(), Read(), Reset(), SetIdle(), and Write().


The documentation for this class was generated from the following files: