File: gsSoap.h

package info (click to toggle)
openmohaa 0.82.1%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 34,192 kB
  • sloc: cpp: 315,720; ansic: 275,789; sh: 312; xml: 246; asm: 141; makefile: 7
file content (73 lines) | stat: -rw-r--r-- 2,438 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifndef __SOAP_H__
#define __SOAP_H__


///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#include "gsCommon.h"
#include "gsCore.h"

#include "../ghttp/ghttp.h"

#if defined(__cplusplus)
extern "C"
{
#endif


///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
typedef void(*GSSoapCallbackFunc)(GHTTPResult theHTTPResult, GSXmlStreamWriter theRequest, GSXmlStreamReader theResponse, void *theUserData);
typedef void(*GSSoapCustomFunc)(GHTTPPost theSoap, void* theUserData);


///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
typedef struct 
{
	GSSoapCallbackFunc mCallbackFunc;
	GSSoapCustomFunc mCustomFunc;
	const char *mURL;
	const char *mService;

	GSXmlStreamWriter mRequestSoap;
	GSXmlStreamReader mResponseSoap;

	char *    mResponseBuffer; // so we can free it later
	GHTTPPost mPostData; // so we can free it later

	void *   mUserData;
	GSTask * mCoreTask;

	GHTTPRequest mRequestId;
	GHTTPResult  mRequestResult;
	gsi_bool     mCompleted;
} GSSoapTask;


///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Execute a soap call (Uses GameSpy core object)
GSSoapTask* gsiExecuteSoap(const char *theURL, const char *theService,
					 GSXmlStreamWriter theSoapData, GSSoapCallbackFunc theCallbackFunc,
					 void *theUserData);

// Alternate version with GSSoapCustomFunc parameter allows client access
// to soap object to set DIME attachments
GSSoapTask* gsiExecuteSoapCustom(const char* theURL, const char* theService, 
					 GSXmlStreamWriter theSoapData, GSSoapCallbackFunc theCallbackFunc, 
					 GSSoapCustomFunc theCustomFunc, void* theUserData);


void gsiCancelSoap(GSSoapTask * theTask);


///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#if defined(__cplusplus)
} // extern "C"
#endif

#endif // __SOAP_H__