OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
ghttpPost.h
1 /*
2GameSpy GHTTP SDK
3Dan "Mr. Pants" Schoenblum
4dan@gamespy.com
5
6Copyright 1999-2007 GameSpy Industries, Inc
7
8devsupport@gamespy.com
9*/
10
11#ifndef _GHTTPPOST_H_
12#define _GHTTPPOST_H_
13
14#include "ghttp.h"
15#include "ghttpBuffer.h"
16#include "../darray.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22typedef enum
23{
24 GHIPostingError,
25 GHIPostingDone,
26 GHIPostingPosting,
27 GHIPostingWaitForContinue
28} GHIPostingResult;
29
30typedef struct GHIPostingState
31{
32 DArray states;
33 int index;
34 int bytesPosted;
35 int totalBytes;
36 ghttpPostCallback callback;
37 void * param;
38 GHTTPBool waitPostContinue; // does DIME need to wait for continue?
39 GHTTPBool completed; // prevent re-post in the event of a redirect.
41
42GHTTPPost ghiNewPost
43(
44 void
45);
46
47void ghiPostSetAutoFree
48(
49 GHTTPPost post,
50 GHTTPBool autoFree
51);
52
53GHTTPBool ghiIsPostAutoFree
54(
55 GHTTPPost post
56);
57
58void ghiFreePost
59(
60 GHTTPPost post
61);
62
63GHTTPBool ghiPostAddString
64(
65 GHTTPPost post,
66 const char * name,
67 const char * string
68);
69
70GHTTPBool ghiPostAddFileFromDisk
71(
72 GHTTPPost post,
73 const char * name,
74 const char * filename,
75 const char * reportFilename,
76 const char * contentType
77);
78
79GHTTPBool ghiPostAddFileFromMemory
80(
81 GHTTPPost post,
82 const char * name,
83 const char * buffer,
84 int bufferLen,
85 const char * reportFilename,
86 const char * contentType
87);
88
89GHTTPBool ghiPostAddXml
90(
91 GHTTPPost post,
92 GSXmlStreamWriter xmlSoap
93);
94
95void ghiPostSetCallback
96(
97 GHTTPPost post,
98 ghttpPostCallback callback,
99 void * param
100);
101
102const char * ghiPostGetContentType
103(
104 struct GHIConnection * connection
105);
106
107GHTTPBool ghiPostInitState
108(
109 struct GHIConnection * connection
110);
111
112void ghiPostCleanupState
113(
114 struct GHIConnection * connection
115);
116
117GHIPostingResult ghiPostDoPosting
118(
119 struct GHIConnection * connection
120);
121
122#ifdef __cplusplus
123}
124#endif
125
126#endif
Definition ghttpConnection.h:84
Definition ghttpPost.h:31