📄 webcallbacks.c
字号:
////////////////////////////////////////////////////////////////////////////// webcallbacks.c//// Default callback functions to support the webserver////////////////////////////////////////////////////////////////////////////#include <stdio.h>#include <stdlib.h>#include <string.h>#include "httppil.h"#include "httpapi.h"BOOL bMacRead=FALSE;OCTET g_aoWebMacAddr[6];//////////////////////////////////////////////////////////////////////////// DefaultWebSubstCallback//// callback from the web server whenever it needs a substitution of// a parameter in a page. Note this is called from the web server thread//////////////////////////////////////////////////////////////////////////int DefaultWebSubstCallback(SubstParam* sp){ return 1;}//////////////////////////////////////////////////////////////////////////// DefaultWebPostCallback//// callback from the web server whenever it recevies posted data//////////////////////////////////////////////////////////////////////////int DefaultWebPostCallback(PostParam* pp){ int iReturn=WEBPOST_OK; // by default redirect to config page strcpy(pp->chFilename,"index.htm"); return iReturn;}//////////////////////////////////////////////////////////////////////////// DefaultWebFileUploadCallback//// callback from the web server whenever it receives a multipart // upload file chunk//////////////////////////////////////////////////////////////////////////int DefaultWebFileUploadCallback(char *pchFilename, OCTET oFileuploadStatus, OCTET *poData, DWORD dwDataChunkSize){ // Do nothing with the data printf("Received %lu bytes for multipart upload file %s\n", dwDataChunkSize, pchFilename); return 0;}////////////////////////////// END OF FILE //////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -