SASC-NG
DVBSoftCAM

cSystems Class Reference

#include <system.h>

List of all members.

Static Public Member Functions

static int CanHandle (int SysId, bool ff)
static cSystem * FindBySysId (unsigned short SysId, bool ff, int oldPri)
static int FindIdentBySysId (unsigned short SysId, bool ff, int &Pri)
static int FindIdentBySysName (unsigned short SysId, bool ff, const char *Name, int &Pri)
static cSystem * FindBySysIdent (int ident)
static bool Init (const char *cfgdir)
static void Clean (void)
static bool ConfigParse (const char *Name, const char *Value)
static void ConfigStore (bool AsIs)
static cOpts * GetSystemOpts (bool start)

Friends

class cSystemLink

Detailed Description

Definition at line 173 of file system.h.


Member Function Documentation

int cSystems::CanHandle ( int  SysId,
bool  ff 
) [static]

Definition at line 305 of file system.c.

References cSystemLink::next.

{
  for(cSystemLink *sl=first; sl; sl=sl->next)
    if(sl->CanHandle(SysId))
      return (sl->noFF && ff) ? -1:1;
  return 0;
}
void cSystems::Clean ( void  ) [static]

Definition at line 399 of file system.c.

References cSystemLink::Clean(), and cSystemLink::next.

Referenced by cSoftCAM::Shutdown().

{
  for(cSystemLink *sl=first; sl; sl=sl->next) sl->Clean();
}
bool cSystems::ConfigParse ( const char *  Name,
const char *  Value 
) [static]

Definition at line 404 of file system.c.

References i, cSystemLink::opts, and cOpts::Parse().

Referenced by InitAll(), and cScPlugin::SetupParse().

{
  char sysName[32];
  unsigned int i;
  for(i=0; Name[i] && Name[i]!='.' && i<sizeof(sysName); i++)
    sysName[i]=Name[i];
  if(Name[i]) {
    sysName[i]=0; i++;
    cSystemLink *sl=FindByName(sysName);
    if(sl && sl->opts) return sl->opts->Parse(&Name[i],Value);
    }
  return false;
}
void cSystems::ConfigStore ( bool  AsIs) [static]

Definition at line 418 of file system.c.

References cSystemLink::NewConfig(), cSystemLink::next, cSystemLink::opts, and cOpts::Store().

Referenced by cScSetup::Store().

{
  for(cSystemLink *sl=first; sl; sl=sl->next)
    if(sl->opts && sl->opts->Store(AsIs)) sl->NewConfig();
}
cSystem * cSystems::FindBySysId ( unsigned short  SysId,
bool  ff,
int  oldPri 
) [static]

Definition at line 354 of file system.c.

References cSystemLink::Create().

Referenced by main(), and cLogChain::Parse().

{
  cSystemLink *csl=FindById(SysId,ff,oldPri);
  return csl ? csl->Create() : 0;
}
cSystem * cSystems::FindBySysIdent ( int  ident) [static]

Definition at line 380 of file system.c.

References cSystemLink::Create().

{
  cSystemLink *csl=FindByIdent(ident);
  return csl ? csl->Create() : 0;
}
int cSystems::FindIdentBySysId ( unsigned short  SysId,
bool  ff,
int &  Pri 
) [static]

Definition at line 360 of file system.c.

References cSystemLink::pri.

Referenced by cChannelList::CheckIgnore().

{
  cSystemLink *csl=FindById(SysId,ff,Pri);
  if(csl) {
    Pri=csl->pri;
    return csl->sysIdent;
    }
  return 0;
}
int cSystems::FindIdentBySysName ( unsigned short  SysId,
bool  ff,
const char *  Name,
int &  Pri 
) [static]

Definition at line 370 of file system.c.

References cSystemLink::CanHandle(), cSystemLink::noFF, and cSystemLink::pri.

{
  cSystemLink *csl=FindByName(Name);
  if(csl && (!ff || !csl->noFF) && csl->CanHandle(SysId)) {
    Pri=csl->pri;
    return csl->sysIdent;
    }
  return 0;
}
cOpts * cSystems::GetSystemOpts ( bool  start) [static]

Definition at line 424 of file system.c.

References cSystemLink::next, and cSystemLink::opts.

Referenced by cMenuSetupSc::cMenuSetupSc(), and cMenuSysOpts::cMenuSysOpts().

{
  static cSystemLink *sl=0;
  sl=(start || !sl) ? first : sl->next;
  while(sl) {
    if(sl->opts) return sl->opts;
    sl=sl->next;
    }
  return 0;
}
bool cSystems::Init ( const char *  cfgdir) [static]

Definition at line 386 of file system.c.

References cSystemLink::Init(), L_CORE_LOAD, L_GEN_WARN, cSystemLink::name, cSystemLink::next, cSystemLink::pri, and PRINTF.

Referenced by InitAll(), and cSoftCAM::Load().

{
  int num=0;
  PRINTF(L_CORE_LOAD,"** registered systems:");
  for(cSystemLink *sl=first; sl; sl=sl->next, num++)
    PRINTF(L_CORE_LOAD,"** %-16s  (pri %3d)",sl->name,sl->pri);
  if(num<1)
    PRINTF(L_GEN_WARN,"No registered systems! Won't decode anything! Where are your libs?");
  for(cSystemLink *sl=first; sl; sl=sl->next)
    if(!sl->Init(cfgdir)) return false;
  return true;
}

Friends And Related Function Documentation

friend class cSystemLink [friend]

Definition at line 174 of file system.h.


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