SASC
DVBSoftCAM

CmdTable Class Reference

List of all members.

Public Member Functions

 CmdTable (const unsigned char *mem, int size)
 ~CmdTable ()
bool GetInfo (const unsigned char *cmd, unsigned char &rlen, unsigned char &rmode)
 CmdTable (const unsigned char *mem, int size)
 ~CmdTable ()
bool GetInfo (const unsigned char *cmd, unsigned char &rlen, unsigned char &rmode)

Detailed Description

Definition at line 424 of file sc-videoguard2.c.


Constructor & Destructor Documentation

CmdTable::CmdTable ( const unsigned char *  mem,
int  size 
)

Definition at line 433 of file sc-videoguard2.c.

{
  tab=(struct CmdTab *)new unsigned char[size];
  memcpy(tab,mem,size);
}
CmdTable::~CmdTable ( )

Definition at line 439 of file sc-videoguard2.c.

{
  delete[] tab;
}
CmdTable::CmdTable ( const unsigned char *  mem,
int  size 
)
CmdTable::~CmdTable ( )

Member Function Documentation

bool CmdTable::GetInfo ( const unsigned char *  cmd,
unsigned char &  rlen,
unsigned char &  rmode 
)

Definition at line 444 of file sc-videoguard2.c.

References CmdTabEntry::cmd, CmdTab::e, i, CmdTabEntry::len, CmdTabEntry::mode, and CmdTab::Nentries.

Referenced by cSmartCardVideoGuard2::DoCmd().

{
  struct CmdTabEntry *pcte=tab->e;
  for(int i=0; i<tab->Nentries; i++,pcte++)
    if(cmd[1]==pcte->cmd) {
      rlen=pcte->len;
      rmode=pcte->mode;
      return true;
      }
  return false;
}
bool CmdTable::GetInfo ( const unsigned char *  cmd,
unsigned char &  rlen,
unsigned char &  rmode 
)

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