DWC_PostGHTTPData

C Specification

#include <dwc.h>

int DWC_PostGHTTPData( 
                      const char* url,
                      DWCGHTTPPost* post,
                      DWCGHTTPCompletedCallback completedCallback,
                      void* param );

Description

This function initiates data upload to the URL specified by url, based on the DWCGHTTPPost type object created by the DWC_GHTTPNewPost and DWC_GHTTPPostAddString functions.

After this function is called, if the DWC_ProcessGHTTP function is continuously called, the upload process proceeds, and when the upload completes, a completion callback is called.

To find the communication status during an upload, call the DWC_GetGHTTPState function using the return value's request identifier.

Arguments

url Upload destination URL.
post Pointer to the DWCGHTTPPost type object to be uploaded.
completedCallback Pointer to the callback function to call when upload is complete.
param Callback parameter.

Return Values

A negative number indicates that upload failed.

0 or higher Request identifier.
DWC_GHTTP_IN_ERROR An error is being generated.
DWC_GHTTP_FAILED_TO_OPEN_FILE File open failed.
DWC_GHTTP_INVALID_POST Invalid transmission.
DWC_GHTTP_INSUFFICIENT_MEMORY Insufficient memory.
DWC_GHTTP_INVALID_FILE_NAME Invalid file name.
DWC_GHTTP_INVALID_BUFFER_SIZE Invalid buffer size.
DWC_GHTTP_INVALID_URL Invalid URL.
DWC_GHTTP_UNSPECIFIED_ERROR Unspecified error.

See Also

DWC_GHTTPNewPost, DWC_GHTTPPostAddString, DWC_GetGHTTPState, DWCGHTTPCompletedCallback

Revision History

01/18/2006 Added DWC_GHTTP_IN_ERROR to the return values.
10/27/2005 Initial version.