SASC-NG
DVBSoftCAM

cPlainKeyDummy Class Reference

Inheritance diagram for cPlainKeyDummy:

List of all members.

Public Member Functions

 cPlainKeyDummy (void)
 ~cPlainKeyDummy ()
virtual bool Parse (const char *line)
virtual bool Cmp (cPlainKey *k)
virtual void Get (void *mem)
virtual int Size (void)
virtual bool SetKey (void *Key, int Keylen)
virtual bool SetBinKey (unsigned char *Mem, int Keylen)

Protected Member Functions

virtual cString Print (void)
virtual cString PrintKeyNr (void)

Detailed Description

Definition at line 782 of file data.c.


Constructor & Destructor Documentation

cPlainKeyDummy::cPlainKeyDummy ( void  )

Definition at line 800 of file data.c.

                                  :
cPlainKey(false)
{
  str=0;
}
cPlainKeyDummy::~cPlainKeyDummy ( )

Definition at line 806 of file data.c.

References free.

{
  free(str);
}

Member Function Documentation

virtual bool cPlainKeyDummy::Cmp ( cPlainKey *  k) [inline, virtual]

Implements cPlainKey.

Definition at line 793 of file data.c.

{ return false; }
virtual void cPlainKeyDummy::Get ( void *  mem) [inline, virtual]

Implements cPlainKey.

Definition at line 794 of file data.c.

{}
bool cPlainKeyDummy::Parse ( const char *  line) [virtual]

Implements cPlainKey.

Definition at line 830 of file data.c.

References Bin2Int, free, GetChar(), GetHex(), SetKey(), skipspace(), stripspace(), and cPlainKey::type.

{
  unsigned char sid[3];
  int len;
  if(GetChar(line,&type,1) && (len=GetHex(line,sid,3,false))) {
    type=toupper(type); id=Bin2Int(sid,len);
    char *l=strdup(line);
    line=skipspace(stripspace(l));
    SetKey((void *)line,strlen(line));
    free(l);
    return true;
    }
  return false;
}
cString cPlainKeyDummy::Print ( void  ) [protected, virtual]

Implements cPlainKey.

Definition at line 825 of file data.c.

{
  return str;
}
virtual cString cPlainKeyDummy::PrintKeyNr ( void  ) [inline, protected, virtual]

Reimplemented from cPlainKey.

Definition at line 788 of file data.c.

{ return ""; }
bool cPlainKeyDummy::SetBinKey ( unsigned char *  Mem,
int  Keylen 
) [virtual]

Implements cPlainKey.

Definition at line 820 of file data.c.

References SetKey().

{
  return SetKey(Mem,Keylen);
}
bool cPlainKeyDummy::SetKey ( void *  Key,
int  Keylen 
) [virtual]

Implements cPlainKey.

Definition at line 811 of file data.c.

References free, MALLOC, and strn0cpy().

Referenced by Parse(), and SetBinKey().

{
  len=Keylen;
  free(str);
  str=MALLOC(char,len+1);
  if(str) strn0cpy(str,(char *)Key,len+1);
  return str!=0;
}
virtual int cPlainKeyDummy::Size ( void  ) [inline, virtual]

Implements cPlainKey.

Definition at line 795 of file data.c.

{ return len; }

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