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.

179 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. , public IClusCfgClusterInfoEx
  57. {
  58. private:
  59. //
  60. // Private member functions and data
  61. //
  62. LONG m_cRef;
  63. LCID m_lcid;
  64. IClusCfgCallback * m_picccCallback;
  65. BSTR m_bstrName;
  66. ULONG m_ulIPDottedQuad;
  67. ULONG m_ulSubnetDottedQuad;
  68. IClusCfgNetworkInfo * m_piccniNetwork;
  69. IUnknown * m_punkServiceAccountCredentials;
  70. IWbemServices * m_pIWbemServices;
  71. ECommitMode m_ecmCommitChangesMode;
  72. BOOL m_fIsClusterNode;
  73. BSTR m_bstrBindingString;
  74. // Private constructors and destructors
  75. CClusCfgClusterInfo( void );
  76. ~CClusCfgClusterInfo( void );
  77. // Private copy constructor to prevent copying.
  78. CClusCfgClusterInfo( const CClusCfgClusterInfo & nodeSrc );
  79. // Private assignment operator to prevent copying.
  80. const CClusCfgClusterInfo & operator = ( const CClusCfgClusterInfo & nodeSrc );
  81. HRESULT HrInit( void );
  82. HRESULT HrLoadNetworkInfo( HCLUSTER hClusterIn );
  83. HRESULT HrGetIPAddressInfo( HCLUSTER hClusterIn, HRESOURCE hResIn );
  84. HRESULT HrGetIPAddressInfo( HRESOURCE hResIn );
  85. HRESULT HrFindNetworkInfo( const WCHAR * pszNetworkNameIn, const WCHAR * pszNetworkIn );
  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. STDMETHOD( SetCommitMode )( ECommitMode ecmNewModeIn );
  107. STDMETHOD( GetCommitMode )( ECommitMode * pecmCurrentModeOut );
  108. STDMETHOD( GetName )( BSTR * pbstrNameOut );
  109. STDMETHOD( SetName )( LPCWSTR bstrNameIn );
  110. STDMETHOD( GetIPAddress )( ULONG * pulDottedQuadOut );
  111. STDMETHOD( SetIPAddress )( ULONG ulDottedQuadIn );
  112. STDMETHOD( GetSubnetMask )( ULONG * pulDottedQuadOut );
  113. STDMETHOD( SetSubnetMask )( ULONG ulDottedQuadIn );
  114. STDMETHOD( GetNetworkInfo )( IClusCfgNetworkInfo ** ppiccniOut );
  115. STDMETHOD( SetNetworkInfo )( IClusCfgNetworkInfo * piccniIn );
  116. STDMETHOD( GetClusterServiceAccountCredentials )( IClusCfgCredentials ** ppicccCredentialsOut );
  117. STDMETHOD( GetBindingString )( BSTR * pbstrBindingStringOut );
  118. STDMETHOD( SetBindingString )( LPCWSTR bstrBindingStringIn );
  119. STDMETHOD( GetMaxNodeCount )( DWORD * pcMaxNodesOut );
  120. //
  121. // IClusCfgClusterInfoEx Interfaces.
  122. //
  123. STDMETHOD( CheckJoiningNodeVersion )( DWORD dwNodeHighestVersionIn, DWORD dwNodeLowestVersionIn );
  124. STDMETHOD( GetNodeNames )( long * pnCountOut, BSTR ** prgbstrNodeNamesOut );
  125. //
  126. // IClusCfgSetClusterNodeInfo Interfaces.
  127. //
  128. STDMETHOD( SetClusterNodeInfo )( IClusCfgNodeInfo * pNodeInfoIn );
  129. //
  130. // IClusCfgWbemServices Interfaces
  131. //
  132. STDMETHOD( SetWbemServices )( IWbemServices * pIWbemServicesIn );
  133. }; //*** Class CClusCfgClusterInfo