Source code of Windows XP (NT5)
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.

142 lines
3.8 KiB

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