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.

187 lines
7.1 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 2000-2001 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: User.h
  6. * Content: DirectNet User Call Back Routines
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 01/16/00 mjn Created
  12. * 01/17/00 mjn Added DN_UserHostMigrate
  13. * 01/17/00 mjn Implemented send time
  14. * 01/22/00 mjn Added DN_UserHostDestroyPlayer
  15. * 01/27/00 mjn Added support for retention of receive buffers
  16. * 01/28/00 mjn Added DN_UserConnectionTerminated
  17. * 03/24/00 mjn Set player context through INDICATE_CONNECT notification
  18. * 04/04/00 mjn Added DN_UserTerminateSession()
  19. * 04/05/00 mjn Updated DN_UserHostDestroyPlayer()
  20. * 04/18/00 mjn Added DN_UserReturnBuffer
  21. * mjn Added ppvReplyContext to DN_UserIndicateConnect
  22. * 07/29/00 mjn Added DNUserIndicatedConnectAborted()
  23. * mjn DNUserConnectionTerminated() supercedes DN_TerminateSession()
  24. * mjn Added HRESULT to DNUserReturnBuffer()
  25. * 07/30/00 mjn Added pAddressDevice to DNUserIndicateConnect()
  26. * mjn Replaced DNUserConnectionTerminated() with DNUserTerminateSession()
  27. * 07/31/00 mjn Revised DNUserDestroyGroup()
  28. * mjn Removed DN_UserHostDestroyPlayer()
  29. * 08/01/00 mjn DN_UserReceive() -> DNUserReceive()
  30. * 08/02/00 mjn DN_UserAddPlayer() -> DNUserCreatePlayer()
  31. * 08/08/00 mjn DN_UserCreateGroup() -> DNUserCreateGroup()
  32. * 08/20/00 mjn Added DNUserEnumQuery() and DNUserEnumResponse()
  33. * 09/17/00 mjn Changed parameters list of DNUserCreateGroup(),DNUserCreatePlayer(),
  34. * DNUserAddPlayerToGroup(),DNRemovePlayerFromGroup()
  35. * 07/24/01 mjn Added DPNBUILD_NOSERVER compile flag
  36. * 10/16/01 vanceo Added some multicast callbacks
  37. *@@END_MSINTERNAL
  38. *
  39. ***************************************************************************/
  40. #ifndef __USER_H__
  41. #define __USER_H__
  42. //**********************************************************************
  43. // Constant definitions
  44. //**********************************************************************
  45. //**********************************************************************
  46. // Macro definitions
  47. //**********************************************************************
  48. //**********************************************************************
  49. // Structure definitions
  50. //**********************************************************************
  51. //**********************************************************************
  52. // Variable definitions
  53. //**********************************************************************
  54. //**********************************************************************
  55. // Function prototypes
  56. //**********************************************************************
  57. HRESULT DNUserConnectComplete(DIRECTNETOBJECT *const pdnObject,
  58. const DPNHANDLE hAsyncOp,
  59. PVOID const pvContext,
  60. const HRESULT hr,
  61. CRefCountBuffer *const pRefCountBuffer);
  62. HRESULT DNUserIndicateConnect(DIRECTNETOBJECT *const pdnObject,
  63. PVOID const pvConnectData,
  64. const DWORD dwConnectDataSize,
  65. void **const ppvReplyData,
  66. DWORD *const pdwReplyDataSize,
  67. void **const ppvReplyContext,
  68. IDirectPlay8Address *const pAddressPlayer,
  69. IDirectPlay8Address *const pAddressDevice,
  70. void **const ppvPlayerContext);
  71. HRESULT DNUserIndicatedConnectAborted(DIRECTNETOBJECT *const pdnObject,
  72. void *const pvPlayerContext);
  73. HRESULT DNUserCreatePlayer(DIRECTNETOBJECT *const pdnObject,
  74. CNameTableEntry *const pNTEntry);
  75. HRESULT DNUserDestroyPlayer(DIRECTNETOBJECT *const pdnObject,
  76. CNameTableEntry *const pNTEntry);
  77. HRESULT DNUserCreateGroup(DIRECTNETOBJECT *const pdnObject,
  78. CNameTableEntry *const pNTEntry);
  79. HRESULT DNUserDestroyGroup(DIRECTNETOBJECT *const pdnObject,
  80. CNameTableEntry *const pNTEntry);
  81. HRESULT DNUserAddPlayerToGroup(DIRECTNETOBJECT *const pdnObject,
  82. CNameTableEntry *const pGroup,
  83. CNameTableEntry *const pPlayer);
  84. HRESULT DNUserRemovePlayerFromGroup(DIRECTNETOBJECT *const pdnObject,
  85. CNameTableEntry *const pGroup,
  86. CNameTableEntry *const pPlayer);
  87. HRESULT DNUserUpdateGroupInfo(DIRECTNETOBJECT *const pdnObject,
  88. const DPNID dpnid,
  89. const PVOID pvContext);
  90. HRESULT DNUserUpdatePeerInfo(DIRECTNETOBJECT *const pdnObject,
  91. const DPNID dpnid,
  92. const PVOID pvContext);
  93. #ifndef DPNBUILD_NOSERVER
  94. HRESULT DNUserUpdateClientInfo(DIRECTNETOBJECT *const pdnObject,
  95. const DPNID dpnid,
  96. const PVOID pvContext);
  97. #endif // DPNBUILD_NOSERVER
  98. HRESULT DNUserUpdateServerInfo(DIRECTNETOBJECT *const pdnObject,
  99. const DPNID dpnid,
  100. const PVOID pvContext);
  101. HRESULT DNUserAsyncComplete(DIRECTNETOBJECT *const pdnObject,
  102. const DPNHANDLE hAsyncOp,
  103. PVOID const pvContext,
  104. const HRESULT hr);
  105. HRESULT DNUserSendComplete(DIRECTNETOBJECT *const pdnObject,
  106. const DPNHANDLE hAsyncOp,
  107. PVOID const pvContext,
  108. const DWORD dwStartTime,
  109. const HRESULT hr,
  110. const DWORD dwFirstFrameRTT,
  111. const DWORD dwFirstFrameRetryCount);
  112. HRESULT DNUserUpdateAppDesc(DIRECTNETOBJECT *const pdnObject);
  113. HRESULT DNUserReceive(DIRECTNETOBJECT *const pdnObject,
  114. CNameTableEntry *const pNTEntry,
  115. BYTE *const pBufferData,
  116. const DWORD dwBufferSize,
  117. const DPNHANDLE hBufferHandle);
  118. HRESULT DN_UserHostMigrate(DIRECTNETOBJECT *const pdnObject,
  119. const DPNID dpnidNewHost,
  120. const PVOID pvPlayerContext);
  121. HRESULT DNUserTerminateSession(DIRECTNETOBJECT *const pdnObject,
  122. const HRESULT hr,
  123. void *const pvTerminateData,
  124. const DWORD dwTerminateDataSize);
  125. HRESULT DNUserReturnBuffer(DIRECTNETOBJECT *const pdnObject,
  126. const HRESULT hr,
  127. void *const pvBuffer,
  128. void *const pvUserContext);
  129. HRESULT DNUserEnumQuery(DIRECTNETOBJECT *const pdnObject,
  130. DPNMSG_ENUM_HOSTS_QUERY *const pMsg);
  131. HRESULT DNUserEnumResponse(DIRECTNETOBJECT *const pdnObject,
  132. DPNMSG_ENUM_HOSTS_RESPONSE *const pMsg);
  133. #ifndef DPNBUILD_NOMULTICAST
  134. HRESULT DNUserJoinComplete(DIRECTNETOBJECT *const pdnObject,
  135. const DPNHANDLE hAsyncOp,
  136. PVOID const pvContext,
  137. const HRESULT hr);
  138. HRESULT DNUserReceiveMulticast(DIRECTNETOBJECT *const pdnObject,
  139. void * const pvSenderContext,
  140. IDirectPlay8Address *const pSenderAddress,
  141. IDirectPlay8Address *const pDeviceAddress,
  142. BYTE *const pBufferData,
  143. const DWORD dwBufferSize,
  144. const DPNHANDLE hBufferHandle);
  145. HRESULT DNUserCreateSenderContext(DIRECTNETOBJECT *const pdnObject,
  146. void *const pvContext);
  147. HRESULT DNUserDestroySenderContext(DIRECTNETOBJECT *const pdnObject,
  148. void *const pvContext);
  149. #endif // ! DPNBUILD_NOMULTICAST
  150. //**********************************************************************
  151. // Class prototypes
  152. //**********************************************************************
  153. #endif // __USER_H__