ZenLib

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

HTTPClient.h
Go to the documentation of this file.
1
2 #ifndef _HTTP_CLIENT
3 #define _HTTP_CLIENT
4
5 #include "HTTPClientWrapper.h"
6 #include "HTTPClientCommon.h"
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 ///////////////////////////////////////////////////////////////////////////////
13 //
14 // Section : HTTP API global definitions
15 // Last updated : 01/09/2005
16 //
17 ///////////////////////////////////////////////////////////////////////////////
18 #ifdef _HTTP_BUILD_AMT
19 #define CMSI_HTTPCLIENT_PROTOCOL_GUID {0x471b2c0e, 0x6137, 0x4d55, 0x92, 0x36, 0xdd, 0x0f, 0xdb, 0xc2, 0x52, 0xfb}
20 #endif
21
22 // Debug hook
23 // #define _HTTP_DEBUGGING_ // Simply dumps more debugging data to the console
24
25 // API Version
26 #define HTTP_CLIENT_VERSION_MINOR 0
27 #define HTTP_CLIENT_VERSION_MAJOR 1
28
29 // Global default sizes
30 #define HTTP_CLIENT_MAX_SEND_RECV_HEADERS 1024 // Maximum Send and receive buffers size
31 #define HTTP_CLIENT_INIT_SEND_RECV_HEADERS 2048 // If we can resize the buffers this would be the initial size
32
33 #define HTTP_CLIENT_MAX_USERNAME_LENGTH 16 // Maximum length the user name (host and proxy authentication)
34 #define HTTP_CLIENT_MAX_PASSWORD_LENGTH 16 // Maximum length for the password
35 // Maximum length for the base 64 encoded credentials (twice the size of the user name and password max parameters)
36 #define HTTP_CLIENT_MAX_64_ENCODED_CRED ((HTTP_CLIENT_MAX_USERNAME_LENGTH + HTTP_CLIENT_MAX_PASSWORD_LENGTH) * 2) + 4
37 #define HTTP_CLIENT_MAX_CHUNK_HEADER 64 // Maximum length for the received chunk header (hex - string) size
38 #define HTTP_CLIENT_MAX_PROXY_HOST_LENGTH 64 // Maximum length for the proxy host name
39 #define HTTP_CLIENT_MAX_TOKEN_LENGTH 512 // Maximum length for an HTTP token data (authentication header elements)
40 #define HTTP_CLIENT_MAX_TOKEN_NAME_LENGTH 32 // Maximum length for an HTTP authorization token name ("qop")
41 #define HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE 1024 // Maximum length for a search clue string (Headers searching)
42 #define HTTP_CLIENT_ALLOW_HEAD_VERB 0 // Can we use the HTTP HEAD verb in our outgoing requests?
43
44 #define HTTP_CLIENT_MEMORY_RESIZABLE FALSE // Permission to dynamically resize the headers buffer
45 #define HTTP_CLIENT_MEMORY_RESIZE_FACTOR 16 // Factor for memory resizing operation
46
47 #define HTTP_CLIENT_DEFAULT_PORT 80 // Default HTTP port
48 #define HTTP_CLIENT_DEFAULT_SSL_PORT 443 // Default HTTPS port
49 #define HTTP_CLIENT_DEFAULT_VERB 0 // GET
50 #define HTTP_CLIENT_DEFAULT_VER "HTTP/1.1" // We will send this in the outgoing header
51 #define HTTP_CLIENT_DEFAULT_PROXY_VER "HTTP/1.0" // We will send this in the outgoing header (proxy)
52 #define HTTP_CLIENT_DEFAULT_AGENT "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
53 #define HTTP_CLIENT_DEFAULT_TIMEOUT 30 // Default timeout in seconds
54 #define HTTP_CLIENT_DEFAULT_KEEP_ALIVE 30 // Default Keep-alive value in seconds
55 #define HTTP_CLIENT_DEFAULT_DIGEST_AUTH "MD5" // This is for bypassing a known bug in AMT05..
56 #define HTTP_CLIENT_DEFAULT_PROXY_AUTH 1 // Basic
57
58 #define HTTP_CLIENT_CRLF "\r\n" // End of line macro
59 #define HTTP_CLIENT_CRLFX2 "\r\n\r\n" // Double End of line macro
60
61 // HTTP Session internal API flags
62 // Note: Not intended to be set the by the API user
63 #define HTTP_CLIENT_FLAG_SECURE 0x00000010 // The session is secured using TLS
64 #define HTTP_CLIENT_FLAG_URLANDPORT 0x00000020 // Url has a port within
65 #define HTTP_CLIENT_FLAG_URLHTTPS 0x00000040 // Url has a https prefix
66 #define HTTP_CLIENT_FLAG_USINGPROXY 0x00000080 // Operation will be performed using a proxy server
67 #define HTTP_CLIENT_FLAG_CHUNKED 0x00000100 // The incoming data is chunked
68
69 // HTTP Status codes
70 #define HTTP_STATUS_OK 200 // The request has succeeded
71 #define HTTP_STATUS_UNAUTHORIZED 401 // The request requires user authentic
72 #define HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED 407 // The client must first authenticate itself with the proxy
73
74 // Redirection (Note: there are more 30x codes, those are the most popular)
75 #define HTTP_STATUS_OBJECT_MOVED 302 // Page redirection notification
76 #define HTTP_STATUS_OBJECT_MOVED_PERMANENTLY 301 // Page redirection notification
77 #define HTTP_STATUS_CONTINUE 100 // Page continue message
78
79
80 // MIN AMX macro
81 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
82 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
83 // HTTP timeout macro for selecting the default value if the caller passed 0 (no timeout) to the function
84 #define HTTP_TIMEOUT(nTimeout) (((nTimeout) > (0)) ? (nTimeout) : (HTTP_CLIENT_DEFAULT_TIMEOUT))
85
86 // 32 bit alignment macro
87 #define ALIGN(size) ((size & 0xfffffffc) + ((size & 3) ? 4 : 0))
88
89
90 #ifdef _HTTP_DEBUGGING_
91 typedef VOID _stdcall E_HTTPDebug(const char *,const char*,UINT32,char *,...); // HTTPDebug hook function
92 #endif
93
94
95 ///////////////////////////////////////////////////////////////////////////////
96 //
97 // Section : HTTP API internals structures
98 // Last updated : 01/09/2005
99 //
100 ///////////////////////////////////////////////////////////////////////////////
101
102 // Generic parameter structure contains a pointer to the buffer and its length
103
104 typedef struct _HTTP_PARAM
105 {
106
107 CHAR *pParam;
108 UINT32 nLength;
109
110 } HTTP_PARAM;
111
112 // HTTP socket events
113 typedef struct _HTTP_CONNECTION
114 {
115
116 fd_set FDRead; // socket read event
117 fd_set FDWrite; // socket write event
118 fd_set FDError; // socket error event
119 INT32 HttpSocket; // The underling socket
120 UINT32 HttpStartTime; // Time stamp for the session
121 UINT32 HttpClientPort; // For client side binding
122 BOOL TlsNego; // TLS negotiation flag
123
124 } HTTP_CONNECTION;
125
126 // Request URL
127 typedef struct _HTTP_URL
128 {
129
130 HTTP_PARAM UrlBsee; // a pointer and length to the "http" section of the URL
131 HTTP_PARAM UrlHost; // a pointer and length to the host section of the URL
132 HTTP_PARAM UrlPort; // a pointer and length to the PORT (if was specified section)
133 HTTP_PARAM UrlRequest; // a pointer and length of the request section of the URL
134 UINT16 nPort; // the PORT that we should use (could be default or the one found within the URL)
135 CHAR Url[HTTP_CLIENT_MAX_URL_LENGTH]; // a buffer for the URL
136
137 }HTTP_URL;
138 // HTTP headers (incoming and outgoing)
139 typedef struct _HTTP_HEADERS
140 {
141
142 HTTP_PARAM HeadersBuffer; // a pointer and length of the complete Headers (in\out) buffer
143 HTTP_PARAM HeadersOut; // a pointer and length of the outgoing HTTP headers
144 HTTP_PARAM HeadersIn; // a pointer and length of the incoming headers
145 HTTP_PARAM HeaderSearch; // Index and pointer for the header search functions
146 HTTP_VERB HttpVerb; // the HTTP verb that was used in the session
147 HTTP_VERB HttpLastVerb; // the HTTP verb that was last transmited to the server
148 CHAR SearchClue[HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE];
149 CHAR Verb[16]; // the actual string buffer of the HTTP verb
150
151
152 }HTTP_HEADERS;
153
154 // HTTP headers (parsed headers information)
155 typedef struct _HTTP_HEADERS_INFO
156 {
157 HTTP_PARAM HttpRedirectURL; // Stores the redirection URL if we got a 301 or 303 return code
158 UINT32 nHTTPStatus; // the HTTP status code (200 401 407 act')
159 UINT32 nHTTPContentLength; // the Content length if specified of the returned data
160 UINT32 nHTTPPostContentLength;// the Content-Length of the POSTed data (if known)
161 BOOL Connection; // True = Keep alive or undefined, False = Closed
162 BOOL ValidHeaders; // a flag that indicates if the incoming header ware parsed OK and found to be valid
163 BOOL HaveCredentials; // a flag that indicates if we have credentials for the session
164 CHAR HTTPVersion[16]; // HTTP version string buffer (for example: "HTTP 1.1")
165
166 }HTTP_HEADERS_INFO;
167
168 // Authentication parameters that ware extracted from the incoming headers
169 typedef struct _HTTP_AUTH_HEADER
170 {
171
172 HTTP_PARAM AuthHeader; // the pointer and length of the authentication header
173 UINT32 HTTP_AUTH_SCHEMA; // Its schema (could be any of the supported)
174
175 }HTTP_AUTH_HEADER;
176 // Proxy related data
177 typedef struct _HTTP_PROXY
178 {
179 CHAR ProxyHost[HTTP_CLIENT_MAX_PROXY_HOST_LENGTH];
180 CHAR ProxtUser[HTTP_CLIENT_MAX_USERNAME_LENGTH];
181 CHAR ProxyPassword[HTTP_CLIENT_MAX_PASSWORD_LENGTH];
182 UINT16 nProxyPort;
183 CHAR AuthSchemaName[16]; // The authentication schema name (for string comperission)
184 HTTP_AUTH_SCHEMA ProxyAuthSchema;
185
186 }HTTP_PROXY;
187
188 // HTTP User credentials
189 typedef struct _HTTP_CREDENTIALS
190 {
191
192 CHAR CredUser[HTTP_CLIENT_MAX_USERNAME_LENGTH];
193 CHAR CredPassword[HTTP_CLIENT_MAX_PASSWORD_LENGTH];
194 CHAR AuthSchemaName[16]; // The authentication schema name (for string comperission)
195 HTTP_AUTH_SCHEMA CredAuthSchema; // The schema that calle has selected for the session
196 BOOL Authentication; // a flag that indicates that this session has requested a user authentication
197
198 }HTTP_CREDENTIALS;
199 // HTTP Counters
200 typedef struct _HTTP_COUNTERS
201 {
202
203 UINT32 nRecivedHeaderLength; // Bytes count of the incoming header
204 UINT32 nRecivedBodyLength; // Bytes count of the incoming body length
205 UINT32 nRecivedChunkLength; // The next chunk length in bytes
206 UINT32 nBytesToNextChunk; // How many bytes we have to read until we can expect the next chunk
207 UINT32 nActionStartTime; // Operation start time
208 UINT32 nActionTimeout; // Timeout for the session
209 UINT32 nSentChunks; // Count of sent chunks
210 UINT32 nSentBodyBytes; // Count of body bytes that ware sent
211 UINT32 nSentHeaderBytes; // Count of header bytes thhat ware sent
212
213 }HTTP_COUNTERS;
214
215 // HTTP Client Session data
216 typedef struct _HTTP_REQUEST
217 {
218
219 HTTP_URL HttpUrl;
220 HTTP_HEADERS HttpHeaders;
221 HTTP_HEADERS_INFO HttpHeadersInfo;
222 HTTP_AUTH_HEADER HttpAuthHeader;
223 HTTP_PROXY HttpProxy;
224 HTTP_CREDENTIALS HttpCredentials;
225 HTTP_CONNECTION HttpConnection;
226 HTTP_COUNTERS HttpCounters;
227 UINT32 HttpState;
228 UINT32 HttpFlags;
229 #ifdef _HTTP_DEBUGGING_
230 E_HTTPDebug *pDebug;
231 #endif
232 } HTTP_SESSION, *P_HTTP_SESSION;
233
234
235 // HTTP Type Definitions
236 typedef UINT32 HTTP_SESSION_HANDLE;
237 typedef UINT32 HTTP_CLIENT_SESSION_FLAGS;
238
239
240 ///////////////////////////////////////////////////////////////////////////////
241 //
242 // Section : HTTP API public interface
243 // Last updated : 01/09/2005
244 //
245 ///////////////////////////////////////////////////////////////////////////////
246
247
248 HTTP_SESSION_HANDLE HTTPClientOpenRequest (HTTP_CLIENT_SESSION_FLAGS Flags);
249 UINT32 HTTPClientCloseRequest (HTTP_SESSION_HANDLE *pSession);
250 UINT32 HTTPClientSetLocalConnection (HTTP_SESSION_HANDLE pSession, UINT32 nPort);
251 UINT32 HTTPClientSetAuth (HTTP_SESSION_HANDLE pSession, HTTP_AUTH_SCHEMA AuthSchema, void *pReserved);
252 UINT32 HTTPClientSetCredentials (HTTP_SESSION_HANDLE pSession, CHAR *pUserName, CHAR *pPassword);
253 UINT32 HTTPClientSetProxy (HTTP_SESSION_HANDLE pSession, CHAR *pProxyName, UINT16 nPort, CHAR *pUserName, CHAR *pPassword);
254 UINT32 HTTPClientSetVerb (HTTP_SESSION_HANDLE pSession, HTTP_VERB HttpVerb);
255 UINT32 HTTPClientAddRequestHeaders (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderName, CHAR *pHeaderData, BOOL nInsert);
256 UINT32 HTTPClientSendRequest (HTTP_SESSION_HANDLE pSession, CHAR *pUrl, VOID *pData, UINT32 nDataLength, BOOL TotalLength, UINT32 nTimeout,UINT32 nClientPort);
257 UINT32 HTTPClientWriteData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBufferLength, UINT32 nTimeout);
258 UINT32 HTTPClientRecvResponse (HTTP_SESSION_HANDLE pSession, UINT32 nTimeout);
259 UINT32 HTTPClientReadData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBytesToRead, UINT32 nTimeout, UINT32 *nBytesRecived);
260 UINT32 HTTPClientGetInfo (HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient);
261
262 UINT32 HTTPClientFindFirstHeader (HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue,CHAR *pHeaderBuffer, UINT32 *nLength);
263 UINT32 HTTPClientGetNextHeader (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength);
264 UINT32 HTTPClientFindCloseHeader (HTTP_SESSION_HANDLE pSession);
265
266
267 #ifdef _HTTP_DEBUGGING_
268 UINT32 HTTPClientSetDebugHook (HTTP_SESSION_HANDLE pSession,E_HTTPDebug *pDebug);
269 #endif
270
271
272 ///////////////////////////////////////////////////////////////////////////////
273 //
274 // Section : HTTP API private function
275 // Last updated : 01/09/2005
276 //
277 ///////////////////////////////////////////////////////////////////////////////
278
279 UINT32 HTTPIntrnResizeBuffer (P_HTTP_SESSION pHTTPSession, UINT32 nNewSize);
280 UINT32 HTTPIntrnSetURL (P_HTTP_SESSION pHTTPSession, CHAR *pUrl,UINT32 nUrlLength);
281 UINT32 HTTPIntrnConnectionClose (P_HTTP_SESSION pHTTPSession);
282 UINT32 HTTPIntrnConnectionOpen (P_HTTP_SESSION pHTTPSession);
283 UINT32 HTTPIntrnGetRemoteHeaders (P_HTTP_SESSION pHTTPSession);
284 UINT32 HTTPIntrnGetRemoteChunkLength (P_HTTP_SESSION pHTTPSession);
285 UINT32 HTTPIntrnSend (P_HTTP_SESSION pHTTPSession, CHAR *pData,UINT32 *nLength);
286 UINT32 HTTPIntrnRecv (P_HTTP_SESSION pHTTPSession, CHAR *pData,UINT32 *nLength,BOOL PeekOnly);
287 UINT32 HTTPIntrnParseAuthHeader (P_HTTP_SESSION pHTTPSession);
288 UINT32 HTTPIntrnAuthHandler (P_HTTP_SESSION pHTTPSession);
289 UINT32 HTTPIntrnAuthSendDigest (P_HTTP_SESSION pHTTPSession);
290 UINT32 HTTPIntrnAuthSendBasic (P_HTTP_SESSION pHTTPSession);
291 UINT32 HTTPIntrnAuthenticate (P_HTTP_SESSION pHTTPSession);
292 UINT32 HTTPIntrnHeadersAdd (P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName, UINT32 nNameLength, CHAR *pHeaderData, UINT32 nDataLength);
293 UINT32 HTTPIntrnHeadersRemove (P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName);
294 UINT32 HTTPIntrnHeadersReceive (P_HTTP_SESSION pHTTPSession, UINT32 nTimeout);
295 UINT32 HTTPIntrnHeadersSend (P_HTTP_SESSION pHTTPSession, HTTP_VERB HttpVerb);
296 UINT32 HTTPIntrnHeadersParse (P_HTTP_SESSION pHTTPSession);
297 UINT32 HTTPIntrnHeadersFind (P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName, HTTP_PARAM *pParam,BOOL IncommingHeaders,UINT32 nOffset);
298 UINT32 HTTPIntrnSessionReset (P_HTTP_SESSION pHTTPSession, BOOL EntireSession);
299 UINT32 HTTPIntrnSessionGetUpTime (VOID);
300 BOOL HTTPIntrnSessionEvalTimeout (P_HTTP_SESSION pHTTPSession);
301
302 #ifdef __cplusplus
303 }
304 #endif
305
306 #endif //_HTTP_CLIENT
HTTPClientGetInfo
UINT32 HTTPClientGetInfo(HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient)
_HTTP_URL::UrlBsee
HTTP_PARAM UrlBsee
Definition: HTTPClient.h:130
_HTTP_CONNECTION::TlsNego
BOOL TlsNego
Definition: HTTPClient.h:122
_HTTP_COUNTERS::nSentChunks
UINT32 nSentChunks
Definition: HTTPClient.h:209
_HTTP_URL::UrlRequest
HTTP_PARAM UrlRequest
Definition: HTTPClient.h:133
_HTTP_PROXY::AuthSchemaName
CHAR AuthSchemaName[16]
Definition: HTTPClient.h:183
_HTTP_CONNECTION::FDError
fd_set FDError
Definition: HTTPClient.h:118
_HTTP_CONNECTION::FDRead
fd_set FDRead
Definition: HTTPClient.h:116
_HTTP_REQUEST
Definition: HTTPClient.h:216
_HTTP_HEADERS::SearchClue
CHAR SearchClue[HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE]
Definition: HTTPClient.h:148
_HTTP_AUTH_HEADER
Definition: HTTPClient.h:169
_HTTP_URL::Url
CHAR Url[HTTP_CLIENT_MAX_URL_LENGTH]
Definition: HTTPClient.h:135
_HTTP_PROXY::nProxyPort
UINT16 nProxyPort
Definition: HTTPClient.h:182
_HTTP_PARAM::pParam
CHAR * pParam
Definition: HTTPClient.h:107
HTTP_PROXY
struct _HTTP_PROXY HTTP_PROXY
HTTPClientCommon.h
HTTPIntrnAuthHandler
UINT32 HTTPIntrnAuthHandler(P_HTTP_SESSION pHTTPSession)
HTTPIntrnHeadersAdd
UINT32 HTTPIntrnHeadersAdd(P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName, UINT32 nNameLength, CHAR *pHeaderData, UINT32 nDataLength)
_HTTP_AUTH_HEADER::HTTP_AUTH_SCHEMA
UINT32 HTTP_AUTH_SCHEMA
Definition: HTTPClient.h:173
HTTPClientReadData
UINT32 HTTPClientReadData(HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBytesToRead, UINT32 nTimeout, UINT32 *nBytesRecived)
_HTTP_COUNTERS::nRecivedBodyLength
UINT32 nRecivedBodyLength
Definition: HTTPClient.h:204
_HTTP_CONNECTION::FDWrite
fd_set FDWrite
Definition: HTTPClient.h:117
HTTPIntrnHeadersReceive
UINT32 HTTPIntrnHeadersReceive(P_HTTP_SESSION pHTTPSession, UINT32 nTimeout)
HTTPIntrnConnectionOpen
UINT32 HTTPIntrnConnectionOpen(P_HTTP_SESSION pHTTPSession)
_HTTP_URL
Definition: HTTPClient.h:127
BOOL
int BOOL
Definition: HTTPClientWrapper.h:99
_HTTP_HEADERS_INFO::ValidHeaders
BOOL ValidHeaders
Definition: HTTPClient.h:162
_HTTP_REQUEST::HttpConnection
HTTP_CONNECTION HttpConnection
Definition: HTTPClient.h:225
_HTTP_HEADERS::Verb
CHAR Verb[16]
Definition: HTTPClient.h:149
_HTTP_HEADERS_INFO::nHTTPPostContentLength
UINT32 nHTTPPostContentLength
Definition: HTTPClient.h:160
HTTPIntrnSetURL
UINT32 HTTPIntrnSetURL(P_HTTP_SESSION pHTTPSession, CHAR *pUrl, UINT32 nUrlLength)
_HTTP_PROXY::ProxyPassword
CHAR ProxyPassword[HTTP_CLIENT_MAX_PASSWORD_LENGTH]
Definition: HTTPClient.h:181
HTTPIntrnGetRemoteChunkLength
UINT32 HTTPIntrnGetRemoteChunkLength(P_HTTP_SESSION pHTTPSession)
HTTP_CLIENT_MAX_PROXY_HOST_LENGTH
#define HTTP_CLIENT_MAX_PROXY_HOST_LENGTH
Definition: HTTPClient.h:38
_HTTP_REQUEST::HttpCounters
HTTP_COUNTERS HttpCounters
Definition: HTTPClient.h:226
_HTTP_URL::UrlPort
HTTP_PARAM UrlPort
Definition: HTTPClient.h:132
HTTPIntrnParseAuthHeader
UINT32 HTTPIntrnParseAuthHeader(P_HTTP_SESSION pHTTPSession)
HTTPIntrnConnectionClose
UINT32 HTTPIntrnConnectionClose(P_HTTP_SESSION pHTTPSession)
HTTP_SESSION
struct _HTTP_REQUEST HTTP_SESSION
HTTPIntrnSessionEvalTimeout
BOOL HTTPIntrnSessionEvalTimeout(P_HTTP_SESSION pHTTPSession)
HTTP_AUTH_HEADER
struct _HTTP_AUTH_HEADER HTTP_AUTH_HEADER
HTTPIntrnSessionGetUpTime
UINT32 HTTPIntrnSessionGetUpTime(VOID)
_HTTP_COUNTERS::nRecivedHeaderLength
UINT32 nRecivedHeaderLength
Definition: HTTPClient.h:203
HTTP_HEADERS
struct _HTTP_HEADERS HTTP_HEADERS
_HTTP_HEADERS_INFO
Definition: HTTPClient.h:155
VOID
#define VOID
Definition: HTTPClientWrapper.h:91
_HTTP_COUNTERS::nActionStartTime
UINT32 nActionStartTime
Definition: HTTPClient.h:207
_HTTP_PROXY::ProxtUser
CHAR ProxtUser[HTTP_CLIENT_MAX_USERNAME_LENGTH]
Definition: HTTPClient.h:180
_HTTP_COUNTERS
Definition: HTTPClient.h:200
HTTPIntrnHeadersSend
UINT32 HTTPIntrnHeadersSend(P_HTTP_SESSION pHTTPSession, HTTP_VERB HttpVerb)
_HTTP_REQUEST::HttpAuthHeader
HTTP_AUTH_HEADER HttpAuthHeader
Definition: HTTPClient.h:222
HTTP_COUNTERS
struct _HTTP_COUNTERS HTTP_COUNTERS
HTTP_CLIENT_MAX_URL_LENGTH
#define HTTP_CLIENT_MAX_URL_LENGTH
Definition: HTTPClientCommon.h:21
_HTTP_PARAM::nLength
UINT32 nLength
Definition: HTTPClient.h:108
_HTTP_HEADERS::HttpLastVerb
HTTP_VERB HttpLastVerb
Definition: HTTPClient.h:147
HTTPClientWrapper.h
_HTTP_REQUEST::HttpCredentials
HTTP_CREDENTIALS HttpCredentials
Definition: HTTPClient.h:224
_HTTP_COUNTERS::nSentHeaderBytes
UINT32 nSentHeaderBytes
Definition: HTTPClient.h:211
HTTPIntrnAuthSendBasic
UINT32 HTTPIntrnAuthSendBasic(P_HTTP_SESSION pHTTPSession)
HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE
#define HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE
Definition: HTTPClient.h:41
HTTPIntrnHeadersFind
UINT32 HTTPIntrnHeadersFind(P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName, HTTP_PARAM *pParam, BOOL IncommingHeaders, UINT32 nOffset)
HTTP_CLIENT_MAX_USERNAME_LENGTH
#define HTTP_CLIENT_MAX_USERNAME_LENGTH
Definition: HTTPClient.h:33
HTTPClientAddRequestHeaders
UINT32 HTTPClientAddRequestHeaders(HTTP_SESSION_HANDLE pSession, CHAR *pHeaderName, CHAR *pHeaderData, BOOL nInsert)
_HTTP_COUNTERS::nActionTimeout
UINT32 nActionTimeout
Definition: HTTPClient.h:208
HTTPClientSetCredentials
UINT32 HTTPClientSetCredentials(HTTP_SESSION_HANDLE pSession, CHAR *pUserName, CHAR *pPassword)
_HTTP_HEADERS_INFO::nHTTPStatus
UINT32 nHTTPStatus
Definition: HTTPClient.h:158
_HTTP_PARAM
Definition: HTTPClient.h:104
_HTTP_HEADERS_INFO::HTTPVersion
CHAR HTTPVersion[16]
Definition: HTTPClient.h:164
_HTTP_PROXY::ProxyAuthSchema
HTTP_AUTH_SCHEMA ProxyAuthSchema
Definition: HTTPClient.h:184
_HTTP_HEADERS_INFO::Connection
BOOL Connection
Definition: HTTPClient.h:161
HTTPIntrnSessionReset
UINT32 HTTPIntrnSessionReset(P_HTTP_SESSION pHTTPSession, BOOL EntireSession)
HTTPIntrnGetRemoteHeaders
UINT32 HTTPIntrnGetRemoteHeaders(P_HTTP_SESSION pHTTPSession)
_HTTP_HEADERS_INFO::HaveCredentials
BOOL HaveCredentials
Definition: HTTPClient.h:163
_HTTP_PROXY::ProxyHost
CHAR ProxyHost[HTTP_CLIENT_MAX_PROXY_HOST_LENGTH]
Definition: HTTPClient.h:179
_HTTP_CREDENTIALS
Definition: HTTPClient.h:189
HTTPClientCloseRequest
UINT32 HTTPClientCloseRequest(HTTP_SESSION_HANDLE *pSession)
_HTTP_REQUEST::HttpState
UINT32 HttpState
Definition: HTTPClient.h:227
HTTP_CLIENT_SESSION_FLAGS
UINT32 HTTP_CLIENT_SESSION_FLAGS
Definition: HTTPClient.h:237
INT32
int INT32
Definition: HTTPClientWrapper.h:32
HTTPClientFindCloseHeader
UINT32 HTTPClientFindCloseHeader(HTTP_SESSION_HANDLE pSession)
_HTTP_CLIENT
Definition: HTTPClientCommon.h:107
_HTTP_REQUEST::HttpHeaders
HTTP_HEADERS HttpHeaders
Definition: HTTPClient.h:220
HTTP_CLIENT_MAX_PASSWORD_LENGTH
#define HTTP_CLIENT_MAX_PASSWORD_LENGTH
Definition: HTTPClient.h:34
_HTTP_CREDENTIALS::CredUser
CHAR CredUser[HTTP_CLIENT_MAX_USERNAME_LENGTH]
Definition: HTTPClient.h:192
_HTTP_HEADERS::HeaderSearch
HTTP_PARAM HeaderSearch
Definition: HTTPClient.h:145
HTTPClientSendRequest
UINT32 HTTPClientSendRequest(HTTP_SESSION_HANDLE pSession, CHAR *pUrl, VOID *pData, UINT32 nDataLength, BOOL TotalLength, UINT32 nTimeout, UINT32 nClientPort)
UINT16
unsigned short UINT16
Definition: HTTPClientWrapper.h:98
HTTP_AUTH_SCHEMA
enum _HTTP_AUTH_SCHEMA HTTP_AUTH_SCHEMA
_HTTP_HEADERS::HeadersBuffer
HTTP_PARAM HeadersBuffer
Definition: HTTPClient.h:142
_HTTP_REQUEST::HttpFlags
UINT32 HttpFlags
Definition: HTTPClient.h:228
HTTPIntrnRecv
UINT32 HTTPIntrnRecv(P_HTTP_SESSION pHTTPSession, CHAR *pData, UINT32 *nLength, BOOL PeekOnly)
_HTTP_CREDENTIALS::AuthSchemaName
CHAR AuthSchemaName[16]
Definition: HTTPClient.h:194
_HTTP_CREDENTIALS::CredPassword
CHAR CredPassword[HTTP_CLIENT_MAX_PASSWORD_LENGTH]
Definition: HTTPClient.h:193
HTTP_PARAM
struct _HTTP_PARAM HTTP_PARAM
_HTTP_COUNTERS::nRecivedChunkLength
UINT32 nRecivedChunkLength
Definition: HTTPClient.h:205
HTTPIntrnSend
UINT32 HTTPIntrnSend(P_HTTP_SESSION pHTTPSession, CHAR *pData, UINT32 *nLength)
HTTPClientSetVerb
UINT32 HTTPClientSetVerb(HTTP_SESSION_HANDLE pSession, HTTP_VERB HttpVerb)
_HTTP_CONNECTION::HttpStartTime
UINT32 HttpStartTime
Definition: HTTPClient.h:120
HTTPIntrnHeadersParse
UINT32 HTTPIntrnHeadersParse(P_HTTP_SESSION pHTTPSession)
_HTTP_PROXY
Definition: HTTPClient.h:177
_HTTP_URL::nPort
UINT16 nPort
Definition: HTTPClient.h:134
_HTTP_REQUEST::HttpUrl
HTTP_URL HttpUrl
Definition: HTTPClient.h:219
P_HTTP_SESSION
struct _HTTP_REQUEST * P_HTTP_SESSION
_HTTP_COUNTERS::nBytesToNextChunk
UINT32 nBytesToNextChunk
Definition: HTTPClient.h:206
HTTPClientGetNextHeader
UINT32 HTTPClientGetNextHeader(HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength)
CHAR
char CHAR
Definition: HTTPClientWrapper.h:97
HTTPClientRecvResponse
UINT32 HTTPClientRecvResponse(HTTP_SESSION_HANDLE pSession, UINT32 nTimeout)
HTTPClientWriteData
UINT32 HTTPClientWriteData(HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBufferLength, UINT32 nTimeout)
_HTTP_CONNECTION::HttpSocket
INT32 HttpSocket
Definition: HTTPClient.h:119
HTTPIntrnHeadersRemove
UINT32 HTTPIntrnHeadersRemove(P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName)
_HTTP_URL::UrlHost
HTTP_PARAM UrlHost
Definition: HTTPClient.h:131
_HTTP_HEADERS_INFO::HttpRedirectURL
HTTP_PARAM HttpRedirectURL
Definition: HTTPClient.h:157
_HTTP_HEADERS::HttpVerb
HTTP_VERB HttpVerb
Definition: HTTPClient.h:146
HTTPIntrnResizeBuffer
UINT32 HTTPIntrnResizeBuffer(P_HTTP_SESSION pHTTPSession, UINT32 nNewSize)
_HTTP_REQUEST::HttpHeadersInfo
HTTP_HEADERS_INFO HttpHeadersInfo
Definition: HTTPClient.h:221
HTTPClientSetLocalConnection
UINT32 HTTPClientSetLocalConnection(HTTP_SESSION_HANDLE pSession, UINT32 nPort)
UINT32
unsigned int UINT32
Definition: HTTPClientWrapper.h:31
_HTTP_HEADERS::HeadersIn
HTTP_PARAM HeadersIn
Definition: HTTPClient.h:144
HTTP_SESSION_HANDLE
UINT32 HTTP_SESSION_HANDLE
Definition: HTTPClient.h:236
_HTTP_CONNECTION
Definition: HTTPClient.h:113
HTTP_HEADERS_INFO
struct _HTTP_HEADERS_INFO HTTP_HEADERS_INFO
HTTPClientSetProxy
UINT32 HTTPClientSetProxy(HTTP_SESSION_HANDLE pSession, CHAR *pProxyName, UINT16 nPort, CHAR *pUserName, CHAR *pPassword)
HTTP_CREDENTIALS
struct _HTTP_CREDENTIALS HTTP_CREDENTIALS
_HTTP_CREDENTIALS::CredAuthSchema
HTTP_AUTH_SCHEMA CredAuthSchema
Definition: HTTPClient.h:195
_HTTP_CONNECTION::HttpClientPort
UINT32 HttpClientPort
Definition: HTTPClient.h:121
_HTTP_HEADERS_INFO::nHTTPContentLength
UINT32 nHTTPContentLength
Definition: HTTPClient.h:159
HTTPClientFindFirstHeader
UINT32 HTTPClientFindFirstHeader(HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue, CHAR *pHeaderBuffer, UINT32 *nLength)
_HTTP_COUNTERS::nSentBodyBytes
UINT32 nSentBodyBytes
Definition: HTTPClient.h:210
_HTTP_REQUEST::HttpProxy
HTTP_PROXY HttpProxy
Definition: HTTPClient.h:223
_HTTP_AUTH_HEADER::AuthHeader
HTTP_PARAM AuthHeader
Definition: HTTPClient.h:172
HTTPIntrnAuthenticate
UINT32 HTTPIntrnAuthenticate(P_HTTP_SESSION pHTTPSession)
_HTTP_HEADERS::HeadersOut
HTTP_PARAM HeadersOut
Definition: HTTPClient.h:143
HTTPClientSetAuth
UINT32 HTTPClientSetAuth(HTTP_SESSION_HANDLE pSession, HTTP_AUTH_SCHEMA AuthSchema, void *pReserved)
HTTPIntrnAuthSendDigest
UINT32 HTTPIntrnAuthSendDigest(P_HTTP_SESSION pHTTPSession)
HTTPClientOpenRequest
HTTP_SESSION_HANDLE HTTPClientOpenRequest(HTTP_CLIENT_SESSION_FLAGS Flags)
_HTTP_CREDENTIALS::Authentication
BOOL Authentication
Definition: HTTPClient.h:196
HTTP_VERB
enum _HTTP_VERB HTTP_VERB
HTTP_CONNECTION
struct _HTTP_CONNECTION HTTP_CONNECTION
HTTP_URL
struct _HTTP_URL HTTP_URL
_HTTP_HEADERS
Definition: HTTPClient.h:139