|
SASC
DVBSoftCAM
|
#include <data.h>
Inheritance diagram for cPlainKeys:Public Member Functions | |
| cPlainKeys (void) | |
| virtual cPlainKey * | ParseLine (char *line) |
| cPlainKey * | FindKey (int Type, int Id, int Keynr, int Size, cPlainKey *key=0) |
| cPlainKey * | FindKeyNoTrig (int Type, int Id, int Keynr, int Size, cPlainKey *key=0) |
| void | Trigger (int Type, int Id, int Keynr) |
| cString | KeyString (int Type, int Id, int Keynr) |
| bool | NewKey (int Type, int Id, int Keynr, void *Key, int Keylen) |
| bool | NewKeyParse (char *line, const char *reason) |
| void | HouseKeeping (void) |
| cPlainKeys (void) | |
| virtual cPlainKey * | ParseLine (char *line) |
| cPlainKey * | FindKey (int Type, int Id, int Keynr, int Size, cPlainKey *key=0) |
| cPlainKey * | FindKeyNoTrig (int Type, int Id, int Keynr, int Size, cPlainKey *key=0) |
| void | Trigger (int Type, int Id, int Keynr) |
| cString | KeyString (int Type, int Id, int Keynr) |
| bool | NewKey (int Type, int Id, int Keynr, void *Key, int Keylen) |
| bool | NewKeyParse (char *line, const char *reason) |
| void | HouseKeeping (void) |
Protected Member Functions | |
| virtual void | Action (void) |
| virtual void | PostLoad (void) |
| virtual void | Action (void) |
| virtual void | PostLoad (void) |
Friends | |
| class | cPlainKeyType |
| cPlainKeys::cPlainKeys | ( | void | ) |
| cPlainKeys::cPlainKeys | ( | void | ) |
| void cPlainKeys::Action | ( | void | ) | [protected, virtual] |
A derived cThread class must implement the code it wants to execute as a separate thread in this function. If this is a loop, it must check Running() repeatedly to see whether it's time to stop.
Implements cThread.
Definition at line 1027 of file data.c.
References cPipe::Close(), cTimeMs::Elapsed(), EXT_AU_MIN, L_CORE_AUEXTERN, NewKeyParse(), cPipe::Open(), PRINTF, cTimeMs::Set(), skipspace(), start(), and stripspace().
{
last.Set(EXT_AU_MIN);
PRINTF(L_CORE_AUEXTERN,"starting...");
cTimeMs start;
cPipe pipe;
if(pipe.Open(externalAU,"r")) {
char buff[1024];
while(fgets(buff,sizeof(buff),pipe)) {
char *line=skipspace(stripspace(buff));
if(line[0]==0 || line[0]==';' || line[0]=='#') continue;
NewKeyParse(line,"from ExtAU");
}
}
pipe.Close();
PRINTF(L_CORE_AUEXTERN,"done (elapsed %d)",(int)start.Elapsed());
}
| virtual void cPlainKeys::Action | ( | void | ) | [protected, virtual] |
Definition at line 903 of file data.c.
References FindKeyNoTrig(), and Trigger().
Referenced by cN2Prov0101::Algo(), cTpsKeys::GetV2Key(), cSystemViaccess::ProcessECM(), cSystemSeca::ProcessECM(), cSystemNagra2::ProcessECM(), cSystemNagra::ProcessECM(), cSystemIrd2::ProcessECM(), cSystemIrd::ProcessECM(), cSystemCryptoworks::ProcessECM(), cSystemConstCw::ProcessECM(), cSystemConax::ProcessECM(), cSystemNagra::ProcessEMM(), and cSystemIrd2::ProcessEMM().
{
key=FindKeyNoTrig(Type,Id,Keynr,Size,key);
if(!key) Trigger(Type,Id,Keynr);
return key;
}
| cPlainKey * cPlainKeys::FindKeyNoTrig | ( | int | Type, |
| int | Id, | ||
| int | Keynr, | ||
| int | Size, | ||
| cPlainKey * | key = 0 |
||
| ) |
Definition at line 910 of file data.c.
References cStructList< cPlainKey >::First(), cPlainKey::id, cPlainKey::keynr, cStructLoader::ListLock(), cStructLoader::ListUnlock(), cStructList< cPlainKey >::Next(), and cPlainKey::type.
Referenced by cSystemLinkConstCw::CanHandle(), FindKey(), cN2Prov4101::PostProcAU(), cSystemNagra2::ProcessECM(), cSystemSeca::ProcessEMM(), and cSystemNagra2::ProcessEMM().
| void cPlainKeys::HouseKeeping | ( | void | ) |
Definition at line 1004 of file data.c.
References EXT_AU_INT, L_CORE_AUEXTERN, PRINTF, cTimeMs::Set(), and cTimeMs::TimedOut().
Referenced by cScHousekeeper::Action().
{
if(trigger.TimedOut()) {
trigger.Set(EXT_AU_INT);
if(externalAU) PRINTF(L_CORE_AUEXTERN,"triggered from housekeeping");
ExternalUpdate();
}
}
| void cPlainKeys::HouseKeeping | ( | void | ) |
| cString cPlainKeys::KeyString | ( | int | Type, |
| int | Id, | ||
| int | Keynr | ||
| ) |
| cString cPlainKeys::KeyString | ( | int | Type, |
| int | Id, | ||
| int | Keynr | ||
| ) |
Definition at line 981 of file data.c.
References bprintf(), cPlainKey::id, cPlainKey::IdSize(), cPlainKey::keynr, cPlainKey::PrintKeyNr(), and cPlainKey::type.
Referenced by cSystem::KeyFail(), and Trigger().
| bool cPlainKeys::NewKey | ( | int | Type, |
| int | Id, | ||
| int | Keynr, | ||
| void * | Key, | ||
| int | Keylen | ||
| ) |
Definition at line 957 of file data.c.
References cPlainKey::Set().
Referenced by cSystemViaccess::ProcessEMM(), cSystemSeca::ProcessEMM(), cSystemNagra2::ProcessEMM(), cSystemNagra::ProcessEMM(), cSystemIrd2::ProcessEMM(), and cSystemIrd::ProcessEMM().
| bool cPlainKeys::NewKey | ( | int | Type, |
| int | Id, | ||
| int | Keynr, | ||
| void * | Key, | ||
| int | Keylen | ||
| ) |
| bool cPlainKeys::NewKeyParse | ( | char * | line, |
| const char * | reason | ||
| ) |
| bool cPlainKeys::NewKeyParse | ( | char * | line, |
| const char * | reason | ||
| ) |
Definition at line 967 of file data.c.
References ParseLine().
Referenced by Action(), and cScPlugin::SVDRPCommand().
| cPlainKey * cPlainKeys::ParseLine | ( | char * | line | ) | [virtual] |
Implements cStructLoader.
Definition at line 973 of file data.c.
References k, cPlainKey::Parse(), and skipspace().
Referenced by NewKeyParse().
| virtual cPlainKey* cPlainKeys::ParseLine | ( | char * | line | ) | [virtual] |
Implements cStructLoader.
| virtual void cPlainKeys::PostLoad | ( | void | ) | [protected, virtual] |
Reimplemented from cStructLoader.
| void cPlainKeys::PostLoad | ( | void | ) | [protected, virtual] |
Reimplemented from cStructLoader.
Definition at line 994 of file data.c.
References cSimpleListBase::Count(), cStructList< cPlainKey >::First(), L_CORE_KEYS, cStructLoader::ListLock(), cStructLoader::ListUnlock(), LOG, cStructList< cPlainKey >::Next(), and PRINTF.
{
ListLock(false);
if(Count() && LOG(L_CORE_KEYS)) {
for(cPlainKey *dat=First(); dat; dat=Next(dat))
PRINTF(L_CORE_KEYS,"keys %s",*dat->ToString(false));
}
ListUnlock();
}
| void cPlainKeys::Trigger | ( | int | Type, |
| int | Id, | ||
| int | Keynr | ||
| ) |
Definition at line 896 of file data.c.
References KeyString(), L_CORE_AUEXTERN, cLastKey::NotLast(), and PRINTF.
Referenced by FindKey(), and cSystem::KeyFail().
{
if(lastkey.NotLast(Type,Id,Keynr))
PRINTF(L_CORE_AUEXTERN,"triggered from findkey (%s)",*KeyString(Type,Id,Keynr));
ExternalUpdate();
}
| void cPlainKeys::Trigger | ( | int | Type, |
| int | Id, | ||
| int | Keynr | ||
| ) |
cPlainKeyType [friend] |