Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
7.0 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dplobbyi.h
  6. * Content: DirectPlayLobby internal include file
  7. *
  8. * History:
  9. * Date By Reason
  10. * =========== ======= ==========
  11. * 2/25/97 myronth Created it
  12. * 2/26/97 myronth #ifdef'd out DPASYNCDATA stuff (removed dependency)
  13. * 3/12/97 myronth Added Connection & Session Management stuff plus
  14. * a few forward declarations for internal objects
  15. * 3/17/97 myronth Create/DestroyGroup/Player
  16. * 3/20/97 myronth AddPlayerToGroup, DeletePlayerFromGroup
  17. * 3/21/97 myronth SetGroup/PlayerName, Get/SetGroup/PlayerData
  18. * 3/25/97 kipo EnumConnections takes a const *GUID now
  19. * 3/31/97 myronth Send
  20. * 4/10/97 myronth GetCaps, GetPlayerCaps
  21. * 5/8/97 myronth Subgroup functions, GroupConnSettings, StartSession,
  22. * Purged dead code
  23. * 5/13/97 myronth Pass credentials to PRV_Open, pass them on to the LP
  24. * 5/17/97 myronth SendChatMessage
  25. * 8/19/97 myronth More prototypes for sending standard lobby messages
  26. * 8/19/97 myronth Removed prototypes for dead functions
  27. * 9/29/97 myronth Added PRV_ConvertDPLCONNECTIONToAnsiInPlace prototype
  28. * 10/29/97 myronth Added group owner ID to create group methods, exposed
  29. * map table functions, exposed group owner methods
  30. * 11/5/97 myronth Expose lobby ID's as DPID's in lobby sessions
  31. * 11/13/97 myronth Added functions for asynchronous Connect (#12541)
  32. * 11/20/97 myronth Made EnumConnections & DirectPlayEnumerate
  33. * drop the lock before calling the callback (#15208)
  34. * 1/20/98 myronth Moved PRV_SendStandardSystemMessage into this file
  35. ***************************************************************************/
  36. #ifndef __DPLOBBYI_INCLUDED__
  37. #define __DPLOBBYI_INCLUDED__
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif /* __cplusplus */
  41. //--------------------------------------------------------------------------
  42. //
  43. // Definitions
  44. //
  45. //--------------------------------------------------------------------------
  46. #ifndef DPLAPI
  47. #define DPLAPI WINAPI
  48. #endif
  49. typedef struct DPLOBBYI_DPLOBJECT * LPDPLOBBYI_DPLOBJECT;
  50. typedef struct LSPNODE * LPLSPNODE;
  51. #define DPLOBBYPR_GAMEID 0
  52. // Forward declarations needed because of the include file order in DPlay
  53. typedef struct _DPLAYI_DPLAY * LPDPLAYI_DPLAY;
  54. //--------------------------------------------------------------------------
  55. //
  56. // Globals
  57. //
  58. //--------------------------------------------------------------------------
  59. extern LPLSPNODE glpLSPHead; // In dplenum.c
  60. //--------------------------------------------------------------------------
  61. //
  62. // Prototypes
  63. //
  64. //--------------------------------------------------------------------------
  65. // create.c
  66. extern HRESULT PRV_AllocateLobbyObject(LPDPLAYI_DPLAY, LPDPLOBBYI_DPLOBJECT *);
  67. // dplenum.c
  68. extern void PRV_FreeLSPList(LPLSPNODE);
  69. extern HRESULT PRV_EnumConnections(LPCGUID, LPDPENUMCONNECTIONSCALLBACK,
  70. LPVOID, DWORD, BOOL);
  71. // dplobby.c
  72. extern HRESULT DPLAPI PRV_GetCaps(LPDPLOBBYI_DPLOBJECT, DWORD, LPDPCAPS);
  73. extern BOOL PRV_GetConnectPointers(LPDIRECTPLAYLOBBY, LPDIRECTPLAY2 *, LPDPLCONNECTION *);
  74. extern void PRV_SaveConnectPointers(LPDIRECTPLAYLOBBY, LPDIRECTPLAY2, LPDPLCONNECTION);
  75. extern BOOL PRV_IsAsyncConnectOn(LPDIRECTPLAYLOBBY);
  76. void PRV_TurnAsyncConnectOn(LPDIRECTPLAYLOBBY);
  77. void PRV_TurnAsyncConnectOff(LPDIRECTPLAYLOBBY);
  78. // dplobbya.c
  79. extern HRESULT DPLAPI DPL_A_GetGroupConnectionSettings(LPDIRECTPLAY,
  80. DWORD, DPID, LPVOID, LPDWORD);
  81. extern HRESULT DPLAPI DPL_A_SetGroupConnectionSettings(LPDIRECTPLAY,
  82. DWORD, DPID, LPDPLCONNECTION);
  83. // dplpack.c
  84. extern void PRV_FixupDPLCONNECTIONPointers(LPDPLCONNECTION);
  85. extern HRESULT PRV_ConvertDPLCONNECTIONToAnsiInPlace(LPDPLCONNECTION, LPDWORD, DWORD);
  86. // dplshare.c
  87. extern HRESULT PRV_SendStandardSystemMessage(LPDIRECTPLAYLOBBY, DWORD, DWORD);
  88. // dplunk.c
  89. extern HRESULT PRV_DestroyDPLobby(LPDPLOBBYI_DPLOBJECT);
  90. extern void PRV_FreeAllLobbyObjects(LPDPLOBBYI_DPLOBJECT);
  91. // group.c
  92. extern HRESULT DPLAPI PRV_AddGroupToGroup(LPDPLOBBYI_DPLOBJECT, DPID, DPID);
  93. extern HRESULT DPLAPI PRV_AddPlayerToGroup(LPDPLOBBYI_DPLOBJECT, DPID, DPID);
  94. extern HRESULT DPLAPI PRV_CreateGroup(LPDPLOBBYI_DPLOBJECT,
  95. LPDPID, LPDPNAME, LPVOID, DWORD, DWORD, DPID);
  96. extern HRESULT DPLAPI PRV_CreateGroupInGroup(LPDPLOBBYI_DPLOBJECT, DPID,
  97. LPDPID, LPDPNAME, LPVOID, DWORD, DWORD, DPID);
  98. extern HRESULT DPLAPI PRV_DeleteGroupFromGroup(LPDPLOBBYI_DPLOBJECT, DPID, DPID);
  99. extern HRESULT DPLAPI PRV_DeletePlayerFromGroup(LPDPLOBBYI_DPLOBJECT, DPID, DPID);
  100. extern HRESULT DPLAPI PRV_DestroyGroup(LPDPLOBBYI_DPLOBJECT, DPID);
  101. extern HRESULT DPLAPI DPL_GetGroupConnectionSettings(LPDIRECTPLAY, DWORD,
  102. DPID, LPVOID, LPDWORD);
  103. extern HRESULT DPLAPI PRV_GetGroupData(LPDPLOBBYI_DPLOBJECT, DPID, LPVOID, LPDWORD);
  104. extern HRESULT DPLAPI DPL_SetGroupConnectionSettings(LPDIRECTPLAY, DWORD,
  105. DPID, LPDPLCONNECTION);
  106. extern HRESULT DPLAPI DPL_GetGroupOwner(LPDIRECTPLAY, DPID, LPDPID);
  107. extern HRESULT DPLAPI PRV_SetGroupData(LPDPLOBBYI_DPLOBJECT, DPID, LPVOID, DWORD, DWORD);
  108. extern HRESULT DPLAPI PRV_SetGroupName(LPDPLOBBYI_DPLOBJECT, DPID, LPDPNAME, DWORD);
  109. extern HRESULT DPLAPI DPL_SetGroupOwner(LPDIRECTPLAY, DPID, DPID);
  110. extern HRESULT DPLAPI DPL_StartSession(LPDIRECTPLAY, DWORD, DPID);
  111. // player.c
  112. extern HRESULT DPLAPI PRV_CreatePlayer(LPDPLOBBYI_DPLOBJECT,
  113. LPDPID, LPDPNAME, HANDLE, LPVOID, DWORD, DWORD);
  114. extern HRESULT DPLAPI PRV_DestroyPlayer(LPDPLOBBYI_DPLOBJECT, DPID);
  115. extern HRESULT DPLAPI PRV_GetPlayerCaps(LPDPLOBBYI_DPLOBJECT, DWORD, DPID, LPDPCAPS);
  116. extern HRESULT DPLAPI PRV_GetPlayerData(LPDPLOBBYI_DPLOBJECT, DPID, LPVOID, LPDWORD);
  117. extern HRESULT DPLAPI PRV_Send(LPDPLOBBYI_DPLOBJECT, DPID, DPID, DWORD, LPVOID, DWORD);
  118. extern HRESULT DPLAPI PRV_SendChatMessage(LPDPLOBBYI_DPLOBJECT, DPID, DPID, DWORD, LPDPCHAT);
  119. extern HRESULT DPLAPI PRV_SetPlayerData(LPDPLOBBYI_DPLOBJECT, DPID, LPVOID, DWORD, DWORD);
  120. extern HRESULT DPLAPI PRV_SetPlayerName(LPDPLOBBYI_DPLOBJECT, DPID, LPDPNAME, DWORD);
  121. extern BOOL PRV_GetDPIDByLobbyID(LPDPLOBBYI_DPLOBJECT, DWORD, DPID *);
  122. extern BOOL PRV_GetLobbyIDByDPID(LPDPLOBBYI_DPLOBJECT, DPID, LPDWORD);
  123. extern HRESULT PRV_AddMapIDNode(LPDPLOBBYI_DPLOBJECT, DWORD, DPID);
  124. extern BOOL PRV_DeleteMapIDNode(LPDPLOBBYI_DPLOBJECT, DWORD);
  125. // server.c
  126. extern HRESULT PRV_LoadSP(LPDPLOBBYI_DPLOBJECT, LPGUID, LPVOID, DWORD);
  127. extern BOOL FAR PASCAL PRV_FindLPGUIDInAddressCallback(REFGUID, DWORD,
  128. LPCVOID, LPVOID);
  129. // session.c
  130. extern HRESULT DPLAPI PRV_Close(LPDPLOBBYI_DPLOBJECT);
  131. extern HRESULT DPLAPI PRV_EnumSessions(LPDPLOBBYI_DPLOBJECT, LPDPSESSIONDESC2, DWORD, DWORD);
  132. extern HRESULT DPLAPI PRV_GetSessionDesc(LPDPLOBBYI_DPLOBJECT);
  133. extern HRESULT DPLAPI PRV_Open(LPDPLOBBYI_DPLOBJECT, LPDPSESSIONDESC2, DWORD, LPCDPCREDENTIALS);
  134. extern HRESULT DPLAPI PRV_SetSessionDesc(LPDPLOBBYI_DPLOBJECT);
  135. #ifdef __cplusplus
  136. extern "C" {
  137. #endif /* __cplusplus */
  138. #endif // __DPLOBBYI_INCLUDED__