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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifndef __SAKEREQUEST_H__
#define __SAKEREQUEST_H__
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#include "sakeMain.h"
#include "sakeRequestInternal.h"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#if defined(__cplusplus)
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#define GSI_SAKE_SERVICE_NAMESPACE_COUNT 1
#define GSI_SAKE_SERVICE_NAMESPACE "ns1"
#define GSI_SAKE_SERVICE_NAMESPACE_URL "http://gamespy.net/sake"
extern const char * GSI_SAKE_SERVICE_NAMESPACES[GSI_SAKE_SERVICE_NAMESPACE_COUNT];
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
typedef enum
{
SAKEIRequestType_CREATE_RECORD,
SAKEIRequestType_UPDATE_RECORD,
SAKEIRequestType_DELETE_RECORD,
SAKEIRequestType_SEARCH_FOR_RECORDS,
SAKEIRequestType_GET_MY_RECORDS,
SAKEIRequestType_GET_SPECIFIC_RECORDS,
SAKEIRequestType_GET_RANDOM_RECORD,
SAKEIRequestType_RATE_RECORD,
SAKEIRequestType_GET_RECORD_LIMIT,
SAKEIRequestType_GET_RECORD_COUNT
} SAKEIRequestType;
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
typedef struct SAKERequestInternal
{
SAKE mSake;
SAKEIRequestType mType;
void *mInput;
void *mOutput;
SAKERequestCallback mCallback;
void *mUserData;
GSXmlStreamWriter mSoapRequest;
GSXmlStreamWriter mSoapResponse;
SAKEIRequestInfo *mInfo;
} SAKERequestInternal;
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
SAKERequest SAKE_CALL sakeiInitRequest(SAKE sake, SAKEIRequestType type, void *input, SAKERequestCallback callback, void *userData);
void SAKE_CALL sakeiFreeRequest(SAKERequest request);
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
SAKEStartRequestResult SAKE_CALL sakeiStartCreateRecordRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartUpdateRecordRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartDeleteRecordRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartSearchForRecordsRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartGetMyRecordsRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartGetSpecificRecordsRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartGetRandomRecordRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartRateRecordRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartGetRecordLimitRequest(SAKERequest request);
SAKEStartRequestResult SAKE_CALL sakeiStartGetRecordCountRequest(SAKERequest request);
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#if defined(__cplusplus)
} // extern "C"
#endif
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#endif // __SAKEREQUEST_H__
|