Return Type | Function name | Arguments |
---|---|---|
hzEcode | hdbADP::InitBlockedIPs | (const hzString&,) |
Declared in file: hzDatabase.h
Defined in file : hdbClass.cpp
Function Logic:
Function body:
hzEcode hdbADP::InitBlockedIPs (const hzString& dataDir) { _hzfunc("hdbADP::InitBlockedIPs") ; static bool bBeenHere = false ; hdbClass* pClass ; hdbObjRepos* pRepos ; hzString S ; hzEcode rc ; if (bBeenHere) return hzerr(E_SEQUENCE, "This function has already been called") ; bBeenHere = true ; if (!dataDir) return hzerr(E_ARGUMENT, "No application data directory") ; S = "blockedIP" ; pClass = new hdbClass(*this, HDB_CLASS_DESIG_SYS) ; rc = pClass->InitStart(S) ; if (rc == E_OK) { S = "ipa" ; rc = pClass->InitMember(S, datatype_IPADDR, HDB_MBR_POP_SINGLE_COMPULSORY) ; } if (rc == E_OK) rc = pClass->InitDone() ; if (rc == E_OK) RegisterDataClass(pClass) ; if (rc != E_OK) hzexit(rc, "Could not init blockedIP class") ; pRepos = new hdbObjRepos(*this) ; if (!pRepos) hzexit(E_MEMORY, "No blockedIP cache allocated") ; rc = pRepos->InitStart(pClass, pClass->strType(), dataDir, HDB_REPOS_CACHE) ; if (rc != E_OK) hzexit(rc, "Could not init blockedIP repos") ; S = "ipa" ; rc = pRepos->InitMbrIndex(S, true) ; if (rc != E_OK) hzexit(rc, "Could not init subsriber repos index") ; rc = pRepos->InitDone() ; if (rc != E_OK) hzexit(rc, "Could not complete subsriber repos initialization") ; rc = m_mapRepositories.Insert(pRepos->strName(), pRepos) ; return rc ; }