OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
peerCallbacks.h
1/*
2GameSpy Peer SDK
3Dan "Mr. Pants" Schoenblum
4dan@gamespy.com
5
6Copyright 1999-2007 GameSpy Industries, Inc
7
8devsupport@gamespy.com
9*/
10
11#ifndef _PEERCALLBACKS_H_
12#define _PEERCALLBACKS_H_
13
14/*************
15** INCLUDES **
16*************/
17#include "peerMain.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/**********
24** TYPES **
25**********/
26typedef enum piCallbackType
27{
28 PI_CONNECT_CALLBACK,
29 PI_JOIN_ROOM_CALLBACK,
30 PI_LIST_GROUP_ROOMS_CALLBACK,
31 PI_LISTING_GAMES_CALLBACK,
32 PI_NICK_ERROR_CALLBACK,
33 PI_ENUM_PLAYERS_CALLBACK,
34 PI_GET_PLAYER_INFO_CALLBACK,
35 PI_GET_PLAYER_PROFILE_ID_CALLBACK,
36 PI_GET_PLAYER_IP_CALLBACK,
37 PI_ROOM_MESSAGE_CALLBACK,
38 PI_ROOM_UTM_CALLBACK,
39 PI_ROOM_NAME_CHANGED_CALLBACK,
40 PI_ROOM_MODE_CHANGED_CALLBACK,
41 PI_PLAYER_MESSAGE_CALLBACK,
42 PI_PLAYER_UTM_CALLBACK,
43 PI_READY_CHANGED_CALLBACK,
44 PI_GAME_STARTED_CALLBACK,
45 PI_PLAYER_JOINED_CALLBACK,
46 PI_PLAYER_LEFT_CALLBACK,
47 PI_KICKED_CALLBACK,
48 PI_NEW_PLAYER_LIST_CALLBACK,
49 PI_PLAYER_CHANGED_NICK_CALLBACK,
50 PI_PLAYER_INFO_CALLBACK,
51 PI_DISCONNECTED_CALLBACK,
52 PI_PING_CALLBACK,
53 PI_CROSS_PING_CALLBACK,
54 PI_CHANGE_NICK_CALLBACK,
55 PI_GLOBAL_KEY_CHANGED_CALLBACK,
56 PI_ROOM_KEY_CHANGED_CALLBACK,
57 PI_GET_GLOBAL_KEYS_CALLBACK,
58 PI_GET_ROOM_KEYS_CALLBACK,
59 PI_PLAYER_FLAGS_CHANGED_CALLBACK,
60 PI_AUTHENTICATE_CDKEY_CALLBACK,
61 PI_AUTO_MATCH_STATUS_CALLBACK,
62 PI_NUM_CALLBACK_TYPES
63} piCallbackType;
64
65/**************
66** FUNCTIONS **
67**************/
68PEERBool piCallbacksInit(PEER peer);
69void piCallbacksCleanup(PEER peer);
70void piCallbacksThink(PEER peer, int blockingID);
71PEERBool piIsCallbackFinished(PEER peer, int opID);
72void piClearCallbacks(PEER peer, piCallbackType type);
73void piClearListingGameServerCallbacks(PEER peer, SBServer server);
74
75/**************
76** CALLBACKS **
77**************/
78
79void piAddConnectCallback
80(
81 PEER peer,
82 PEERBool success,
83 int failureReason,
84 peerConnectCallback callback,
85 void * param,
86 int opID
87);
88
89void piAddJoinRoomCallback
90(
91 PEER peer,
92 PEERBool success,
93 PEERJoinResult result,
94 RoomType roomType,
95 peerJoinRoomCallback callback,
96 void * param,
97 int opID
98);
99
100void piAddListGroupRoomsCallback
101(
102 PEER peer,
103 PEERBool success,
104 int groupID,
105 SBServer server,
106 const char * name,
107 int numWaiting,
108 int maxWaiting,
109 int numGames,
110 int numPlaying,
111 peerListGroupRoomsCallback callback,
112 void * param,
113 int opID
114);
115
116void piAddListingGamesCallback
117(
118 PEER peer,
119 PEERBool success,
120 SBServer server,
121 int msg
122);
123
124void piAddEnumPlayersCallback
125(
126 PEER peer,
127 PEERBool success,
128 RoomType roomType,
129 int index,
130 const char * nick,
131 int flags,
132 peerEnumPlayersCallback callback,
133 void * param,
134 int opID
135);
136
137void piAddGetPlayerInfoCallback
138(
139 PEER peer,
140 PEERBool success,
141 const char * nick,
142 unsigned int IP,
143 int profileID,
144 peerGetPlayerInfoCallback callback,
145 void * param,
146 int opID
147);
148
149void piAddGetPlayerProfileIDCallback
150(
151 PEER peer,
152 PEERBool success,
153 const char * nick,
154 int profileID,
155 peerGetPlayerProfileIDCallback callback,
156 void * param,
157 int opID
158);
159
160void piAddGetPlayerIPCallback
161(
162 PEER peer,
163 PEERBool success,
164 const char * nick,
165 unsigned int IP,
166 peerGetPlayerIPCallback callback,
167 void * param,
168 int opID
169);
170
171void piAddRoomMessageCallback
172(
173 PEER peer,
174 RoomType roomType,
175 const char * nick,
176 const char * message,
177 MessageType messageType
178);
179
180void piAddRoomUTMCallback
181(
182 PEER peer,
183 RoomType roomType,
184 const char * nick,
185 const char * command,
186 const char * parameters,
187 PEERBool authenticated
188);
189
190void piAddRoomNameChangedCallback
191(
192 PEER peer,
193 RoomType roomType
194);
195
196void piAddRoomModeChangedCallback
197(
198 PEER peer,
199 RoomType roomType,
200 CHATChannelMode * mode
201);
202
203void piAddPlayerMessageCallback
204(
205 PEER peer,
206 const char * nick,
207 const char * message,
208 MessageType messageType
209);
210
211void piAddPlayerUTMCallback
212(
213 PEER peer,
214 const char * nick,
215 const char * command,
216 const char * parameters,
217 PEERBool authenticated
218);
219
220void piAddReadyChangedCallback
221(
222 PEER peer,
223 const char * nick,
224 PEERBool ready
225);
226
227void piAddGameStartedCallback
228(
229 PEER peer,
230 SBServer server,
231 const char * message
232);
233
234void piAddPlayerJoinedCallback
235(
236 PEER peer,
237 RoomType roomType,
238 const char * nick
239);
240
241void piAddPlayerLeftCallback
242(
243 PEER peer,
244 RoomType roomType,
245 const char * nick,
246 const char * reason
247);
248
249void piAddKickedCallback
250(
251 PEER peer,
252 RoomType roomType,
253 const char * nick,
254 const char * reason
255);
256
257void piAddNewPlayerListCallback
258(
259 PEER peer,
260 RoomType roomType
261);
262
263void piAddPlayerChangedNickCallback
264(
265 PEER peer,
266 RoomType roomType,
267 const char * oldNick,
268 const char * newNick
269);
270
271void piAddPlayerInfoCallback
272(
273 PEER peer,
274 RoomType roomType,
275 const char * nick,
276 unsigned int IP,
277 int profileID
278);
279
280void piAddDisconnectedCallback
281(
282 PEER peer,
283 const char * reason
284);
285
286void piAddPingCallback
287(
288 PEER peer,
289 const char * nick,
290 int ping
291);
292
293void piAddCrossPingCallback
294(
295 PEER peer,
296 const char * nick1,
297 const char * nick2,
298 int crossPing
299);
300
301void piAddNickErrorCallback
302(
303 PEER peer,
304 int type,
305 const char * nick,
306 int numSuggestedNicks,
307 const char ** suggestedNicks,
308 void * param,
309 int opID
310);
311
312void piAddChangeNickCallback
313(
314 PEER peer,
315 PEERBool success,
316 const char * oldNick,
317 const char * newNick,
318 peerChangeNickCallback callback,
319 void * param,
320 int opID
321);
322
323void piAddGlobalKeyChangedCallback
324(
325 PEER peer,
326 const char * nick,
327 const char * key,
328 const char * value
329);
330
331void piAddRoomKeyChangedCallback
332(
333 PEER peer,
334 RoomType roomType,
335 const char * nick,
336 const char * key,
337 const char * value
338);
339
340void piAddGetGlobalKeysCallback
341(
342 PEER peer,
343 PEERBool success,
344 const char * nick,
345 int num,
346 const char ** keys,
347 const char ** values,
348 peerGetGlobalKeysCallback callback,
349 void * param,
350 int opID
351);
352
353void piAddGetRoomKeysCallback
354(
355 PEER peer,
356 PEERBool success,
357 RoomType roomType,
358 const char * nick,
359 int num,
360 const char ** keys,
361 const char ** values,
362 peerGetRoomKeysCallback callback,
363 void * param,
364 int opID
365);
366
367void piAddPlayerFlagsChangedCallback
368(
369 PEER peer,
370 RoomType roomType,
371 const char * nick,
372 int oldFlags,
373 int newFlags
374);
375
376void piAddAuthenticateCDKeyCallback
377(
378 PEER peer,
379 int result,
380 const char * message,
381 peerAuthenticateCDKeyCallback callback,
382 void * param,
383 int opID
384);
385
386void piAddAutoMatchStatusCallback
387(
388 PEER peer
389);
390
391int piCallAutoMatchRateCallback
392(
393 PEER peer,
394 SBServer server
395);
396
397#ifdef __cplusplus
398}
399#endif
400
401#endif
Definition chat.h:81