Add a function that effects a Dissemino page to the application's resource map. In this case only a path is available and not a resource name so only the m_ResourcesPath map is aggregated.
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdsApp::AddCIFunc | (hzEcode(*)(hzHttpEvent*),hzString,uint32_t,HttpMethod,) |
Declared in file: hzDissemino.h
Defined in file : hdsCore.cpp
Function Logic:
Function body:
hzEcode hdsApp::AddCIFunc (hzEcode(*)(hzHttpEvent*) pFunc)hzString path, uint32_t access, HttpMethod eMethod,
{
// Category: Dissemino System Initialization
//
// Add a function that effects a Dissemino page to the application's resource map. In this case only a path is available and not a resource name so only the m_ResourcesPath
// map is aggregated.
//
// Arguments: 1) pFunc Pointer to the function. This must return hzEcode and accept a hzHttpEvent pointer as its only argument
// 2) path The 'page' path the function is associated with
// 3) access The access level the website user is expected to have to access the resource
// 4) method Either HTTP_GET (if the function shows a page) or HTTP_POST if the function acts as form handler
//
// Returns: E_DUPLICATE If the path is already in use
// E_OK If the operation was successful
_hzfunc("hdsApp::AddCIFunc") ;
hdsCIFunc* pCIF ; // C-Interface function
hdsResource* pDupRes ; // For illegal dupliacte reporting, existing article by name
if (m_ResourcesPath.Exists(path))
{
pDupRes = m_ResourcesPath[path] ;
hzerr(E_DUPLICATE, "Duplicate resource (%s) previous path %s\n", *path, *pDupRes->m_Url) ;
return E_DUPLICATE ;
}
pCIF = new hdsCIFunc() ;
pCIF->m_Url = path ;
pCIF->m_pFunc = pFunc ;
pCIF->m_resAccess = access ;
m_ResourcesPath.Insert(path, pCIF) ;
return E_OK ;
}