Source code of Windows XP (NT5)
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.

162 lines
4.0 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1991 - 1999
  3. Module Name:
  4. svrbind.hxx
  5. Abstract:
  6. We have got a problem. The DCE RPC runtime APIs are specified such
  7. that RpcServerInqBindings returns a vector of binding handles. The
  8. problem is that when a binding handle is created, you need to verify
  9. whether or not the requested rpc protocol sequence is supported.
  10. This requires that we check to see if the loadable transport interface
  11. dll is available. So, rather than create a real binding handle,
  12. we will create server binding handles which we will transform into
  13. a client binding handle of the appropriate type if necessary.
  14. This file contains the class definition of server binding handles.
  15. Author:
  16. Michael Montague (mikemon) 23-Nov-1991
  17. Revision History:
  18. --*/
  19. #ifndef __SVRBIND_HXX__
  20. #define __SVRBIND_HXX__
  21. class SVR_BINDING_HANDLE : public BINDING_HANDLE
  22. /*++
  23. Class Description:
  24. This class represents a binding handle as created by
  25. RpcServerInqBindings. It is derived from the client class BINDING_HANDLE
  26. because it must act like a binding handle, but we do not want
  27. to create a full fledged client binding handle because it may
  28. be expensive. If we ever need the full fledged binding handle,
  29. will transform this instance into one.
  30. Fields:
  31. DceBinding - Contains the information necessary to construct a
  32. full fledged binding handle. This information is an internalized
  33. version of the stuff contained in the string binding.
  34. RealBindingHandle - Contains a pointer to the real binding handle,
  35. if we have transformed this binding handle into a real full
  36. fledged binding handle, otherwise, it will be zero.
  37. DynamicEndpoint - Objects of this class are created from an rpc
  38. address. If the rpc address has a dynamic endpoint, we want
  39. to create a partially bound binding handle. We also need to
  40. know the dynamic endpoint when we register the binding handles
  41. with the endpoing mapper. If the rpc address corresponding to
  42. this binding handle has a dynamic endpoint, then this field will
  43. contain the dynamic endpoint; otherwise, it will be zero.
  44. --*/
  45. {
  46. private:
  47. DCE_BINDING * DceBinding;
  48. BINDING_HANDLE * RealBindingHandle;
  49. RPC_CHAR PAPI * DynamicEndpoint;
  50. int EndpointIsDynamic;
  51. RPC_STATUS
  52. InsureRealBindingHandle (
  53. );
  54. public:
  55. SVR_BINDING_HANDLE (
  56. IN DCE_BINDING * DceBinding,
  57. IN RPC_CHAR * DynamicEndpoint,
  58. IN OUT RPC_STATUS *Status
  59. );
  60. ~SVR_BINDING_HANDLE (
  61. );
  62. HANDLE_TYPE
  63. Type(
  64. );
  65. void
  66. MakePartiallyBound(
  67. );
  68. virtual RPC_STATUS
  69. SendReceive (
  70. IN OUT PRPC_MESSAGE Message
  71. );
  72. virtual RPC_STATUS
  73. NegotiateTransferSyntax (
  74. IN OUT PRPC_MESSAGE Message
  75. );
  76. virtual RPC_STATUS
  77. GetBuffer (
  78. IN OUT PRPC_MESSAGE Message,
  79. IN UUID *ObjectUuid
  80. );
  81. virtual void
  82. FreeBuffer (
  83. IN PRPC_MESSAGE Message
  84. );
  85. virtual RPC_STATUS
  86. BindingCopy (
  87. OUT BINDING_HANDLE * PAPI * DestinationBinding,
  88. IN unsigned int MaintainContext
  89. );
  90. virtual RPC_STATUS
  91. BindingFree (
  92. );
  93. virtual RPC_STATUS
  94. ToStringBinding (
  95. OUT RPC_CHAR PAPI * PAPI * StringBinding
  96. );
  97. RPC_STATUS
  98. ToStaticStringBinding (
  99. OUT RPC_CHAR PAPI * PAPI * StringBinding
  100. );
  101. virtual RPC_STATUS
  102. InquireDynamicEndpoint (
  103. OUT RPC_CHAR PAPI * PAPI * DynamicEndpoint
  104. );
  105. virtual RPC_STATUS
  106. PrepareBindingHandle (
  107. IN TRANS_INFO * TransportInterface,
  108. IN DCE_BINDING * DceBinding
  109. );
  110. virtual RPC_STATUS
  111. ResolveBinding (
  112. IN PRPC_CLIENT_INTERFACE RpcClientInterface
  113. );
  114. virtual RPC_STATUS
  115. BindingReset (
  116. );
  117. virtual RPC_STATUS
  118. InquireTransportType(
  119. OUT unsigned int PAPI *Type
  120. );
  121. };
  122. #endif // __SVRBIND_HXX__