|
SASC-NG
DVBSoftCAM
|
Inheritance diagram for cSystemLinkCardClient:Public Member Functions | |
| cSystemLinkCardClient (void) | |
| virtual bool | CanHandle (unsigned short SysId) |
| virtual cSystem * | Create (void) |
| virtual void | Clean (void) |
| cCardClient * | FindBySysId (unsigned short id, cCardClient *cc) |
Protected Member Functions | |
| virtual bool | ParseLinePlain (const char *line) |
| cSystemLinkCardClient::cSystemLinkCardClient | ( | void | ) |
Definition at line 251 of file cc.c.
References cOpts::Add(), immediate, cSystemLink::opts, SYSTEM_NAME, and trNOOP.
:cSystemLink(SYSTEM_NAME,SYSTEM_PRI) ,cStructListPlain<cCardClient>("cardclient config",CONF_FILE,SL_MISSINGOK|SL_VERBOSE|SL_NOPURGE) { opts=new cOpts(SYSTEM_NAME,1); opts->Add(new cOptBool("Immediate",trNOOP("Cardclient: connect immediately"),&immediate)); }
| bool cSystemLinkCardClient::CanHandle | ( | unsigned short | SysId | ) | [virtual] |
Implements cSystemLink.
Definition at line 268 of file cc.c.
References FindBySysId().
{
return FindBySysId(SysId,0)!=0;
}
| void cSystemLinkCardClient::Clean | ( | void | ) | [virtual] |
Reimplemented from cSystemLink.
Definition at line 305 of file cc.c.
References cStructLoader::SafeClear().
{
SafeClear();
}
| cSystem * cSystemLinkCardClient::Create | ( | void | ) | [virtual] |
| cCardClient * cSystemLinkCardClient::FindBySysId | ( | unsigned short | id, |
| cCardClient * | cc | ||
| ) |
Definition at line 259 of file cc.c.
References cCardClient::CanHandle(), cStructListPlain< cCardClient >::First(), cStructLoader::ListLock(), cStructLoader::ListUnlock(), and cStructListPlain< cCardClient >::Next().
Referenced by CanHandle(), cSystemCardClient::ProcessECM(), and cSystemCardClient::ProcessEMM().
| bool cSystemLinkCardClient::ParseLinePlain | ( | const char * | line | ) | [protected, virtual] |
Implements cStructLoaderPlain.
Definition at line 278 of file cc.c.
References cSimpleListBase::Add(), cCardClientLink::Create(), cCardClients::FindByName(), cCardClient::Immediate(), cCardClient::Init(), L_CC_CORE, L_GEN_ERROR, cCardClient::Login(), cCardClient::Name(), cSystemLink::name, and PRINTF.
{
char name[32];
int num;
if(sscanf(line,"%31[^:]:%n",name,&num)==1) {
cCardClientLink *ccl=cardclients.FindByName(name);
if(ccl) {
cCardClient *cc=ccl->Create();
if(cc) {
if(cc->Init(&line[num])) {
Add(cc);
PRINTF(L_CC_CORE,"client '%s' ready",cc->Name());
if(cc->Immediate()) cc->Login();
return true;
}
else {
delete cc;
PRINTF(L_GEN_ERROR,"init of cardclient '%s' failed",name);
}
}
else PRINTF(L_GEN_ERROR,"failed to create cardclient '%s'",name);
}
else PRINTF(L_GEN_ERROR,"no client found for card server type '%s'",name);
}
return false;
}