|
SASC-NG
DVBSoftCAM
|
Inheritance diagram for cSmartCardDataConax:Public Member Functions | |
| cSmartCardDataConax (void) | |
| cSmartCardDataConax (eDataType Type, unsigned char *Id) | |
| virtual bool | Parse (const char *line) |
| virtual bool | Matches (cSmartCardData *param) |
Public Attributes | |
| eDataType | type |
| unsigned char | id [7] |
| unsigned char | pin [4] |
Definition at line 99 of file sc-conax.c.
| cSmartCardDataConax::cSmartCardDataConax | ( | void | ) |
Definition at line 112 of file sc-conax.c.
:cSmartCardData(SC_ID) { memset(id,0,sizeof(id)); }
| cSmartCardDataConax::cSmartCardDataConax | ( | eDataType | Type, |
| unsigned char * | Id | ||
| ) |
Definition at line 118 of file sc-conax.c.
References type.
:cSmartCardData(SC_ID) { type=Type; memset(id,0,sizeof(id)); memcpy(id,Id,IdLen()); }
| bool cSmartCardDataConax::Matches | ( | cSmartCardData * | param | ) | [virtual] |
Implements cSmartCardData.
Definition at line 126 of file sc-conax.c.
{
cSmartCardDataConax *cd=(cSmartCardDataConax *)param;
return cd->type==type && !memcmp(cd->id,id,IdLen());
}
| bool cSmartCardDataConax::Parse | ( | const char * | line | ) | [virtual] |
Implements cSmartCardData.
Definition at line 132 of file sc-conax.c.
References dtPIN, GetHex(), i, L_CORE_LOAD, pin, PRINTF, skipspace(), and type.
{
line=skipspace(line);
if(!strncasecmp(line,"PIN",3)) { type=dtPIN; line+=3; }
else {
PRINTF(L_CORE_LOAD,"smartcarddataconax: format error: datatype");
return false;
}
line=skipspace(line);
if(GetHex(line,id,IdLen())!=IdLen()) {
PRINTF(L_CORE_LOAD,"smartcarddataconax: format error: serial");
return false;
}
line=skipspace(line);
if(type==dtPIN) {
for(int i=0; i<4; i++) {
if(!isdigit(*line)) {
PRINTF(L_CORE_LOAD,"smartcarddataconax: format error: pin");
return false;
}
pin[i]=*line++;
}
}
return true;
}
| unsigned char cSmartCardDataConax::id[7] |
Definition at line 104 of file sc-conax.c.
Referenced by Matches().
| unsigned char cSmartCardDataConax::pin[4] |
Definition at line 104 of file sc-conax.c.
Referenced by cSmartCardConax::Decode(), and Parse().
Definition at line 103 of file sc-conax.c.
Referenced by cSmartCardDataConax(), Matches(), and Parse().