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.

93 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. FTMan
  5. File Name:
  6. FrSpace.h
  7. Abstract:
  8. The definition of class CFreeSpaceData. The class that stores all information related
  9. to a free space on a disk. A free space is a contiguous block on a physical disk which
  10. is not inside a partition
  11. Author:
  12. Cristian Teodorescu October 23, 1998
  13. Notes:
  14. Revision History:
  15. --*/
  16. /////////////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_FRSPACE_H_INCLUDED_)
  18. #define AFX_FRSPACE_H_INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "Item.h"
  23. ////////////////////////////////////////////////////////////////////////////////////////////////////
  24. // Class CFreeSpaceData
  25. class CFreeSpaceData : public CItemData
  26. {
  27. public:
  28. // Constructor providing the partition information
  29. CFreeSpaceData(
  30. DWORD dwDiskNumber,
  31. DWORD dwSignature,
  32. LONGLONG llOffset,
  33. LONGLONG llSize,
  34. FREE_SPACE_TYPE wFreeSpaceType,
  35. LONGLONG llCylinderSize,
  36. DWORD dwPartitionCountOnLevel,
  37. DWORD dwExtendedPartitionCountOnLevel,
  38. CItemData* pParentData = NULL);
  39. virtual ~CFreeSpaceData() {};
  40. // Operations
  41. public:
  42. virtual BOOL ReadItemInfo( CString& strErrors );
  43. virtual BOOL ReadMembers( CObArray& arrMembersData, CString& strErrors );
  44. virtual int ComputeImageIndex() const;
  45. virtual BOOL operator==(CItemData& rData) const;
  46. // Provide item properties
  47. virtual void GetDisplayName( CString& strDisplay ) const;
  48. virtual void GetDisplayType( CString& strDisplay ) const ;
  49. virtual BOOL GetSize( LONGLONG& llSize ) const;
  50. virtual BOOL GetDiskNumber( ULONG& ulDiskNumber ) const;
  51. virtual BOOL GetOffset( LONGLONG& llOffset) const;
  52. //Data members
  53. public:
  54. DWORD m_dwDiskNumber; // Disk number
  55. DWORD m_dwSignature; // Disk signature
  56. LONGLONG m_llOffset; // Free space starting offset
  57. LONGLONG m_llSize; // Free space size
  58. FREE_SPACE_TYPE m_wFreeSpaceType; // Free space type
  59. DWORD m_dwFreeSpaceNumber; // Free space number ( internal value )
  60. LONGLONG m_llCylinderSize; // Disk cylinder size
  61. DWORD m_dwPartitionCountOnLevel; // Number of non-container partitions on the same level with the free space
  62. DWORD m_dwExtendedPartitionCountOnLevel; // Number of container partitions on the same level with the free space
  63. protected:
  64. virtual BOOL RetrieveDisksSet();
  65. };
  66. #endif // !defined(AFX_FRSPACE_H_INCLUDED_)