1 #ifndef __WINE_LOBBY_SP_H
2 #define __WINE_LOBBY_SP_H
6 /* GUID for IDPLobbySP {5A4E5A20-2CED-11d0-A889-00A0C905433C} */
7 DEFINE_GUID(IID_IDPLobbySP
, 0x5a4e5a20, 0x2ced, 0x11d0, 0xa8, 0x89, 0x0, 0xa0, 0xc9, 0x5, 0x43, 0x3c);
8 typedef struct IDPLobbySP IDPLobbySP
, *LPDPLOBBYSP
;
10 /* For SP. Top 16 bits is dplay, bottom 16 is SP */
11 #define DPLSP_MAJORVERSION 0x00050000
13 typedef struct SPDATA_ADDGROUPTOGROUP
19 } SPDATA_ADDGROUPTOGROUP
, *LPSPDATA_ADDGROUPTOGROUP
;
21 typedef struct SPDATA_ADDPLAYERTOGROUP
27 } SPDATA_ADDPLAYERTOGROUP
, *LPSPDATA_ADDPLAYERTOGROUP
;
29 typedef struct SPDATA_ADDREMOTEGROUPTOGROUP
38 } SPDATA_ADDREMOTEGROUPTOGROUP
, *LPSPDATA_ADDREMOTEGROUPTOGROUP
;
40 typedef struct SPDATA_ADDREMOTEPLAYERTOGROUP
48 } SPDATA_ADDREMOTEPLAYERTOGROUP
, *LPSPDATA_ADDREMOTEPLAYERTOGROUP
;
50 typedef struct SPDATA_BUILDPARENTALHEIRARCHY
57 } SPDATA_BUILDPARENTALHEIRARCHY
, *LPSPDATA_BUILDPARENTALHEIRARCHY
;
59 typedef struct SPDATA_CLOSE
63 } SPDATA_CLOSE
, *LPSPDATA_CLOSE
;
65 typedef struct SPDATA_CREATEGROUP
74 } SPDATA_CREATEGROUP
, *LPSPDATA_CREATEGROUP
;
76 typedef struct SPDATA_CREATEGROUPINGROUP
86 } SPDATA_CREATEGROUPINGROUP
, *LPSPDATA_CREATEGROUPINGROUP
;
88 typedef struct SPDATA_CREATEREMOTEGROUP
97 } SPDATA_CREATEREMOTEGROUP
, *LPSPDATA_CREATEREMOTEGROUP
;
99 typedef struct SPDATA_CREATEREMOTEGROUPINGROUP
107 } SPDATA_CREATEREMOTEGROUPINGROUP
, *LPSPDATA_CREATEREMOTEGROUPINGROUP
;
109 typedef struct SPDATA_CREATEPLAYER
118 } SPDATA_CREATEPLAYER
, *LPSPDATA_CREATEPLAYER
;
120 typedef struct SPDATA_DELETEGROUPFROMGROUP
126 } SPDATA_DELETEGROUPFROMGROUP
, *LPSPDATA_DELETEGROUPFROMGROUP
;
128 typedef struct SPDATA_DELETEPLAYERFROMGROUP
134 } SPDATA_DELETEPLAYERFROMGROUP
, *LPSPDATA_DELETEPLAYERFROMGROUP
;
136 typedef struct SPDATA_DELETEREMOTEGROUPFROMGROUP
142 } SPDATA_DELETEREMOTEGROUPFROMGROUP
, *LPSPDATA_DELETEREMOTEGROUPFROMGROUP
;
144 typedef struct SPDATA_DELETEREMOTEPLAYERFROMGROUP
150 } SPDATA_DELETEREMOTEPLAYERFROMGROUP
, *LPSPDATA_DELETEREMOTEPLAYERFROMGROUP
;
152 typedef struct SPDATA_DESTROYGROUP
157 } SPDATA_DESTROYGROUP
, *LPSPDATA_DESTROYGROUP
;
159 typedef struct SPDATA_DESTROYREMOTEGROUP
164 } SPDATA_DESTROYREMOTEGROUP
, *LPSPDATA_DESTROYREMOTEGROUP
;
166 typedef struct SPDATA_DESTROYPLAYER
171 } SPDATA_DESTROYPLAYER
, *LPSPDATA_DESTROYPLAYER
;
173 typedef struct SPDATA_ENUMSESSIONS
177 LPDPSESSIONDESC2 lpsd
;
180 } SPDATA_ENUMSESSIONS
, *LPSPDATA_ENUMSESSIONS
;
182 typedef struct SPDATA_ENUMSESSIONSRESPONSE
185 LPDPSESSIONDESC2 lpsd
;
186 } SPDATA_ENUMSESSIONSRESPONSE
, *LPSPDATA_ENUMSESSIONSRESPONSE
;
188 typedef struct SPDATA_GETCAPS
194 } SPDATA_GETCAPS
, *LPSPDATA_GETCAPS
;
196 typedef struct SPDATA_GETGROUPCONNECTIONSETTINGS
202 LPDWORD lpdwBufferSize
;
204 } SPDATA_GETGROUPCONNECTIONSETTINGS
, *LPSPDATA_GETGROUPCONNECTIONSETTINGS
;
206 typedef struct SPDATA_GETGROUPDATA
211 LPDWORD lpdwDataSize
;
213 } SPDATA_GETGROUPDATA
, *LPSPDATA_GETGROUPDATA
;
215 typedef struct SPDATA_GETPLAYERCAPS
222 } SPDATA_GETPLAYERCAPS
, *LPSPDATA_GETPLAYERCAPS
;
224 typedef struct SPDATA_GETPLAYERDATA
229 LPDWORD lpdwDataSize
;
231 } SPDATA_GETPLAYERDATA
, *LPSPDATA_GETPLAYERDATA
;
233 typedef struct SPDATA_HANDLEMESSAGE
240 } SPDATA_HANDLEMESSAGE
, *LPSPDATA_HANDLEMESSAGE
;
242 typedef struct SPDATA_OPEN
246 LPDPSESSIONDESC2 lpsd
;
248 LPCDPCREDENTIALS lpCredentials
;
249 } SPDATA_OPEN
, *LPSPDATA_OPEN
;
251 typedef struct SPDATA_SEND
260 } SPDATA_SEND
, *LPSPDATA_SEND
;
262 typedef struct SPDATA_CHATMESSAGE
270 } SPDATA_CHATMESSAGE
, *LPSPDATA_CHATMESSAGE
;
272 typedef struct SPDATA_SETGROUPCONNECTIONSETTINGS
278 LPDPLCONNECTION lpConn
;
279 } SPDATA_SETGROUPCONNECTIONSETTINGS
, *LPSPDATA_SETGROUPCONNECTIONSETTINGS
;
281 typedef struct SPDATA_SETGROUPDATA
289 } SPDATA_SETGROUPDATA
, *LPSPDATA_SETGROUPDATA
;
291 typedef struct SPDATA_SETGROUPNAME
298 } SPDATA_SETGROUPNAME
, *LPSPDATA_SETGROUPNAME
;
300 typedef struct SPDATA_SETREMOTEGROUPNAME
307 } SPDATA_SETREMOTEGROUPNAME
, *LPSPDATA_SETREMOTEGROUPNAME
;
309 typedef struct SPDATA_SETPLAYERDATA
317 } SPDATA_SETPLAYERDATA
, *LPSPDATA_SETPLAYERDATA
;
319 typedef struct SPDATA_SETPLAYERNAME
326 } SPDATA_SETPLAYERNAME
, *LPSPDATA_SETPLAYERNAME
;
328 typedef struct SPDATA_SETREMOTEPLAYERNAME
335 } SPDATA_SETREMOTEPLAYERNAME
, *LPSPDATA_SETREMOTEPLAYERNAME
;
337 typedef struct SPDATA_SETSESSIONDESC
340 LPDPSESSIONDESC2 lpsd
;
341 } SPDATA_SETSESSIONDESC
, *LPSPDATA_SETSESSIONDESC
;
343 typedef struct SPDATA_SHUTDOWN
347 } SPDATA_SHUTDOWN
, *LPSPDATA_SHUTDOWN
;
349 typedef struct SPDATA_STARTSESSION
355 } SPDATA_STARTSESSION
, *LPSPDATA_STARTSESSION
;
357 typedef struct SPDATA_STARTSESSIONCOMMAND
362 LPDPLCONNECTION lpConn
;
363 } SPDATA_STARTSESSIONCOMMAND
, *LPSPDATA_STARTSESSIONCOMMAND
;
365 /* Prototypes for callbacks returned by DPLSPInit */
366 typedef HRESULT (WINAPI
*LPSP_ADDGROUPTOGROUP
)(LPSPDATA_ADDGROUPTOGROUP
);
367 typedef HRESULT (WINAPI
*LPSP_ADDPLAYERTOGROUP
)(LPSPDATA_ADDPLAYERTOGROUP
);
368 typedef HRESULT (WINAPI
*LPSP_BUILDPARENTALHEIRARCHY
)(LPSPDATA_BUILDPARENTALHEIRARCHY
);
369 typedef HRESULT (WINAPI
*LPSP_CLOSE
)(LPSPDATA_CLOSE
);
370 typedef HRESULT (WINAPI
*LPSP_CREATEGROUP
)(LPSPDATA_CREATEGROUP
);
371 typedef HRESULT (WINAPI
*LPSP_CREATEGROUPINGROUP
)(LPSPDATA_CREATEGROUPINGROUP
);
372 typedef HRESULT (WINAPI
*LPSP_CREATEPLAYER
)(LPSPDATA_CREATEPLAYER
);
373 typedef HRESULT (WINAPI
*LPSP_DELETEGROUPFROMGROUP
)(LPSPDATA_DELETEGROUPFROMGROUP
);
374 typedef HRESULT (WINAPI
*LPSP_DELETEPLAYERFROMGROUP
)(LPSPDATA_DELETEPLAYERFROMGROUP
);
375 typedef HRESULT (WINAPI
*LPSP_DESTROYGROUP
)(LPSPDATA_DESTROYGROUP
);
376 typedef HRESULT (WINAPI
*LPSP_DESTROYPLAYER
)(LPSPDATA_DESTROYPLAYER
);
377 typedef HRESULT (WINAPI
*LPSP_ENUMSESSIONS
)(LPSPDATA_ENUMSESSIONS
);
378 typedef HRESULT (WINAPI
*LPSP_GETCAPS
)(LPSPDATA_GETCAPS
);
379 typedef HRESULT (WINAPI
*LPSP_GETGROUPCONNECTIONSETTINGS
)(LPSPDATA_GETGROUPCONNECTIONSETTINGS
);
380 typedef HRESULT (WINAPI
*LPSP_GETGROUPDATA
)(LPSPDATA_GETGROUPDATA
);
381 typedef HRESULT (WINAPI
*LPSP_GETPLAYERCAPS
)(LPSPDATA_GETPLAYERCAPS
);
382 typedef HRESULT (WINAPI
*LPSP_GETPLAYERDATA
)(LPSPDATA_GETPLAYERDATA
);
383 typedef HRESULT (WINAPI
*LPSP_HANDLEMESSAGE
)(LPSPDATA_HANDLEMESSAGE
);
384 typedef HRESULT (WINAPI
*LPSP_OPEN
)(LPSPDATA_OPEN
);
385 typedef HRESULT (WINAPI
*LPSP_SEND
)(LPSPDATA_SEND
);
386 typedef HRESULT (WINAPI
*LPSP_SENDCHATMESSAGE
)(LPSPDATA_CHATMESSAGE
);
387 typedef HRESULT (WINAPI
*LPSP_SETGROUPCONNECTIONSETTINGS
)(LPSPDATA_SETGROUPCONNECTIONSETTINGS
);
388 typedef HRESULT (WINAPI
*LPSP_SETGROUPDATA
)(LPSPDATA_SETGROUPDATA
);
389 typedef HRESULT (WINAPI
*LPSP_SETGROUPNAME
)(LPSPDATA_SETGROUPNAME
);
390 typedef HRESULT (WINAPI
*LPSP_SETPLAYERDATA
)(LPSPDATA_SETPLAYERDATA
);
391 typedef HRESULT (WINAPI
*LPSP_SETPLAYERNAME
)(LPSPDATA_SETPLAYERNAME
);
392 typedef HRESULT (WINAPI
*LPSP_SHUTDOWN
)(LPSPDATA_SHUTDOWN
);
393 typedef HRESULT (WINAPI
*LPSP_STARTSESSION
)(LPSPDATA_STARTSESSION
);
395 /* Callback table for dplay to call into service provider */
396 typedef struct SP_CALLBACKS
400 LPSP_ADDGROUPTOGROUP AddGroupToGroup
;
401 LPSP_ADDPLAYERTOGROUP AddPlayerToGroup
;
402 LPSP_BUILDPARENTALHEIRARCHY BuildParentalHeirarchy
;
404 LPSP_CREATEGROUP CreateGroup
;
405 LPSP_CREATEGROUPINGROUP CreateGroupInGroup
;
406 LPSP_CREATEPLAYER CreatePlayer
;
407 LPSP_DELETEGROUPFROMGROUP DeleteGroupFromGroup
;
408 LPSP_DELETEPLAYERFROMGROUP DeletePlayerFromGroup
;
409 LPSP_DESTROYGROUP DestroyGroup
;
410 LPSP_DESTROYPLAYER DestroyPlayer
;
411 LPSP_ENUMSESSIONS EnumSessions
;
412 LPSP_GETCAPS GetCaps
;
413 LPSP_GETGROUPCONNECTIONSETTINGS GetGroupConnectionSettings
;
414 LPSP_GETGROUPDATA GetGroupData
;
415 LPSP_GETPLAYERCAPS GetPlayerCaps
;
416 LPSP_GETPLAYERDATA GetPlayerData
;
419 LPSP_SENDCHATMESSAGE SendChatMessage
;
420 LPSP_SETGROUPCONNECTIONSETTINGS SetGroupConnectionSettings
;
421 LPSP_SETGROUPDATA SetGroupData
;
422 LPSP_SETGROUPNAME SetGroupName
;
423 LPSP_SETPLAYERDATA SetPlayerData
;
424 LPSP_SETPLAYERNAME SetPlayerName
;
425 LPSP_SHUTDOWN Shutdown
;
426 LPSP_STARTSESSION StartSession
;
427 } SP_CALLBACKS
, *LPSP_CALLBACKS
;
429 typedef struct SPDATA_INIT
434 LPDPADDRESS lpAddress
;
435 } SPDATA_INIT
, *LPSPDATA_INIT
;
437 typedef HRESULT (WINAPI
*LPSP_INIT
)(LPSPDATA_INIT
);
438 HRESULT WINAPI
DPLSPInit(LPSPDATA_INIT
);
440 /* Define the COM interface */
441 #define ICOM_INTERFACE IDPLobbySP
442 #define IDPLobbySP_METHODS \
443 ICOM_METHOD1(HRESULT, AddGroupToGroup, LPSPDATA_ADDREMOTEGROUPTOGROUP, argtg ) \
444 ICOM_METHOD1(HRESULT, AddPlayerToGroup, LPSPDATA_ADDREMOTEPLAYERTOGROUP, arptg ) \
445 ICOM_METHOD1(HRESULT, CreateGroup, LPSPDATA_CREATEREMOTEGROUP, crg ) \
446 ICOM_METHOD1(HRESULT, CreateGroupInGroup, LPSPDATA_CREATEREMOTEGROUPINGROUP, crgig ) \
447 ICOM_METHOD1(HRESULT, DeleteGroupFromGroup, LPSPDATA_DELETEREMOTEGROUPFROMGROUP, drgfg ) \
448 ICOM_METHOD1(HRESULT, DeletePlayerFromGroup, LPSPDATA_DELETEREMOTEPLAYERFROMGROUP, drpfg ) \
449 ICOM_METHOD1(HRESULT, DestroyGroup, LPSPDATA_DESTROYREMOTEGROUP, drg ) \
450 ICOM_METHOD1(HRESULT, EnumSessionsResponse, LPSPDATA_ENUMSESSIONSRESPONSE, er ) \
451 ICOM_METHOD1(HRESULT, GetSPDataPointer, LPVOID*, lplpData ) \
452 ICOM_METHOD1(HRESULT, HandleMessage, LPSPDATA_HANDLEMESSAGE, hm ) \
453 ICOM_METHOD1(HRESULT, SendChatMessage, LPSPDATA_CHATMESSAGE, cm ) \
454 ICOM_METHOD1(HRESULT, SetGroupName, LPSPDATA_SETREMOTEGROUPNAME, srgn ) \
455 ICOM_METHOD1(HRESULT, SetPlayerName, LPSPDATA_SETREMOTEPLAYERNAME, srpn ) \
456 ICOM_METHOD1(HRESULT, SetSessionDesc, LPSPDATA_SETSESSIONDESC, ssd ) \
457 ICOM_METHOD1(HRESULT, SetSPDataPointer, LPVOID, lpData ) \
458 ICOM_METHOD1(HRESULT, StartSession, LPSPDATA_STARTSESSIONCOMMAND, ssc )
460 #define IDPLobbySP_IMETHODS \
464 ICOM_DEFINE(IDPLobbySP
,IUnknown
)
465 #undef ICOM_INTERFACE
467 /*** IUnknown methods ***/
468 #define IDPLobbySP_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
469 #define IDPLobbySP_AddRef(p) ICOM_CALL (AddRef,p)
470 #define IDPLobbySP_Release(p) ICOM_CALL (Release,p)
472 /*** IDPLobbySP methods ***/
473 #define IDPLobbySP_AddGroupToGroup(p,a) ICOM_CALL1(AddGroupToGroup,p,a)
474 #define IDPLobbySP_AddPlayerToGroup(p,a) ICOM_CALL1(AddPlayerToGroup,p,a)
475 #define IDPLobbySP_CreateGroup(p,a) ICOM_CALL1(CreateGroup,p,a)
476 #define IDPLobbySP_CreateGroupInGroup(p,a) ICOM_CALL1(CreateGroupInGroup,p,a)
477 #define IDPLobbySP_DeleteGroupFromGroup(p,a) ICOM_CALL1(DeleteGroupFromGroup,p,a)
478 #define IDPLobbySP_DeletePlayerFromGroup(p,a) ICOM_CALL1(DeletePlayerFromGroup,p,a)
479 #define IDPLobbySP_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
480 #define IDPLobbySP_EnumSessionsResponse(p,a) ICOM_CALL1(EnumSessionsResponse,p,a)
481 #define IDPLobbySP_GetSPDataPointer(p,a) ICOM_CALL1(GetSPDataPointer,p,a)
482 #define IDPLobbySP_HandleMessage(p,a) ICOM_CALL1(HandleMessage,p,a)
483 #define IDPLobbySP_SetGroupName(p,a) ICOM_CALL1(SetGroupName,p,a)
484 #define IDPLobbySP_SetPlayerName(p,a) ICOM_CALL1(SetPlayerName,p,a)
485 #define IDPLobbySP_SetSessionDesc(p,a) ICOM_CALL1(SetSessionDesc,p,a)
486 #define IDPLobbySP_StartSession(p,a) ICOM_CALL1(StartSession,p,a)
487 #define IDPLobbySP_SetSPDataPointer(p,a) ICOM_CALL1(SetSPDataPointer,p,a)
489 /* This variable is exported from the DLL at ordinal 6 to be accessed by the
490 * SP directly. This is the same variable that the DP SP will use.
492 extern DWORD gdwDPlaySPRefCount
;