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.

131 lines
4.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CBaseClusterForm.h
  7. //
  8. // Description:
  9. // Header file for CBaseClusterForm class.
  10. //
  11. // The CBaseClusterForm class is a class that encapsulates the
  12. // formation of a cluster.
  13. //
  14. // Implementation Files:
  15. // CBaseClusterForm.cpp
  16. //
  17. // Maintained By:
  18. // Vij Vasu (Vvasu) 03-MAR-2000
  19. //
  20. //////////////////////////////////////////////////////////////////////////////
  21. // Make sure that this file is included only once per compile path.
  22. #pragma once
  23. //////////////////////////////////////////////////////////////////////////
  24. // Include Files
  25. //////////////////////////////////////////////////////////////////////////
  26. // For the base class of this class.
  27. #include "CBaseClusterAddNode.h"
  28. // For ClusterMinNodeIdString
  29. #include <clusdef.h>
  30. // For the CStr class.
  31. #include "CStr.h"
  32. //////////////////////////////////////////////////////////////////////////////
  33. //++
  34. //
  35. // class CBaseClusterForm
  36. //
  37. // Description:
  38. // The CBaseClusterForm class is a class that encapsulates the
  39. // formation of a cluster.
  40. //
  41. //--
  42. //////////////////////////////////////////////////////////////////////////////
  43. class CBaseClusterForm : public CBaseClusterAddNode
  44. {
  45. public:
  46. //////////////////////////////////////////////////////////////////////////
  47. // Constructors and destructors
  48. //////////////////////////////////////////////////////////////////////////
  49. // Constructor.
  50. CBaseClusterForm(
  51. CBCAInterface * pbcaiInterfaceIn
  52. , const WCHAR * pcszClusterNameIn
  53. , const WCHAR * pcszClusterBindingStringIn
  54. , IClusCfgCredentials * pcccServiceAccountIn
  55. , DWORD dwClusterIPAddressIn
  56. , DWORD dwClusterIPSubnetMaskIn
  57. , const WCHAR * pszClusterIPNetworkIn
  58. );
  59. // Default destructor.
  60. ~CBaseClusterForm( void ) throw();
  61. //////////////////////////////////////////////////////////////////////////
  62. // Public accessors
  63. //////////////////////////////////////////////////////////////////////////
  64. // Get the cluster IP address.
  65. DWORD DwGetIPAddress( void ) const throw() { return m_dwClusterIPAddress; }
  66. // Get the cluster IP subnet mask.
  67. DWORD DwGetIPSubnetMask( void ) const throw() { return m_dwClusterIPSubnetMask; }
  68. // Get the network used for the cluster IP address
  69. const CStr & RStrGetClusterIPNetwork( void ) const throw() { return m_strClusterIPNetwork; }
  70. // Get the NodeId of this node.
  71. virtual const WCHAR * PszGetNodeIdString( void ) const throw() { return ClusterMinNodeIdString; }
  72. //////////////////////////////////////////////////////////////////////////
  73. // Public member functions
  74. //////////////////////////////////////////////////////////////////////////
  75. // Form the cluster.
  76. void Commit( void );
  77. // Rollback a created cluster.
  78. void Rollback( void );
  79. // Returns the number of progress messages that this action will send.
  80. UINT UiGetMaxProgressTicks() const throw()
  81. {
  82. // The extra tick if for the "Form starting" notification.
  83. return BaseClass::UiGetMaxProgressTicks() + 1;
  84. }
  85. private:
  86. // Private copy constructor to prevent copying.
  87. CBaseClusterForm( const CBaseClusterForm & );
  88. // Private assignment operator to prevent copying.
  89. CBaseClusterForm & operator = ( const CBaseClusterForm & );
  90. //////////////////////////////////////////////////////////////////////////
  91. // Private types
  92. //////////////////////////////////////////////////////////////////////////
  93. typedef CBaseClusterAddNode BaseClass;
  94. //////////////////////////////////////////////////////////////////////////
  95. // Private data
  96. //////////////////////////////////////////////////////////////////////////
  97. // Cluster IP address and network information.
  98. DWORD m_dwClusterIPAddress;
  99. DWORD m_dwClusterIPSubnetMask;
  100. CStr m_strClusterIPNetwork;
  101. }; //*** class CBaseClusterForm