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.

122 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. FTMan
  5. File Name:
  6. LogVol.h
  7. Abstract:
  8. The definition of class CLogicalVolumeData. The class who stores all properties of a logical volume
  9. Author:
  10. Cristian Teodorescu October 20, 1998
  11. Notes:
  12. Revision History:
  13. --*/
  14. /////////////////////////////////////////////////////////////////////////////
  15. #if !defined(AFX_LOGVOL_H_INCLUDED_)
  16. #define AFX_LOGVOL_H_INCLUDED_
  17. #if _MSC_VER > 1000
  18. #pragma once
  19. #endif // _MSC_VER > 1000
  20. #include <FTTypes.h>
  21. #include "Item.h"
  22. ////////////////////////////////////////////////////////////////////////////////////////////////////
  23. // Class CLogicalVolumeData
  24. class CLogicalVolumeData : public CItemData
  25. {
  26. public:
  27. // Constructor providing the ID of the Logical Volume
  28. CLogicalVolumeData(
  29. FT_LOGICAL_DISK_ID llVolID,
  30. CItemData* pParentData = NULL,
  31. BOOL bIsRootVolume = FALSE,
  32. USHORT unMemberIndex = MAXWORD,
  33. FT_MEMBER_STATE nMemberStatus = FtMemberHealthy );
  34. // Copy constructor
  35. CLogicalVolumeData( CLogicalVolumeData& rData );
  36. virtual ~CLogicalVolumeData() {};
  37. // Operations
  38. public:
  39. virtual BOOL ReadItemInfo( CString& strErrors );
  40. // Read the FT related info of the logical volume
  41. BOOL ReadFTInfo( CString& strErrors );
  42. virtual BOOL ReadMembers( CObArray& arrMembersData, CString& strErrors );
  43. virtual int ComputeImageIndex() const;
  44. virtual BOOL operator==(CItemData& rData) const;
  45. // Provide item properties
  46. virtual void GetDisplayName( CString& strDisplay ) const ;
  47. virtual void GetDisplayType( CString& strDisplay ) const ;
  48. virtual void GetDisplayExtendedName( CString& strDisplay ) const ;
  49. virtual BOOL GetVolumeID( FT_LOGICAL_DISK_ID& llVolID ) const;
  50. virtual BOOL GetSize( LONGLONG& llSize ) const;
  51. virtual BOOL GetDiskNumber( ULONG& ulDiskNumber ) const;
  52. virtual BOOL GetOffset( LONGLONG& llOffset) const;
  53. //Data members
  54. public:
  55. // Logical Volume ID
  56. FT_LOGICAL_DISK_ID m_llVolID;
  57. // Logical Volume Size
  58. LONGLONG m_llVolSize;
  59. // Logical Volume Type ( FtPartition, FtVolumeSet, FtStripeSet, FtMirrorSet, FtStripeSetWithParity, FtRedistribution )
  60. FT_LOGICAL_DISK_TYPE m_nVolType;
  61. // Configuration info
  62. union
  63. {
  64. // For a FT partition I must keep some extra info together with FT_PARTITION_CONFIGURATION_INFORMATION
  65. struct
  66. {
  67. FT_PARTITION_CONFIGURATION_INFORMATION Config;
  68. PARTITION_TYPE wPartitionType;
  69. DWORD dwPartitionNumber;
  70. } partConfig;
  71. // For all other logical volumes the FT_.... structure is enough
  72. FT_STRIPE_SET_CONFIGURATION_INFORMATION stripeConfig;
  73. FT_MIRROR_SET_CONFIGURATION_INFORMATION mirrorConfig;
  74. FT_STRIPE_SET_WITH_PARITY_CONFIGURATION_INFORMATION swpConfig;
  75. FT_REDISTRIBUTION_CONFIGURATION_INFORMATION redistConfig;
  76. } m_ConfigInfo;
  77. // State info
  78. union
  79. {
  80. FT_MIRROR_AND_SWP_STATE_INFORMATION stripeState;
  81. FT_REDISTRIBUTION_STATE_INFORMATION redistState;
  82. } m_StateInfo;
  83. // If the volume is a member of a logical volume set store here the zero-based index of the member in the set
  84. // MAXWORD if the volume is not a member of a set ( then IsRootVolume returns TRUE )
  85. USHORT m_unMemberIndex;
  86. protected:
  87. virtual BOOL RetrieveNTName( CString& strNTName ) const;
  88. virtual BOOL RetrieveDisksSet();
  89. };
  90. #endif // !defined(AFX_LOGVOL_H_INCLUDED_)