|
SASC
DVBSoftCAM
|
Inheritance diagram for cSmartCardSlots:Public Member Functions | |
| cSmartCardSlots (void) | |
| cSmartCardSlot * | GetSlot (int num) |
| cSmartCardSlot * | FirstSlot (void) |
| void | Release (void) |
| cSmartCardSlots (void) | |
| cSmartCardSlot * | GetSlot (int num) |
| cSmartCardSlot * | FirstSlot (void) |
| void | Release (void) |
Protected Member Functions | |
| virtual bool | ParseLinePlain (const char *line) |
| virtual bool | ParseLinePlain (const char *line) |
Friends | |
| class | cSmartCardSlotLink |
Definition at line 571 of file smartcard.c.
| cSmartCardSlots::cSmartCardSlots | ( | void | ) |
Definition at line 596 of file smartcard.c.
:cStructListPlain<cSmartCardSlot>("cardslot config","cardslot.conf",SL_MISSINGOK|SL_VERBOSE|SL_NOPURGE) {}
| cSmartCardSlots::cSmartCardSlots | ( | void | ) |
| cSmartCardSlot * cSmartCardSlots::FirstSlot | ( | void | ) |
Definition at line 615 of file smartcard.c.
References cStructListPlain< cSmartCardSlot >::First(), and cStructLoader::ListLock().
Referenced by cSmartCards::HaveCard(), cSmartCards::LockCard(), and cSmartCards::ReleaseCard().
| cSmartCardSlot* cSmartCardSlots::FirstSlot | ( | void | ) |
| cSmartCardSlot * cSmartCardSlots::GetSlot | ( | int | num | ) |
Definition at line 607 of file smartcard.c.
References cStructListPlain< cSmartCardSlot >::First(), cStructLoader::ListLock(), and cStructListPlain< cSmartCardSlot >::Next().
Referenced by cSmartCards::CardInfo(), cSmartCards::CardReset(), and cSmartCards::ListCard().
{
ListLock(false);
for(cSmartCardSlot *slot=First(); slot; slot=Next(slot))
if(slot->SlotNum()==num) return slot;
return 0;
}
| cSmartCardSlot* cSmartCardSlots::GetSlot | ( | int | num | ) |
| virtual bool cSmartCardSlots::ParseLinePlain | ( | const char * | line | ) | [protected, virtual] |
Implements cStructLoaderPlain.
| bool cSmartCardSlots::ParseLinePlain | ( | const char * | line | ) | [protected, virtual] |
Implements cStructLoaderPlain.
Definition at line 626 of file smartcard.c.
References cSimpleListBase::Add(), cSimpleListBase::Count(), L_GEN_ERROR, cSmartCardSlotLink::next, PRINTF, cSmartCardSlot::Setup(), and cStructLoader::type.
{
char type[32];
int num;
if(sscanf(line,"%31[^:]:%n",type,&num)==1) {
for(cSmartCardSlotLink *scs=first; scs; scs=scs->next) {
if(!strcasecmp(type,scs->name)) {
cSmartCardSlot *slot=scs->Create();
if(slot) {
if(slot->Setup(Count(),&line[num])) {
Add(slot);
return true;
}
delete slot;
}
else PRINTF(L_GEN_ERROR,"failed to create cardslot");
return false;
}
}
PRINTF(L_GEN_ERROR,"unknown cardslot type '%s'",type);
}
return false;
}
| void cSmartCardSlots::Release | ( | void | ) |
| void cSmartCardSlots::Release | ( | void | ) |
Definition at line 621 of file smartcard.c.
References cStructLoader::ListUnlock().
Referenced by cSmartCards::CardInfo(), cSmartCards::CardReset(), cSmartCards::HaveCard(), cSmartCards::ListCard(), cSmartCards::LockCard(), and cSmartCards::ReleaseCard().
{
ListUnlock();
}
cSmartCardSlotLink [friend] |
Definition at line 572 of file smartcard.c.