#include <dwc.h>
typedef void (*DWCGHTTPCompletedCallback)( const char* buf,
int len,
DWCGHTTPResult result,
void* param );
This function is called at the completion of data upload or download using DWC_PostGHTTPData, DWC_GetGHTTPData, or DWC_GetGHTTPDataEx.
It can be set using DWC_PostGHTTPData, DWC_GetGHTTPData, or DWC_GetGHTTPDataEx.
buf |
Receive data storage buffer. NULL during upload. |
len |
Size of the received data. 0 during upload. |
result |
Result of the upload/download. If an error occurs, a DWC error is set by the library. DWC errors can be retrieved using DWC_GetLastErrorEx. |
param |
Parameter for the callback specified by DWC_PostGHTTPData, DWC_GetGHTTPData, or DWC_GetGHTTPDataEx. |
result takes any of the following values.
DWC_GHTTP_SUCCESS |
Succeeded in getting file. |
DWC_GHTTP_OUT_OF_MEMORY |
Memory allocation failed. |
DWC_GHTTP_BUFFER_OVERFLOW |
Get-file failed because the buffer was too small. |
DWC_GHTTP_PARSE_URL_FAILED |
URL analysis error. |
DWC_GHTTP_HOST_LOOKUP_FAILED |
Failed to find host name. |
DWC_GHTTP_SOCKET_FAILED |
Failed to create, initialize, read, or write socket. |
DWC_GHTTP_CONNECT_FAILED |
Failed to connect to HTTP server. |
DWC_GHTTP_BAD_RESPONSE |
Analysis error of HTTP server response. |
DWC_GHTTP_REQUEST_REJECTED |
Request rejected by the HTTP server. |
DWC_GHTTP_UNAUTHORIZED |
Unauthorized file acquisition. |
DWC_GHTTP_FORBIDDEN |
Rejected file send from HTTP server. |
DWC_GHTTP_FILE_NOT_FOUND |
Failed to find file on HTTP server. |
DWC_GHTTP_SERVER_ERROR |
Internal HTTP server error. |
DWC_GHTTP_FILE_WRITE_FAILED |
Writing to local file error. |
DWC_GHTTP_FILE_READ_FAILED |
Reading from local file error. |
DWC_GHTTP_FILE_INCOMPLETE |
Aborted download. |
DWC_GHTTP_FILE_TOO_BIG |
Download impossible because file is too large. |
DWC_GHTTP_ENCRYPTION_ERROR |
Encryption error. |
DWC_GHTTP_MEMORY_ERROR |
Memory allocation failed. |
None.
DWC_PostGHTTPData
DWC_GetGHTTPData
DWC_GetGHTTPDataEx
2005/12/16 Added a description of the callback select function.
2005/10/27 Initial version.
CONFIDENTIAL