16#include "../common/gsCommon.h"
17#include "../common/gsXML.h"
24#define ghttpGet ghttpGetA
25#define ghttpGetEx ghttpGetExA
26#define ghttpSave ghttpSaveA
27#define ghttpSaveEx ghttpSaveExA
28#define ghttpStream ghttpStreamA
29#define ghttpStreamEx ghttpStreamExA
30#define ghttpHead ghttpHeadA
31#define ghttpHeadEx ghttpHeadExA
32#define ghttpPost ghttpPostA
33#define ghttpPostEx ghttpPostExA
34#define ghttpPostAddString ghttpPostAddStringA
35#define ghttpPostAddFileFromDisk ghttpPostAddFileFromDiskA
36#define ghttpPostAddFileFromMemory ghttpPostAddFileFromMemoryA
38#define ghttpGet ghttpGetW
39#define ghttpGetEx ghttpGetExW
40#define ghttpSave ghttpSaveW
41#define ghttpSaveEx ghttpSaveExW
42#define ghttpStream ghttpStreamW
43#define ghttpStreamEx ghttpStreamExW
44#define ghttpHead ghttpHeadW
45#define ghttpHeadEx ghttpHeadExW
46#define ghttpPost ghttpPostW
47#define ghttpPostEx ghttpPostExW
48#define ghttpPostAddString ghttpPostAddStringW
49#define ghttpPostAddFileFromDisk ghttpPostAddFileFromDiskW
50#define ghttpPostAddFileFromMemory ghttpPostAddFileFromMemoryW
63#if (GSI_MAX_INTEGRAL_BITS >= 64)
64typedef gsi_i64 GHTTPByteCount;
66typedef gsi_i32 GHTTPByteCount;
82 GHTTPReceivingHeaders,
94 GHTTPHostLookupFailed,
103 GHTTPFileWriteFailed,
107 GHTTPEncryptionError,
108 GHTTPRequestCancelled
114 GHTTPEncryptionEngine_None,
115 GHTTPEncryptionEngine_GameSpy,
116 GHTTPEncryptionEngine_MatrixSsl,
117 GHTTPEncryptionEngine_RevoEx,
119 GHTTPEncryptionEngine_Default
121} GHTTPEncryptionEngine;
125typedef int GHTTPRequest;
129#ifdef GHTTP_EXTENDEDERROR
132 GHTTPErrorStart = -8,
133 GHTTPFailedToOpenFile,
135 GHTTPInsufficientMemory,
136 GHTTPInvalidFileName,
137 GHTTPInvalidBufferSize,
139 GHTTPUnspecifiedError = -1
145 GHTTPErrorStart = -1,
146 GHTTPFailedToOpenFile = -1,
147 GHTTPInvalidPost = -1,
148 GHTTPInsufficientMemory = -1,
149 GHTTPInvalidFileName = -1,
150 GHTTPInvalidBufferSize = -1,
151 GHTTPInvalidURL = -1,
152 GHTTPUnspecifiedError = -1
156#define IS_GHTTP_ERROR(x) (x<0)
162typedef struct GHIPost * GHTTPPost;
177typedef void (* ghttpProgressCallback)
179 GHTTPRequest request,
182 GHTTPByteCount bufferLen,
183 GHTTPByteCount bytesReceived,
184 GHTTPByteCount totalSize,
201typedef GHTTPBool (* ghttpCompletedCallback)
203 GHTTPRequest request,
206 GHTTPByteCount bufferLen,
233 const gsi_char * URL,
235 ghttpCompletedCallback completedCallback,
252GHTTPRequest ghttpGetEx
254 const gsi_char * URL,
255 const gsi_char * headers,
261 ghttpProgressCallback progressCallback,
262 ghttpCompletedCallback completedCallback,
269GHTTPRequest ghttpSave
271 const gsi_char * URL,
272 const gsi_char * filename,
274 ghttpCompletedCallback completedCallback,
283GHTTPRequest ghttpSaveEx
285 const gsi_char * URL,
286 const gsi_char * filename,
287 const gsi_char * headers,
291 ghttpProgressCallback progressCallback,
292 ghttpCompletedCallback completedCallback,
299GHTTPRequest ghttpStream
301 const gsi_char * URL,
303 ghttpProgressCallback progressCallback,
304 ghttpCompletedCallback completedCallback,
312GHTTPRequest ghttpStreamEx
314 const gsi_char * URL,
315 const gsi_char * headers,
319 ghttpProgressCallback progressCallback,
320 ghttpCompletedCallback completedCallback,
328GHTTPRequest ghttpHead
330 const gsi_char * URL,
332 ghttpCompletedCallback completedCallback,
341GHTTPRequest ghttpHeadEx
343 const gsi_char * URL,
344 const gsi_char * headers,
347 ghttpProgressCallback progressCallback,
348 ghttpCompletedCallback completedCallback,
358GHTTPRequest ghttpPost
360 const gsi_char * URL,
363 ghttpCompletedCallback completedCallback,
375GHTTPRequest ghttpPostEx
377 const gsi_char * URL,
378 const gsi_char * headers,
382 ghttpProgressCallback progressCallback,
383 ghttpCompletedCallback completedCallback,
396GHTTPBool ghttpRequestThink
403void ghttpCancelRequest
410void ghttpCloseRequest
418GHTTPState ghttpGetState
428const char * ghttpGetResponseStatus
430 GHTTPRequest request,
438const char * ghttpGetHeaders
445const char * ghttpGetURL
455GHTTPBool ghttpSetProxy
464GHTTPBool ghttpSetRequestProxy
466 GHTTPRequest request,
476 GHTTPRequest request,
482void ghttpThrottleSettings
491void ghttpSetMaxRecvTime
493 GHTTPRequest request,
508GHTTPPost ghttpNewPost
519void ghttpPostSetAutoFree
534GHTTPBool ghttpPostAddString
537 const gsi_char * name,
538 const gsi_char *
string
549GHTTPBool ghttpPostAddFileFromDisk
552 const gsi_char * name,
553 const gsi_char * filename,
554 const gsi_char * reportFilename,
555 const gsi_char * contentType
568GHTTPBool ghttpPostAddFileFromMemory
571 const gsi_char * name,
574 const gsi_char * reportFilename,
575 const gsi_char * contentType
582GHTTPBool ghttpPostAddXml
585 GSXmlStreamWriter xmlSoap
591typedef void (* ghttpPostCallback)
593 GHTTPRequest request,
603void ghttpPostSetCallback
606 ghttpPostCallback callback,
611GHTTPBool ghttpSetRequestEncryptionEngine
613 GHTTPRequest request,
614 GHTTPEncryptionEngine engine
620#define ghttpGetFile(a, b, c, d) ghttpGet(a, b, c, d)
621#define ghttpGetFileEx(a, b, c, d, e, f, g, h, i, j) ghttpGetEx(a, b, c, d, e, f, g, h, i, j)
622#define ghttpSaveFile(a, b, c, d, e) ghttpSave(a, b, c, d, e)
623#define ghttpSaveFileEx(a, b, c, d, e, f, g, h, i) ghttpSaveEx(a, b, c, d, e, f, g, h, i)
624#define ghttpStreamFile(a, b, c, d, e) ghttpStream(a, b, c, d, e)
625#define ghttpStreamFileEx(a, b, c, d, e, f, g, h) ghttpStreamEx(a, b, c, d, e, f, g, h)
626#define ghttpHeadFile(a, b, c, d) ghttpHead(a, b, c, d)
627#define ghttpHeadFileEx(a, b, c, d, e, f, g) ghttpHeadEx(a, b, c, d, e, f, g)
630GHTTPRequest ghttpGetA
634 ghttpCompletedCallback completedCallback,
637#define ghttpGetFileA(a, b, c, d) ghttpGetA(a, b, c, d)
Definition ghttpPost.c:76