DWC_GHTTP Library Constants

Definitions

#include <dwc.h>

#define   DWC_GHTTP_FALSE                -1
#define   DWC_GHTTP_HOST_LOOKUP           0
#define   DWC_GHTTP_CONNECTING            1
#define   DWC_GHTTP_SECURING_SESSION      2
#define   DWC_GHTTP_SENDING_REQUEST       3
#define   DWC_GHTTP_POSTING               4
#define   DWC_GHTTP_WAITING               5
#define   DWC_GHTTP_RECEIVING_STATUS      6
#define   DWC_GHTTP_RECEIVING_HEADERS     7
#define   DWC_GHTTP_RECEIVING_FILE        8

#define   DWC_GHTTP_FAILED_TO_OPEN_FILE  -7
#define   DWC_GHTTP_INVALID_POST         -6
#define   DWC_GHTTP_INSUFFICIENT_MEMORY  -5
#define   DWC_GHTTP_INVALID_FILE_NAME    -4
#define   DWC_GHTTP_INVALID_BUFFER_SIZE  -3
#define   DWC_GHTTP_INVALID_URL          -2
#define   DWC_GHTTP_UNSPECIFIED_ERROR    -1

#define   DWC_GHTTP_SUCCESS               0
#define   DWC_GHTTP_OUT_OF_MEMORY         1
#define   DWC_GHTTP_BUFFER_OVERFLOW       2
#define   DWC_GHTTP_PARSE_URL_FAILED      3
#define   DWC_GHTTP_HOST_LOOKUP_FAILED    4
#define   DWC_GHTTP_SOCKET_FAILED         5
#define   DWC_GHTTP_CONNECT_FAILED        6
#define   DWC_GHTTP_BAD_RESPONSE          7
#define   DWC_GHTTP_REQUEST_REJECTED      8
#define   DWC_GHTTP_UNAUTHORIZED          9
#define   DWC_GHTTP_FORBIDDEN            10
#define   DWC_GHTTP_FILE_NOT_FOUND       11
#define   DWC_GHTTP_SERVER_ERROR         12
#define   DWC_GHTTP_FILE_WRITE_FAILED    13
#define   DWC_GHTTP_FILE_READ_FAILED     14
#define   DWC_GHTTP_FILE_INCOMPLETE      15
#define   DWC_GHTTP_FILE_TOO_BIG         16
#define   DWC_GHTTP_ENCRYPTION_ERROR     17
#define   DWC_GHTTP_NUM                  18
#define   DWC_GHTTP_MEMORY_ERROR         19

GHTTP Communication Status

DWC_GHTTP_FALSE Communication failed.
DWC_GHTTP_HOST_LOOKUP Converting the host name to an IP address.
DWC_GHTTP_CONNECTING Waiting for socket connection to complete.
DWC_GHTTP_SECURING_SESSION Establishing a safe channel.
DWC_GHTTP_SENDING_REQUEST Sending a request.
DWC_GHTTP_POSTING Sending data (skip if no data is to be sent).
DWC_GHTTP_WAITING Wait for response.
DWC_GHTTP_RECEIVING_STATUS Receiving response status.
DWC_GHTTP_RECEIVING_HEADERS Receiving headers.
DWC_GHTTP_RECEIVING_FILE Receiving file.

Request Error Values

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.

GHTTP Function Results

DWC_GHTTP_SUCCESS Succeeded in getting file.
DWC_GHTTP_OUT_OF_MEMORY Memory allocation failed.
DWC_GHTTP_BUFFER_OVERFLOW Get file failed because 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.

Revision History

10/27/2005 Initial version.