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.

190 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1991-2000 Microsoft Corporation
  3. Module Name:
  4. udflvol.hxx
  5. Abstract:
  6. This class supplies the UDF-only SUPERAREA methods.
  7. Author:
  8. Centis Biks (cbiks) 05-May-2000
  9. --*/
  10. #pragma once
  11. #include "ScanADs.hxx"
  12. DECLARE_CLASS( UDF_LVOL );
  13. class UDF_LVOL : public OBJECT {
  14. public:
  15. UUDF_EXPORT
  16. DECLARE_CONSTRUCTOR(UDF_LVOL);
  17. VIRTUAL
  18. UUDF_EXPORT
  19. ~UDF_LVOL();
  20. NONVIRTUAL
  21. UUDF_EXPORT
  22. BOOLEAN
  23. Initialize(
  24. IN PUDF_SA UdfSA,
  25. IN OUT PMESSAGE Message,
  26. IN PNSR_LVOL LogicalVolumeDescriptor,
  27. IN PNSR_PART PartitionDescriptor
  28. );
  29. //
  30. //
  31. //
  32. BOOL CheckFileStructure();
  33. BOOL ReadFileSetDescriptor();
  34. BOOL ReadIcbDirectEntry( LONGAD*, USHORT*, PICBFILE*, OUT PULONGLONG BlockNum, OUT PUINT BlockSize, UINT );
  35. BOOL ExpandDirectoryHierarchy( PICBFILE FileIcbEntry, BOOL isStreamDir, PUINT TotalFiles, PUINT TotalDirs, UINT ExpandDirRecursionCount );
  36. BOOL ExpandFID( PNSR_FID NsrFid, BOOL isStreamDir, PUINT TotalFiles, PUINT TotalDirs, UINT ExpandDirRecursionCount );
  37. //
  38. //
  39. //
  40. BOOL Read(
  41. IN ULONG StartingSector,
  42. IN SECTORCOUNT NumberOfSectors,
  43. OUT PVOID Buffer
  44. );
  45. BOOL Write(
  46. IN ULONG StartingSector,
  47. IN SECTORCOUNT NumberOfSectors,
  48. OUT PVOID Buffer
  49. );
  50. ULONG QuerySectorSize() CONST;
  51. //
  52. //
  53. //
  54. BOOL MarkBlocksUsed
  55. (
  56. IN ULONGLONG StartingSector,
  57. IN SECTORCOUNT NumberOfSectors
  58. );
  59. //
  60. // UNDONE, CBiks, 8/9/2000
  61. // This function should be private when I figure out the rest of the class hierarchy.
  62. //
  63. ULONGLONG
  64. TranslateBlockNum
  65. (
  66. ULONG Lbn,
  67. USHORT Partition
  68. );
  69. private:
  70. //
  71. //
  72. //
  73. NONVIRTUAL
  74. VOID
  75. Construct(
  76. );
  77. NONVIRTUAL
  78. VOID
  79. Destroy(
  80. );
  81. BOOL ReadSpaceBitmapDescriptor();
  82. BOOL
  83. VerifySBDAllocation
  84. (
  85. PNSR_SBD SBDOriginal,
  86. PNSR_SBD SBDNew
  87. );
  88. //
  89. //
  90. //
  91. BOOL
  92. CreateLostClusterFile
  93. (
  94. ULONG StartSector,
  95. ULONG EndSector,
  96. PNSR_SBD SBDOriginal,
  97. PNSR_SBD SBDNew
  98. );
  99. BOOL
  100. UDF_LVOL::CreateFID
  101. (
  102. PICBFILE IcbDirectoryParent,
  103. PICBEXTFILE IcbFile,
  104. PCWSTR FileName,
  105. PNSR_FID* NewNsrFID,
  106. ULONG StartLbn,
  107. USHORT StartPartition,
  108. ULONG Length
  109. );
  110. BOOL
  111. FindAvailableFID
  112. (
  113. PICBFILE IcbFileEntry,
  114. ULONG RequestedFIDSize
  115. );
  116. BOOL
  117. FindAvailableSector
  118. (
  119. PNSR_SBD SBDOriginal,
  120. PNSR_SBD SBDNew,
  121. PULONG SectorAvailable
  122. );
  123. BOOL
  124. CreateICBFileEntry
  125. (
  126. PICBEXTFILE* ICBCheckFile,
  127. ULONG StartSector,
  128. ULONG EndSector,
  129. PNSR_SBD SBDOriginal,
  130. PNSR_SBD SBDNew
  131. );
  132. //
  133. //
  134. //
  135. PMESSAGE _Message;
  136. PUDF_SA _UdfSA;
  137. PNSR_LVOL _LogicalVolumeDescriptor;
  138. PNSR_PART _PartitionDescriptor;
  139. PNSR_FSD _FileSetDescriptor;
  140. PICBFILE _RootIcbFileEntry;
  141. PNSR_INTEG _LogicalVolumeIntegrityDescriptor;
  142. PNSR_SBD _SpaceBitmapDescriptor;
  143. PNSR_SBD _NewSpaceBitmapDescriptor;
  144. };