SASC-NG
DVBSoftCAM

cCamSlot Class Reference

#include <ci.h>

Inheritance diagram for cCamSlot:

List of all members.

Public Member Functions

 cCamSlot (cCiAdapter *CiAdapter)
virtual ~cCamSlot ()
bool Assign (cDevice *Device, bool Query=false)
cDevice * Device (void)
 Returns the device this CAM slot is currently assigned to.
int SlotIndex (void)
int SlotNumber (void)
bool Reset (void)
eModuleStatus ModuleStatus (void)
 Returns the status of the CAM in this slot.
const char * GetCamName (void)
bool Ready (void)
 Returns 'true' if the CAM in this slot is ready to decrypt.
bool HasMMI (void)
 Returns 'true' if the CAM in this slot has an active MMI.
bool HasUserIO (void)
bool EnterMenu (void)
 Requests the CAM in this slot to start its menu.
cCiMenu * GetMenu (void)
 Gets a pending menu, or NULL if there is no menu.
cCiEnquiry * GetEnquiry (void)
 Gets a pending enquiry, or NULL if there is no enquiry.
int Priority (void)
bool ProvidesCa (const int *CaSystemIds)
void AddPid (int ProgramNumber, int Pid, int StreamType)
void SetPid (int Pid, bool Active)
void AddChannel (const cChannel *Channel)
bool CanDecrypt (const cChannel *Channel)
void StartDecrypting (void)
void StopDecrypting (void)
 Clears the list of CA_PMT entries and tells the CAM to stop decrypting.
bool IsDecrypting (void)
 Returns true if the CAM in this slot is currently used for decrypting.

Friends

class cCiAdapter
class cCiTransportConnection

Detailed Description

Definition at line 125 of file ci.h.


Constructor & Destructor Documentation

cCamSlot::cCamSlot ( cCiAdapter *  CiAdapter)

Creates a new CAM slot for the given CiAdapter. The CiAdapter will take care of deleting the CAM slot, so the caller must not delete it!

virtual cCamSlot::~cCamSlot ( ) [virtual]

Member Function Documentation

void cCamSlot::AddChannel ( const cChannel *  Channel)

Adds all PIDs if the given Channel to the current list of PIDs. If the source or transponder of the channel are different than what was given in a previous call to AddChannel(), any previously added PIDs will be cleared.

void cCamSlot::AddPid ( int  ProgramNumber,
int  Pid,
int  StreamType 
)

Adds the given PID information to the list of PIDs. A later call to SetPid() will (de)activate one of these entries.

bool cCamSlot::Assign ( cDevice *  Device,
bool  Query = false 
)

Assigns this CAM slot to the given Device, if this is possible. If Query is 'true', the CI adapter of this slot only checks whether it can be assigned to the Device, but doesn't actually assign itself to it. Returns true if this slot can be assigned to the Device. If Device is NULL, the slot 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'.

bool cCamSlot::CanDecrypt ( const cChannel *  Channel)

Returns true if there is a CAM in this slot that is able to decrypt the given Channel (or at least claims to be able to do so). Since the QUERY/REPLY mechanism for CAMs is pretty unreliable (some CAMs don't reply to queries at all), we always return true if the CAM is currently not decrypting anything. If there is already a channel being decrypted, a call to CanDecrypt() checks whether the CAM can also decrypt the given channel. Only CAMs that have replied to the inital QUERY will perform this check at all. CAMs that never replied to the initial QUERY are assumed not to be able to handle more than one channel at a time.

cDevice* cCamSlot::Device ( void  )

Returns the device this CAM slot is currently assigned to.

bool cCamSlot::EnterMenu ( void  )

Requests the CAM in this slot to start its menu.

const char* cCamSlot::GetCamName ( void  )

Returns the name of the CAM in this slot, or NULL if there is no ready CAM in this slot.

cCiEnquiry* cCamSlot::GetEnquiry ( void  )

Gets a pending enquiry, or NULL if there is no enquiry.

cCiMenu* cCamSlot::GetMenu ( void  )

Gets a pending menu, or NULL if there is no menu.

bool cCamSlot::HasMMI ( void  )

Returns 'true' if the CAM in this slot has an active MMI.

bool cCamSlot::HasUserIO ( void  )

Returns true if there is a pending user interaction, which shall be retrieved via GetMenu() or GetEnquiry().

bool cCamSlot::IsDecrypting ( void  )

Returns true if the CAM in this slot is currently used for decrypting.

eModuleStatus cCamSlot::ModuleStatus ( void  )

Returns the status of the CAM in this slot.

int cCamSlot::Priority ( void  )

Returns the priority if the device this slot is currently assigned to, or -1 if it is not assigned to any device.

bool cCamSlot::ProvidesCa ( const int *  CaSystemIds)

Returns true if the CAM in this slot provides one of the given CaSystemIds. This doesn't necessarily mean that it will be possible to actually decrypt such a programme, since CAMs usually advertise several CA system ids, while the actual decryption is controlled by the smart card inserted into the CAM.

bool cCamSlot::Ready ( void  )

Returns 'true' if the CAM in this slot is ready to decrypt.

bool cCamSlot::Reset ( void  )

Resets the CAM in this slot. Returns true if the operation was successful.

Referenced by cScCamSlot::cScCamSlot().

void cCamSlot::SetPid ( int  Pid,
bool  Active 
)

Sets the given Pid (which has previously been added through a call to AddPid()) to Active. A later call to StartDecrypting() will send the full list of currently active CA_PMT entries to the CAM.

int cCamSlot::SlotIndex ( void  ) [inline]

Returns the index of this CAM slot within its CI adapter. The first slot has an index of 0.

Definition at line 166 of file ci.h.

int cCamSlot::SlotNumber ( void  ) [inline]

Returns the number of this CAM slot within the whole system. The first slot has the number 1.

Definition at line 169 of file ci.h.

void cCamSlot::StartDecrypting ( void  )

Triggers sending all currently active CA_PMT entries to the CAM, so that it will start decrypting.

void cCamSlot::StopDecrypting ( void  )

Clears the list of CA_PMT entries and tells the CAM to stop decrypting.


Friends And Related Function Documentation

friend class cCiAdapter [friend]

Definition at line 126 of file ci.h.

friend class cCiTransportConnection [friend]

Definition at line 127 of file ci.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines