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.

109 lines
4.4 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CProxyCfgClusterInfo.h
  7. //
  8. // Description:
  9. // CProxyCfgClusterInfo implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 02-AUG-2000
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. // Make sure that this file is included only once per compile path.
  16. #pragma once
  17. //////////////////////////////////////////////////////////////////////////////
  18. //++
  19. //
  20. // class CProxyCfgClusterInfo
  21. //
  22. // Description:
  23. //
  24. //--
  25. //////////////////////////////////////////////////////////////////////////////
  26. class CProxyCfgClusterInfo
  27. : public IClusCfgClusterInfo
  28. , public IClusCfgClusterInfoEx
  29. {
  30. private:
  31. LONG m_cRef; // Reference counter
  32. IUnknown * m_punkOuter; // Interface to Outer Proxy object
  33. IClusCfgCallback * m_pcccb; // Callback interface
  34. HCLUSTER * m_phCluster; // Pointer to the handle of the cluster.
  35. CLSID * m_pclsidMajor; // CLSID to use to log errors to the UI.
  36. BSTR m_bstrClusterName; // Cluster FQDN name
  37. ULONG m_ulIPAddress; // Cluster IP Address
  38. ULONG m_ulSubnetMask; // Cluster Network mask
  39. BSTR m_bstrNetworkName; // Cluster Network name
  40. IClusCfgCredentials * m_pccc; // Cluster Credentials object
  41. BSTR m_bstrBindingString; // Cluster binding string.
  42. CProxyCfgClusterInfo( void );
  43. ~CProxyCfgClusterInfo( void );
  44. // Private copy constructor to prevent copying.
  45. CProxyCfgClusterInfo( const CProxyCfgClusterInfo & nodeSrc );
  46. // Private assignment operator to prevent copying.
  47. const CProxyCfgClusterInfo & operator = ( const CProxyCfgClusterInfo & nodeSrc );
  48. HRESULT HrInit( IUnknown * punkOuterIn, HCLUSTER * phClusterIn, CLSID * pclsidMajorIn, LPCWSTR pcszDomainIn );
  49. HRESULT HrLoadCredentials( void );
  50. public:
  51. static HRESULT S_HrCreateInstance(
  52. IUnknown ** ppunkOut
  53. , IUnknown * punkOuterIn
  54. , HCLUSTER * phClusterIn
  55. , CLSID * pclsidMajorIn
  56. , LPCWSTR pcszDomainIn
  57. );
  58. // IUnknown
  59. STDMETHOD( QueryInterface )( REFIID riid, LPVOID * ppv );
  60. STDMETHOD_( ULONG, AddRef )( void );
  61. STDMETHOD_( ULONG, Release )( void );
  62. // IClusCfgClusterInfo
  63. STDMETHOD( SetCommitMode )( ECommitMode eccbNewModeIn );
  64. STDMETHOD( GetCommitMode )( ECommitMode * peccmCurrentModeOut );
  65. STDMETHOD( GetName )( BSTR * pbstrNameOut );
  66. STDMETHOD( GetIPAddress )( DWORD * pdwIPAddress );
  67. STDMETHOD( GetSubnetMask )( DWORD * pdwNetMask );
  68. STDMETHOD( GetNetworkInfo )( IClusCfgNetworkInfo ** ppICCNetInfoOut );
  69. STDMETHOD( GetClusterServiceAccountCredentials )( IClusCfgCredentials ** ppICCCredentials );
  70. STDMETHOD( GetBindingString )( BSTR * pbstrBindingStringOut );
  71. STDMETHOD( SetName )( LPCWSTR pcszNameIn );
  72. STDMETHOD( SetIPAddress )( DWORD dwIPAddressIn );
  73. STDMETHOD( SetSubnetMask )( DWORD dwNetMaskIn );
  74. STDMETHOD( SetNetworkInfo )( IClusCfgNetworkInfo * pICCNetInfoIn );
  75. STDMETHOD( SetBindingString )( LPCWSTR bstrBindingStringIn );
  76. STDMETHOD( GetMaxNodeCount )( DWORD * pcMaxNodesOut );
  77. // IClusCfgClusterInfoEx
  78. STDMETHOD( CheckJoiningNodeVersion )( DWORD dwNodeHighestVersionIn, DWORD dwNodeLowestVersionIn );
  79. STDMETHOD( GetNodeNames )( long * pnCountOut, BSTR ** prgbstrNodeNamesOut );
  80. // IClusCfgCallback
  81. STDMETHOD( SendStatusReport )(
  82. LPCWSTR pcszNodeNameIn
  83. , CLSID clsidTaskMajorIn
  84. , CLSID clsidTaskMinorIn
  85. , ULONG ulMinIn
  86. , ULONG ulMaxIn
  87. , ULONG ulCurrentIn
  88. , HRESULT hrStatusIn
  89. , LPCWSTR pcszDescriptionIn
  90. , FILETIME * pftTimeIn
  91. , LPCWSTR pcszReferenceIn
  92. );
  93. }; //*** Class CProxyCfgClusterInfo