|
SASC
DVBSoftCAM
|
Inheritance diagram for cPlainKeyConstCw:Public Member Functions | |
| cPlainKeyConstCw (bool Super) | |
| virtual bool | Parse (const char *line) |
| bool | Matches (const cEcmInfo *ecm) |
| cPlainKeyConstCw (bool Super) | |
| virtual bool | Parse (const char *line) |
| bool | Matches (const cEcmInfo *ecm) |
Protected Member Functions | |
| virtual int | IdSize (void) |
| virtual cString | PrintKeyNr (void) |
| virtual bool | CmpExtId (cPlainKey *k) |
| virtual int | IdSize (void) |
| virtual cString | PrintKeyNr (void) |
| virtual bool | CmpExtId (cPlainKey *k) |
| cPlainKeyConstCw::cPlainKeyConstCw | ( | bool | Super | ) |
| cPlainKeyConstCw::cPlainKeyConstCw | ( | bool | Super | ) |
| bool cPlainKeyConstCw::CmpExtId | ( | cPlainKey * | k | ) | [protected, virtual] |
Reimplemented from cPlainKey.
Definition at line 65 of file constcw.c.
References k.
{
cPlainKeyConstCw *ck=dynamic_cast<cPlainKeyConstCw *>(k); // downcast
return ck && prgId==ck->prgId && source==ck->source && freq==ck->freq && pol==ck->pol;
}
| virtual bool cPlainKeyConstCw::CmpExtId | ( | cPlainKey * | k | ) | [protected, virtual] |
Reimplemented from cPlainKey.
| virtual int cPlainKeyConstCw::IdSize | ( | void | ) | [inline, protected, virtual] |
| virtual int cPlainKeyConstCw::IdSize | ( | void | ) | [inline, protected, virtual] |
| bool cPlainKeyConstCw::Matches | ( | const cEcmInfo * | ecm | ) |
Definition at line 71 of file constcw.c.
References cEcmInfo::prgId, cEcmInfo::source, and cEcmInfo::transponder.
Referenced by cSystemConstCw::ProcessECM().
{
return ecm->prgId==prgId && ecm->source==source && ecm->transponder==transponder;
}
| bool cPlainKeyConstCw::Matches | ( | const cEcmInfo * | ecm | ) |
| bool cPlainKeyConstCw::Parse | ( | const char * | line | ) | [virtual] |
Reimplemented from cHexKey.
Definition at line 76 of file constcw.c.
References Bin2Int, caid, cSource::FromString(), GetChar(), GetHex(), cSource::IsSat(), cPlainKey::keynr, PLAINLEN_CW, cHexKey::SetBinKey(), cChannel::Transponder(), and cPlainKey::type.
{
unsigned char caid[2], skey[PLAINLEN_CW];
if(GetChar(line,&type,1) && GetHex(line,caid,2)) {
int num;
char srcBuf[16];
if(sscanf(line," %d:%c:%15[^:]:%d%n",&freq,&pol,srcBuf,&prgId,&num)==4) {
source=cSource::FromString(srcBuf);
transponder=freq;
while(transponder>20000) transponder/=1000;
if(cSource::IsSat(source)) transponder=cChannel::Transponder(transponder,pol);
line+=num;
if(GetHex(line,skey,PLAINLEN_CW)) {
type=toupper(type);
id=Bin2Int(caid,2);
keynr=0;
SetBinKey(skey,PLAINLEN_CW);
return true;
}
}
}
return false;
}
| virtual bool cPlainKeyConstCw::Parse | ( | const char * | line | ) | [virtual] |
Reimplemented from cHexKey.
| cString cPlainKeyConstCw::PrintKeyNr | ( | void | ) | [protected, virtual] |
Reimplemented from cPlainKey.
Definition at line 100 of file constcw.c.
References cString::sprintf(), and cSource::ToString().
{
return freq<0 ? "" : cString::sprintf("%d:%c:%s:%d",freq,pol,*cSource::ToString(source),prgId);
}
| virtual cString cPlainKeyConstCw::PrintKeyNr | ( | void | ) | [protected, virtual] |
Reimplemented from cPlainKey.