mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
🎨Converted all plugin types to interfaces.
This commit is contained in:
@@ -41,7 +41,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
// Information from Inside Macintosh Volume II
|
||||
public partial class AppleMFS
|
||||
{
|
||||
public override bool Identify(ImagePlugin imagePlugin, Partition partition)
|
||||
public virtual bool Identify(IMediaImage imagePlugin, Partition partition)
|
||||
{
|
||||
ushort drSigWord;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
return drSigWord == MFS_MAGIC;
|
||||
}
|
||||
|
||||
public override void GetInformation(ImagePlugin imagePlugin, Partition partition, out string information)
|
||||
public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding)
|
||||
{
|
||||
information = "";
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
MDB.drVNSiz = mdbSector[0x024];
|
||||
byte[] variableSize = new byte[MDB.drVNSiz + 1];
|
||||
Array.Copy(mdbSector, 0x024, variableSize, 0, MDB.drVNSiz + 1);
|
||||
MDB.drVN = StringHandlers.PascalToString(variableSize, CurrentEncoding);
|
||||
MDB.drVN = StringHandlers.PascalToString(variableSize, currentEncoding);
|
||||
|
||||
BB.signature = BigEndianBitConverter.ToUInt16(bbSector, 0x000);
|
||||
|
||||
@@ -103,19 +103,19 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
BB.sec_sv_pages = BigEndianBitConverter.ToInt16(bbSector, 0x008);
|
||||
|
||||
Array.Copy(mdbSector, 0x00A, pString, 0, 16);
|
||||
BB.system_name = StringHandlers.PascalToString(pString, CurrentEncoding);
|
||||
BB.system_name = StringHandlers.PascalToString(pString, currentEncoding);
|
||||
Array.Copy(mdbSector, 0x01A, pString, 0, 16);
|
||||
BB.finder_name = StringHandlers.PascalToString(pString, CurrentEncoding);
|
||||
BB.finder_name = StringHandlers.PascalToString(pString, currentEncoding);
|
||||
Array.Copy(mdbSector, 0x02A, pString, 0, 16);
|
||||
BB.debug_name = StringHandlers.PascalToString(pString, CurrentEncoding);
|
||||
BB.debug_name = StringHandlers.PascalToString(pString, currentEncoding);
|
||||
Array.Copy(mdbSector, 0x03A, pString, 0, 16);
|
||||
BB.disasm_name = StringHandlers.PascalToString(pString, CurrentEncoding);
|
||||
BB.disasm_name = StringHandlers.PascalToString(pString, currentEncoding);
|
||||
Array.Copy(mdbSector, 0x04A, pString, 0, 16);
|
||||
BB.stupscr_name = StringHandlers.PascalToString(pString, CurrentEncoding);
|
||||
BB.stupscr_name = StringHandlers.PascalToString(pString, currentEncoding);
|
||||
Array.Copy(mdbSector, 0x05A, pString, 0, 16);
|
||||
BB.bootup_name = StringHandlers.PascalToString(pString, CurrentEncoding);
|
||||
BB.bootup_name = StringHandlers.PascalToString(pString, currentEncoding);
|
||||
Array.Copy(mdbSector, 0x06A, pString, 0, 16);
|
||||
BB.clipbrd_name = StringHandlers.PascalToString(pString, CurrentEncoding);
|
||||
BB.clipbrd_name = StringHandlers.PascalToString(pString, currentEncoding);
|
||||
|
||||
BB.max_files = BigEndianBitConverter.ToUInt16(bbSector, 0x07A);
|
||||
BB.queue_size = BigEndianBitConverter.ToUInt16(bbSector, 0x07C);
|
||||
@@ -173,26 +173,26 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
|
||||
information = sb.ToString();
|
||||
|
||||
XmlFsType = new FileSystemType();
|
||||
xmlFsType = new FileSystemType();
|
||||
if(MDB.drLsBkUp > 0)
|
||||
{
|
||||
XmlFsType.BackupDate = DateHandlers.MacToDateTime(MDB.drLsBkUp);
|
||||
XmlFsType.BackupDateSpecified = true;
|
||||
xmlFsType.BackupDate = DateHandlers.MacToDateTime(MDB.drLsBkUp);
|
||||
xmlFsType.BackupDateSpecified = true;
|
||||
}
|
||||
XmlFsType.Bootable = BB.signature == MFSBB_MAGIC;
|
||||
XmlFsType.Clusters = MDB.drNmAlBlks;
|
||||
XmlFsType.ClusterSize = (int)MDB.drAlBlkSiz;
|
||||
xmlFsType.Bootable = BB.signature == MFSBB_MAGIC;
|
||||
xmlFsType.Clusters = MDB.drNmAlBlks;
|
||||
xmlFsType.ClusterSize = (int)MDB.drAlBlkSiz;
|
||||
if(MDB.drCrDate > 0)
|
||||
{
|
||||
XmlFsType.CreationDate = DateHandlers.MacToDateTime(MDB.drCrDate);
|
||||
XmlFsType.CreationDateSpecified = true;
|
||||
xmlFsType.CreationDate = DateHandlers.MacToDateTime(MDB.drCrDate);
|
||||
xmlFsType.CreationDateSpecified = true;
|
||||
}
|
||||
XmlFsType.Files = MDB.drNmFls;
|
||||
XmlFsType.FilesSpecified = true;
|
||||
XmlFsType.FreeClusters = MDB.drFreeBks;
|
||||
XmlFsType.FreeClustersSpecified = true;
|
||||
XmlFsType.Type = "MFS";
|
||||
XmlFsType.VolumeName = MDB.drVN;
|
||||
xmlFsType.Files = MDB.drNmFls;
|
||||
xmlFsType.FilesSpecified = true;
|
||||
xmlFsType.FreeClusters = MDB.drFreeBks;
|
||||
xmlFsType.FreeClustersSpecified = true;
|
||||
xmlFsType.Type = "MFS";
|
||||
xmlFsType.VolumeName = MDB.drVN;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user