OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
sciWebServices.h
1
3#ifndef __SCWEBSERVICES_H__
4#define __SCWEBSERVICES_H__
5
6
9#include "../common/gsSoap.h"
10#include "../common/gsXML.h"
11#include "../ghttp/ghttpPost.h"
12
13#include "sci.h"
14#include "sciReport.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif // __cplusplus
19
20
23// Web service result codes (must match definitions in StatsReceiver)
24typedef enum
25{
26 SCWsResult_NO_ERROR = 0,
27 SCWsResult_REPORT_INVALID,
28 SCWsResult_SINGLE_ATTACHMENT_EXPECTED
29} SCWsResult;
30
31
34typedef struct
35{
36 SCInterfacePtr mInterface;
37 SCCreateSessionCallback mCreateSessionCallback;
38 SCSetReportIntentionCallback mSetReportIntentionCallback;
39 SCSubmitReportCallback mSubmitReportDataCallback;
40 gsi_bool mSetReportIntentionPending;
41 gsi_bool mCreateSessionPending;
42 gsi_bool mSubmitReportPending;
43 void * mSetReportIntentionUserData;
44 void * mCreateSessionUserData;
45 void * mSubmitReportUserData;
46 gsi_u8* mSubmitReportData;
47 gsi_u32 mSubmitReportLength;
48 gsi_bool mInit;
50
51
54SCResult sciWsInit (SCWebServices* theWebServices,
55 SCInterfacePtr theInterface);
56void sciWsDestroy(SCWebServices* theWebServices);
57void sciWsThink (SCWebServices* theWebServices);
58
59
62SCResult sciWsCreateSession (SCWebServices * theWebServices,
63 gsi_u32 theGameId,
64 const GSLoginCertificate * theCertificate,
65 const GSLoginPrivateData * thePrivateData,
66 SCCreateSessionCallback theCallback,
67 gsi_time theTimeoutMs,
68 void * theUserData);
69
70SCResult sciWsCreateMatchlessSession(SCWebServices * theWebServices,
71 gsi_u32 theGameId,
72 const GSLoginCertificate * theCertificate,
73 const GSLoginPrivateData * thePrivateData,
74 SCCreateSessionCallback theCallback,
75 gsi_time theTimeoutMs,
76 void * theUserData);
77
78void sciWsCreateSessionCallback(GHTTPResult theHttpResult,
79 GSXmlStreamWriter theRequestData,
80 GSXmlStreamReader theResponseData,
81 void* theUserData);
82
83SCResult sciWsSetReportIntention (SCWebServices* theWebServices,
84 gsi_u32 theGameId,
85 const char * theSessionId,
86 const char * theConnectionId,
87 gsi_bool isAuthoritative,
88 const GSLoginCertificate * theCertificate,
89 const GSLoginPrivateData * thePrivateData,
90 SCSetReportIntentionCallback theCallback,
91 gsi_time theTimeoutMs,
92 void * theUserData);
93
94void sciWsSetReportIntentionCallback(GHTTPResult theHttpResult,
95 GSXmlStreamWriter theRequestData,
96 GSXmlStreamReader theResponseData,
97 void* theUserData);
98
99SCResult sciWsSubmitReport (SCWebServices* theWebServices,
100 gsi_u32 theGameId,
101 const char * theSessionId,
102 const char * theConnectionId,
103 const SCIReport* theReport,
104 gsi_bool isAuthoritative,
105 const GSLoginCertificate * theCertificate,
106 const GSLoginPrivateData * thePrivateData,
107 SCSubmitReportCallback theCallback,
108 gsi_time theTimeoutMs,
109 void * theUserData);
110
111void sciWsSubmitReportCallback(GHTTPResult theHttpResult,
112 GSXmlStreamWriter theRequestData,
113 GSXmlStreamReader theResponseData,
114 void* theUserData);
115
116
119#ifdef __cplusplus
120} // extern "C"
121#endif // __cplusplus
122
123
126#endif // __SCWEBSERVICES_H__
Definition AuthService.h:87
Definition sciReport.h:105
Definition sciWebServices.h:35