TVirtualDiskVpcImage
From Ultibo.org
Return to Unit VirtualDisk
Description
To be documented
Class definitions
TVirtualDiskVpcImage = class(TVirtualDiskImage)
constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);
|
|
destructor Destroy; override;
|
|
private
| |
function GetAttributes:LongWord;
|
|
function ChecksumFooter(AFooter:PVpcHardDiskFooter):LongWord;
|
|
function ChecksumSparse(ASparse:PVpcDynamicDiskHeader):LongWord;
|
|
function RoundToSector(AValue:LongWord;ASectorSize:Word):LongWord;
|
|
protected
| |
function GetReady:Boolean; override;
|
|
function GetCylinders:LongWord; override;
|
|
function GetHeads:LongWord; override;
|
|
function GetSectors:LongWord; override;
|
|
function GetSectorSize:Word; override;
|
|
function GetSectorCount:Int64; override;
|
|
function ReadExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; var ABuffer):Word; override;
|
|
function WriteExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; const ABuffer):Word; override;
|
|
function LoadExtents:Boolean; override;
|
|
function CheckExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):Boolean; override;
|
|
function LoadExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; override;
|
|
function AddExtent(AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; override;
|
|
function SetExtent(AExtent:TVirtualDiskExtent):Boolean; override;
|
|
function GetExtent(const ASector:Int64; AWrite,ALock:Boolean):TVirtualDiskExtent; override;
|
|
function LoadTables:Boolean; override;
|
|
function LoadTable(AExtent:TVirtualDiskExtent; ATableNo:LongWord):TVirtualDiskTable; override;
|
|
function AddTable(AExtent:TVirtualDiskExtent):TVirtualDiskTable; override;
|
|
function SetTable(ATable:TVirtualDiskTable):Boolean; override;
|
|
function LoadBlocks(ATable:TVirtualDiskTable):Boolean; override;
|
|
function LoadBlock(ATable:TVirtualDiskTable; ABlockNo:LongWord):TVirtualDiskBlock; override;
|
|
function AddBlock(ATable:TVirtualDiskTable):TVirtualDiskBlock; override;
|
|
function SetBlock(ABlock:TVirtualDiskBlock):Boolean; override;
|
|
function GetBlock(ATable:TVirtualDiskTable; const ASector:Int64; AWrite:Boolean):TVirtualDiskBlock; override;
|
|
function TestBlock(ABlock:TVirtualDiskBlock; const ASector:Int64; ACount:LongWord; AUsed:Boolean):LongWord;
|
|
function MarkBlock(ABlock:TVirtualDiskBlock; const ASector:Int64; ACount:LongWord; AUsed:Boolean):Boolean;
|
|
function TestBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):LongWord;
|
|
function MarkBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):Boolean;
|
|
function LocateDelta(AExtent:TVirtualDiskExtent):String; override;
|
|
function LocateParent(AExtent:TVirtualDiskExtent):String; override;
|
|
function LocateSibling(AExtent:TVirtualDiskExtent):String; override;
|
|
public
| |
function ImageInit:Boolean; override;
|
|
function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;
|
|
function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;
|
|
function Allocated(ASector:LongWord; ACount:Word):Word; override;
|
|
function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;
|
|
function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;
|
|
function CloseImage:Boolean; override;
|
|
function ResizeImage(const ASectorCount:Int64):Boolean; override;
|
|
function CreateSnapshot:Boolean; override;
|
|
function DeleteSnapshot:Boolean; override;
|
|
function MergeSnapshot:Boolean; override;
|
Function declarations
constructor TVirtualDiskVpcImage.Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);
Description: To be documented
Note | None documented |
---|
destructor TVirtualDiskVpcImage.Destroy;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.GetAttributes:LongWord;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.ChecksumFooter(AFooter:PVpcHardDiskFooter):LongWord;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.ChecksumSparse(ASparse:PVpcDynamicDiskHeader):LongWord;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.RoundToSector(AValue:LongWord; ASectorSize:Word):LongWord;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.GetReady:Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.GetCylinders:LongWord;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.GetHeads:LongWord;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.GetSectors:LongWord;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.GetSectorSize:Word;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.GetSectorCount:Int64;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.ReadExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; var ABuffer):Word;
Description: To be documented
Note | Caller must hold the extent lock |
---|
function TVirtualDiskVpcImage.WriteExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; const ABuffer):Word;
Description: To be documented
Note | Caller must hold the extent lock |
---|
function TVirtualDiskVpcImage.LoadExtents:Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.CheckExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):Boolean;
Description: Check that the passed file is a valid VirtualPC extent
Note | If delta is provided, check that passed file is the parent of the delta.
If parent is provided, check that passed file is the delta of the parent.
|
---|
function TVirtualDiskVpcImage.LoadExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.AddExtent(AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent;
Description: To be documented
Note | Caller must hold the parent lock |
---|
function TVirtualDiskVpcImage.SetExtent(AExtent:TVirtualDiskExtent):Boolean;
Description: To be documented
Note | Caller must hold the extent lock |
---|
function TVirtualDiskVpcImage.GetExtent(const ASector:Int64; AWrite,ALock:Boolean):TVirtualDiskExtent;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.LoadTables:Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.LoadTable(AExtent:TVirtualDiskExtent; ATableNo:LongWord):TVirtualDiskTable;
Description: To be documented
Note | Caller must hold the extent tables writer lock |
---|
function TVirtualDiskVpcImage.AddTable(AExtent:TVirtualDiskExtent):TVirtualDiskTable;
Description: To be documented
Note | Caller must hold the extent lock |
---|
function TVirtualDiskVpcImage.SetTable(ATable:TVirtualDiskTable):Boolean;
Description: To be documented
Note | Caller must hold the table extent lock |
---|
function TVirtualDiskVpcImage.LoadBlocks(ATable:TVirtualDiskTable):Boolean;
Description: To be documented
Note | Caller must hold the extent tables writer lock |
---|
function TVirtualDiskVpcImage.LoadBlock(ATable:TVirtualDiskTable; ABlockNo:LongWord):TVirtualDiskBlock;
Description: To be documented
Note | Caller must hold the extent tables writer lock |
---|
function TVirtualDiskVpcImage.AddBlock(ATable:TVirtualDiskTable):TVirtualDiskBlock;
Description: To be documented
Note | Caller must hold the table extent lock |
---|
function TVirtualDiskVpcImage.SetBlock(ABlock:TVirtualDiskBlock):Boolean;
Description: To be documented
Note | Caller must hold the block table extent lock |
---|
function TVirtualDiskVpcImage.GetBlock(ATable:TVirtualDiskTable; const ASector:Int64; AWrite:Boolean):TVirtualDiskBlock;
Description: To be documented
Write | The Write parameter is ignored for Block lookups |
---|---|
Note | Caller must hold the table extent lock |
function TVirtualDiskVpcImage.TestBlock(ABlock:TVirtualDiskBlock; const ASector:Int64; ACount:LongWord; AUsed:Boolean):LongWord;
Description: Test Count sectors from Sector in the Block bitmap for Free or Used
Sector | Sector is the sector number in the block to start from
Sector must be greater than or equal to block start sector |
---|---|
Note | Caller must hold the block table extent lock |
function TVirtualDiskVpcImage.MarkBlock(ABlock:TVirtualDiskBlock; const ASector:Int64; ACount:LongWord; AUsed:Boolean):Boolean;
Description: Mark Count sectors from Sector in the Block bitmap as Free or Used
Sector | Sector is the sector number in the block to start from
Sector must be greater than or equal to block start sector |
---|---|
Note | Caller must hold the block table extent lock |
function TVirtualDiskVpcImage.TestBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):LongWord;
Description: Test Count bits from Start in the Block bitmap for Free or Used
Size | Size is the total number of bits in the bitmap |
---|---|
Start | Start is the bit number in the bitmap to start from |
Count | Count is the number of bits in the bitmap to be tested |
Note | Should only be called by TestBlock
Bitmaps use 32 bit blocks in big endian order |
function TVirtualDiskVpcImage.MarkBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):Boolean;
Description: Mark Count bits from Start in the Block bitmap as Free or Used
Size | Size is the total number of bits in the bitmap |
---|---|
Start | Start is the bit number in the bitmap to start from |
Count | Count is the number of bits in the bitmap to be marked |
Note | Should only be called by MarkBlock
Bitmaps use 32 bit blocks in big endian order |
function TVirtualDiskVpcImage.LocateDelta(AExtent:TVirtualDiskExtent):String;
Description: To be documented
Note | Caller must hold the extent lock |
---|
function TVirtualDiskVpcImage.LocateParent(AExtent:TVirtualDiskExtent):String;
Description: To be documented
Note | Caller must hold the extent lock |
---|
function TVirtualDiskVpcImage.LocateSibling(AExtent:TVirtualDiskExtent):String;
Description: To be documented
Note | Caller must hold the extent lock |
---|
function TVirtualDiskVpcImage.ImageInit:Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean;
Description: To be documented
Note | Caller must hold the image lock |
---|
function TVirtualDiskVpcImage.Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean;
Description: To be documented
Note | Caller must hold the image lock |
---|
function TVirtualDiskVpcImage.Allocated(ASector:LongWord; ACount:Word):Word;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.CloseImage:Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.ResizeImage(const ASectorCount:Int64):Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.CreateSnapshot:Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.DeleteSnapshot:Boolean;
Description: To be documented
Note | None documented |
---|
function TVirtualDiskVpcImage.MergeSnapshot:Boolean;
Description: To be documented
Note | None documented |
---|
Return to Unit Reference