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.

201 lines
5.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CClusCfgClusterInfo.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the CClusCfgClusterInfo
  10. // class.
  11. //
  12. // The class CClusCfgClusterInfo is the representation of a
  13. // computer that can be a cluster node. It implements the
  14. // IClusCfgClusterInfo interface.
  15. //
  16. // Documentation:
  17. //
  18. // Implementation Files:
  19. // CClusCfgClusterInfo.cpp
  20. //
  21. // Maintained By:
  22. // Galen Barbee (GalenB) 22-FEB-2000
  23. //
  24. //////////////////////////////////////////////////////////////////////////////
  25. // Make sure that this file is included only once per compile path.
  26. #pragma once
  27. //////////////////////////////////////////////////////////////////////////////
  28. // Include Files
  29. //////////////////////////////////////////////////////////////////////////////
  30. #include "PrivateInterfaces.h"
  31. //////////////////////////////////////////////////////////////////////////////
  32. // Constant Declarations
  33. //////////////////////////////////////////////////////////////////////////////
  34. //////////////////////////////////////////////////////////////////////////////
  35. //++
  36. //
  37. // class CClusCfgClusterInfo
  38. //
  39. // Description:
  40. // The class CClusCfgClusterInfo is the representation of a
  41. // cluster.
  42. //
  43. // Interfaces:
  44. // IClusCfgClusterInfo
  45. // IClusCfgInitialize
  46. // IClusCfgSetClusterNodeInfo
  47. // IClusCfgWbemServices
  48. //
  49. //--
  50. //////////////////////////////////////////////////////////////////////////////
  51. class CClusCfgClusterInfo
  52. : public IClusCfgClusterInfo
  53. , public IClusCfgInitialize
  54. , public IClusCfgSetClusterNodeInfo
  55. , public IClusCfgWbemServices
  56. {
  57. private:
  58. //
  59. // Private member functions and data
  60. //
  61. LONG m_cRef;
  62. LCID m_lcid;
  63. IClusCfgCallback * m_picccCallback;
  64. BSTR m_bstrName;
  65. ULONG m_ulIPDottedQuad;
  66. ULONG m_ulSubnetDottedQuad;
  67. IClusCfgNetworkInfo * m_piccniNetwork;
  68. IUnknown * m_punkServiceAccountCredentials;
  69. IWbemServices * m_pIWbemServices;
  70. ECommitMode m_ecmCommitChangesMode;
  71. BOOL m_fIsClusterNode:1;
  72. BSTR m_bstrBindingString;
  73. // Private constructors and destructors
  74. CClusCfgClusterInfo( void );
  75. ~CClusCfgClusterInfo( void );
  76. // Private copy constructor to prevent copying.
  77. CClusCfgClusterInfo( const CClusCfgClusterInfo & nodeSrc );
  78. // Private assignment operator to prevent copying.
  79. const CClusCfgClusterInfo & operator = ( const CClusCfgClusterInfo & nodeSrc );
  80. HRESULT HrInit( void );
  81. HRESULT HrLoadNetworkInfo( HCLUSTER hClusterIn );
  82. HRESULT HrGetIPAddressInfo( HCLUSTER hClusterIn, HRESOURCE hResIn );
  83. HRESULT HrIsResourceOfType( HRESOURCE hResIn, const WCHAR * pszResourceTypeIn );
  84. HRESULT HrGetIPAddressInfo( HRESOURCE hResIn );
  85. HRESULT HrFindNetworkInfo( const WCHAR * pszNetworkName, const WCHAR * pszNetwork );
  86. HRESULT HrLoadCredentials( void );
  87. public:
  88. //
  89. // Public, non interface methods.
  90. //
  91. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  92. //
  93. // IUnknown Interfaces
  94. //
  95. STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
  96. STDMETHOD_( ULONG, AddRef )( void );
  97. STDMETHOD_( ULONG, Release )( void );
  98. //
  99. // IClusCfgIntialize Interfaces.
  100. //
  101. // Register callbacks, locale id, etc.
  102. STDMETHOD( Initialize )( IUnknown * punkCallbackIn, LCID lcidIn );
  103. //
  104. // IClusCfgClusterInfo Interfaces.
  105. //
  106. //
  107. // CommitChanges Mode
  108. //
  109. STDMETHOD( SetCommitMode )( ECommitMode ecmNewModeIn );
  110. STDMETHOD( GetCommitMode )( ECommitMode * pecmCurrentModeOut );
  111. //
  112. // Name (Fully Qualified Domain Name) e.g. cluster1.ntdev.microsoft.com
  113. //
  114. // In Forming the cluster, this is the resulting cluster name.
  115. // In Joining the cluster, this is the sponsers cluster name.
  116. //
  117. STDMETHOD( GetName )( BSTR * pbstrNameOut );
  118. STDMETHOD( SetName )( LPCWSTR bstrNameIn );
  119. //
  120. // Cluster IP Address
  121. //
  122. STDMETHOD( GetIPAddress )( ULONG * pulDottedQuadOut );
  123. STDMETHOD( SetIPAddress )( ULONG ulDottedQuadIn );
  124. //
  125. // Cluster Subnet Mask
  126. //
  127. STDMETHOD( GetSubnetMask )( ULONG * pulDottedQuadOut );
  128. STDMETHOD( SetSubnetMask )( ULONG ulDottedQuadIn );
  129. //
  130. // Cluster Network
  131. //
  132. STDMETHOD( GetNetworkInfo )( IClusCfgNetworkInfo ** ppiccniOut );
  133. STDMETHOD( SetNetworkInfo )( IClusCfgNetworkInfo * piccniIn );
  134. //
  135. // Cluster Service Account
  136. //
  137. STDMETHOD( GetClusterServiceAccountCredentials )( IClusCfgCredentials ** ppicccCredentialsOut );
  138. //
  139. // Cluster Binding String
  140. //
  141. STDMETHOD( GetBindingString )( BSTR * pbstrBindingStringOut );
  142. STDMETHOD( SetBindingString )( LPCWSTR bstrBindingStringIn );
  143. //
  144. // IClusCfgSetClusterNodeInfo Interfaces.
  145. //
  146. STDMETHOD( SetClusterNodeInfo )( IClusCfgNodeInfo * pNodeInfoIn );
  147. //
  148. // IClusCfgWbemServices Interfaces
  149. //
  150. STDMETHOD( SetWbemServices )( IWbemServices * pIWbemServicesIn );
  151. }; //*** Class CClusCfgClusterInfo