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.

140 lines
4.0 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CClusDiskJoin.h
  7. //
  8. // Description:
  9. // Header file for CClusDiskJoin class.
  10. // The CClusDiskJoin class is an action that configures the ClusDisk
  11. // service during a join.
  12. //
  13. // Maintained By:
  14. // David Potter (DavidP) 20-JUN-2001
  15. // Vij Vasu (Vvasu) 03-MAR-2000
  16. //
  17. //////////////////////////////////////////////////////////////////////////////
  18. // Make sure that this file is included only once per compile path.
  19. #pragma once
  20. //////////////////////////////////////////////////////////////////////////
  21. // Include Files
  22. //////////////////////////////////////////////////////////////////////////
  23. // For the CClusDisk base class
  24. #include "CClusDisk.h"
  25. // For the cluster API functions and types
  26. #include "ClusAPI.h"
  27. //////////////////////////////////////////////////////////////////////////
  28. // Forward declaration
  29. //////////////////////////////////////////////////////////////////////////
  30. class CBaseClusterJoin;
  31. //////////////////////////////////////////////////////////////////////////////
  32. //++
  33. //
  34. // class CClusDiskJoin
  35. //
  36. // Description:
  37. // The CClusDiskJoin class is an action that configures the ClusDisk
  38. // service during a join.
  39. //
  40. //--
  41. //////////////////////////////////////////////////////////////////////////////
  42. class CClusDiskJoin : public CClusDisk
  43. {
  44. public:
  45. //////////////////////////////////////////////////////////////////////////
  46. // Constructors and destructors
  47. //////////////////////////////////////////////////////////////////////////
  48. // Constructor.
  49. CClusDiskJoin(
  50. CBaseClusterJoin * pbcjParentActionIn
  51. );
  52. // Default destructor.
  53. ~CClusDiskJoin();
  54. //////////////////////////////////////////////////////////////////////////
  55. // Public methods
  56. //////////////////////////////////////////////////////////////////////////
  57. //
  58. // Create the ClusDisk service.
  59. //
  60. void Commit();
  61. //
  62. // Rollback this creation.
  63. //
  64. void Rollback();
  65. // Returns the number of progress messages that this action will send.
  66. UINT
  67. UiGetMaxProgressTicks() const throw()
  68. {
  69. return BaseClass::UiGetMaxProgressTicks();
  70. }
  71. private:
  72. //////////////////////////////////////////////////////////////////////////
  73. // Private types
  74. //////////////////////////////////////////////////////////////////////////
  75. // The base class of this class.
  76. typedef CClusDisk BaseClass;
  77. // Smart array of DWORDS
  78. typedef CSmartGenericPtr< CArrayPtrTrait< DWORD > > SmartDwordArray;
  79. //////////////////////////////////////////////////////////////////////////
  80. // Private methods
  81. //////////////////////////////////////////////////////////////////////////
  82. // Attach to all the disks that the sponsor cluster cares about.
  83. void
  84. AttachToClusteredDisks();
  85. // Add a signature to the signature array.
  86. DWORD
  87. ScAddSignature( DWORD dwSignatureIn ) throw();
  88. // A function that is called back during resource enumeration.
  89. static DWORD
  90. S_ScResourceEnumCallback(
  91. HCLUSTER hClusterIn
  92. , HRESOURCE hSelfIn
  93. , HRESOURCE hCurrentResourceIn
  94. , PVOID pvParamIn
  95. );
  96. //////////////////////////////////////////////////////////////////////////
  97. // Private data
  98. //////////////////////////////////////////////////////////////////////////
  99. // An array of signatures of disk to which ClusDisk should attach.
  100. SmartDwordArray m_rgdwSignatureArray;
  101. // Current size of the signature array.
  102. int m_nSignatureArraySize;
  103. // Number of signatures currently in the array.
  104. int m_nSignatureCount;
  105. }; //*** class CClusDiskJoin