OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
gpiOperation.h
1/*
2gpiOperation.h
3GameSpy Presence SDK
4Dan "Mr. Pants" Schoenblum
5
6Copyright 1999-2007 GameSpy Industries, Inc
7
8devsupport@gamespy.com
9
10***********************************************************************
11Please see the GameSpy Presence SDK documentation for more information
12**********************************************************************/
13
14#ifndef _GPIOPERATION_H_
15#define _GPIOPERATION_H_
16
17//INCLUDES
19#include "gpi.h"
20
21//DEFINES
23// Operation Types.
25#define GPI_CONNECT 0
26#define GPI_NEW_PROFILE 1
27#define GPI_GET_INFO 2
28#define GPI_PROFILE_SEARCH 3
29#define GPI_REGISTER_UNIQUENICK 4
30#define GPI_DELETE_PROFILE 5
31#define GPI_REGISTER_CDKEY 6
32// Operation States.
34#define GPI_START 0
35//#define GPI_CONNECTING 1
36#define GPI_LOGIN 2
37#define GPI_REQUESTING 3
38#define GPI_WAITING 4
39#define GPI_FINISHING 5
40
41//TYPES
43// Operation data.
45typedef struct GPIOperation_s
46{
47 int type;
48 void * data;
49 GPIBool blocking;
50 GPICallback callback;
51 int state;
52 int id;
53 GPResult result;
54 struct GPIOperation_s * pnext;
55} GPIOperation;
56
57// Connect operation data.
59typedef struct
60{
61 char serverChallenge[128];
62 char userChallenge[33];
63 char passwordHash[33];
64 char authtoken[GP_AUTHTOKEN_LEN];
65 char partnerchallenge[GP_PARTNERCHALLENGE_LEN];
66 char cdkey[GP_CDKEY_LEN];
67 GPIBool newuser;
69
70//FUNCTIONS
72GPResult
73gpiAddOperation(
74 GPConnection * connection,
75 int type,
76 void * data,
77 GPIOperation ** op,
78 GPEnum blocking,
79 GPCallback callback,
80 void * param
81);
82
83void
84gpiRemoveOperation(
85 GPConnection * connection,
86 GPIOperation * operation
87);
88
89void
90gpiDestroyOperation(
91 GPConnection * connection,
92 GPIOperation * operation
93);
94
95GPIBool
96gpiFindOperationByID(
97 const GPConnection * connection,
98 GPIOperation ** operation,
99 int id
100);
101
102GPIBool
103gpiOperationsAreBlocking(
104 const GPConnection * connection
105);
106
107GPResult
108gpiProcessOperation(
109 GPConnection * connection,
110 GPIOperation * operation,
111 const char * input
112);
113
114GPResult
115gpiFailedOpCallback(
116 GPConnection * connection,
117 const GPIOperation * operation
118);
119
120#endif
Definition gpiCallback.h:67
Definition gpiOperation.h:60
Definition gpiOperation.h:46