SASC
DVBSoftCAM

cSatTime Class Reference

List of all members.

Public Member Functions

 cSatTime (int Source, int Transponder)
time_t Now (cSystem *sys)
 cSatTime (int Source, int Transponder)
time_t Now (cSystem *sys)

Detailed Description

Definition at line 159 of file tps.c.


Constructor & Destructor Documentation

cSatTime::cSatTime ( int  Source,
int  Transponder 
)

Definition at line 175 of file tps.c.

References cSimpleListBase::Add(), cSimpleList< T >::First(), cTransponderTime::Is(), L_SYS_TIME, cSimpleList< T >::Next(), and PRINTF.

{
  cMutexLock lock(&mutex);
  for(ttime=list.First(); ttime; ttime=list.Next(ttime))
    if(ttime->Is(Source,Transponder)) break;
  if(!ttime) {
    ttime=new cTransponderTime(Source,Transponder);
    if(ttime) list.Add(ttime);
    PRINTF(L_SYS_TIME,"%x:%x: created new transpondertime",Source,Transponder);
    }
  else PRINTF(L_SYS_TIME,"%x:%x: using existing transpondertime",Source,Transponder);
}
cSatTime::cSatTime ( int  Source,
int  Transponder 
)

Member Function Documentation

time_t cSatTime::Now ( cSystem *  sys)

Definition at line 188 of file tps.c.

References cSystem::AddHook(), cTransponderTime::HasHandler(), HOOK_SATTIME, L_SYS_TIME, cTransponderTime::Now(), PRINTF, and cSystem::TriggerHook().

Referenced by cTPS::Decrypt().

{
  if(ttime) {
    if(!sys->TriggerHook(HOOK_SATTIME) && !ttime->HasHandler()) {
      cSatTimeHook *hook=new cSatTimeHook(ttime);
      sys->AddHook(hook);
      PRINTF(L_SYS_TIME,"added hook");
      }
    return ttime->Now();
    }
  return -1;
}
time_t cSatTime::Now ( cSystem *  sys)

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines