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.

196 lines
7.6 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ClusCfg.h
  7. //
  8. // Description:
  9. // Declaration of the CClusCfgWizard class.
  10. //
  11. // Maintained By:
  12. // David Potter (DavidP) 15-JUN-2001
  13. // Geoffrey Pease (GPease) 11-MAY-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. #include "NamedCookie.h"
  18. //
  19. // Creating / Adding enum
  20. //
  21. enum ECreateAddMode {
  22. camUNKNOWN = 0,
  23. camCREATING,
  24. camADDING
  25. };
  26. /*
  27. #define USER_REGISTRY_SETTINGS_KEY L"Software\\Microsoft\\Cluster Configuration Wizard\\Settings"
  28. #define CONFIGURATION_TYPE L"ConfigurationType"
  29. typedef enum EConfigurationSettings
  30. {
  31. csUnknown = 0,
  32. csFullConfig, // Full analysis and configuration
  33. csMinConfig, // Minimal analysis and configuraion
  34. csMax
  35. } EConfigurationSettings;
  36. */
  37. //////////////////////////////////////////////////////////////////////////////
  38. //++
  39. //
  40. // class CClusCfgWizard
  41. //
  42. // Description:
  43. // The Cluster Configuration Wizard object.
  44. //
  45. //--
  46. //////////////////////////////////////////////////////////////////////////////
  47. class CClusCfgWizard
  48. : INotifyUI
  49. {
  50. private:
  51. // IUnknown
  52. LONG m_cRef; // Reference count
  53. // IClusCfgWizard
  54. IClusCfgCredentials * m_pccc; // Cluster Service Account Credentials
  55. ULONG m_ulIPAddress; // IP Address for the cluster
  56. ULONG m_ulIPSubnet; // Subnet mask for the cluster
  57. BSTR m_bstrNetworkName; // Name of network for IP address
  58. HANDLE m_hCancelCleanupEvent; // Used to signal when the cancel cleanup task is complete
  59. IServiceProvider * m_psp; // Middle Tier Service Manager
  60. HMODULE m_hRichEdit; // RichEdit's module handle
  61. SNamedCookie m_ncCluster;
  62. BSTR m_bstrClusterDomain;
  63. BOOL m_fDefaultedDomain;
  64. NamedCookieArray m_ncaNodes;
  65. OBJECTCOOKIE m_cookieCompletion;
  66. BOOL m_fMinimalConfig; // Minimal analysis and config chosen?
  67. IConnectionPointContainer * m_pcpc;
  68. ITaskManager * m_ptm;
  69. IObjectManager * m_pom;
  70. // INotifyUI
  71. DWORD m_dwCookieNotify; // Notification registration cookie
  72. private:
  73. CClusCfgWizard( void );
  74. ~CClusCfgWizard( void );
  75. HRESULT HrInit( void );
  76. // Private copy constructor to prevent copying.
  77. CClusCfgWizard( const CClusCfgWizard & );
  78. // Private assignment operator to prevent copying.
  79. CClusCfgWizard & operator=( const CClusCfgWizard & );
  80. HRESULT
  81. HrAddWizardPage( LPPROPSHEETHEADER ppshInout,
  82. UINT idTemplateIn,
  83. DLGPROC pfnDlgProcIn,
  84. UINT idTitleIn,
  85. UINT idSubtitleIn,
  86. LPARAM lParam
  87. );
  88. public:
  89. static HRESULT S_HrCreateInstance( CClusCfgWizard ** ppccwOut );
  90. HRESULT HrLaunchCleanupTask( void );
  91. BOOL FHasClusterName( void ) const;
  92. BOOL FDefaultedClusterDomain( void ) const;
  93. //
  94. // IUnknown
  95. //
  96. STDMETHOD( QueryInterface )( REFIID riidIn, PVOID * ppvOut );
  97. STDMETHOD_( ULONG, AddRef )( void );
  98. STDMETHOD_( ULONG, Release )( void );
  99. //
  100. // IClusCfgWizard methods
  101. //
  102. STDMETHOD( CreateCluster )( HWND lParentWndIn, BOOL * pfDoneOut );
  103. STDMETHOD( AddClusterNodes )( HWND lParentWndIn, BOOL * pfDoneOut );
  104. STDMETHOD( get_ClusterName )( BSTR * pbstrClusterNameOut );
  105. STDMETHOD( put_ClusterName )( BSTR bstrClusterNameIn );
  106. STDMETHOD( get_ServiceAccountUserName )( BSTR * pbstrAccountNameOut );
  107. STDMETHOD( put_ServiceAccountUserName )( BSTR bstrAccountNameIn );
  108. STDMETHOD( put_ServiceAccountPassword )( BSTR bstrPasswordIn );
  109. STDMETHOD( get_ServiceAccountDomainName )( BSTR * pbstrDomainOut );
  110. STDMETHOD( put_ServiceAccountDomainName )( BSTR bstrDomainIn );
  111. STDMETHOD( get_ClusterIPAddress )( BSTR * pbstrIPAddressOut );
  112. STDMETHOD( put_ClusterIPAddress )( BSTR bstrIPAddressIn );
  113. STDMETHOD( get_ClusterIPSubnet )( BSTR * pbstrIPSubnetOut );
  114. STDMETHOD( put_ClusterIPSubnet )( BSTR bstrIPSubnetIn );
  115. STDMETHOD( get_ClusterIPAddressNetwork )( BSTR * pbstrNetworkNameOut );
  116. STDMETHOD( put_ClusterIPAddressNetwork )( BSTR bstrNetworkNameIn );
  117. STDMETHOD( AddComputer )( BSTR bstrComputerNameIn );
  118. STDMETHOD( RemoveComputer )( BSTR bstrComputerNameIn );
  119. STDMETHOD( ClearComputerList )( void );
  120. STDMETHOD( get_MinimumConfiguration )( BOOL * pfMinimumConfigurationOut );
  121. STDMETHOD( put_MinimumConfiguration )( BOOL fMinimumConfigurationIn );
  122. //
  123. // Non-COM public methods: cluster access
  124. //
  125. STDMETHOD( HrSetClusterName )( LPCWSTR pwcszClusterNameIn, bool fAcceptNonRFCCharsIn );
  126. STDMETHOD( HrGetClusterDomain )( BSTR* pbstrDomainOut );
  127. STDMETHOD( HrGetClusterObject )( IClusCfgClusterInfo ** ppClusterOut );
  128. STDMETHOD( HrGetClusterCookie )( OBJECTCOOKIE * pocClusterOut );
  129. STDMETHOD( HrGetClusterChild )( REFCLSID rclsidChildIn, REFGUID rguidFormatIn, IUnknown ** ppunkChildOut );
  130. STDMETHOD( HrReleaseClusterObject )( void );
  131. //
  132. // Non-COM public methods: node access
  133. //
  134. STDMETHOD( HrAddNode )( LPCWSTR pwcszNodeNameIn, bool fAcceptNonRFCCharsIn );
  135. STDMETHOD( HrGetNodeCount )( size_t* pcNodesOut );
  136. STDMETHOD( HrGetNodeObject )( size_t idxNodeIn, IClusCfgNodeInfo ** ppNodeOut );
  137. STDMETHOD( HrGetNodeCookie )( size_t idxNodeIn, OBJECTCOOKIE * pocNodeOut );
  138. STDMETHOD( HrGetNodeName )( size_t idxNodeIn, BSTR * pbstrNodeNameOut );
  139. STDMETHOD( HrGetNodeChild )( size_t idxNodeIn, REFCLSID rclsidChildIn, REFGUID rguidFormatIn, IUnknown** ppunkChildOut );
  140. STDMETHOD( HrReleaseNodeObjects )( void );
  141. //
  142. // Non-COM public methods: task access
  143. //
  144. STDMETHOD( HrCreateTask )( REFGUID rguidTaskIn, IUnknown** ppunkOut );
  145. STDMETHOD( HrSubmitTask)( IDoTask* pTaskIn );
  146. //
  147. // Non-COM public methods: completion task access
  148. //
  149. STDMETHOD( HrGetCompletionCookie )( REFGUID rguidTaskIn, OBJECTCOOKIE * pocTaskOut );
  150. STDMETHOD( HrGetCompletionStatus )( OBJECTCOOKIE ocTaskIn, HRESULT * phrStatusOut );
  151. STDMETHOD( HrReleaseCompletionObject )( OBJECTCOOKIE ocTaskIn );
  152. //
  153. // Non-COM public methods: connection point access
  154. //
  155. STDMETHOD( HrAdvise )( REFIID riidConnectionIn, IUnknown * punkConnectionIn, DWORD * pdwCookieOut );
  156. STDMETHOD( HrUnadvise )( REFIID riidConnectionIn, DWORD dwCookieIn );
  157. //
  158. // Non-COM public methods: miscellaneous
  159. //
  160. STDMETHOD( HrIsCompatibleNodeDomain )( LPCWSTR pcwszDomainIn );
  161. STDMETHOD( HrCreateMiddleTierObjects )( void );
  162. STDMETHOD( HrFilterNodesWithBadDomains )( BSTR * pbstrBadNodesOut );
  163. // STDMETHOD( HrReadSettings )( EConfigurationSettings * pecsSettingIn, BOOL * pfValuePresentOut = NULL );
  164. // STDMETHOD( HrWriteSettings )( EConfigurationSettings ecsSettingIn, BOOL fDeleteValueIn = FALSE );
  165. //
  166. // INotifyUI
  167. //
  168. STDMETHOD( ObjectChanged )( OBJECTCOOKIE cookieIn );
  169. }; //*** class CClusCfgWizard