RegisterSubCmd("mcu", Config_ControlMCU)
Config_ControlMCU(connection, paraList , action, pReturnXML)
重点在这里:
int httpRegisterEmbedFunEx(const char *pcAccessName, REQUEST_CALLBACK_PFUN funRequestCallBack, int iPrivilegeRequired, void *pParam);
Description:
Registered by "httpRegisterEmbedFunEx", the very http request specified by "pcAccessName" will to be processed by "funRequestCallBack".
Param:
typedef int (*REQUEST_CALLBACK_PFUN)(HTTPCONNECTION hc, void *pParam);
pcAccessName - the file path in URL;
funRequestCallBack - the function to process http request;
iPrivilegeRequired - minimal privilege required;
pParam - a additional parameter when calling "funRequestCallBack", which can be used to transfer any pointer specified by user;
Return: 0, success; -1, failed.