diff --git a/Aaru.Archives/Register.cs b/Aaru.Archives/Register.cs
index 0859cd6b2..ecf7f4c94 100644
--- a/Aaru.Archives/Register.cs
+++ b/Aaru.Archives/Register.cs
@@ -46,30 +46,41 @@ using Aaru.CommonTypes.Interfaces;
namespace Aaru.Archives
{
+ ///
public sealed class Register : IPluginRegister
{
+ ///
public List GetAllChecksumPlugins() => null;
+ ///
public List GetAllFilesystemPlugins() => null;
+ ///
public List GetAllFilterPlugins() => null;
+ ///
public List GetAllFloppyImagePlugins() => null;
+ ///
public List GetAllMediaImagePlugins() => null;
+ ///
public List GetAllPartitionPlugins() => null;
+ ///
public List GetAllReadOnlyFilesystemPlugins() => null;
+ ///
public List GetAllWritableFloppyImagePlugins() => null;
+ ///
public List GetAllWritableImagePlugins() => null;
+ ///
public List GetAllArchivePlugins() => Assembly.GetExecutingAssembly().GetTypes().
Where(t => t.GetInterfaces().
- Contains(typeof(IArchive
- ))).Where(t => t.IsClass).
+ Contains(typeof(IArchive
+ ))).Where(t => t.IsClass).
ToList();
}
}
diff --git a/Aaru.Checksums b/Aaru.Checksums
index b7f3192ef..8ca59cbcd 160000
--- a/Aaru.Checksums
+++ b/Aaru.Checksums
@@ -1 +1 @@
-Subproject commit b7f3192eff12ad1be41f272395258497bb576a38
+Subproject commit 8ca59cbcd0a4a9a2740ea11531937bc26965d4b2
diff --git a/Aaru.CommonTypes b/Aaru.CommonTypes
index 433bed214..fb6e3cf36 160000
--- a/Aaru.CommonTypes
+++ b/Aaru.CommonTypes
@@ -1 +1 @@
-Subproject commit 433bed2145dec49dfdff0bfe620702ad67d38136
+Subproject commit fb6e3cf36116dac98001f505c131c64ac59e481c
diff --git a/Aaru.Compression/AppleRle.cs b/Aaru.Compression/AppleRle.cs
index 8448aa7ec..64d59d744 100644
--- a/Aaru.Compression/AppleRle.cs
+++ b/Aaru.Compression/AppleRle.cs
@@ -35,6 +35,9 @@ using System.IO;
namespace Aaru.Compression
{
+ ///
+ /// Implements the Apple version of RLE
+ ///
public class AppleRle
{
const uint DART_CHUNK = 20960;
@@ -45,6 +48,10 @@ namespace Aaru.Compression
byte _repeatedByteA, _repeatedByteB;
bool _repeatMode; // true if we're repeating, false if we're just copying
+ ///
+ /// Initializes a decompressor for the specified stream
+ ///
+ /// Stream containing the compressed data
public AppleRle(Stream stream)
{
_inStream = stream;
@@ -59,6 +66,10 @@ namespace Aaru.Compression
_repeatMode = false;
}
+ ///
+ /// Decompresses a byte
+ ///
+ /// Decompressed byte
public int ProduceByte()
{
if(_repeatMode && _count > 0)
diff --git a/Aaru.Compression/TeleDiskLzh.cs b/Aaru.Compression/TeleDiskLzh.cs
index 641d48a0c..a64893185 100644
--- a/Aaru.Compression/TeleDiskLzh.cs
+++ b/Aaru.Compression/TeleDiskLzh.cs
@@ -53,6 +53,9 @@ namespace Aaru.Compression
* Adaptive Huffman Coding coded by Haruyasu YOSHIZAKI
* Edited and translated to English by Kenji RIKITAKE
*/
+ ///
+ /// Implements the TeleDisk version of LZH
+ ///
public class TeleDiskLzh
{
const int BUFSZ = 512;
@@ -133,6 +136,10 @@ namespace Aaru.Compression
Tdlzhuf _tdctl;
+ ///
+ /// Implements the TeleDisk LZH algorithm over the specified stream.
+ ///
+ /// Stream with compressed data.
public TeleDiskLzh(Stream dataStream)
{
int i;
@@ -156,6 +163,12 @@ namespace Aaru.Compression
*/
+ ///
+ /// Decompresses data
+ ///
+ /// Buffer to write the decompressed data to
+ /// Number of bytes to decompress
+ /// Number of decompressed bytes
public int Decode(out byte[] buf, int len) /* Decoding/Uncompressing */
{
short c;
diff --git a/Aaru.Console b/Aaru.Console
index 75db40d0e..dc0e013d8 160000
--- a/Aaru.Console
+++ b/Aaru.Console
@@ -1 +1 @@
-Subproject commit 75db40d0e3f610aca134b9576afe46f757027269
+Subproject commit dc0e013d8d965752bc585013bdb3191cb05ed92e
diff --git a/Aaru.Core/Checksum.cs b/Aaru.Core/Checksum.cs
index 7674111ab..b68f0df99 100644
--- a/Aaru.Core/Checksum.cs
+++ b/Aaru.Core/Checksum.cs
@@ -39,18 +39,68 @@ using Schemas;
namespace Aaru.Core
{
+ ///
+ /// Enabled checksums
+ ///
[Flags]
public enum EnableChecksum
{
- Adler32 = 1, Crc16 = 2, Crc32 = 4,
- Crc64 = 8, Md5 = 16, Sha1 = 64,
- Sha256 = 128, Sha384 = 256, Sha512 = 512,
- SpamSum = 1024, Fletcher16 = 2048, Fletcher32 = 4096,
+ ///
+ /// Enables Adler-32
+ ///
+ Adler32 = 1,
+ ///
+ /// Enables CRC-16
+ ///
+ Crc16 = 2,
+ ///
+ /// Enables CRC-32
+ ///
+ Crc32 = 4,
+ ///
+ /// Enables CRC-64
+ ///
+ Crc64 = 8,
+ ///
+ /// Enables MD5
+ ///
+ Md5 = 16,
+ ///
+ /// Enables SHA1
+ ///
+ Sha1 = 64,
+ ///
+ /// Enables SHA2-256
+ ///
+ Sha256 = 128,
+ ///
+ /// Enables SHA2-384
+ ///
+ Sha384 = 256,
+ ///
+ /// Enables SHA2-512
+ ///
+ Sha512 = 512,
+ ///
+ /// Enables SpamSum
+ ///
+ SpamSum = 1024,
+ ///
+ /// Enables Fletcher-16
+ ///
+ Fletcher16 = 2048,
+ ///
+ /// Enables Fletcher-32
+ ///
+ Fletcher32 = 4096,
+ ///
+ /// Enables all known checksums
+ ///
All = Adler32 | Crc16 | Crc32 | Crc64 | Md5 | Sha1 | Sha256 | Sha384 | Sha512 | SpamSum | Fletcher16 |
Fletcher32
}
- /// Checksums and hashes data, with different algorithms multithreaded
+ /// Checksums and hashes data, with different algorithms, multithreaded
public sealed class Checksum
{
readonly IChecksum _adler32Ctx;
@@ -91,6 +141,10 @@ namespace Aaru.Core
HashPacket _spamsumPkt;
Thread _spamsumThread;
+ ///
+ /// Initializes an instance of the checksum operations
+ ///
+ /// Enabled checksums
public Checksum(EnableChecksum enabled = EnableChecksum.All)
{
_enabled = enabled;
@@ -229,6 +283,10 @@ namespace Aaru.Core
_f32Thread = new Thread(UpdateHash);
}
+ ///
+ /// Updates the checksum with new data
+ ///
+ /// New data
public void Update(byte[] data)
{
if(_enabled.HasFlag(EnableChecksum.Adler32))
@@ -353,6 +411,10 @@ namespace Aaru.Core
_f32Thread = new Thread(UpdateHash);
}
+ ///
+ /// Finishes the checksums
+ ///
+ /// Returns the checksum results
public List End()
{
List chks = new List();
diff --git a/Aaru.Core/Devices/Dumping/Dump.cs b/Aaru.Core/Devices/Dumping/Dump.cs
index 1e96fb9c8..426ec5491 100644
--- a/Aaru.Core/Devices/Dumping/Dump.cs
+++ b/Aaru.Core/Devices/Dumping/Dump.cs
@@ -48,10 +48,19 @@ using Schemas;
namespace Aaru.Core.Devices.Dumping
{
+ /// Subchannel requested to dump
public enum DumpSubchannel
{
- Any, Rw, RwOrPq,
- Pq, None
+ /// Any available subchannel, in order: raw P to W, PQ, none
+ Any,
+ /// Raw P to W
+ Rw,
+ /// Raw P to W or PQ if not possible
+ RwOrPq,
+ /// PQ
+ Pq,
+ /// None
+ None
}
public partial class Dump
@@ -266,6 +275,9 @@ namespace Aaru.Core.Devices.Dumping
fs.Close();
}
+ ///
+ /// Aborts the dump in progress
+ ///
public void Abort()
{
_aborted = true;
diff --git a/Aaru.Core/Devices/Dumping/NVMe.cs b/Aaru.Core/Devices/Dumping/NVMe.cs
index 081523209..e7df17503 100644
--- a/Aaru.Core/Devices/Dumping/NVMe.cs
+++ b/Aaru.Core/Devices/Dumping/NVMe.cs
@@ -36,6 +36,9 @@ namespace Aaru.Core.Devices.Dumping
{
public partial class Dump
{
+ ///
+ /// Dumps an NVMe device
+ ///
public void NVMe() => StoppingErrorMessage?.Invoke("NVMe devices not yet supported.");
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Devices/Info/DeviceInfo.cs b/Aaru.Core/Devices/Info/DeviceInfo.cs
index ef62a6593..bae7d19c3 100644
--- a/Aaru.Core/Devices/Info/DeviceInfo.cs
+++ b/Aaru.Core/Devices/Info/DeviceInfo.cs
@@ -47,8 +47,15 @@ using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
namespace Aaru.Core.Devices.Info
{
+ ///
+ /// Obtains and contains information about a device
+ ///
public partial class DeviceInfo
{
+ ///
+ /// Initializes an instance of this class for the specified device
+ ///
+ /// Device
public DeviceInfo(Device dev)
{
Type = dev.Type;
diff --git a/Aaru.Core/Devices/Info/Plextor.cs b/Aaru.Core/Devices/Info/Plextor.cs
index fef8cac86..7e2da2244 100644
--- a/Aaru.Core/Devices/Info/Plextor.cs
+++ b/Aaru.Core/Devices/Info/Plextor.cs
@@ -32,38 +32,134 @@
namespace Aaru.Core.Devices.Info
{
+ ///
+ /// Contains information about Plextor features
+ ///
public class Plextor
{
+ ///
+ /// Access time limit
+ ///
public byte AccessTimeLimit;
+ ///
+ /// Drive supports setting book type bit for DVD+R
+ ///
public bool BitSetting;
+ ///
+ /// Drive supports setting book type bit for DVD+R DL
+ ///
public bool BitSettingDl;
+ ///
+ /// CD read speed limit
+ ///
public byte CdReadSpeedLimit;
+ ///
+ /// Time drive has spent reading CDs
+ ///
public uint CdReadTime;
+ ///
+ /// CD write speed limit
+ ///
public byte CdWriteSpeedLimit;
+ ///
+ /// Time drive has spent writing CDs
+ ///
public uint CdWriteTime;
+ ///
+ /// Total number of loaded discs
+ ///
public ushort Discs;
+ ///
+ /// Drive supports test writing DVD+
+ ///
public bool DvdPlusWriteTest;
+ ///
+ /// DVD read limit
+ ///
public byte DvdReadSpeedLimit;
+ ///
+ /// Time drive has spent reading DVDs
+ ///
public uint DvdReadTime;
+ ///
+ /// Time drive has spent writing DVDs
+ ///
public uint DvdWriteTime;
+ ///
+ /// Raw contents of EEPROM
+ ///
public byte[] Eeprom;
+ ///
+ /// Drive supports GigaRec
+ ///
public bool GigaRec;
+ ///
+ /// Drive will show recordable CDs as embossed
+ ///
public bool HidesRecordables;
+ ///
+ /// Drive will hide sessions
+ ///
public bool HidesSessions;
+ ///
+ /// Drive supports hiding recordable CDs and sessions
+ ///
public bool Hiding;
+ ///
+ /// Drive is a DVD capable drive
+ ///
public bool IsDvd;
+ ///
+ /// Drive supports PoweRec
+ ///
public bool PoweRec;
+ ///
+ /// Drive has PoweRec enabled
+ ///
public bool PoweRecEnabled;
+ ///
+ /// Last used PoweRec in KiB/sec
+ ///
public ushort PoweRecLast;
+ ///
+ /// Maximum supported PoweRec for currently inserted media in KiB/sec
+ ///
public ushort PoweRecMax;
+ ///
+ /// Recommended supported PoweRec for currently inserted media in KiB/sec
+ ///
public ushort PoweRecRecommendedSpeed;
+ ///
+ /// Selected supported PoweRec for currently inserted media in KiB/sec
+ ///
public ushort PoweRecSelected;
+ ///
+ /// Drive supports SecuRec
+ ///
public bool SecuRec;
+ ///
+ /// Drive supports SilentMode
+ ///
public bool SilentMode;
+ ///
+ /// Drive has SilentMode enabled
+ ///
public bool SilentModeEnabled;
+ ///
+ /// Drive supports SpeedRead
+ ///
public bool SpeedRead;
+ ///
+ /// Drive has SpeedRead enabled
+ ///
public bool SpeedReadEnabled;
+ ///
+ /// Drive supports VariRec
+ ///
public bool VariRec;
+ ///
+ /// Drive supports VariRec for DVDs
+ ///
public bool VariRecDvd;
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Devices/Info/Properties.cs b/Aaru.Core/Devices/Info/Properties.cs
index fef6096f4..c543e3590 100644
--- a/Aaru.Core/Devices/Info/Properties.cs
+++ b/Aaru.Core/Devices/Info/Properties.cs
@@ -44,51 +44,189 @@ namespace Aaru.Core.Devices.Info
{
public partial class DeviceInfo
{
+ ///
+ /// Raw IDENTIFY DEVICE response
+ ///
public byte[] AtaIdentify { get; }
+ ///
+ /// Raw IDENTIFY PACKET DEVICE response
+ ///
public byte[] AtapiIdentify { get; }
+ ///
+ /// Raw INQUIRY response
+ ///
public byte[] ScsiInquiryData { get; }
+ ///
+ /// Decoded INQUIRY response
+ ///
public Inquiry? ScsiInquiry { get; }
+ ///
+ /// Response for ATA Memory Card Pass Through
+ ///
public AtaErrorRegistersChs? AtaMcptError { get; }
+ ///
+ /// List of raw EVPD page indexed by page number
+ ///
public Dictionary ScsiEvpdPages { get; }
+ ///
+ /// Decoded MODE SENSE response
+ ///
public Modes.DecodedMode? ScsiMode { get; }
+ ///
+ /// Raw MODE SENSE(6) response
+ ///
public byte[] ScsiModeSense6 { get; }
+ ///
+ /// Raw MODE SENSE(10) response
+ ///
public byte[] ScsiModeSense10 { get; }
+ ///
+ /// Raw GET CONFIGURATION response
+ ///
public byte[] MmcConfiguration { get; }
+ ///
+ /// Decoded Plextor features
+ ///
public Plextor PlextorFeatures { get; }
+ ///
+ /// Decoded Kreon features
+ ///
public KreonFeatures KreonFeatures { get; }
+ ///
+ /// Raw GET BLOCK LIMITS support
+ ///
public byte[] BlockLimits { get; }
+ ///
+ /// Raw density support
+ ///
public byte[] DensitySupport { get; }
+ ///
+ /// Decoded density support
+ ///
public DensitySupport.DensitySupportHeader? DensitySupportHeader { get; }
+ ///
+ /// Raw medium density support
+ ///
public byte[] MediumDensitySupport { get; }
+ ///
+ /// Decoded medium density support
+ ///
public DensitySupport.MediaTypeSupportHeader? MediaTypeSupportHeader { get; }
+ ///
+ /// Raw CID registers
+ ///
public byte[] CID { get; }
+ ///
+ /// Raw CSD
+ ///
public byte[] CSD { get; }
+ ///
+ /// Raw extended CSD
+ ///
public byte[] ExtendedCSD { get; }
+ ///
+ /// Raw SCR registers
+ ///
public byte[] SCR { get; }
+ ///
+ /// Raw OCR registers
+ ///
public byte[] OCR { get; }
+ ///
+ /// Aaru's device type
+ ///
public DeviceType Type { get; }
+ ///
+ /// Device manufacturer
+ ///
public string Manufacturer { get; }
+ ///
+ /// Device model
+ ///
public string Model { get; }
+ ///
+ /// Device firmware version or revision
+ ///
public string FirmwareRevision { get; }
+ ///
+ /// Device serial number
+ ///
public string Serial { get; }
+ ///
+ /// SCSI Peripheral Device Type
+ ///
public PeripheralDeviceTypes ScsiType { get; }
+ ///
+ /// Is media removable from device?
+ ///
public bool IsRemovable { get; }
+ ///
+ /// Is device attached via USB?
+ ///
public bool IsUsb { get; }
+ ///
+ /// USB vendor ID
+ ///
public ushort UsbVendorId { get; }
+ ///
+ /// USB product ID
+ ///
public ushort UsbProductId { get; }
+ ///
+ /// Raw USB descriptors
+ ///
public byte[] UsbDescriptors { get; }
+ ///
+ /// USB manufacturer string
+ ///
public string UsbManufacturerString { get; }
+ ///
+ /// USB product string
+ ///
public string UsbProductString { get; }
+ ///
+ /// USB serial number string
+ ///
public string UsbSerialString { get; }
+ ///
+ /// Is device attached via FireWire?
+ ///
public bool IsFireWire { get; }
+ ///
+ /// FireWire's device GUID
+ ///
public ulong FireWireGuid { get; }
+ ///
+ /// FireWire's device model ID
+ ///
public uint FireWireModel { get; }
+ ///
+ /// FireWire's device model name
+ ///
public string FireWireModelName { get; }
+ ///
+ /// FireWire's device vendor ID
+ ///
public uint FireWireVendor { get; }
+ ///
+ /// FireWire's device vendor name
+ ///
public string FireWireVendorName { get; }
+ ///
+ /// Is device a CompactFlash device?
+ ///
public bool IsCompactFlash { get; }
+ ///
+ /// Is device a PCMCIA or CardBus device?
+ ///
public bool IsPcmcia { get; }
+ ///
+ /// PCMCIA/CardBus CIS
+ ///
public byte[] Cis { get; }
+ ///
+ /// MMC device CSS/CPRM Region Protection Code
+ ///
public CSS_CPRM.RegionalPlaybackControlState? RPC { get; }
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Devices/Report/ATA.cs b/Aaru.Core/Devices/Report/ATA.cs
index f5dae240b..64c057fff 100644
--- a/Aaru.Core/Devices/Report/ATA.cs
+++ b/Aaru.Core/Devices/Report/ATA.cs
@@ -41,6 +41,10 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
+ ///
+ /// Creates a report for media inserted into an ATA device
+ ///
+ /// Media report
public TestedMedia ReportAtaMedia()
{
var mediaTest = new TestedMedia();
@@ -721,6 +725,11 @@ namespace Aaru.Core.Devices.Report
return capabilities;
}
+ ///
+ /// Clear serial numbers and other private fields from an IDENTIFY ATA DEVICE response
+ ///
+ /// IDENTIFY ATA DEVICE response
+ /// IDENTIFY ATA DEVICE response without the private fields
public static byte[] ClearIdentify(byte[] buffer)
{
byte[] empty = new byte[512];
diff --git a/Aaru.Core/Devices/Report/DeviceReport.cs b/Aaru.Core/Devices/Report/DeviceReport.cs
index 4f9b3410c..fda310476 100644
--- a/Aaru.Core/Devices/Report/DeviceReport.cs
+++ b/Aaru.Core/Devices/Report/DeviceReport.cs
@@ -38,6 +38,10 @@ namespace Aaru.Core.Devices.Report
{
readonly Device _dev;
+ ///
+ /// Initializes a device report for the specified device (must be opened)
+ ///
+ /// Device
public DeviceReport(Device device) => _dev = device;
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Devices/Report/GdRomSwapTrick.cs b/Aaru.Core/Devices/Report/GdRomSwapTrick.cs
index 8f331d119..a441ddfc8 100644
--- a/Aaru.Core/Devices/Report/GdRomSwapTrick.cs
+++ b/Aaru.Core/Devices/Report/GdRomSwapTrick.cs
@@ -45,6 +45,10 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
+ ///
+ /// Tries and checks reading a GD-ROM disc using the swap disc trick and adds the result to a device report
+ ///
+ /// Device report
public void ReportGdRomSwapTrick(ref DeviceReportV2 report)
{
report.GdRomSwapDiscCapabilities = new GdRomSwapDiscCapabilities();
diff --git a/Aaru.Core/Devices/Report/MMC.cs b/Aaru.Core/Devices/Report/MMC.cs
index e33495f31..cc80129ef 100644
--- a/Aaru.Core/Devices/Report/MMC.cs
+++ b/Aaru.Core/Devices/Report/MMC.cs
@@ -71,6 +71,10 @@ namespace Aaru.Core.Devices.Report
return response;
}
+ ///
+ /// Creates a report for the GET CONFIGURATION response of an MMC device
+ ///
+ /// MMC features report
public MmcFeatures ReportMmcFeatures()
{
AaruConsole.WriteLine("Querying MMC GET CONFIGURATION...");
@@ -570,6 +574,16 @@ namespace Aaru.Core.Devices.Report
return report;
}
+ ///
+ /// Creates a report for media inserted into an MMC device
+ ///
+ /// Expected media type name
+ /// Try Plextor vendor commands
+ /// Try Pioneer vendor commands
+ /// Try NEC vendor commands
+ /// Try HL-DT-ST vendor commands
+ /// Try MediaTek vendor commands
+ ///
public TestedMedia ReportMmcMedia(string mediaType, bool tryPlextor, bool tryPioneer, bool tryNec,
bool tryHldtst, bool tryMediaTekF106)
{
diff --git a/Aaru.Core/Devices/Report/SSC.cs b/Aaru.Core/Devices/Report/SSC.cs
index d57e9acb3..f91aec334 100644
--- a/Aaru.Core/Devices/Report/SSC.cs
+++ b/Aaru.Core/Devices/Report/SSC.cs
@@ -41,6 +41,10 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
+ ///
+ /// Creates a report from a SCSI Sequential Commands device
+ ///
+ /// SSC report
public Ssc ReportScsiSsc()
{
var report = new Ssc();
@@ -137,6 +141,10 @@ namespace Aaru.Core.Devices.Report
return report;
}
+ ///
+ /// Creates a report for media inserted into an SSC device
+ ///
+ /// Media report
public TestedSequentialMedia ReportSscMedia()
{
var seqTest = new TestedSequentialMedia();
diff --git a/Aaru.Core/Devices/Report/Scsi.cs b/Aaru.Core/Devices/Report/Scsi.cs
index 604684ee6..8d4419124 100644
--- a/Aaru.Core/Devices/Report/Scsi.cs
+++ b/Aaru.Core/Devices/Report/Scsi.cs
@@ -45,6 +45,10 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
+ ///
+ /// Creates a report for the SCSI INQUIRY response
+ ///
+ /// SCSI report
public Scsi ReportScsiInquiry()
{
AaruConsole.WriteLine("Querying SCSI INQUIRY...");
@@ -85,6 +89,11 @@ namespace Aaru.Core.Devices.Report
return inquiry;
}
+ ///
+ /// Returns a list of decoded SCSI EVPD pages
+ ///
+ /// Decoded SCSI vendor identification
+ /// List of decoded SCSI EVPD pages
public List ReportEvpdPages(string vendor)
{
AaruConsole.WriteLine("Querying list of SCSI EVPDs...");
@@ -187,6 +196,12 @@ namespace Aaru.Core.Devices.Report
return pageResponse;
}
+ ///
+ /// Adds reports for the decoded SCSI MODE SENSE pages to a device report
+ ///
+ /// Device report
+ /// Returns raw MODE SENSE page 2Ah, aka CD-ROM page
+ /// Returns decoded list of supported media types response
public void ReportScsiModes(ref DeviceReportV2 report, out byte[] cdromMode, out MediumTypes mediumType)
{
Modes.DecodedMode? decMode = null;
@@ -419,6 +434,10 @@ namespace Aaru.Core.Devices.Report
report.SCSI.ModeSense.ModePages = modePages;
}
+ ///
+ /// Creates a report for media inserted into a SCSI device
+ ///
+ /// Media report
public TestedMedia ReportScsiMedia()
{
var mediaTest = new TestedMedia();
@@ -684,6 +703,10 @@ namespace Aaru.Core.Devices.Report
return mediaTest;
}
+ ///
+ /// Creates a media report for a non-removable SCSI device
+ ///
+ /// Media report
public TestedMedia ReportScsi()
{
var capabilities = new TestedMedia
diff --git a/Aaru.Core/Devices/Scanning/MediaScan.cs b/Aaru.Core/Devices/Scanning/MediaScan.cs
index 4e2dc4cc8..b02da641d 100644
--- a/Aaru.Core/Devices/Scanning/MediaScan.cs
+++ b/Aaru.Core/Devices/Scanning/MediaScan.cs
@@ -68,6 +68,11 @@ namespace Aaru.Core.Devices.Scanning
_useBufferedReads = useBufferedReads;
}
+ ///
+ /// Starts a media scan
+ ///
+ /// Media scan results
+ /// Unknown device type
public ScanResults Scan()
{
switch(_dev.Type)
@@ -82,6 +87,9 @@ namespace Aaru.Core.Devices.Scanning
}
}
+ ///
+ /// Aborts the running media scan
+ ///
public void Abort() => _aborted = true;
/// Event raised when the progress bar is not longer needed
@@ -96,9 +104,13 @@ namespace Aaru.Core.Devices.Scanning
public event UpdateProgressHandler UpdateProgress;
/// Event raised to update the status of an indeterminate progress bar
public event PulseProgressHandler PulseProgress;
+ /// Updates lists of time taken on scanning from the specified sector
public event ScanTimeHandler ScanTime;
+ /// Specified a number of blocks could not be read on scan
public event ScanUnreadableHandler ScanUnreadable;
+ /// Initializes a block map that's going to be filled with a media scan
public event InitBlockMapHandler InitBlockMap;
+ /// Sends the speed of scanning a specific sector
public event ScanSpeedHandler ScanSpeed;
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Entropy.cs b/Aaru.Core/Entropy.cs
index b2be20fa4..fca58d86c 100644
--- a/Aaru.Core/Entropy.cs
+++ b/Aaru.Core/Entropy.cs
@@ -41,24 +41,43 @@ using Aaru.Console;
namespace Aaru.Core
{
+ ///
+ /// Media image entropy operations
+ ///
public sealed class Entropy
{
readonly bool _debug;
readonly IMediaImage _inputFormat;
+ ///
+ /// Initializes an instance with the specified parameters
+ ///
+ /// Debug enabled
+ /// Media image
public Entropy(bool debug, IMediaImage inputFormat)
{
_debug = debug;
_inputFormat = inputFormat;
}
+ /// Event raised when a progress bar is needed
public event InitProgressHandler InitProgressEvent;
+ /// Event raised to update the values of a determinate progress bar
public event UpdateProgressHandler UpdateProgressEvent;
+ /// Event raised when the progress bar is not longer needed
public event EndProgressHandler EndProgressEvent;
+ /// Event raised when a progress bar is needed
public event InitProgressHandler InitProgress2Event;
+ /// Event raised to update the values of a determinate progress bar
public event UpdateProgressHandler UpdateProgress2Event;
+ /// Event raised when the progress bar is not longer needed
public event EndProgressHandler EndProgress2Event;
+ ///
+ /// Calculates the tracks entropy
+ ///
+ /// Checks for duplicated sectors
+ /// Calculated entropy
public EntropyResults[] CalculateTracksEntropy(bool duplicatedSectors)
{
List entropyResults = new List();
@@ -144,6 +163,11 @@ namespace Aaru.Core
return entropyResults.ToArray();
}
+ ///
+ /// Calculates the media entropy
+ ///
+ /// Checks for duplicated sectors
+ /// Calculated entropy
public EntropyResults CalculateMediaEntropy(bool duplicatedSectors)
{
var entropy = new EntropyResults
@@ -190,11 +214,26 @@ namespace Aaru.Core
}
}
+ ///
+ /// Entropy results
+ ///
public struct EntropyResults
{
+ ///
+ /// Track number, if applicable
+ ///
public uint Track;
+ ///
+ /// Entropy
+ ///
public double Entropy;
+ ///
+ /// Number of unique sectors
+ ///
public int? UniqueSectors;
+ ///
+ /// Number of total sectors
+ ///
public ulong Sectors;
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Error.cs b/Aaru.Core/Error.cs
index 4d1dbe565..9e2ecba27 100644
--- a/Aaru.Core/Error.cs
+++ b/Aaru.Core/Error.cs
@@ -34,8 +34,16 @@ using Aaru.CommonTypes.Interop;
namespace Aaru.Core
{
+ ///
+ /// Prints the description of a system error number.
+ ///
public static class Error
{
+ ///
+ /// Prints the description of a system error number.
+ ///
+ /// System error number.
+ /// Error description.
public static string Print(int errno)
{
switch(DetectOS.GetRealPlatformID())
diff --git a/Aaru.Core/Filesystems.cs b/Aaru.Core/Filesystems.cs
index d2e158fb9..6f7224811 100644
--- a/Aaru.Core/Filesystems.cs
+++ b/Aaru.Core/Filesystems.cs
@@ -37,6 +37,9 @@ using Aaru.CommonTypes.Interfaces;
namespace Aaru.Core
{
+ ///
+ /// Core filesystem operations
+ ///
public static class Filesystems
{
///
diff --git a/Aaru.Core/GetPluginBase.cs b/Aaru.Core/GetPluginBase.cs
index 6e8ed2df5..a53196346 100644
--- a/Aaru.Core/GetPluginBase.cs
+++ b/Aaru.Core/GetPluginBase.cs
@@ -36,8 +36,14 @@ using Aaru.CommonTypes.Interfaces;
namespace Aaru.Core
{
+ ///
+ /// Plugin base operations
+ ///
public static class GetPluginBase
{
+ ///
+ /// Gets an instance with all the known plugins
+ ///
public static PluginBase Instance
{
get
diff --git a/Aaru.Core/ImageFormat.cs b/Aaru.Core/ImageFormat.cs
index 183b462f6..a515d003d 100644
--- a/Aaru.Core/ImageFormat.cs
+++ b/Aaru.Core/ImageFormat.cs
@@ -38,6 +38,9 @@ using Aaru.Console;
namespace Aaru.Core
{
+ ///
+ /// Core media image format operations
+ ///
public static class ImageFormat
{
/// Detects the image plugin that recognizes the data inside a filter
diff --git a/Aaru.Core/ImageInfo.cs b/Aaru.Core/ImageInfo.cs
index 629932884..6cf39228e 100644
--- a/Aaru.Core/ImageInfo.cs
+++ b/Aaru.Core/ImageInfo.cs
@@ -56,6 +56,9 @@ using Tuple = Aaru.Decoders.PCMCIA.Tuple;
namespace Aaru.Core
{
+ ///
+ /// Image information operations
+ ///
public static class ImageInfo
{
const string MANUFACTURER_STRING = "Manufacturer";
@@ -67,6 +70,10 @@ namespace Aaru.Core
const string START_STRING = "Start";
const string END_STRING = "End";
+ ///
+ /// Prints image information to console
+ ///
+ /// Media image
public static void PrintImageInfo(IMediaImage imageFormat)
{
AaruConsole.WriteLine("Image information:");
diff --git a/Aaru.Core/Logging/ErrorLog.cs b/Aaru.Core/Logging/ErrorLog.cs
index 163226134..9c0d52eb4 100644
--- a/Aaru.Core/Logging/ErrorLog.cs
+++ b/Aaru.Core/Logging/ErrorLog.cs
@@ -35,6 +35,9 @@ using Aaru.Decoders.SCSI;
namespace Aaru.Core.Logging
{
+ ///
+ /// Logs errors
+ ///
public sealed class ErrorLog
{
readonly StreamWriter _logSw;
diff --git a/Aaru.Core/Logging/SubchannelLog.cs b/Aaru.Core/Logging/SubchannelLog.cs
index c46963971..c242b002d 100644
--- a/Aaru.Core/Logging/SubchannelLog.cs
+++ b/Aaru.Core/Logging/SubchannelLog.cs
@@ -32,13 +32,16 @@ using Aaru.Decoders.CD;
namespace Aaru.Core.Logging
{
+ ///
+ /// Logs subchannel data
+ ///
public class SubchannelLog
{
const int _subSize = 96;
readonly bool _bcd;
readonly StreamWriter _logSw;
- /// Initializes the dump log
+ /// Initializes the subchannel log
/// Output log file
/// Drive returns subchannel in BCD format
public SubchannelLog(string outputFile, bool bcd)
@@ -55,7 +58,7 @@ namespace Aaru.Core.Logging
_logSw.Flush();
}
- /// Finishes and closes the dump log
+ /// Finishes and closes the subchannel log
public void Close()
{
_logSw.WriteLine("######################################################");
@@ -63,6 +66,15 @@ namespace Aaru.Core.Logging
_logSw.Close();
}
+ ///
+ /// Logs an entry to the subchannel log
+ ///
+ /// Subchannel data
+ /// Set to true if the subchannel data is raw
+ /// First LBA read from drive to retrieve the data
+ /// Number of blocks read
+ /// Set to true if the subchannel has been generated, false if read from media
+ /// Set to true if the subchannel has been fixed, false if as is
public void WriteEntry(byte[] subchannel, bool raw, long startingLba, uint blocks, bool generated, bool @fixed)
{
if(subchannel.Length / _subSize != blocks)
@@ -219,34 +231,87 @@ namespace Aaru.Core.Logging
_logSw.Flush();
}
+ ///
+ /// Logs message indicating the P subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WritePFix(long lba) => WriteMessageWithPosition(lba, "fixed P subchannel using weight average.");
+ ///
+ /// Logs message indicating the R-W subchannels have been fixed
+ ///
+ /// LBA fix belongs to
public void WriteRwFix(long lba) => WriteMessageWithPosition(lba, "fixed R-W subchannels writing empty data.");
+ ///
+ /// Logs message indicating the ADR field of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQAdrFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct ADR.");
+ ///
+ /// Logs message indicating the CONTROL field of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQCtrlFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with correct CONTROL.");
+ ///
+ /// Logs message indicating the ZERO field of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQZeroFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct ZERO.");
+ ///
+ /// Logs message indicating the TNO field of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQTnoFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct TNO.");
+ ///
+ /// Logs message indicating the INDEX field of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQIndexFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct INDEX.");
+ ///
+ /// Logs message indicating the relative position of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQRelPosFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with correct RELATIVE POSITION.");
+ ///
+ /// Logs message indicating the absolute position of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQAbsPosFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with correct ABSOLUTE POSITION.");
+ ///
+ /// Logs message indicating the CRC of the Q subchannel has been fixed
+ ///
+ /// LBA fix belongs to
public void WriteQCrcFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct CRC.");
+ ///
+ /// Logs message indicating the the Q subchannel has been fixed with a known good MCN
+ ///
+ /// LBA fix belongs to
public void WriteQMcnFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with known good MCN.");
+ ///
+ /// Logs message indicating the the Q subchannel has been fixed with a known good ISRC
+ ///
+ /// LBA fix belongs to
public void WriteQIsrcFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with known good ISRC.");
+ ///
+ /// Logs a message with a specified position
+ ///
+ /// LBA position
+ /// Message to log
public void WriteMessageWithPosition(long lba, string message)
{
long minute = (lba + 150) / 4500;
diff --git a/Aaru.Core/Media/CompactDisc.cs b/Aaru.Core/Media/CompactDisc.cs
index 31bcd27d7..57627ecc9 100644
--- a/Aaru.Core/Media/CompactDisc.cs
+++ b/Aaru.Core/Media/CompactDisc.cs
@@ -41,6 +41,9 @@ using Aaru.Helpers;
namespace Aaru.Core.Media
{
+ ///
+ /// Operations over CD based media
+ ///
public static class CompactDisc
{
/// Writes subchannel data to an image
diff --git a/Aaru.Core/Media/Detection/MMC.cs b/Aaru.Core/Media/Detection/MMC.cs
index 29619aafd..36391ea31 100644
--- a/Aaru.Core/Media/Detection/MMC.cs
+++ b/Aaru.Core/Media/Detection/MMC.cs
@@ -51,6 +51,9 @@ using DMI = Aaru.Decoders.Xbox.DMI;
namespace Aaru.Core.Media.Detection
{
+ ///
+ /// Detects media type for MMC class devices
+ ///
public static class MMC
{
/// SHA256 of PlayStation 2 boot sectors, seen in PAL discs
diff --git a/Aaru.Core/Media/Info/CompactDisc.cs b/Aaru.Core/Media/Info/CompactDisc.cs
index 8d2879b84..3a510a69f 100644
--- a/Aaru.Core/Media/Info/CompactDisc.cs
+++ b/Aaru.Core/Media/Info/CompactDisc.cs
@@ -45,6 +45,9 @@ using Device = Aaru.Database.Models.Device;
namespace Aaru.Core.Media.Info
{
+ ///
+ /// Core operations for retrieving information about CD based media
+ ///
public static class CompactDisc
{
/// Gets the offset bytes from a Compact Disc
diff --git a/Aaru.Core/Media/Info/ScsiInfo.cs b/Aaru.Core/Media/Info/ScsiInfo.cs
index 9b30ba2da..9a4055594 100644
--- a/Aaru.Core/Media/Info/ScsiInfo.cs
+++ b/Aaru.Core/Media/Info/ScsiInfo.cs
@@ -53,8 +53,15 @@ using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
namespace Aaru.Core.Media.Info
{
+ ///
+ /// Retrieves information from a SCSI device
+ ///
public sealed class ScsiInfo
{
+ ///
+ /// Initializes this class with the specific device, and fills in the information
+ ///
+ /// Device
public ScsiInfo(Device dev)
{
if(dev.Type != DeviceType.SCSI &&
@@ -1492,74 +1499,281 @@ namespace Aaru.Core.Media.Info
MediaType = tmpType;
}
+ ///
+ /// Decoded DVD Pre-Recorded Information
+ ///
public PRI.PreRecordedInformation? DecodedDvdPrePitInformation { get; }
+ ///
+ /// Decoded recordable DVD Physical Format Information
+ ///
public PFI.PhysicalFormatInformation? DecodedDvdrPfi { get; }
+ ///
+ /// Raw media serial number
+ ///
public byte[] MediaSerialNumber { get; }
+ ///
+ /// Raw Xbox security sectors
+ ///
public byte[] XboxSecuritySector { get; }
+ ///
+ /// Decoded Xbox security sectors
+ ///
public SS.SecuritySector? DecodedXboxSecuritySector { get; }
+ ///
+ /// Information about an XGD, XGD2 or XGD3 media
+ ///
public XgdInfo XgdInfo { get; }
+ ///
+ /// MMC drive raw GET CONFIGURATION
+ ///
public byte[] MmcConfiguration { get; }
+ ///
+ /// Raw recognized format layers
+ ///
public byte[] RecognizedFormatLayers { get; }
+ ///
+ /// Raw write protection status
+ ///
public byte[] WriteProtectionStatus { get; }
+ ///
+ /// Raw DVD Physical Format Information
+ ///
public byte[] DvdPfi { get; }
+ ///
+ /// Decoded DVD Physical Format Information
+ ///
public PFI.PhysicalFormatInformation? DecodedPfi { get; }
+ ///
+ /// Raw DVD Disc Manufacturing Information
+ ///
public byte[] DvdDmi { get; }
+ ///
+ /// Raw DVD Copyright Management Information
+ ///
public byte[] DvdCmi { get; }
+ ///
+ /// Raw DVD Burst Cutting Area
+ ///
public byte[] DvdBca { get; }
+ ///
+ /// Raw DVD AACS information
+ ///
public byte[] DvdAacs { get; }
+ ///
+ /// Raw DVD-RAM Disc Definition Structure
+ ///
public byte[] DvdRamDds { get; }
+ ///
+ /// Raw DVD-RAM Cartridge Status
+ ///
public byte[] DvdRamCartridgeStatus { get; }
+ ///
+ /// Raw DVD-RAM Spare Area Information
+ ///
public byte[] DvdRamSpareArea { get; }
+ ///
+ /// Raw DVD-R(W) Last Border-Out RMD
+ ///
public byte[] LastBorderOutRmd { get; }
+ ///
+ /// Raw DVD-R(W) Pre-Recorded Information
+ ///
public byte[] DvdPreRecordedInfo { get; }
+ ///
+ /// Raw DVD-R Media ID
+ ///
public byte[] DvdrMediaIdentifier { get; }
+ ///
+ /// Raw recordable DVD Physical Format Information
+ ///
public byte[] DvdrPhysicalInformation { get; }
+ ///
+ /// Raw DVD+R(W) ADIP
+ ///
public byte[] DvdPlusAdip { get; }
+ ///
+ /// Raw DVD+R(W) Disc Control Blocks
+ ///
public byte[] DvdPlusDcb { get; }
+ ///
+ /// Raw HD DVD Copyright Management Information
+ ///
public byte[] HddvdCopyrightInformation { get; }
+ ///
+ /// Raw HD DVD-R Medium Status
+ ///
public byte[] HddvdrMediumStatus { get; }
+ ///
+ /// Raw HD DVD-R(W) Last Border-Out RMD
+ ///
public byte[] HddvdrLastRmd { get; }
+ ///
+ /// Raw DVD-R(W) Layer Capacity
+ ///
public byte[] DvdrLayerCapacity { get; }
+ ///
+ /// Raw DVD-R DL Middle Zone start
+ ///
public byte[] DvdrDlMiddleZoneStart { get; }
+ ///
+ /// Raw DVD-R DL Jump Interval size
+ ///
public byte[] DvdrDlJumpIntervalSize { get; }
+ ///
+ /// Raw DVD-R DL Manual Layer Jump Start LBA
+ ///
public byte[] DvdrDlManualLayerJumpStartLba { get; }
+ ///
+ /// Raw DVD-R DL Remap Anchor Point
+ ///
public byte[] DvdrDlRemapAnchorPoint { get; }
+ ///
+ /// Raw Blu-ray Disc Information
+ ///
public byte[] BlurayDiscInformation { get; }
+ ///
+ /// Raw Blu-ray PAC
+ ///
public byte[] BlurayPac { get; }
+ ///
+ /// Raw Blu-ray Burst Cutting Area
+ ///
public byte[] BlurayBurstCuttingArea { get; }
+ ///
+ /// Raw Blu-ray Disc Definition Structure
+ ///
public byte[] BlurayDds { get; }
+ ///
+ /// Raw Blu-ray Cartridge Status
+ ///
public byte[] BlurayCartridgeStatus { get; }
+ ///
+ /// Raw Blu-ray Spare Area Information
+ ///
public byte[] BluraySpareAreaInformation { get; }
+ ///
+ /// Raw Blu-ray DFL
+ ///
public byte[] BlurayRawDfl { get; }
+ ///
+ /// Raw Blu-ray Pseudo OverWrite Resources
+ ///
public byte[] BlurayPowResources { get; }
+ ///
+ /// Raw READ TOC response
+ ///
public byte[] Toc { get; }
+ ///
+ /// Raw READ ATIP response
+ ///
public byte[] Atip { get; }
+ ///
+ /// Raw READ DISC INFORMATION response
+ ///
public byte[] DiscInformation { get; }
+ ///
+ /// Raw READ SESSION response
+ ///
public byte[] Session { get; }
+ ///
+ /// Raw READ FULL TOC response
+ ///
public byte[] RawToc { get; }
+ ///
+ /// Raw READ PMA response
+ ///
public byte[] Pma { get; }
+ ///
+ /// Raw Lead-In's CD-TEXT response
+ ///
public byte[] CdTextLeadIn { get; }
+ ///
+ /// Decoded READ TOC response
+ ///
public TOC.CDTOC? DecodedToc { get; }
+ ///
+ /// Decoded READ ATIP response
+ ///
public ATIP.CDATIP DecodedAtip { get; }
+ ///
+ /// Decoded READ SESSION response
+ ///
public Session.CDSessionInfo? DecodedSession { get; }
+ ///
+ /// Decoded READ FULL TOC response
+ ///
public FullTOC.CDFullTOC? FullToc { get; }
+ ///
+ /// Decoded Lead-In CD-TEXT response
+ ///
public CDTextOnLeadIn.CDText? DecodedCdTextLeadIn { get; }
+ ///
+ /// Raw Blu-ray track resources
+ ///
public byte[] BlurayTrackResources { get; }
+ ///
+ /// Decoded Blu-ray Disc Information
+ ///
public DiscInformation.StandardDiscInformation? DecodedDiscInformation { get; }
+ ///
+ /// Decoded Media Catalogue Number
+ ///
public string Mcn { get; }
+ ///
+ /// List of decoded track ISRCs
+ ///
public Dictionary Isrcs { get; }
+ ///
+ /// Set if media is inserted in drive
+ ///
public bool MediaInserted { get; }
+ ///
+ /// Detected media type
+ ///
public MediaType MediaType { get; }
+ ///
+ /// Device information
+ ///
public DeviceInfo DeviceInfo { get; }
+ ///
+ /// Raw READ CAPACITY(10) response
+ ///
public byte[] ReadCapacity { get; }
+ ///
+ /// Number of blocks in media
+ ///
public ulong Blocks { get; }
+ ///
+ /// Logical block size
+ ///
public uint BlockSize { get; }
+ ///
+ /// Raw READ CAPACITY(16) response
+ ///
public byte[] ReadCapacity16 { get; }
+ ///
+ /// Raw SSC Density support
+ ///
public byte[] DensitySupport { get; }
+ ///
+ /// Decoded SSC Density support
+ ///
public DensitySupport.DensitySupportHeader? DensitySupportHeader { get; }
+ ///
+ /// Raw SSC media support
+ ///
public byte[] MediaTypeSupport { get; }
+ ///
+ /// Decoded SSC media support
+ ///
public DensitySupport.MediaTypeSupportHeader? MediaTypeSupportHeader { get; }
+ ///
+ /// Raw data from DVD sector Copyright Management Information
+ ///
public byte[] DvdSectorCmi { get; }
+ ///
+ /// Raw DVD Disc Key
+ ///
public byte[] DvdDiscKey { get; }
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Media/Info/XgdInfo.cs b/Aaru.Core/Media/Info/XgdInfo.cs
index 8d4736d58..9870dc956 100644
--- a/Aaru.Core/Media/Info/XgdInfo.cs
+++ b/Aaru.Core/Media/Info/XgdInfo.cs
@@ -32,13 +32,34 @@
namespace Aaru.Core.Media.Info
{
+ ///
+ /// Information about an XGD, XGD2 or XGD3 media.
+ ///
public sealed class XgdInfo
{
+ ///
+ /// Size of the game partition
+ ///
public ulong GameSize;
+ ///
+ /// Size of layer 0 of the video partition
+ ///
public ulong L0Video;
+ ///
+ /// Size of layer 1 of the video partition
+ ///
public ulong L1Video;
+ ///
+ /// Real layer break
+ ///
public ulong LayerBreak;
+ ///
+ /// Size of the middle zone
+ ///
public ulong MiddleZone;
+ ///
+ /// Total size of media
+ ///
public ulong TotalSize;
}
}
\ No newline at end of file
diff --git a/Aaru.Core/Options.cs b/Aaru.Core/Options.cs
index ee1d083a1..3275f9358 100644
--- a/Aaru.Core/Options.cs
+++ b/Aaru.Core/Options.cs
@@ -36,8 +36,16 @@ using System.Text;
namespace Aaru.Core
{
+ ///
+ /// Option parsing
+ ///
public static class Options
{
+ ///
+ /// Parses a string with options
+ ///
+ /// Options string
+ /// Options name-value dictionary
public static Dictionary Parse(string options)
{
Dictionary parsed = new Dictionary();
diff --git a/Aaru.Core/PrintScsiModePages.cs b/Aaru.Core/PrintScsiModePages.cs
index 299d27028..19667ba48 100644
--- a/Aaru.Core/PrintScsiModePages.cs
+++ b/Aaru.Core/PrintScsiModePages.cs
@@ -37,8 +37,17 @@ using Aaru.Helpers;
namespace Aaru.Core
{
+ ///
+ /// Prints all SCSI MODE pages
+ ///
public static class PrintScsiModePages
{
+ ///
+ /// Prints all SCSI MODE pages
+ ///
+ /// Decoded SCSI MODE SENSE
+ /// SCSI Peripheral Type
+ /// SCSI vendor identification
public static void Print(Modes.DecodedMode decMode, PeripheralDeviceTypes devType, byte[] vendorId)
{
AaruConsole.WriteLine(Modes.PrettifyModeHeader(decMode.Header, devType));
diff --git a/Aaru.Core/Remote.cs b/Aaru.Core/Remote.cs
index 6a2d7ec57..f45aa83e4 100644
--- a/Aaru.Core/Remote.cs
+++ b/Aaru.Core/Remote.cs
@@ -111,6 +111,10 @@ namespace Aaru.Core
submitThread.Start();
}
+ ///
+ /// Updates the main database
+ ///
+ /// If true creates the database from scratch, otherwise updates an existing database
public static void UpdateMainDatabase(bool create)
{
var mctx = AaruContext.Create(Settings.Settings.MainDbPath);
diff --git a/Aaru.Core/Sidecar/BlockTape.cs b/Aaru.Core/Sidecar/BlockTape.cs
index f927ff926..11b8ea1f4 100644
--- a/Aaru.Core/Sidecar/BlockTape.cs
+++ b/Aaru.Core/Sidecar/BlockTape.cs
@@ -36,6 +36,9 @@ using Schemas;
namespace Aaru.Core
{
+ ///
+ /// Sidecar operations
+ ///
public sealed partial class Sidecar
{
/// Creates a metadata sidecar for a block tape (e.g. scsi streaming)
diff --git a/Aaru.Core/Sidecar/Events.cs b/Aaru.Core/Sidecar/Events.cs
index 114d67e66..f07bc8a0b 100644
--- a/Aaru.Core/Sidecar/Events.cs
+++ b/Aaru.Core/Sidecar/Events.cs
@@ -36,28 +36,42 @@ namespace Aaru.Core
{
public sealed partial class Sidecar
{
+ /// Initializes a progress indicator (e.g. makes a progress bar visible)
public event InitProgressHandler InitProgressEvent;
+ /// Updates a progress indicator with text
public event UpdateProgressHandler UpdateProgressEvent;
+ /// Uninitializes a progress indicator (e.g. adds a newline to the console)
public event EndProgressHandler EndProgressEvent;
+ /// Initializes a secondary progress indicator (e.g. makes a progress bar visible)
public event InitProgressHandler2 InitProgressEvent2;
+ /// Event raised to update the values of a determinate progress bar
public event UpdateProgressHandler2 UpdateProgressEvent2;
+ /// Event raised when the progress bar is not longer needed
public event EndProgressHandler2 EndProgressEvent2;
+ /// Updates a status indicator
public event UpdateStatusHandler UpdateStatusEvent;
+ /// Initializes a progress indicator (e.g. makes a progress bar visible)
public void InitProgress() => InitProgressEvent?.Invoke();
+ /// Updates a progress indicator with text
public void UpdateProgress(string text, long current, long maximum) =>
UpdateProgressEvent?.Invoke(string.Format(text, current, maximum), current, maximum);
+ /// Uninitializes a progress indicator (e.g. adds a newline to the console)
public void EndProgress() => EndProgressEvent?.Invoke();
+ /// Initializes a secondary progress indicator (e.g. makes a progress bar visible)
public void InitProgress2() => InitProgressEvent2?.Invoke();
+ /// Event raised to update the values of a determinate progress bar
public void UpdateProgress2(string text, long current, long maximum) =>
UpdateProgressEvent2?.Invoke(string.Format(text, current, maximum), current, maximum);
+ /// Event raised when the progress bar is not longer needed
public void EndProgress2() => EndProgressEvent2?.Invoke();
+ /// Updates a status indicator
public void UpdateStatus(string text, params object[] args) =>
UpdateStatusEvent?.Invoke(string.Format(text, args));
}
diff --git a/Aaru.Core/Sidecar/Sidecar.cs b/Aaru.Core/Sidecar/Sidecar.cs
index 18cd58955..03f7ea4f6 100644
--- a/Aaru.Core/Sidecar/Sidecar.cs
+++ b/Aaru.Core/Sidecar/Sidecar.cs
@@ -56,6 +56,9 @@ namespace Aaru.Core
FileStream _fs;
CICMMetadataType _sidecar;
+ ///
+ /// Initializes a new instance of this class
+ ///
public Sidecar()
{
_plugins = GetPluginBase.Instance;
@@ -167,6 +170,9 @@ namespace Aaru.Core
return _sidecar;
}
+ ///
+ /// Aborts sidecar running operation
+ ///
public void Abort()
{
UpdateStatus("Aborting...");
diff --git a/Aaru.Database/Context.cs b/Aaru.Database/Context.cs
index bfcf509c8..07edcd6f3 100644
--- a/Aaru.Database/Context.cs
+++ b/Aaru.Database/Context.cs
@@ -35,30 +35,94 @@ using Microsoft.EntityFrameworkCore;
namespace Aaru.Database
{
+ ///
+ ///
+ /// Database context
+ ///
public sealed class AaruContext : DbContext
{
+ ///
+ /// Creates a database context with the specified options
+ ///
+ /// Options
public AaruContext(DbContextOptions options) : base(options) {}
+ ///
+ /// List of known devices
+ ///
public DbSet Devices { get; set; }
+ ///
+ /// List of local device reports
+ ///
public DbSet Reports { get; set; }
+ ///
+ /// Command usage statistics
+ ///
public DbSet Commands { get; set; }
+ ///
+ /// Statistics for found filesystems
+ ///
public DbSet Filesystems { get; set; }
+ ///
+ /// Statistics for used filters
+ ///
public DbSet Filters { get; set; }
+ ///
+ /// Statistics for media image formats
+ ///
public DbSet MediaFormats { get; set; }
+ ///
+ /// Statistics for partitioning schemes
+ ///
public DbSet Partitions { get; set; }
+ ///
+ /// Statistics for media types
+ ///
public DbSet Medias { get; set; }
+ ///
+ /// Statistics for devices seen using commands
+ ///
public DbSet SeenDevices { get; set; }
+ ///
+ /// Statistics for operating systems
+ ///
public DbSet OperatingSystems { get; set; }
+ ///
+ /// Statistics for used Aaru versions
+ ///
public DbSet Versions { get; set; }
+ ///
+ /// List of known USB vendors
+ ///
public DbSet UsbVendors { get; set; }
+ ///
+ /// List of known USB products
+ ///
public DbSet UsbProducts { get; set; }
+ ///
+ /// List of CD reading offsets
+ ///
public DbSet CdOffsets { get; set; }
+ ///
+ /// Statistics of remote applications
+ ///
public DbSet RemoteApplications { get; set; }
+ ///
+ /// Statistics of remote architectures
+ ///
public DbSet RemoteArchitectures { get; set; }
+ ///
+ /// Statistics of remote operating systems
+ ///
public DbSet RemoteOperatingSystems { get; set; }
// Note: If table does not appear check that last migration has been REALLY added to the project
+ ///
+ /// Creates a database context with the database in the specified path
+ ///
+ /// Path to database file
+ /// Database context
public static AaruContext Create(string dbPath)
{
var optionsBuilder = new DbContextOptionsBuilder();
@@ -67,6 +131,7 @@ namespace Aaru.Database
return new AaruContext(optionsBuilder.Options);
}
+ ///
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
diff --git a/Aaru.Database/ContextFactory.cs b/Aaru.Database/ContextFactory.cs
index 3c3de026c..bed05c9fc 100644
--- a/Aaru.Database/ContextFactory.cs
+++ b/Aaru.Database/ContextFactory.cs
@@ -34,8 +34,16 @@ using Microsoft.EntityFrameworkCore.Design;
namespace Aaru.Database
{
+ ///
+ /// Database context factory, for design time
+ ///
public class AaruContextFactory : IDesignTimeDbContextFactory
{
+ ///
+ /// Creates a database context
+ ///
+ /// Ignored parameters
+ /// A database context
public AaruContext CreateDbContext(string[] args) => AaruContext.Create("aaru.db");
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/BaseModel.cs b/Aaru.Database/Models/BaseModel.cs
index 76494d9d8..aced6e42e 100644
--- a/Aaru.Database/Models/BaseModel.cs
+++ b/Aaru.Database/Models/BaseModel.cs
@@ -34,8 +34,14 @@ using System.ComponentModel.DataAnnotations;
namespace Aaru.Database.Models
{
+ ///
+ /// Base database model
+ ///
public abstract class BaseModel
{
+ ///
+ /// Database ID
+ ///
[Key]
public int Id { get; set; }
}
diff --git a/Aaru.Database/Models/BaseOperatingSystem.cs b/Aaru.Database/Models/BaseOperatingSystem.cs
index 1277693a1..5092793f5 100644
--- a/Aaru.Database/Models/BaseOperatingSystem.cs
+++ b/Aaru.Database/Models/BaseOperatingSystem.cs
@@ -32,11 +32,26 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Operating system statistics
+ ///
public abstract class BaseOperatingSystem : BaseModel
{
+ ///
+ /// Operating system name
+ ///
public string Name { get; set; }
+ ///
+ /// Operating system version
+ ///
public string Version { get; set; }
+ ///
+ /// Has already been synchronized with Aaru's server
+ ///
public bool Synchronized { get; set; }
+ ///
+ /// Statistical count
+ ///
public ulong Count { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/CdOffset.cs b/Aaru.Database/Models/CdOffset.cs
index 24fd9f5af..734ecae80 100644
--- a/Aaru.Database/Models/CdOffset.cs
+++ b/Aaru.Database/Models/CdOffset.cs
@@ -34,10 +34,24 @@ using System;
namespace Aaru.Database.Models
{
+ ///
+ /// CD read offset
+ ///
public class CdOffset : CommonTypes.Metadata.CdOffset
{
+ ///
+ /// Builds an empty CD read offset
+ ///
public CdOffset() {}
+ ///
+ /// Builds a CD read offset with the specified parameters
+ ///
+ /// Manufacturer
+ /// Model
+ /// Read offset
+ /// Number of submissions
+ /// Percentage of agreement of submissions
public CdOffset(string manufacturer, string model, short offset, int submissions, float agreement)
{
Manufacturer = manufacturer;
@@ -48,6 +62,10 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
+ ///
+ /// Builds a CD read offset from the metadata type
+ ///
+ /// Read offset metadata
public CdOffset(CommonTypes.Metadata.CdOffset offset)
{
Manufacturer = offset.Manufacturer;
@@ -58,8 +76,17 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
+ ///
+ /// Database ID
+ ///
public int Id { get; set; }
+ ///
+ /// Date when model has been added to the database
+ ///
public DateTime AddedWhen { get; set; }
+ ///
+ /// Date when model was last modified
+ ///
public DateTime ModifiedWhen { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Command.cs b/Aaru.Database/Models/Command.cs
index ad9a016fe..4455de1cb 100644
--- a/Aaru.Database/Models/Command.cs
+++ b/Aaru.Database/Models/Command.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Command statistics.
+ ///
public class Command : NameCountModel {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Device.cs b/Aaru.Database/Models/Device.cs
index ccbea4b45..0fd086edf 100644
--- a/Aaru.Database/Models/Device.cs
+++ b/Aaru.Database/Models/Device.cs
@@ -36,10 +36,20 @@ using Aaru.CommonTypes.Metadata;
namespace Aaru.Database.Models
{
+ ///
+ /// Known device
+ ///
public class Device : DeviceReportV2
{
+ ///
+ /// Builds an empty device
+ ///
public Device() => LastSynchronized = DateTime.UtcNow;
+ ///
+ /// Builds a device from a device report
+ ///
+ /// Device report
public Device(DeviceReportV2 report)
{
ATA = report.ATA;
@@ -59,11 +69,20 @@ namespace Aaru.Database.Models
GdRomSwapDiscCapabilities = report.GdRomSwapDiscCapabilities;
}
+ ///
+ /// When this known device was last synchronized with the server
+ ///
public DateTime LastSynchronized { get; set; }
+ ///
+ /// Optimal number of blocks to read at once
+ ///
[DefaultValue(0)]
public int OptimalMultipleSectorsRead { get; set; }
+ ///
+ /// Can read GD-ROM using swap trick?
+ ///
[DefaultValue(null)]
public bool? CanReadGdRomUsingSwapDisc { get; set; }
}
diff --git a/Aaru.Database/Models/DeviceStat.cs b/Aaru.Database/Models/DeviceStat.cs
index 8bdeeef74..d4e0211a6 100644
--- a/Aaru.Database/Models/DeviceStat.cs
+++ b/Aaru.Database/Models/DeviceStat.cs
@@ -32,12 +32,30 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Device found in usage
+ ///
public class DeviceStat : BaseModel
{
+ ///
+ /// Manufacturer
+ ///
public string Manufacturer { get; set; }
+ ///
+ /// Model
+ ///
public string Model { get; set; }
+ ///
+ /// Revision or firmware version
+ ///
public string Revision { get; set; }
+ ///
+ /// Bus
+ ///
public string Bus { get; set; }
+ ///
+ /// Has already been synchronized with Aaru's server
+ ///
public bool Synchronized { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Filesystem.cs b/Aaru.Database/Models/Filesystem.cs
index 64dc2a388..6a3117c8d 100644
--- a/Aaru.Database/Models/Filesystem.cs
+++ b/Aaru.Database/Models/Filesystem.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Filesystem found
+ ///
public class Filesystem : NameCountModel {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Filter.cs b/Aaru.Database/Models/Filter.cs
index f79549b81..354713c31 100644
--- a/Aaru.Database/Models/Filter.cs
+++ b/Aaru.Database/Models/Filter.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Filter used
+ ///
public class Filter : NameCountModel {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Media.cs b/Aaru.Database/Models/Media.cs
index c895af85f..10c7d8a5b 100644
--- a/Aaru.Database/Models/Media.cs
+++ b/Aaru.Database/Models/Media.cs
@@ -32,11 +32,26 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Media type found
+ ///
public class Media : BaseModel
{
+ ///
+ /// Media type name
+ ///
public string Type { get; set; }
+ ///
+ /// Found physically, or in image
+ ///
public bool Real { get; set; }
+ ///
+ /// Has already been synchronized with Aaru's server
+ ///
public bool Synchronized { get; set; }
+ ///
+ /// Count of times found
+ ///
public ulong Count { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/MediaFormat.cs b/Aaru.Database/Models/MediaFormat.cs
index a75720853..8f9da5dec 100644
--- a/Aaru.Database/Models/MediaFormat.cs
+++ b/Aaru.Database/Models/MediaFormat.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Media image format
+ ///
public class MediaFormat : NameCountModel {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/NameCountModel.cs b/Aaru.Database/Models/NameCountModel.cs
index 2eafee2fd..874396209 100644
--- a/Aaru.Database/Models/NameCountModel.cs
+++ b/Aaru.Database/Models/NameCountModel.cs
@@ -32,10 +32,22 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Model for name-count values.
+ ///
public abstract class NameCountModel : BaseModel
{
+ ///
+ /// Value name
+ ///
public string Name { get; set; }
+ ///
+ /// Has already been synchronized with Aaru's server
+ ///
public bool Synchronized { get; set; }
+ ///
+ /// Value count
+ ///
public ulong Count { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/OperatingSystem.cs b/Aaru.Database/Models/OperatingSystem.cs
index 4fb750e63..697cb771b 100644
--- a/Aaru.Database/Models/OperatingSystem.cs
+++ b/Aaru.Database/Models/OperatingSystem.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Operating system
+ ///
public class OperatingSystem : BaseOperatingSystem {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Partition.cs b/Aaru.Database/Models/Partition.cs
index a0b98e013..eecebf11d 100644
--- a/Aaru.Database/Models/Partition.cs
+++ b/Aaru.Database/Models/Partition.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Partitioning scheme
+ ///
public class Partition : NameCountModel {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/RemoteApplication.cs b/Aaru.Database/Models/RemoteApplication.cs
index 75822990d..4b48b5b75 100644
--- a/Aaru.Database/Models/RemoteApplication.cs
+++ b/Aaru.Database/Models/RemoteApplication.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Remote application
+ ///
public class RemoteApplication : BaseOperatingSystem {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/RemoteArchitecture.cs b/Aaru.Database/Models/RemoteArchitecture.cs
index 7805922a0..75df98a8b 100644
--- a/Aaru.Database/Models/RemoteArchitecture.cs
+++ b/Aaru.Database/Models/RemoteArchitecture.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Remote architecture
+ ///
public class RemoteArchitecture : NameCountModel {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/RemoteOperatingSystem.cs b/Aaru.Database/Models/RemoteOperatingSystem.cs
index 3e4e8833b..0da5e617f 100644
--- a/Aaru.Database/Models/RemoteOperatingSystem.cs
+++ b/Aaru.Database/Models/RemoteOperatingSystem.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Remote operating system
+ ///
public class RemoteOperatingSystem : BaseOperatingSystem {}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Report.cs b/Aaru.Database/Models/Report.cs
index 4fd5f0c50..a13cc5af5 100644
--- a/Aaru.Database/Models/Report.cs
+++ b/Aaru.Database/Models/Report.cs
@@ -35,14 +35,24 @@ using Aaru.CommonTypes.Metadata;
namespace Aaru.Database.Models
{
+ ///
+ /// Device report
+ ///
public class Report : DeviceReportV2
{
+ ///
+ /// Builds an empty device report
+ ///
public Report()
{
Created = DateTime.UtcNow;
Uploaded = false;
}
+ ///
+ /// Builds a device report model from a device report
+ ///
+ /// Device report
public Report(DeviceReportV2 report)
{
ATA = report.ATA;
@@ -62,7 +72,13 @@ namespace Aaru.Database.Models
Type = report.Type;
}
+ ///
+ /// Date when the device report was created
+ ///
public DateTime Created { get; set; }
+ ///
+ /// If this model has already been upload
+ ///
public bool Uploaded { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/UsbProduct.cs b/Aaru.Database/Models/UsbProduct.cs
index 8f15556cf..7d9d0e731 100644
--- a/Aaru.Database/Models/UsbProduct.cs
+++ b/Aaru.Database/Models/UsbProduct.cs
@@ -35,10 +35,22 @@ using System.ComponentModel.DataAnnotations;
namespace Aaru.Database.Models
{
+ ///
+ /// USB product
+ ///
public class UsbProduct
{
+ ///
+ /// Builds an empty USB product
+ ///
public UsbProduct() {}
+ ///
+ /// Builds a USB product with the specified parameters
+ ///
+ /// Vendor ID
+ /// Product ID
+ /// Product name
public UsbProduct(ushort vendorId, ushort id, string product)
{
VendorId = vendorId;
@@ -47,13 +59,34 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
+ ///
+ /// Database ID
+ ///
[Key]
public int Id { get; set; }
+ ///
+ /// Product ID
+ ///
public ushort ProductId { get; set; }
+ ///
+ /// Product name
+ ///
public string Product { get; set; }
+ ///
+ /// Date when model has been added to the database
+ ///
public DateTime AddedWhen { get; set; }
+ ///
+ /// Date when model was last modified
+ ///
public DateTime ModifiedWhen { get; set; }
+ ///
+ /// USB vendor ID
+ ///
public ushort VendorId { get; set; }
+ ///
+ /// Database link to USB vendor
+ ///
public virtual UsbVendor Vendor { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/UsbVendor.cs b/Aaru.Database/Models/UsbVendor.cs
index 1a4ebeb77..3098519bb 100644
--- a/Aaru.Database/Models/UsbVendor.cs
+++ b/Aaru.Database/Models/UsbVendor.cs
@@ -36,10 +36,21 @@ using System.ComponentModel.DataAnnotations;
namespace Aaru.Database.Models
{
+ ///
+ /// USB vendor
+ ///
public class UsbVendor
{
+ ///
+ /// Builds an empty USB vendor
+ ///
public UsbVendor() {}
+ ///
+ /// Builds a USB vendor with the specified parameters
+ ///
+ /// Vendor ID
+ /// Vendor name
public UsbVendor(ushort id, string vendor)
{
Id = id;
@@ -47,12 +58,27 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
+ ///
+ /// Database ID
+ ///
[Key]
public ushort Id { get; set; }
+ ///
+ /// Vendor name
+ ///
public string Vendor { get; set; }
+ ///
+ /// Date when model has been added to the database
+ ///
public DateTime AddedWhen { get; set; }
+ ///
+ /// Date when model was last modified
+ ///
public DateTime ModifiedWhen { get; set; }
+ ///
+ /// List of products from this vendor
+ ///
public virtual ICollection Products { get; set; }
}
}
\ No newline at end of file
diff --git a/Aaru.Database/Models/Version.cs b/Aaru.Database/Models/Version.cs
index 58a688544..e831b8a79 100644
--- a/Aaru.Database/Models/Version.cs
+++ b/Aaru.Database/Models/Version.cs
@@ -32,5 +32,8 @@
namespace Aaru.Database.Models
{
+ ///
+ /// Aaru version
+ ///
public class Version : NameCountModel {}
}
\ No newline at end of file
diff --git a/Aaru.Decoders b/Aaru.Decoders
index 6e744af7f..f7fa22672 160000
--- a/Aaru.Decoders
+++ b/Aaru.Decoders
@@ -1 +1 @@
-Subproject commit 6e744af7f3b20e89de7abf82b55114f99c40c90e
+Subproject commit f7fa226727375a8e093d8252d95f4a02c4b45cf0
diff --git a/Aaru.Devices/Device/AtaCommands/Ata28.cs b/Aaru.Devices/Device/AtaCommands/Ata28.cs
index d06e55139..bd448c255 100644
--- a/Aaru.Devices/Device/AtaCommands/Ata28.cs
+++ b/Aaru.Devices/Device/AtaCommands/Ata28.cs
@@ -37,6 +37,14 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Reads the drive buffer using PIO transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadBuffer(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint timeout,
out double duration)
{
@@ -58,6 +66,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads the drive buffer using DMA transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadBufferDma(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint timeout,
out double duration)
{
@@ -78,10 +94,31 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using 28-bit addressing and DMA transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadDma(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint lba, byte count,
uint timeout, out double duration) =>
ReadDma(out buffer, out statusRegisters, true, lba, count, timeout, out duration);
+ ///
+ /// Reads sectors using 48-bit addressing and DMA transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Retry on error
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadDma(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, bool retry, uint lba,
byte count, uint timeout, out double duration)
{
@@ -109,6 +146,16 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using 28-bit addressing and PIO transfer, sending an interrupt only after all the sectors have been transferred
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadMultiple(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint lba, byte count,
uint timeout, out double duration)
{
@@ -137,6 +184,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads native max address using 28-bit addressing
+ ///
+ /// Maximum addressable block
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadNativeMaxAddress(out uint lba, out AtaErrorRegistersLba28 statusRegisters, uint timeout,
out double duration)
{
@@ -170,10 +225,31 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using 28-bit addressing and PIO transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Read(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint lba, byte count,
uint timeout, out double duration) =>
Read(out buffer, out statusRegisters, true, lba, count, timeout, out duration);
+ ///
+ /// Reads sectors using 28-bit addressing and PIO transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Retry on error
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Read(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, bool retry, uint lba,
byte count, uint timeout, out double duration)
{
@@ -202,10 +278,31 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads a long sector using 28-bit addressing and PIO transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// LBA of read start
+ /// Size in bytes of the long sector
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadLong(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint lba, uint blockSize,
uint timeout, out double duration) =>
ReadLong(out buffer, out statusRegisters, true, lba, blockSize, timeout, out duration);
+ ///
+ /// Reads a long sector using 28-bit addressing and PIO transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Retry on error
+ /// LBA of read start
+ /// Size in bytes of the long sector
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadLong(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, bool retry, uint lba,
uint blockSize, uint timeout, out double duration)
{
@@ -234,6 +331,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Sets the reading mechanism ready to read the specified block using 28-bit LBA addressing
+ ///
+ /// Returned status registers
+ /// LBA to position reading mechanism ready to read
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Seek(out AtaErrorRegistersLba28 statusRegisters, uint lba, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
diff --git a/Aaru.Devices/Device/AtaCommands/Ata48.cs b/Aaru.Devices/Device/AtaCommands/Ata48.cs
index 533cf73eb..d60ba5a4b 100644
--- a/Aaru.Devices/Device/AtaCommands/Ata48.cs
+++ b/Aaru.Devices/Device/AtaCommands/Ata48.cs
@@ -37,6 +37,14 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Gets native max address using 48-bit addressing
+ ///
+ /// Maximum addressable block
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool GetNativeMaxAddressExt(out ulong lba, out AtaErrorRegistersLba48 statusRegisters, uint timeout,
out double duration)
{
@@ -71,6 +79,16 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using 48-bit addressing and DMA transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 65536 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadDma(out byte[] buffer, out AtaErrorRegistersLba48 statusRegisters, ulong lba, ushort count,
uint timeout, out double duration)
{
@@ -100,6 +118,17 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads a drive log using PIO transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Log address
+ /// Log page number
+ /// How log blocks to read
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadLog(out byte[] buffer, out AtaErrorRegistersLba48 statusRegisters, byte logAddress,
ushort pageNumber, ushort count, uint timeout, out double duration)
{
@@ -126,6 +155,17 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads a drive log using DMA transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Log address
+ /// Log page number
+ /// How log blocks to read
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadLogDma(out byte[] buffer, out AtaErrorRegistersLba48 statusRegisters, byte logAddress,
ushort pageNumber, ushort count, uint timeout, out double duration)
{
@@ -151,6 +191,16 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using 48-bit addressing and PIO transfer, sending an interrupt only after all the sectors have been transferred
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadMultiple(out byte[] buffer, out AtaErrorRegistersLba48 statusRegisters, ulong lba, ushort count,
uint timeout, out double duration)
{
@@ -181,6 +231,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads native max address using 48-bit addressing
+ ///
+ /// Maximum addressable block
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadNativeMaxAddress(out ulong lba, out AtaErrorRegistersLba48 statusRegisters, uint timeout,
out double duration)
{
@@ -216,6 +274,16 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using 48-bit addressing and PIO transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// LBA of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Read(out byte[] buffer, out AtaErrorRegistersLba48 statusRegisters, ulong lba, ushort count,
uint timeout, out double duration)
{
diff --git a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs
index 740e0543f..3a9e0beb9 100644
--- a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs
+++ b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs
@@ -87,10 +87,35 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using CHS addressing and DMA transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Cylinder of read start
+ /// Head of read start
+ /// Sector of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadDma(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, ushort cylinder, byte head,
byte sector, byte count, uint timeout, out double duration) =>
ReadDma(out buffer, out statusRegisters, true, cylinder, head, sector, count, timeout, out duration);
+ ///
+ /// Reads sectors using CHS addressing and DMA transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Retry on error
+ /// Cylinder of read start
+ /// Head of read start
+ /// Sector of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadDma(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, bool retry, ushort cylinder,
byte head, byte sector, byte count, uint timeout, out double duration)
{
@@ -116,6 +141,18 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using CHS addressing and PIO transfer, sending an interrupt only after all the sectors have been transferred
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Cylinder of read start
+ /// Head of read start
+ /// Sector of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadMultiple(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, ushort cylinder,
byte head, byte sector, byte count, uint timeout, out double duration)
{
@@ -142,10 +179,35 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads sectors using CHS addressing and PIO transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Cylinder of read start
+ /// Head of read start
+ /// Sector of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Read(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, ushort cylinder, byte head,
byte sector, byte count, uint timeout, out double duration) =>
Read(out buffer, out statusRegisters, true, cylinder, head, sector, count, timeout, out duration);
+ ///
+ /// Reads sectors using CHS addressing and PIO transfer
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Retry on error
+ /// Cylinder of read start
+ /// Head of read start
+ /// Sector of read start
+ /// How many blocks to read, or 0 to indicate 256 blocks
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Read(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, bool retry, ushort cylinder,
byte head, byte sector, byte count, uint timeout, out double duration)
{
@@ -172,10 +234,35 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads a long sector using CHS addressing and PIO transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Cylinder of read start
+ /// Head of read start
+ /// Sector of read start
+ /// Size in bytes of the long sector
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadLong(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, ushort cylinder, byte head,
byte sector, uint blockSize, uint timeout, out double duration) =>
ReadLong(out buffer, out statusRegisters, true, cylinder, head, sector, blockSize, timeout, out duration);
+ ///
+ /// Reads a long sector using CHS addressing and PIO transfer, retrying on error
+ ///
+ /// Buffer that contains the read data
+ /// Returned status registers
+ /// Retry on error
+ /// Cylinder of read start
+ /// Head of read start
+ /// Sector of read start
+ /// Size in bytes of the long sector
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadLong(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, bool retry, ushort cylinder,
byte head, byte sector, uint blockSize, uint timeout, out double duration)
{
@@ -202,6 +289,16 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Sets the reading mechanism ready to read the specified block using CHS addressing
+ ///
+ /// Returned status registers
+ /// Cylinder to position reading mechanism ready to read
+ /// Head to position reading mechanism ready to read
+ /// Sector to position reading mechanism ready to read
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Seek(out AtaErrorRegistersChs statusRegisters, ushort cylinder, byte head, byte sector,
uint timeout, out double duration)
{
@@ -227,10 +324,30 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Enables drive features
+ ///
+ /// Returned status registers
+ /// Feature to enable
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SetFeatures(out AtaErrorRegistersChs statusRegisters, AtaFeatures feature, uint timeout,
out double duration) =>
SetFeatures(out statusRegisters, feature, 0, 0, 0, 0, timeout, out duration);
+ ///
+ /// Enables drive features
+ ///
+ /// Returned status registers
+ /// Feature to enable
+ /// Value for the cylinder register
+ /// Value for the head register
+ /// Value for the sector register
+ /// Value for the sector count register
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SetFeatures(out AtaErrorRegistersChs statusRegisters, AtaFeatures feature, ushort cylinder,
byte head, byte sector, byte sectorCount, uint timeout, out double duration)
{
@@ -258,6 +375,13 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Prevents ejection of the media inserted in the drive
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool DoorLock(out AtaErrorRegistersChs statusRegisters, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
@@ -278,6 +402,13 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Allows ejection of the media inserted in the drive
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool DoorUnlock(out AtaErrorRegistersChs statusRegisters, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
@@ -298,6 +429,13 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Ejects the media inserted in the drive
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool MediaEject(out AtaErrorRegistersChs statusRegisters, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
diff --git a/Aaru.Devices/Device/AtaCommands/Cfa.cs b/Aaru.Devices/Device/AtaCommands/Cfa.cs
index a64fde7b9..228738ec2 100644
--- a/Aaru.Devices/Device/AtaCommands/Cfa.cs
+++ b/Aaru.Devices/Device/AtaCommands/Cfa.cs
@@ -37,6 +37,15 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Requests to translate an LBA to a card physical address
+ ///
+ /// Data buffer
+ /// Returned status registers
+ /// LBA to start reading from
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool TranslateSector(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint lba,
uint timeout, out double duration)
{
@@ -64,6 +73,17 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Requests to translate a CHS to a card physical address
+ ///
+ /// Data buffer
+ /// Returned status registers
+ /// Cylinder
+ /// Head
+ /// Sector
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool TranslateSector(out byte[] buffer, out AtaErrorRegistersChs statusRegisters, ushort cylinder,
byte head, byte sector, uint timeout, out double duration)
{
@@ -89,6 +109,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Requests an extended error code
+ ///
+ /// Error code
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool RequestExtendedErrorCode(out byte errorCode, out AtaErrorRegistersLba28 statusRegisters,
uint timeout, out double duration)
{
diff --git a/Aaru.Devices/Device/AtaCommands/MCPT.cs b/Aaru.Devices/Device/AtaCommands/MCPT.cs
index e5da92883..e1c045d12 100644
--- a/Aaru.Devices/Device/AtaCommands/MCPT.cs
+++ b/Aaru.Devices/Device/AtaCommands/MCPT.cs
@@ -37,14 +37,36 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Enables media card pass through
+ ///
+ /// Status registers.
+ /// Timeout in seconds
+ /// Time it took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool EnableMediaCardPassThrough(out AtaErrorRegistersChs statusRegisters, uint timeout,
out double duration) =>
CheckMediaCardType(1, out statusRegisters, timeout, out duration);
+ ///
+ /// Disables media card pass through
+ ///
+ /// Status registers.
+ /// Timeout in seconds
+ /// Time it took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool DisableMediaCardPassThrough(out AtaErrorRegistersChs statusRegisters, uint timeout,
out double duration) =>
CheckMediaCardType(0, out statusRegisters, timeout, out duration);
+ ///
+ /// Checks media card pass through
+ ///
+ /// Feature
+ /// Status registers.
+ /// Timeout in seconds
+ /// Time it took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool CheckMediaCardType(byte feature, out AtaErrorRegistersChs statusRegisters, uint timeout,
out double duration)
{
diff --git a/Aaru.Devices/Device/AtaCommands/Smart.cs b/Aaru.Devices/Device/AtaCommands/Smart.cs
index 754475fcf..23b451ae7 100644
--- a/Aaru.Devices/Device/AtaCommands/Smart.cs
+++ b/Aaru.Devices/Device/AtaCommands/Smart.cs
@@ -37,6 +37,13 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Disables S.M.A.R.T.
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartDisable(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
@@ -60,6 +67,13 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Enables auto-saving of S.M.A.R.T. attributes
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartEnableAttributeAutosave(out AtaErrorRegistersLba28 statusRegisters, uint timeout,
out double duration)
{
@@ -85,6 +99,13 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Disables auto-saving of S.M.A.R.T. attributes
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartDisableAttributeAutosave(out AtaErrorRegistersLba28 statusRegisters, uint timeout,
out double duration)
{
@@ -109,6 +130,13 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Enables S.M.A.R.T.
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartEnable(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
@@ -132,6 +160,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Requests drive to execute offline immediate S.M.A.R.T. test
+ ///
+ /// Subcommand
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartExecuteOffLineImmediate(out AtaErrorRegistersLba28 statusRegisters, byte subcommand,
uint timeout, out double duration)
{
@@ -157,6 +193,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads S.M.A.R.T. data
+ ///
+ /// Buffer containing data
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartReadData(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, uint timeout,
out double duration)
{
@@ -181,6 +225,15 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads S.M.A.R.T. log
+ ///
+ /// Buffer containing log
+ /// Returned status registers
+ /// Log address
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartReadLog(out byte[] buffer, out AtaErrorRegistersLba28 statusRegisters, byte logAddress,
uint timeout, out double duration)
{
@@ -206,6 +259,13 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Retrieves S.M.A.R.T. status
+ ///
+ /// Returned status registers
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SmartReturnStatus(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
diff --git a/Aaru.Devices/Device/Commands.cs b/Aaru.Devices/Device/Commands.cs
index c6aa7a3b0..72a0bbde1 100644
--- a/Aaru.Devices/Device/Commands.cs
+++ b/Aaru.Devices/Device/Commands.cs
@@ -242,19 +242,59 @@ namespace Aaru.Devices
timeout);
}
+ ///
+ /// Encapsulates a single MMC command to send in a queue
+ ///
+ [SuppressMessage("ReSharper", "InconsistentNaming")]
+ [SuppressMessage("ReSharper", "MemberCanBeInternal")]
public class MmcSingleCommand
{
+ ///
+ /// Command argument
+ ///
public uint argument;
+ ///
+ /// How many blocks to transfer
+ ///
public uint blocks;
+ ///
+ /// Size of block in bytes
+ ///
public uint blockSize;
+ ///
+ /// Buffer for MMC/SD command response
+ ///
public byte[] buffer;
+ ///
+ /// MMC/SD opcode
+ ///
public MmcCommands command;
+ ///
+ /// Flags indicating kind and place of response
+ ///
public MmcFlags flags;
+ ///
+ /// True if command should be preceded with CMD55
+ ///
public bool isApplication;
+ ///
+ /// Response registers
+ ///
public uint[] response;
+ ///
+ /// True if data is sent from host to card
+ ///
public bool write;
}
+ ///
+ /// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI controller
+ ///
+ /// List of commands
+ /// Duration to execute all commands, in milliseconds
+ /// Set to true if any of the commands returned an error status, false otherwise
+ /// Maximum allowed time to execute a single command
+ /// 0 if no error occurred, otherwise, errno
public int SendMultipleMmcCommands(MmcSingleCommand[] commands, out double duration, out bool sense,
uint timeout = 15)
{
@@ -293,6 +333,10 @@ namespace Aaru.Devices
return error;
}
+ ///
+ /// Closes then immediately reopens a device
+ ///
+ /// Returned error number if any
public bool ReOpen()
{
if(!(_remote is null))
@@ -308,6 +352,14 @@ namespace Aaru.Devices
return Error;
}
+ ///
+ /// Reads data using operating system buffers.
+ ///
+ /// Data buffer
+ /// Offset in remote device to start reading, in bytes
+ /// Number of bytes to read
+ /// Total time in milliseconds the reading took
+ /// true if there was an error, false otherwise
public bool BufferedOsRead(out byte[] buffer, long offset, uint length, out double duration)
{
if(!(_remote is null))
diff --git a/Aaru.Devices/Device/Constructor.cs b/Aaru.Devices/Device/Constructor.cs
index 2a1862b90..e35a63e97 100644
--- a/Aaru.Devices/Device/Constructor.cs
+++ b/Aaru.Devices/Device/Constructor.cs
@@ -59,6 +59,9 @@ using VendorString = Aaru.Decoders.SecureDigital.VendorString;
namespace Aaru.Devices
{
+ ///
+ /// Implements a device or media containing drive
+ ///
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "UnusedMember.Global"),
SuppressMessage("ReSharper", "UnusedMethodReturnValue.Global")]
public sealed partial class Device
diff --git a/Aaru.Devices/Device/Destructor.cs b/Aaru.Devices/Device/Destructor.cs
index 797d289c6..ff65d632e 100644
--- a/Aaru.Devices/Device/Destructor.cs
+++ b/Aaru.Devices/Device/Destructor.cs
@@ -45,6 +45,9 @@ namespace Aaru.Devices
///
~Device() => Close();
+ ///
+ /// Closes a device
+ ///
public void Close()
{
if(_remote != null)
diff --git a/Aaru.Devices/Device/List.cs b/Aaru.Devices/Device/List.cs
index 3f7cb45f7..90a370985 100644
--- a/Aaru.Devices/Device/List.cs
+++ b/Aaru.Devices/Device/List.cs
@@ -38,35 +38,75 @@ using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
namespace Aaru.Devices
{
+ ///
+ /// Contains device information
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct DeviceInfo
{
+ ///
+ /// Device path
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
public string Path;
+ ///
+ /// Device vendor or manufacturer
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Vendor;
+ ///
+ /// Device model or product name
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Model;
+ ///
+ /// Device serial number
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Serial;
+ ///
+ /// Bus the device is attached to
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Bus;
+ ///
+ /// Set to true if Aaru can send commands to the device in the current machine or remote, false otherwise
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool Supported;
+ ///
+ /// Padding
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public readonly byte[] Padding;
}
public sealed partial class Device
{
+ ///
+ /// Lists devices attached to current machine
+ ///
+ /// List of devices
public static DeviceInfo[] ListDevices() => ListDevices(out _, out _, out _, out _, out _, out _);
+ ///
+ /// Lists devices attached to current machine or specified remote
+ ///
+ /// Is remote
+ /// Remote application
+ /// Remote application version
+ /// Remote operating system name
+ /// Remote operating system version
+ /// Remote architecture
+ /// Remote URI
+ /// List of devices
+ ///
public static DeviceInfo[] ListDevices(out bool isRemote, out string serverApplication,
out string serverVersion, out string serverOperatingSystem,
out string serverOperatingSystemVersion, out string serverArchitecture,
diff --git a/Aaru.Devices/Device/MmcCommands/MMC.cs b/Aaru.Devices/Device/MmcCommands/MMC.cs
index 0524d8376..1354061c7 100644
--- a/Aaru.Devices/Device/MmcCommands/MMC.cs
+++ b/Aaru.Devices/Device/MmcCommands/MMC.cs
@@ -37,6 +37,14 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Reads the CSD register from a SecureDigital or MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadCsd(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[16];
@@ -52,6 +60,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads the CID register from a SecureDigital or MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadCid(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[16];
@@ -67,6 +83,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads the OCR register from a MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadOcr(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[4];
@@ -82,6 +106,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads the extended CSD from a MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadExtendedCsd(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[512];
@@ -97,6 +129,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Sets the block length for transfers from a SecureDigital or MultiMediaCard device
+ ///
+ /// Block length in bytes
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool SetBlockLength(uint length, out uint[] response, uint timeout, out double duration)
{
byte[] buffer = new byte[0];
@@ -112,6 +152,18 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads blocks from a SecureDigital or MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// LBA to start reading from
+ /// Block size in bytes
+ /// Number of bytes to transfer
+ /// Card is byte-addressed
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool Read(out byte[] buffer, out uint[] response, uint lba, uint blockSize, ushort transferLength,
bool byteAddressed, uint timeout, out double duration)
{
@@ -134,6 +186,17 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads a single block from a SecureDigital or MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// LBA to start reading from
+ /// Block size in bytes
+ /// Card is byte-addressed
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadSingleBlock(out byte[] buffer, out uint[] response, uint lba, uint blockSize,
bool byteAddressed, uint timeout, out double duration)
{
@@ -159,6 +222,18 @@ namespace Aaru.Devices
static bool _readMultipleBlockCannotSetBlockCount;
+ ///
+ /// Reads multiple blocks from a SecureDigital or MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// LBA to start reading from
+ /// Block size in bytes
+ /// Number of bytes to transfer
+ /// Card is byte-addressed
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadMultipleBlock(out byte[] buffer, out uint[] response, uint lba, uint blockSize,
ushort transferLength, bool byteAddressed, uint timeout, out double duration)
{
@@ -190,6 +265,18 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads blocks using a single block read from a SecureDigital or MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// LBA to start reading from
+ /// Block size in bytes
+ /// Number of bytes to transfer
+ /// Card is byte-addressed
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadMultipleUsingSingle(out byte[] buffer, out uint[] response, uint lba, uint blockSize,
ushort transferLength, bool byteAddressed, uint timeout,
out double duration)
@@ -229,6 +316,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads status register from a MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadStatus(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[4];
@@ -244,6 +339,18 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads blocks with block count from a SecureDigital or MultiMediaCard device
+ ///
+ /// Data buffer
+ /// Response
+ /// LBA to start reading from
+ /// Block size in bytes
+ /// Number of bytes to transfer
+ /// Card is byte-addressed
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadWithBlockCount(out byte[] buffer, out uint[] response, uint lba, uint blockSize,
ushort transferLength, bool byteAddressed, uint timeout, out double duration)
{
diff --git a/Aaru.Devices/Device/MmcCommands/SecureDigital.cs b/Aaru.Devices/Device/MmcCommands/SecureDigital.cs
index 9482b59b9..3bcfa7dd9 100644
--- a/Aaru.Devices/Device/MmcCommands/SecureDigital.cs
+++ b/Aaru.Devices/Device/MmcCommands/SecureDigital.cs
@@ -36,6 +36,14 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Reads the status register from a SecureDigital device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadSdStatus(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[64];
@@ -51,6 +59,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads the OCR register from a SecureDigital device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadSdocr(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[4];
@@ -66,6 +82,14 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Reads the SCR register from a SecureDigital device
+ ///
+ /// Data buffer
+ /// Response
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool ReadScr(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[8];
diff --git a/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs b/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs
index c95f70166..1745b6c45 100644
--- a/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs
+++ b/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs
@@ -39,6 +39,17 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
+ ///
+ /// Sets the data for the integrated display
+ ///
+ /// Returned SENSE buffer
+ /// If the display should start flashing
+ /// Display mode
+ /// String to be shown in the first line of the display
+ /// String to be shown in the second line of the display
+ /// Timeout to wait for command execution
+ /// Time the device took to execute the command in milliseconds
+ /// true if the device set an error condition, false otherwise
public bool FujitsuDisplay(out byte[] senseBuffer, bool flash, FujitsuDisplayModes mode, string firstHalf,
string secondHalf, uint timeout, out double duration)
{
diff --git a/Aaru.Devices/Device/ScsiCommands/MMC.cs b/Aaru.Devices/Device/ScsiCommands/MMC.cs
index b73e6210b..2e0f2339a 100644
--- a/Aaru.Devices/Device/ScsiCommands/MMC.cs
+++ b/Aaru.Devices/Device/ScsiCommands/MMC.cs
@@ -527,12 +527,29 @@ namespace Aaru.Devices
return sense;
}
+ /// Prevents ejection of the media inserted in the drive
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool PreventMediumRemoval(out byte[] senseBuffer, uint timeout, out double duration) =>
PreventAllowMediumRemoval(out senseBuffer, false, true, timeout, out duration);
+ /// Allows ejection of the media inserted in the drive
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool AllowMediumRemoval(out byte[] senseBuffer, uint timeout, out double duration) =>
PreventAllowMediumRemoval(out senseBuffer, false, false, timeout, out duration);
+ /// Prevents or allows ejection of the media inserted in the drive
+ /// Sense buffer.
+ /// Persistent.
+ /// Prevent.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool PreventAllowMediumRemoval(out byte[] senseBuffer, bool persistent, bool prevent, uint timeout,
out double duration)
{
@@ -560,18 +577,49 @@ namespace Aaru.Devices
return sense;
}
+ /// Loads the media tray
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool LoadTray(out byte[] senseBuffer, uint timeout, out double duration) =>
StartStopUnit(out senseBuffer, false, 0, 0, false, true, true, timeout, out duration);
+ /// Ejects the media or its tray
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool EjectTray(out byte[] senseBuffer, uint timeout, out double duration) =>
StartStopUnit(out senseBuffer, false, 0, 0, false, true, false, timeout, out duration);
+ /// Starts the drive's reading mechanism
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool StartUnit(out byte[] senseBuffer, uint timeout, out double duration) =>
StartStopUnit(out senseBuffer, false, 0, 0, false, false, true, timeout, out duration);
+ /// Stops the drive's reading mechanism
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool StopUnit(out byte[] senseBuffer, uint timeout, out double duration) =>
StartStopUnit(out senseBuffer, false, 0, 0, false, false, false, timeout, out duration);
+ /// Starts or stops the drive's reading mechanism or tray
+ /// Sense buffer.
+ /// Return from execution immediately
+ /// Choose density layer for hybrid discs
+ /// Power condition
+ /// Change format layer
+ /// Loads or ejects the media
+ /// Starts the mechanism
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool StartStopUnit(out byte[] senseBuffer, bool immediate, byte formatLayer, byte powerConditions,
bool changeFormatLayer, bool loadEject, bool start, uint timeout, out double duration)
{
@@ -613,6 +661,13 @@ namespace Aaru.Devices
return sense;
}
+ /// Reads the MCN from a disc
+ /// Decoded MCN.
+ /// Buffer containing raw drive response.
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool ReadMcn(out string mcn, out byte[] buffer, out byte[] senseBuffer, uint timeout,
out double duration)
{
@@ -645,6 +700,14 @@ namespace Aaru.Devices
return sense;
}
+ /// Reads the ISRC from a track
+ /// Track number.
+ /// Decoded ISRC.
+ /// Buffer containing raw drive response.
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool ReadIsrc(byte trackNumber, out string isrc, out byte[] buffer, out byte[] senseBuffer, uint timeout,
out double duration)
{
@@ -678,6 +741,14 @@ namespace Aaru.Devices
return sense;
}
+ /// Sets the reading speed
+ /// Sense buffer.
+ /// Rotational control.
+ /// Read speed.
+ /// Write speed.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool SetCdSpeed(out byte[] senseBuffer, RotationalControl rotationalControl, ushort readSpeed,
ushort writeSpeed, uint timeout, out double duration)
{
diff --git a/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs b/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs
index 0ee611d07..aeff45573 100644
--- a/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs
+++ b/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs
@@ -31,11 +31,18 @@
// ****************************************************************************/
using Aaru.Console;
+// ReSharper disable InconsistentNaming
namespace Aaru.Devices
{
public sealed partial class Device
{
+ /// Reads the data TOC from an MD-DATA
+ /// Buffer where the response will be stored
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool MiniDiscReadDataTOC(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
ushort transferLength = 2336;
@@ -59,6 +66,13 @@ namespace Aaru.Devices
return sense;
}
+ /// Reads the user TOC from an MD-DATA
+ /// Buffer where the response will be stored
+ /// Sense buffer.
+ /// TOC sector to read
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool MiniDiscReadUserTOC(out byte[] buffer, out byte[] senseBuffer, uint sector, uint timeout,
out double duration)
{
@@ -87,6 +101,12 @@ namespace Aaru.Devices
return sense;
}
+ /// Sends a D5h command to a MD-DATA drive (harmless)
+ /// Buffer where the response will be stored
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool MiniDiscD5(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
ushort transferLength = 4;
@@ -110,7 +130,13 @@ namespace Aaru.Devices
return sense;
}
- public bool MiniDiscStopPlaying(out byte[] buffer, out byte[] senseBuffer, uint sector, uint timeout,
+ /// Stops playing MiniDisc audio from an MD-DATA drive
+ /// Buffer where the response will be stored
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
+ public bool MiniDiscStopPlaying(out byte[] buffer, out byte[] senseBuffer, uint timeout,
out double duration)
{
senseBuffer = new byte[64];
@@ -130,6 +156,12 @@ namespace Aaru.Devices
return sense;
}
+ /// Gets current position while playing MiniDisc audio from an MD-DATA drive
+ /// Buffer where the response will be stored
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool MiniDiscReadPosition(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
ushort transferLength = 4;
@@ -153,6 +185,12 @@ namespace Aaru.Devices
return sense;
}
+ /// Gets MiniDisc type from an MD-DATA drive
+ /// Buffer where the response will be stored
+ /// Sense buffer.
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed and contains the sense buffer.
public bool MiniDiscGetType(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
ushort transferLength = 8;
diff --git a/Aaru.Devices/Device/ScsiCommands/SPC.cs b/Aaru.Devices/Device/ScsiCommands/SPC.cs
index d1bbea032..b71dc35b3 100644
--- a/Aaru.Devices/Device/ScsiCommands/SPC.cs
+++ b/Aaru.Devices/Device/ScsiCommands/SPC.cs
@@ -777,9 +777,24 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Requests the device fixed sense
+ ///
+ /// Sense buffer
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed.
public bool RequestSense(out byte[] buffer, uint timeout, out double duration) =>
RequestSense(false, out buffer, timeout, out duration);
+ ///
+ /// Requests the device sense
+ ///
+ /// Request a descriptor sense
+ /// Sense buffer
+ /// Timeout in seconds.
+ /// Duration in milliseconds it took for the device to execute the command.
+ /// true if the command failed.
public bool RequestSense(bool descriptor, out byte[] buffer, uint timeout, out double duration)
{
byte[] cdb = new byte[6];
diff --git a/Aaru.Devices/Device/ScsiCommands/SSC.cs b/Aaru.Devices/Device/ScsiCommands/SSC.cs
index bdfe109cd..a50b4ebd9 100644
--- a/Aaru.Devices/Device/ScsiCommands/SSC.cs
+++ b/Aaru.Devices/Device/ScsiCommands/SSC.cs
@@ -952,6 +952,15 @@ namespace Aaru.Devices
return sense;
}
+ ///
+ /// Writes a space mark in the media
+ ///
+ /// Sense buffer.
+ /// Space type code.
+ /// How many marks to write
+ /// Timeout.
+ /// Duration.
+ /// true, if select was tracked, false otherwise.
public bool Space(out byte[] senseBuffer, SscSpaceCodes code, int count, uint timeout, out double duration)
{
senseBuffer = new byte[64];
diff --git a/Aaru.Devices/Device/Variables.cs b/Aaru.Devices/Device/Variables.cs
index efe9d36c9..f7156b4ef 100644
--- a/Aaru.Devices/Device/Variables.cs
+++ b/Aaru.Devices/Device/Variables.cs
@@ -166,6 +166,9 @@ namespace Aaru.Devices
bool? _isRemoteAdmin;
readonly string _devicePath;
+ ///
+ /// Returns if remote is running under administrative (aka root) privileges
+ ///
public bool IsRemoteAdmin
{
get
@@ -176,12 +179,33 @@ namespace Aaru.Devices
}
}
+ ///
+ /// Current device is remote
+ ///
public bool IsRemote => _remote != null;
+ ///
+ /// Remote application
+ ///
public string RemoteApplication => _remote?.ServerApplication;
+ ///
+ /// Remote application server
+ ///
public string RemoteVersion => _remote?.ServerVersion;
+ ///
+ /// Remote operating system name
+ ///
public string RemoteOperatingSystem => _remote?.ServerOperatingSystem;
+ ///
+ /// Remote operating system version
+ ///
public string RemoteOperatingSystemVersion => _remote?.ServerOperatingSystemVersion;
+ ///
+ /// Remote architecture
+ ///
public string RemoteArchitecture => _remote?.ServerArchitecture;
+ ///
+ /// Remote protocol version
+ ///
public int RemoteProtocolVersion => _remote?.ServerProtocolVersion ?? 0;
}
}
\ No newline at end of file
diff --git a/Aaru.Devices/Enums.cs b/Aaru.Devices/Enums.cs
index f67eeb297..0f9c9ddc1 100644
--- a/Aaru.Devices/Enums.cs
+++ b/Aaru.Devices/Enums.cs
@@ -31,6 +31,7 @@
// ****************************************************************************/
using System;
+#pragma warning disable 1591
// ReSharper disable UnusedType.Global
diff --git a/Aaru.Devices/Remote/Consts.cs b/Aaru.Devices/Remote/Consts.cs
index 9cd201b1e..e629adf57 100644
--- a/Aaru.Devices/Remote/Consts.cs
+++ b/Aaru.Devices/Remote/Consts.cs
@@ -32,11 +32,26 @@
namespace Aaru.Devices.Remote
{
+ ///
+ /// AaruRemote protocol constants
+ ///
public class Consts
{
+ ///
+ /// Primary unique packet identifier
+ ///
public const uint REMOTE_ID = 0x52434944; // "DICR"
+ ///
+ /// Secondary unique packet identifier
+ ///
public const uint PACKET_ID = 0x544B4350; // "PCKT"
+ ///
+ /// Default packet version
+ ///
public const int PACKET_VERSION = 1;
+ ///
+ /// Maximum supported protocol version
+ ///
public const int MAX_PROTOCOL = 2;
}
}
\ No newline at end of file
diff --git a/Aaru.Devices/Remote/Enums.cs b/Aaru.Devices/Remote/Enums.cs
index fc6c8b807..0102d43df 100644
--- a/Aaru.Devices/Remote/Enums.cs
+++ b/Aaru.Devices/Remote/Enums.cs
@@ -32,8 +32,12 @@
namespace Aaru.Devices.Remote
{
+ ///
+ /// Packet type enumeration
+ ///
public enum AaruPacketType : sbyte
{
+ #pragma warning disable 1591
Nop = -1, Hello = 1, CommandListDevices = 2,
ResponseListDevices = 3, CommandOpen = 4, CommandScsi = 5,
ResponseScsi = 6, CommandAtaChs = 7, ResponseAtaChs = 8,
@@ -45,12 +49,45 @@ namespace Aaru.Devices.Remote
ResponseGetPcmciaData = 24, CommandCloseDevice = 25, CommandAmIRoot = 26,
ResponseAmIRoot = 27, MultiCommandSdhci = 28, ResponseMultiSdhci = 29,
CommandReOpenDevice = 30, CommandOsRead = 31, ResponseOsRead = 32
+ #pragma warning restore 1591
}
+ ///
+ /// Reasons for non-data request or response
+ ///
public enum AaruNopReason : byte
{
- OutOfOrder = 0, NotImplemented = 1, NotRecognized = 2,
- ErrorListDevices = 3, OpenOk = 4, OpenError = 5,
- ReOpenOk = 6, CloseError = 7
+ ///
+ /// Request or response has arrived unexpectedly
+ ///
+ OutOfOrder = 0,
+ ///
+ /// Packet or version of packet is not implemented
+ ///
+ NotImplemented = 1,
+ ///
+ /// Unknown or non-recognized packet
+ ///
+ NotRecognized = 2,
+ ///
+ /// Error trying to get list of devices
+ ///
+ ErrorListDevices = 3,
+ ///
+ /// Device opened correctly
+ ///
+ OpenOk = 4,
+ ///
+ /// An error occurred opening the device
+ ///
+ OpenError = 5,
+ ///
+ /// Device re-opened correctly
+ ///
+ ReOpenOk = 6,
+ ///
+ /// An error occurred closing the device
+ ///
+ CloseError = 7
}
}
\ No newline at end of file
diff --git a/Aaru.Devices/Remote/Remote.cs b/Aaru.Devices/Remote/Remote.cs
index dc8322cce..912328c38 100644
--- a/Aaru.Devices/Remote/Remote.cs
+++ b/Aaru.Devices/Remote/Remote.cs
@@ -43,14 +43,26 @@ using Aaru.Console;
using Aaru.Decoders.ATA;
using Marshal = Aaru.Helpers.Marshal;
using Version = Aaru.CommonTypes.Interop.Version;
+// ReSharper disable MemberCanBeInternal
namespace Aaru.Devices.Remote
{
+ ///
+ ///
+ /// Handles communication with a remote device that's connected using the AaruRemote protocol
+ ///
public class Remote : IDisposable
{
readonly string _host;
readonly Socket _socket;
+ ///
+ /// Connects using TCP/IP to the specified remote
+ ///
+ /// URI of the remote
+ /// Unsupported or invalid remote protocol.
+ /// Host not found.
+ /// Network error.
public Remote(Uri uri)
{
if(uri.Scheme != "aaru" &&
@@ -185,13 +197,34 @@ namespace Aaru.Devices.Remote
throw new IOException();
}
+ ///
+ /// Remote server application
+ ///
public string ServerApplication { get; }
+ ///
+ /// Remote server application version
+ ///
public string ServerVersion { get; }
+ ///
+ /// Remote server operating system
+ ///
public string ServerOperatingSystem { get; }
+ ///
+ /// Remote server operating system version
+ ///
public string ServerOperatingSystemVersion { get; }
+ ///
+ /// Remote server architecture
+ ///
public string ServerArchitecture { get; }
+ ///
+ /// Remote server protocol version
+ ///
public int ServerProtocolVersion { get; }
+ ///
+ /// Is remote running with administrative (aka root) privileges?
+ ///
public bool IsRoot
{
get
@@ -264,8 +297,12 @@ namespace Aaru.Devices.Remote
}
}
+ ///
public void Dispose() => Disconnect();
+ ///
+ /// Disconnects from remote
+ ///
public void Disconnect()
{
try
@@ -279,6 +316,10 @@ namespace Aaru.Devices.Remote
}
}
+ ///
+ /// Lists devices attached to remote
+ ///
+ /// List of devices
public DeviceInfo[] ListDevices()
{
var cmdPkt = new AaruPacketCommandListDevices
@@ -387,6 +428,13 @@ namespace Aaru.Devices.Remote
return devices.ToArray();
}
+ ///
+ /// Opens the specified device path on the remote
+ ///
+ /// Device path
+ /// Returned error
+ /// true if opened correctly, falseotherwise
+ /// Support for the specified device has not yet been implemented in the remote application.
public bool Open(string devicePath, out int lastError)
{
lastError = 0;
@@ -474,6 +522,18 @@ namespace Aaru.Devices.Remote
return false;
}
+ /// Sends a SCSI command to the remote device
+ /// 0 if no error occurred, otherwise, errno
+ /// SCSI CDB
+ /// Buffer for SCSI command response
+ /// Buffer with the SCSI sense
+ /// Timeout in seconds
+ /// SCSI command transfer direction
+ /// Time it took to execute the command in milliseconds
+ ///
+ /// True if SCSI command returned non-OK status and contains
+ /// SCSI sense
+ ///
public int SendScsiCommand(byte[] cdb, ref byte[] buffer, out byte[] senseBuffer, uint timeout,
ScsiDirection direction, out double duration, out bool sense)
{
@@ -572,6 +632,20 @@ namespace Aaru.Devices.Remote
return (int)res.error_no;
}
+ /// Sends an ATA/ATAPI command to the remote device using CHS addressing
+ /// 0 if no error occurred, otherwise, errno
+ /// ATA registers.
+ /// Status/error registers.
+ /// ATA Protocol.
+ /// Indicates which register indicates the transfer length
+ /// Buffer for ATA/ATAPI command response
+ /// Timeout in seconds
+ ///
+ /// If set to true, transfer is indicated in blocks, otherwise, it is indicated in
+ /// bytes.
+ ///
+ /// Time it took to execute the command in milliseconds
+ /// True if ATA/ATAPI command returned non-OK status
public int SendAtaCommand(AtaRegistersChs registers, out AtaErrorRegistersChs errorRegisters,
AtaProtocol protocol, AtaTransferRegister transferRegister, ref byte[] buffer,
uint timeout, bool transferBlocks, out double duration, out bool sense)
@@ -667,6 +741,20 @@ namespace Aaru.Devices.Remote
return (int)res.error_no;
}
+ /// Sends an ATA/ATAPI command to the remote device using 28-bit LBA addressing
+ /// 0 if no error occurred, otherwise, errno
+ /// ATA registers.
+ /// Status/error registers.
+ /// ATA Protocol.
+ /// Indicates which register indicates the transfer length
+ /// Buffer for ATA/ATAPI command response
+ /// Timeout in seconds
+ ///
+ /// If set to true, transfer is indicated in blocks, otherwise, it is indicated in
+ /// bytes.
+ ///
+ /// Time it took to execute the command in milliseconds
+ /// True if ATA/ATAPI command returned non-OK status
public int SendAtaCommand(AtaRegistersLba28 registers, out AtaErrorRegistersLba28 errorRegisters,
AtaProtocol protocol, AtaTransferRegister transferRegister, ref byte[] buffer,
uint timeout, bool transferBlocks, out double duration, out bool sense)
@@ -763,6 +851,20 @@ namespace Aaru.Devices.Remote
return (int)res.error_no;
}
+ /// Sends an ATA/ATAPI command to the remote device using 48-bit LBA addressing
+ /// 0 if no error occurred, otherwise, errno
+ /// ATA registers.
+ /// Status/error registers.
+ /// ATA Protocol.
+ /// Indicates which register indicates the transfer length
+ /// Buffer for ATA/ATAPI command response
+ /// Timeout in seconds
+ ///
+ /// If set to true, transfer is indicated in blocks, otherwise, it is indicated in
+ /// bytes.
+ ///
+ /// Time it took to execute the command in milliseconds
+ /// True if ATA/ATAPI command returned non-OK status
public int SendAtaCommand(AtaRegistersLba48 registers, out AtaErrorRegistersLba48 errorRegisters,
AtaProtocol protocol, AtaTransferRegister transferRegister, ref byte[] buffer,
uint timeout, bool transferBlocks, out double duration, out bool sense)
@@ -859,6 +961,20 @@ namespace Aaru.Devices.Remote
return (int)res.error_no;
}
+ /// Sends a MMC/SD command to the remote device
+ /// The result of the command.
+ /// MMC/SD opcode
+ /// Buffer for MMC/SD command response
+ /// Timeout in seconds
+ /// Time it took to execute the command in milliseconds
+ /// True if MMC/SD returned non-OK status
+ /// True if data is sent from host to card
+ /// True if command should be preceded with CMD55
+ /// Flags indicating kind and place of response
+ /// How many blocks to transfer
+ /// Command argument
+ /// Response registers
+ /// Size of block in bytes
public int SendMmcCommand(MmcCommands command, bool write, bool isApplication, MmcFlags flags, uint argument,
uint blockSize, uint blocks, ref byte[] buffer, out uint[] response,
out double duration, out bool sense, uint timeout = 0)
@@ -964,6 +1080,10 @@ namespace Aaru.Devices.Remote
return (int)res.res.error_no;
}
+ ///
+ /// Gets the for the remote device
+ ///
+ ///
public DeviceType GetDeviceType()
{
var cmdPkt = new AaruPacketCmdGetDeviceType
@@ -1033,6 +1153,14 @@ namespace Aaru.Devices.Remote
return res.device_type;
}
+ ///
+ /// Retrieves the SDHCI registers from the remote device
+ ///
+ /// CSD register
+ /// CID register
+ /// OCR register
+ /// SCR register
+ /// true if the device is attached to an SDHCI controller, false otherwise
public bool GetSdhciRegisters(out byte[] csd, out byte[] cid, out byte[] ocr, out byte[] scr)
{
csd = null;
@@ -1148,6 +1276,16 @@ namespace Aaru.Devices.Remote
return res.isSdhci;
}
+ ///
+ /// Gets the USB data from the remote device
+ ///
+ /// USB descriptors
+ /// USB vendor ID
+ /// USB product ID
+ /// USB manufacturer string
+ /// USB product string
+ /// USB serial number string
+ /// true if the device is attached via USB, false otherwise
public bool GetUsbData(out byte[] descriptors, out ushort idVendor, out ushort idProduct,
out string manufacturer, out string product, out string serial)
{
@@ -1235,6 +1373,15 @@ namespace Aaru.Devices.Remote
return true;
}
+ ///
+ /// Gets the FireWire data from the remote device
+ ///
+ /// FireWire vendor ID
+ /// FireWire product ID
+ /// FireWire vendor string
+ /// FireWire model string
+ /// FireWire GUID
+ /// true if the device is attached via FireWire, false otherwise
public bool GetFireWireData(out uint idVendor, out uint idProduct, out ulong guid, out string vendor,
out string model)
{
@@ -1321,6 +1468,11 @@ namespace Aaru.Devices.Remote
return true;
}
+ ///
+ /// Gets the PCMCIA/CardBus data from the remote device
+ ///
+ /// Card Information Structure
+ /// true if the device is attached via PCMCIA or CardBus, false otherwise
public bool GetPcmciaData(out byte[] cis)
{
cis = null;
@@ -1397,6 +1549,14 @@ namespace Aaru.Devices.Remote
return true;
}
+ ///
+ /// Receives data from a socket into a buffer
+ ///
+ /// Socket
+ /// Data buffer
+ /// Expected total size in bytes
+ /// Socket flags
+ /// Retrieved number of bytes
static int Receive(Socket socket, byte[] buffer, int size, SocketFlags socketFlags)
{
int offset = 0;
@@ -1415,6 +1575,9 @@ namespace Aaru.Devices.Remote
return offset;
}
+ ///
+ /// Closes the remote device, without closing the network connection
+ ///
public void Close()
{
var cmdPkt = new AaruPacketCmdClose
@@ -1441,6 +1604,14 @@ namespace Aaru.Devices.Remote
}
}
+ ///
+ /// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI controller
+ ///
+ /// List of commands
+ /// Duration to execute all commands, in milliseconds
+ /// Set to true if any of the commands returned an error status, false otherwise
+ /// Maximum allowed time to execute a single command
+ /// 0 if no error occurred, otherwise, errno
public int SendMultipleMmcCommands(Device.MmcSingleCommand[] commands, out double duration, out bool sense,
uint timeout = 0)
{
@@ -1599,6 +1770,14 @@ namespace Aaru.Devices.Remote
return error;
}
+ ///
+ /// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI controller, using protocol version 1 without specific support for such a queueing
+ ///
+ /// List of commands
+ /// Duration to execute all commands, in milliseconds
+ /// Set to true if any of the commands returned an error status, false otherwise
+ /// Maximum allowed time to execute a single command
+ /// 0 if no error occurred, otherwise, errno
int SendMultipleMmcCommandsV1(Device.MmcSingleCommand[] commands, out double duration, out bool sense,
uint timeout)
{
@@ -1621,6 +1800,10 @@ namespace Aaru.Devices.Remote
return error;
}
+ ///
+ /// Closes then immediately reopens a remote device
+ ///
+ /// Returned error number if any
public bool ReOpen()
{
if(ServerProtocolVersion < 2)
@@ -1713,6 +1896,14 @@ namespace Aaru.Devices.Remote
return false;
}
+ ///
+ /// Reads data using operating system buffers.
+ ///
+ /// Data buffer
+ /// Offset in remote device to start reading, in bytes
+ /// Number of bytes to read
+ /// Total time in milliseconds the reading took
+ /// true if there was an error, false otherwise
public bool BufferedOsRead(out byte[] buffer, long offset, uint length, out double duration)
{
duration = 0;
diff --git a/Aaru.Devices/Remote/Structs.cs b/Aaru.Devices/Remote/Structs.cs
index 65f084144..1199d4bf0 100644
--- a/Aaru.Devices/Remote/Structs.cs
+++ b/Aaru.Devices/Remote/Structs.cs
@@ -33,385 +33,839 @@
using System.Runtime.InteropServices;
using Aaru.CommonTypes.Enums;
using Aaru.Decoders.ATA;
+// ReSharper disable MemberCanBeInternal
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable FieldCanBeMadeReadOnly.Global
+// ReSharper disable IdentifierTypo
namespace Aaru.Devices.Remote
{
+ ///
+ /// Header for any Aaru remote packet
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketHeader
{
+ ///
+ /// Unique Aaru packet identifier (primary)
+ ///
public uint remote_id;
+ ///
+ /// Unique Aaru packet identifier (secondary)
+ ///
public uint packet_id;
-
+ ///
+ /// Packet length
+ ///
public uint len;
+ ///
+ /// Packet version
+ ///
public byte version;
+ ///
+ /// Unique Aaru packet type identifier
+ ///
public AaruPacketType packetType;
-
+ ///
+ /// Spare for expansion (or alignment)
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
public readonly byte[] spare;
}
+ ///
+ /// Hello packet, identifies a remote initiator with a responder
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketHello
{
+ /// Packet header
public AaruPacketHeader hdr;
-
+///
+/// Application name
+///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
public string application;
-
+///
+/// Application version
+///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
public string version;
-
+///
+/// Maximum supported protocol version
+///
public byte maxProtocol;
-
+///
+/// Spare for expansion (or alignment)
+///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public readonly byte[] spare;
-
+///
+/// Operating system name
+///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string sysname;
-
+///
+/// Operating system version / release
+///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string release;
-
+///
+/// Operating system machine / architecture
+///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string machine;
}
+ ///
+ /// Request a list of device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCommandListDevices
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Returns the requested list of devices
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public readonly struct AaruPacketResponseListDevices
{
+ /// Packet header
public readonly AaruPacketHeader hdr;
+ ///
+ /// How many device descriptors follows this structure in the packet
+ ///
public readonly ushort devices;
}
+ ///
+ /// Sends a request or returns a response that requires no intervention or further processing
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketNop
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Reason code
+ ///
public AaruNopReason reasonCode;
-
+ ///
+ /// Spare for expansion (or alignment)
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public readonly byte[] spare;
-
+///
+/// Reason name
+///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string reason;
-
+///
+/// Operating system error number
+///
public int errno;
}
+ ///
+ /// Requests to open a device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCommandOpenDevice
{
+ /// Packet header
public AaruPacketHeader hdr;
-
+ ///
+ /// Device path
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
public string device_path;
}
+ ///
+ /// Requests remote to send a command to a SCSI device. This header is followed by the CDB and after it comes the buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdScsi
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Length in bytes of the CDB that follows this structure
+ ///
public uint cdb_len;
+ ///
+ /// Length in bytes of the buffer that follows the CDB
+ ///
public uint buf_len;
+ ///
+ /// Direction of SCSI data transfer
+ ///
public int direction;
+ ///
+ /// Timeout waiting for device to respond to command
+ ///
public uint timeout;
}
+ ///
+ /// Returns the response from a command sent to a SCSI device. This structure is followed by the buffer containing the REQUEST SENSE response and this is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResScsi
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Size the REQUEST SENSE buffer that follows this structure
+ ///
public uint sense_len;
+ ///
+ /// Length in bytes of the data buffer that follows the sense buffer
+ ///
public uint buf_len;
+ ///
+ /// Time in milliseconds it took for the device to execute the command
+ ///
public uint duration;
+ ///
+ /// Set to anything different of zero if there was a SENSE returned
+ ///
public uint sense;
+ ///
+ /// Set to the remote operating system error number
+ ///
public uint error_no;
}
+ ///
+ /// Requests remote to send a command to an ATA device using the CHS command set. This header is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdAtaChs
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Registers to set in the ATA device
+ ///
public AtaRegistersChs registers;
+ ///
+ /// ATA protocol code
+ ///
public byte protocol;
+ ///
+ /// ATA transfer register indicator
+ ///
public byte transferRegister;
+ ///
+ /// Set to true to transfer blocks, false to transfer bytes
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool transferBlocks;
+ ///
+ /// Spare for expansion (or alignment)
+ ///
public byte spare;
+ ///
+ /// Timeout waiting for device to respond to command
+ ///
public uint timeout;
}
+ ///
+ /// Returns the response from a command sent to an ATA device using the CHS command set. This structure is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResAtaChs
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Registers as set back by the ATA device
+ ///
public AtaErrorRegistersChs registers;
+ ///
+ /// Time in milliseconds it took for the device to execute the command
+ ///
public uint duration;
+ ///
+ /// Set to anything different of zero if the device set an error condition
+ ///
public uint sense;
+ ///
+ /// Set to the remote operating system error number
+ ///
public uint error_no;
}
+ ///
+ /// Requests remote to send a command to an ATA device using the 28-bit command set. This header is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdAtaLba28
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Registers to set in the ATA device
+ ///
public AtaRegistersLba28 registers;
+ ///
+ /// ATA protocol code
+ ///
public byte protocol;
+ ///
+ /// ATA transfer register indicator
+ ///
public byte transferRegister;
+ ///
+ /// Set to true to transfer blocks, false to transfer bytes
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool transferBlocks;
+ ///
+ /// Spare for expansion (or alignment)
+ ///
public byte spare;
+ ///
+ /// Timeout waiting for device to respond to command
+ ///
public uint timeout;
}
+ ///
+ /// Returns the response from a command sent to an ATA device using the 28-bit LBA command set. This structure is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResAtaLba28
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Registers as set back by the ATA device
+ ///
public AtaErrorRegistersLba28 registers;
+ ///
+ /// Time in milliseconds it took for the device to execute the command
+ ///
public uint duration;
+ ///
+ /// Set to anything different of zero if the device set an error condition
+ ///
public uint sense;
+ ///
+ /// Set to the remote operating system error number
+ ///
public uint error_no;
}
+ ///
+ /// Requests remote to send a command to an ATA device using the 48-bit command set. This header is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdAtaLba48
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Registers to set in the ATA device
+ ///
public AtaRegistersLba48 registers;
+ ///
+ /// ATA protocol code
+ ///
public byte protocol;
+ ///
+ /// ATA transfer register indicator
+ ///
public byte transferRegister;
+ ///
+ /// Set to true to transfer blocks, false to transfer bytes
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool transferBlocks;
+ ///
+ /// Spare for expansion (or alignment)
+ ///
public byte spare;
+ ///
+ /// Timeout waiting for device to respond to command
+ ///
public uint timeout;
}
+ ///
+ /// Returns the response from a command sent to an ATA device using the 48-bit LBA command set. This structure is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResAtaLba48
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Registers as set back by the ATA device
+ ///
public AtaErrorRegistersLba48 registers;
+ ///
+ /// Time in milliseconds it took for the device to execute the command
+ ///
public uint duration;
+ ///
+ /// Set to anything different of zero if the device set an error condition
+ ///
public uint sense;
+ ///
+ /// Set to the remote operating system error number
+ ///
public uint error_no;
}
+ ///
+ /// SecureDigital or MultiMediaCard command description
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruCmdSdhci
{
+ ///
+ /// Command
+ ///
public MmcCommands command;
+ ///
+ /// Set to true if the command writes to the device, false otherwise
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool write;
+ ///
+ /// Set to true if it is an application command, false otherwise
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool application;
+ ///
+ /// Flags
+ ///
public MmcFlags flags;
+ ///
+ /// Argument
+ ///
public uint argument;
+ ///
+ /// Block size
+ ///
public uint block_size;
+ ///
+ /// Number of blocks to transfer
+ ///
public uint blocks;
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Timeout waiting for device to respond to command
+ ///
public uint timeout;
}
+ ///
+ /// Requests remote to send a command to a SecureDigital or MultiMediaCard device attached using a SDHCI controller. This structure is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdSdhci
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// SecureDigital or MultiMediaCard command description
+ ///
public AaruCmdSdhci command;
}
+ ///
+ /// Returns the response from a command sent to a SecureDigital or MultiMediaCard device attached to a SDHCI controller. This structure is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruResSdhci
{
+ ///
+ /// Length in bytes of the data buffer
+ ///
public uint buf_len;
+ ///
+ /// Response registers
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public uint[] response;
+ ///
+ /// Time in milliseconds it took for the device to execute the command
+ ///
public uint duration;
+ ///
+ /// Set to anything different of zero if the device set an error condition
+ ///
public uint sense;
+ ///
+ /// Set to the remote operating system error number
+ ///
public uint error_no;
}
+ ///
+ /// Returns the response from a command sent to a SecureDigital or MultiMediaCard device attached to a SDHCI controller. This structure is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResSdhci
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Response
+ ///
public AaruResSdhci res;
}
+ ///
+ /// Requests the Aaru device type for the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdGetDeviceType
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Returns the Aaru device type for the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResGetDeviceType
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Aaru's device type
+ ///
public DeviceType device_type;
}
+ ///
+ /// Requests the registers of a SecureDigital or MultiMediaCard attached to an SDHCI controller
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdGetSdhciRegisters
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Returns the registers of a SecureDigital or MultiMediaCard attached to an SDHCI controller
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResGetSdhciRegisters
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// true if the device is attached to an SDHCI controller and the rest of the fields on this packet are valid, false otherwise
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool isSdhci;
-
+ ///
+ /// CSD registers
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] csd;
-
+ ///
+ /// CID registers
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] cid;
-
+ ///
+ /// OCR registers
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public byte[] ocr;
-
+ ///
+ /// SCR registers
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public byte[] scr;
-
+ ///
+ /// Length of the CSD registers
+ ///
public uint csd_len;
+ ///
+ /// Length of the CID registers
+ ///
public uint cid_len;
+ ///
+ /// Length of the OCR registers
+ ///
public uint ocr_len;
+ ///
+ /// Length of the SCR registers
+ ///
public uint scr_len;
}
+ ///
+ /// Requests information about the USB connection of the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdGetUsbData
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Returns information about the USB connection of the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResGetUsbData
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// true if the device is attached using USB and the rest of the fields on this packet are valid, false otherwise
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool isUsb;
+ ///
+ /// Length of the descriptors
+ ///
public ushort descLen;
-
+ ///
+ /// Raw USB descriptors
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 65536)]
public byte[] descriptors;
-
+ ///
+ /// USB vendor ID
+ ///
public ushort idVendor;
+ ///
+ /// USB product ID
+ ///
public ushort idProduct;
-
+ ///
+ /// USB manufacturer string
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string manufacturer;
-
+ ///
+ /// USB product string
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string product;
-
+ ///
+ /// USB serial number string
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string serial;
}
+ ///
+ /// Requests information about the FireWire connection of the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdGetFireWireData
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Returns information about the FireWire connection of the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResGetFireWireData
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// true if the device is attached using FireWire and the rest of the fields on this packet are valid, false otherwise
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool isFireWire;
+ ///
+ /// FireWire model ID
+ ///
public uint idModel;
+ ///
+ /// FireWire vendor ID
+ ///
public uint idVendor;
+ ///
+ /// FireWire's device GUID
+ ///
public ulong guid;
-
+ ///
+ /// FireWire vendor string
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string vendor;
-
+ ///
+ /// FireWire model string
+ ///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string model;
}
+ ///
+ /// Requests information about the PCMCIA or CardBus connection of the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdGetPcmciaData
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Returns information about the PCMCIA or CardBus connection of the opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResGetPcmciaData
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// true if the device is a PCMCIA or CardBus device and the rest of the fields on this packet are valid, false otherwise
+ ///
[MarshalAs(UnmanagedType.U1)]
public bool isPcmcia;
+ ///
+ /// CIS buffer length
+ ///
public ushort cis_len;
-
+ ///
+ /// CIS buffer
+ ///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 65536)]
public byte[] cis;
}
+ ///
+ /// Requests to close the currently opened device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdClose
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Requests to know if the remote is running with administrative (aka root) privileges
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdAmIRoot
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Returns if the remote is running with administrative (aka root) privileges
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResAmIRoot
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Set to any value different of 0 to indicate the remote is running with administrative (aka root) privileges
+ ///
public uint am_i_root;
}
+ ///
+ /// Initiates a multiple command block with the SDHCI controller the SecureDigital or MultiMediaCard is attached
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketMultiCmdSdhci
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// How many commands to queue
+ ///
public ulong cmd_count;
}
+ ///
+ /// Closes and then re-opens the same device
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdReOpen
{
+ /// Packet header
public AaruPacketHeader hdr;
}
+ ///
+ /// Reads data using operating system buffers
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketCmdOsRead
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Device offset where to read
+ ///
public ulong offset;
+ ///
+ /// Number of bytes to read
+ ///
public uint length;
}
+ ///
+ /// Returns data read using operating system buffers. This structure is followed by the data buffer.
+ ///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct AaruPacketResOsRead
{
+ /// Packet header
public AaruPacketHeader hdr;
+ ///
+ /// Set to the remote operating system error number
+ ///
public int errno;
+ ///
+ /// Time in milliseconds it took for the device to execute the command
+ ///
public uint duration;
}
}
\ No newline at end of file
diff --git a/Aaru.Dto b/Aaru.Dto
index 3b6c6aca7..033842d8a 160000
--- a/Aaru.Dto
+++ b/Aaru.Dto
@@ -1 +1 @@
-Subproject commit 3b6c6aca706b391ea6efa15da2afc0a5059dc890
+Subproject commit 033842d8a1d7da92d780553328cb2f21d525422e
diff --git a/Aaru.Filesystems/AODOS.cs b/Aaru.Filesystems/AODOS.cs
index cd24b7771..dab05ecb6 100644
--- a/Aaru.Filesystems/AODOS.cs
+++ b/Aaru.Filesystems/AODOS.cs
@@ -44,18 +44,27 @@ namespace Aaru.Filesystems
{
// Information has been extracted looking at available disk images
// This may be missing fields, or not, I don't know russian so any help is appreciated
+ ///
+ /// Implements detection of the AO-DOS filesystem
+ ///
public sealed class AODOS : IFilesystem
{
readonly byte[] _identifier =
{
0x20, 0x41, 0x4F, 0x2D, 0x44, 0x4F, 0x53, 0x20
};
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Name => "Alexander Osipov DOS file system";
+ ///
public Guid Id => new Guid("668E5039-9DDD-442A-BE1B-A315D6E38E26");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
// Does AO-DOS support hard disks?
@@ -77,6 +86,7 @@ namespace Aaru.Filesystems
return bb.identifier.SequenceEqual(_identifier);
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/APFS.cs b/Aaru.Filesystems/APFS.cs
index e41e3e2a9..06d906e3a 100644
--- a/Aaru.Filesystems/APFS.cs
+++ b/Aaru.Filesystems/APFS.cs
@@ -41,18 +41,27 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Apple File System (APFS)
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class APFS : IFilesystem
{
const uint APFS_CONTAINER_MAGIC = 0x4253584E; // "NXSB"
const uint APFS_VOLUME_MAGIC = 0x42535041; // "APSB"
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Apple File System";
+ ///
public Guid Id => new Guid("A4060F9D-2909-42E2-9D95-DB31FA7EA797");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start >= partition.End)
@@ -73,6 +82,7 @@ namespace Aaru.Filesystems
return nxSb.magic == APFS_CONTAINER_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Acorn.cs b/Aaru.Filesystems/Acorn.cs
index 1616a3457..0c466d197 100644
--- a/Aaru.Filesystems/Acorn.cs
+++ b/Aaru.Filesystems/Acorn.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of Acorn's Advanced Data Filing System (ADFS)
+ ///
public sealed class AcornADFS : IFilesystem
{
/// Location for boot block, in bytes
@@ -63,13 +66,19 @@ namespace Aaru.Filesystems
/// Old directory format magic number, "Hugo"
const uint OLD_DIR_MAGIC = 0x6F677548;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Name => "Acorn Advanced Disc Filing System";
+ ///
public Guid Id => new Guid("BAFC1E50-9C64-4CD3-8400-80628CC27AFA");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
// TODO: BBC Master hard disks are untested...
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start >= partition.End)
@@ -261,6 +270,7 @@ namespace Aaru.Filesystems
// TODO: Find root directory on volumes with DiscRecord
// TODO: Support big directories (ADFS-G?)
// TODO: Find the real freemap on volumes with DiscRecord, as DiscRecord's discid may be empty but this one isn't
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/AmigaDOS.cs b/Aaru.Filesystems/AmigaDOS.cs
index 6a4c12383..d0e8f53a0 100644
--- a/Aaru.Filesystems/AmigaDOS.cs
+++ b/Aaru.Filesystems/AmigaDOS.cs
@@ -44,6 +44,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of Amiga Fast File System (AFFS)
+ ///
public sealed class AmigaDOSPlugin : IFilesystem
{
const uint FFS_MASK = 0x444F5300;
@@ -52,12 +55,18 @@ namespace Aaru.Filesystems
const uint TYPE_HEADER = 2;
const uint SUBTYPE_ROOT = 1;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Name => "Amiga DOS filesystem";
+ ///
public Guid Id => new Guid("3c882400-208c-427d-a086-9119852a1bc7");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start + 4 >= partition.End)
@@ -164,6 +173,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/AppleDOS/AppleDOS.cs b/Aaru.Filesystems/AppleDOS/AppleDOS.cs
index c0135e381..fb64ab081 100644
--- a/Aaru.Filesystems/AppleDOS/AppleDOS.cs
+++ b/Aaru.Filesystems/AppleDOS/AppleDOS.cs
@@ -38,6 +38,9 @@ using Schemas;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements the Apple DOS 3 filesystem
+ ///
public sealed partial class AppleDOS : IReadOnlyFilesystem
{
bool _debug;
@@ -51,16 +54,23 @@ namespace Aaru.Filesystems
uint _usedSectors;
Vtoc _vtoc;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Apple DOS File System";
+ ///
public Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n");
+ ///
public string Author => "Natalia Portillo";
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => null;
static Dictionary GetDefaultOptions() => new Dictionary
diff --git a/Aaru.Filesystems/AppleDOS/Dir.cs b/Aaru.Filesystems/AppleDOS/Dir.cs
index 44a217356..32cd462bb 100644
--- a/Aaru.Filesystems/AppleDOS/Dir.cs
+++ b/Aaru.Filesystems/AppleDOS/Dir.cs
@@ -42,9 +42,6 @@ namespace Aaru.Filesystems
public sealed partial class AppleDOS
{
///
- /// Solves a symbolic link.
- /// Link path.
- /// Link destination.
public Errno ReadLink(string path, out string dest)
{
dest = null;
@@ -53,9 +50,6 @@ namespace Aaru.Filesystems
}
///
- /// Lists contents from a directory.
- /// Directory path.
- /// Directory contents.
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/AppleDOS/File.cs b/Aaru.Filesystems/AppleDOS/File.cs
index c84b6e3b2..3918c79f1 100644
--- a/Aaru.Filesystems/AppleDOS/File.cs
+++ b/Aaru.Filesystems/AppleDOS/File.cs
@@ -42,6 +42,7 @@ namespace Aaru.Filesystems
{
public sealed partial class AppleDOS
{
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -76,6 +77,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
if(!_mounted)
@@ -131,6 +133,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
@@ -185,6 +188,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
diff --git a/Aaru.Filesystems/AppleDOS/Info.cs b/Aaru.Filesystems/AppleDOS/Info.cs
index 383e1cdf1..e98cf67ed 100644
--- a/Aaru.Filesystems/AppleDOS/Info.cs
+++ b/Aaru.Filesystems/AppleDOS/Info.cs
@@ -42,6 +42,7 @@ namespace Aaru.Filesystems
{
public sealed partial class AppleDOS
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.Sectors != 455 &&
@@ -61,6 +62,7 @@ namespace Aaru.Filesystems
_vtoc.sectorsPerTrack == spt && _vtoc.bytesPerSector == 256;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/AppleDOS/Super.cs b/Aaru.Filesystems/AppleDOS/Super.cs
index aa9cf7b2b..3a8fe5cde 100644
--- a/Aaru.Filesystems/AppleDOS/Super.cs
+++ b/Aaru.Filesystems/AppleDOS/Super.cs
@@ -45,7 +45,6 @@ namespace Aaru.Filesystems
public sealed partial class AppleDOS
{
///
- /// Mounts an Apple DOS filesystem
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -128,7 +127,6 @@ namespace Aaru.Filesystems
}
///
- /// Unmounts this DOS filesystem
public Errno Unmount()
{
_mounted = false;
@@ -141,8 +139,6 @@ namespace Aaru.Filesystems
}
///
- /// Gets information about the mounted volume.
- /// Information about the mounted volume.
public Errno StatFs(out FileSystemInfo stat)
{
stat = new FileSystemInfo
diff --git a/Aaru.Filesystems/AppleDOS/Xattr.cs b/Aaru.Filesystems/AppleDOS/Xattr.cs
index 5f4bbddcf..be6f26f6b 100644
--- a/Aaru.Filesystems/AppleDOS/Xattr.cs
+++ b/Aaru.Filesystems/AppleDOS/Xattr.cs
@@ -39,10 +39,6 @@ namespace Aaru.Filesystems
public sealed partial class AppleDOS
{
///
- /// Lists all extended attributes, alternate data streams and forks of the given file.
- /// Error number.
- /// Path.
- /// List of extended attributes, alternate data streams and forks.
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
@@ -83,11 +79,6 @@ namespace Aaru.Filesystems
}
///
- /// Reads an extended attribute, alternate data stream or fork from the given file.
- /// Error number.
- /// File path.
- /// Extended attribute, alternate data stream or fork name.
- /// Buffer.
public Errno GetXattr(string path, string xattr, ref byte[] buf)
{
if(!_mounted)
diff --git a/Aaru.Filesystems/AppleHFS/AppleHFS.cs b/Aaru.Filesystems/AppleHFS/AppleHFS.cs
index 047358530..b52b5671d 100644
--- a/Aaru.Filesystems/AppleHFS/AppleHFS.cs
+++ b/Aaru.Filesystems/AppleHFS/AppleHFS.cs
@@ -40,12 +40,20 @@ namespace Aaru.Filesystems
{
// Information from Inside Macintosh
// https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf
+ ///
+ /// Implements detection of the Apple Hierarchical File System (HFS)
+ ///
public sealed partial class AppleHFS : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Apple Hierarchical File System";
+ ///
public Guid Id => new Guid("36405F8D-0D26-6ECC-0BBB-1D5225FF404F");
+ ///
public string Author => "Natalia Portillo";
}
}
\ No newline at end of file
diff --git a/Aaru.Filesystems/AppleHFS/Info.cs b/Aaru.Filesystems/AppleHFS/Info.cs
index b66f3e987..b98f03ee6 100644
--- a/Aaru.Filesystems/AppleHFS/Info.cs
+++ b/Aaru.Filesystems/AppleHFS/Info.cs
@@ -43,6 +43,7 @@ namespace Aaru.Filesystems
// https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf
public sealed partial class AppleHFS
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -96,6 +97,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/AppleHFSPlus.cs b/Aaru.Filesystems/AppleHFSPlus.cs
index dae04601a..da5ba135b 100644
--- a/Aaru.Filesystems/AppleHFSPlus.cs
+++ b/Aaru.Filesystems/AppleHFSPlus.cs
@@ -42,14 +42,23 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from Apple TechNote 1150: https://developer.apple.com/legacy/library/technotes/tn/tn1150.html
+ ///
+ /// Implements detection of Apple Hierarchical File System Plus (HFS+)
+ ///
public sealed class AppleHFSPlus : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Apple HFS+ filesystem";
+ ///
public Guid Id => new Guid("36405F8D-0D26-6EBE-436F-62F0586B4F08");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -96,6 +105,7 @@ namespace Aaru.Filesystems
return drSigWord == AppleCommon.HFSP_MAGIC || drSigWord == AppleCommon.HFSX_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/AppleMFS/AppleMFS.cs b/Aaru.Filesystems/AppleMFS/AppleMFS.cs
index 0bf85715d..86280143a 100644
--- a/Aaru.Filesystems/AppleMFS/AppleMFS.cs
+++ b/Aaru.Filesystems/AppleMFS/AppleMFS.cs
@@ -39,6 +39,9 @@ using Schemas;
namespace Aaru.Filesystems
{
// Information from Inside Macintosh Volume II
+ ///
+ /// Implements the Apple Macintosh File System
+ ///
public sealed partial class AppleMFS : IReadOnlyFilesystem
{
bool _mounted;
@@ -60,17 +63,24 @@ namespace Aaru.Filesystems
byte[] _directoryTags;
byte[] _bitmapTags;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Name => "Apple Macintosh File System";
+ ///
public Guid Id => new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
// TODO: Implement Finder namespace (requires decoding Desktop database)
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => null;
static Dictionary GetDefaultOptions() => new Dictionary
diff --git a/Aaru.Filesystems/AppleMFS/Dir.cs b/Aaru.Filesystems/AppleMFS/Dir.cs
index 1b45f1077..15b1aa509 100644
--- a/Aaru.Filesystems/AppleMFS/Dir.cs
+++ b/Aaru.Filesystems/AppleMFS/Dir.cs
@@ -42,6 +42,7 @@ namespace Aaru.Filesystems
// Information from Inside Macintosh Volume II
public sealed partial class AppleMFS
{
+ ///
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/AppleMFS/File.cs b/Aaru.Filesystems/AppleMFS/File.cs
index 1126006fb..f989c78b4 100644
--- a/Aaru.Filesystems/AppleMFS/File.cs
+++ b/Aaru.Filesystems/AppleMFS/File.cs
@@ -43,6 +43,7 @@ namespace Aaru.Filesystems
// Information from Inside Macintosh Volume II
public sealed partial class AppleMFS
{
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = new long();
@@ -92,6 +93,7 @@ namespace Aaru.Filesystems
return Errno.InOutError;
}
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -155,6 +157,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
if(!_mounted)
@@ -199,6 +202,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
@@ -287,6 +291,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno ReadLink(string path, out string dest)
{
dest = null;
diff --git a/Aaru.Filesystems/AppleMFS/Info.cs b/Aaru.Filesystems/AppleMFS/Info.cs
index 9e0031d81..7982da97f 100644
--- a/Aaru.Filesystems/AppleMFS/Info.cs
+++ b/Aaru.Filesystems/AppleMFS/Info.cs
@@ -44,6 +44,7 @@ namespace Aaru.Filesystems
// Information from Inside Macintosh Volume II
public sealed partial class AppleMFS
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -56,6 +57,7 @@ namespace Aaru.Filesystems
return drSigWord == MFS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/AppleMFS/Super.cs b/Aaru.Filesystems/AppleMFS/Super.cs
index 28291b067..c970936c9 100644
--- a/Aaru.Filesystems/AppleMFS/Super.cs
+++ b/Aaru.Filesystems/AppleMFS/Super.cs
@@ -47,6 +47,7 @@ namespace Aaru.Filesystems
{
const int BYTES_BEFORE_BLOCK_MAP = 64;
+ ///
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -194,6 +195,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Unmount()
{
_mounted = false;
@@ -205,6 +207,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno StatFs(out FileSystemInfo stat)
{
stat = new FileSystemInfo
diff --git a/Aaru.Filesystems/AppleMFS/Xattr.cs b/Aaru.Filesystems/AppleMFS/Xattr.cs
index 2a2ed9efe..35e7524e8 100644
--- a/Aaru.Filesystems/AppleMFS/Xattr.cs
+++ b/Aaru.Filesystems/AppleMFS/Xattr.cs
@@ -42,6 +42,7 @@ namespace Aaru.Filesystems
// Information from Inside Macintosh Volume II
public sealed partial class AppleMFS
{
+ ///
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
@@ -99,6 +100,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno GetXattr(string path, string xattr, ref byte[] buf)
{
if(!_mounted)
diff --git a/Aaru.Filesystems/AtheOS.cs b/Aaru.Filesystems/AtheOS.cs
index 1d7dfceec..942c82b17 100644
--- a/Aaru.Filesystems/AtheOS.cs
+++ b/Aaru.Filesystems/AtheOS.cs
@@ -42,6 +42,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection for the AtheOS filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class AtheOS : IFilesystem
{
@@ -54,12 +57,18 @@ namespace Aaru.Filesystems
const uint AFS_SUPERBLOCK_SIZE = 1024;
const uint AFS_BOOTBLOCK_SIZE = AFS_SUPERBLOCK_SIZE;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "AtheOS Filesystem";
+ ///
public Guid Id => new Guid("AAB2C4F1-DC07-49EE-A948-576CC51B58C5");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
ulong sector = AFS_BOOTBLOCK_SIZE / imagePlugin.Info.SectorSize;
@@ -85,6 +94,7 @@ namespace Aaru.Filesystems
return magic == AFS_MAGIC1;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/BFS.cs b/Aaru.Filesystems/BFS.cs
index 8e83a5f73..670086b69 100644
--- a/Aaru.Filesystems/BFS.cs
+++ b/Aaru.Filesystems/BFS.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from Practical Filesystem Design, ISBN 1-55860-497-9
+ ///
+ /// Implements detection of the Be (new) filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class BeFS : IFilesystem
{
@@ -60,12 +63,18 @@ namespace Aaru.Filesystems
const uint BEFS_CLEAN = 0x434C454E;
const uint BEFS_DIRTY = 0x44495254;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Be Filesystem";
+ ///
public Guid Id => new Guid("dc8572b3-b6ad-46e4-8de9-cbe123ff6672");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -98,6 +107,7 @@ namespace Aaru.Filesystems
return magic == BEFS_MAGIC1 || magicBe == BEFS_MAGIC1;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/BTRFS.cs b/Aaru.Filesystems/BTRFS.cs
index a7c86d751..65dc162ad 100644
--- a/Aaru.Filesystems/BTRFS.cs
+++ b/Aaru.Filesystems/BTRFS.cs
@@ -41,17 +41,26 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the b-tree filesystem (btrfs)
+ ///
public sealed class BTRFS : IFilesystem
{
/// BTRFS magic "_BHRfS_M"
const ulong BTRFS_MAGIC = 0x4D5F53665248425F;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "B-tree file system";
+ ///
public Guid Id => new Guid("C904CF15-5222-446B-B7DB-02EAC5D781B3");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start >= partition.End)
@@ -83,6 +92,7 @@ namespace Aaru.Filesystems
return btrfsSb.magic == BTRFS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/CBM.cs b/Aaru.Filesystems/CBM.cs
index 769b85416..2abf2c342 100644
--- a/Aaru.Filesystems/CBM.cs
+++ b/Aaru.Filesystems/CBM.cs
@@ -43,14 +43,23 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the filesystem used in 8-bit Commodore microcomputers
+ ///
public sealed class CBM : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Name => "Commodore file system";
+ ///
public Guid Id => new Guid("D104744E-A376-450C-BAC0-1347C93F983B");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start > 0)
@@ -92,6 +101,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/CPM/CPM.cs b/Aaru.Filesystems/CPM/CPM.cs
index 094726bff..aca9b866d 100644
--- a/Aaru.Filesystems/CPM/CPM.cs
+++ b/Aaru.Filesystems/CPM/CPM.cs
@@ -39,6 +39,9 @@ using Schemas;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements the CP/M filesystem
+ ///
public sealed partial class CPM : IReadOnlyFilesystem
{
/// True if thinks this is a CP/M filesystem
@@ -80,16 +83,23 @@ namespace Aaru.Filesystems
/// If thinks this is a CP/M filesystem, this is the definition for it
CpmDefinition _workingDefinition;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "CP/M File System";
+ ///
public Guid Id => new Guid("AA2B8585-41DF-4E3B-8A35-D1A935E2F8A1");
+ ///
public string Author => "Natalia Portillo";
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => null;
static Dictionary GetDefaultOptions() => new Dictionary
diff --git a/Aaru.Filesystems/CPM/Dir.cs b/Aaru.Filesystems/CPM/Dir.cs
index b13b85e44..2cca2bcf1 100644
--- a/Aaru.Filesystems/CPM/Dir.cs
+++ b/Aaru.Filesystems/CPM/Dir.cs
@@ -40,6 +40,7 @@ namespace Aaru.Filesystems
{
public sealed partial class CPM
{
+ ///
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/CPM/File.cs b/Aaru.Filesystems/CPM/File.cs
index cde616765..89983bb64 100644
--- a/Aaru.Filesystems/CPM/File.cs
+++ b/Aaru.Filesystems/CPM/File.cs
@@ -38,6 +38,7 @@ namespace Aaru.Filesystems
{
public sealed partial class CPM
{
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -71,6 +72,7 @@ namespace Aaru.Filesystems
}
// TODO: Implementing this would require storing the interleaving
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
@@ -78,6 +80,7 @@ namespace Aaru.Filesystems
return !_mounted ? Errno.AccessDenied : Errno.NotImplemented;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
if(!_mounted)
@@ -116,6 +119,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno ReadLink(string path, out string dest)
{
dest = null;
@@ -123,6 +127,7 @@ namespace Aaru.Filesystems
return !_mounted ? Errno.AccessDenied : Errno.NotSupported;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/CPM/Info.cs b/Aaru.Filesystems/CPM/Info.cs
index c64856f62..db3ec921f 100644
--- a/Aaru.Filesystems/CPM/Info.cs
+++ b/Aaru.Filesystems/CPM/Info.cs
@@ -44,6 +44,7 @@ namespace Aaru.Filesystems
{
public sealed partial class CPM
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
// This will only continue on devices with a chance to have ever been used by CP/M while failing on all others
@@ -1125,6 +1126,7 @@ namespace Aaru.Filesystems
}
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/CPM/Super.cs b/Aaru.Filesystems/CPM/Super.cs
index fd723615a..2fff62ef9 100644
--- a/Aaru.Filesystems/CPM/Super.cs
+++ b/Aaru.Filesystems/CPM/Super.cs
@@ -50,6 +50,7 @@ namespace Aaru.Filesystems
{
public sealed partial class CPM
{
+ ///
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -806,8 +807,6 @@ namespace Aaru.Filesystems
}
///
- /// Gets information about the mounted volume.
- /// Information about the mounted volume.
public Errno StatFs(out FileSystemInfo stat)
{
stat = null;
@@ -820,6 +819,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Unmount()
{
_mounted = false;
diff --git a/Aaru.Filesystems/CPM/Xattr.cs b/Aaru.Filesystems/CPM/Xattr.cs
index 8468d405b..feddb0e28 100644
--- a/Aaru.Filesystems/CPM/Xattr.cs
+++ b/Aaru.Filesystems/CPM/Xattr.cs
@@ -39,11 +39,6 @@ namespace Aaru.Filesystems
public sealed partial class CPM
{
///
- /// Reads an extended attribute, alternate data stream or fork from the given file.
- /// Error number.
- /// File path.
- /// Extended attribute, alternate data stream or fork name.
- /// Buffer.
public Errno GetXattr(string path, string xattr, ref byte[] buf)
{
if(!_mounted)
@@ -72,10 +67,6 @@ namespace Aaru.Filesystems
}
///
- /// Lists all extended attributes, alternate data streams and forks of the given file.
- /// Error number.
- /// Path.
- /// List of extended attributes, alternate data streams and forks.
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
diff --git a/Aaru.Filesystems/Cram.cs b/Aaru.Filesystems/Cram.cs
index 7e50cf3db..b1fc192cb 100644
--- a/Aaru.Filesystems/Cram.cs
+++ b/Aaru.Filesystems/Cram.cs
@@ -44,6 +44,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the CRAM filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedType.Local")]
public sealed class Cram : IFilesystem
{
@@ -51,12 +54,18 @@ namespace Aaru.Filesystems
const uint CRAM_MAGIC = 0x28CD3D45;
const uint CRAM_CIGAM = 0x453DCD28;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Cram filesystem";
+ ///
public Guid Id => new Guid("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start >= partition.End)
@@ -69,6 +78,7 @@ namespace Aaru.Filesystems
return magic == CRAM_MAGIC || magic == CRAM_CIGAM;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ECMA67.cs b/Aaru.Filesystems/ECMA67.cs
index 03240813a..0f0530a0c 100644
--- a/Aaru.Filesystems/ECMA67.cs
+++ b/Aaru.Filesystems/ECMA67.cs
@@ -41,6 +41,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the filesystem described in ECMA-67
+ ///
public sealed class ECMA67 : IFilesystem
{
readonly byte[] _magic =
@@ -48,12 +51,18 @@ namespace Aaru.Filesystems
0x56, 0x4F, 0x4C
};
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "ECMA-67";
+ ///
public Guid Id => new Guid("62A2D44A-CBC1-4377-B4B6-28C5C92034A1");
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start > 0)
@@ -72,6 +81,7 @@ namespace Aaru.Filesystems
return _magic.SequenceEqual(vol.labelIdentifier) && vol.labelNumber == 1 && vol.recordLength == 0x31;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/EFS.cs b/Aaru.Filesystems/EFS.cs
index 8ab368a10..a7e9ae618 100644
--- a/Aaru.Filesystems/EFS.cs
+++ b/Aaru.Filesystems/EFS.cs
@@ -44,17 +44,26 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements identification for the SGI Extent FileSystem
+ ///
public sealed class EFS : IFilesystem
{
const uint EFS_MAGIC = 0x00072959;
const uint EFS_MAGIC_NEW = 0x0007295A;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Extent File System Plugin";
+ ///
public Guid Id => new Guid("52A43F90-9AF3-4391-ADFE-65598DEEABAB");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -111,6 +120,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/F2FS.cs b/Aaru.Filesystems/F2FS.cs
index a38ba830a..e578e2459 100644
--- a/Aaru.Filesystems/F2FS.cs
+++ b/Aaru.Filesystems/F2FS.cs
@@ -42,6 +42,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Flash-Friendly File System (F2FS)
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class F2FS : IFilesystem
{
@@ -51,12 +54,18 @@ namespace Aaru.Filesystems
const uint F2FS_MAX_SECTOR = 4096;
const uint F2FS_BLOCK_SIZE = 4096;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "F2FS Plugin";
+ ///
public Guid Id => new Guid("82B0920F-5F0D-4063-9F57-ADE0AE02ECE5");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < F2FS_MIN_SECTOR ||
@@ -86,6 +95,7 @@ namespace Aaru.Filesystems
return sb.magic == F2FS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/FAT/FAT.cs b/Aaru.Filesystems/FAT/FAT.cs
index 1761d62d5..b77da744b 100644
--- a/Aaru.Filesystems/FAT/FAT.cs
+++ b/Aaru.Filesystems/FAT/FAT.cs
@@ -42,6 +42,9 @@ namespace Aaru.Filesystems
{
// TODO: Differentiate between Atari and X68k FAT, as this one uses a standard BPB.
// X68K uses cdate/adate from direntry for extending filename
+ ///
+ /// Implements the File Allocation Table, aka FAT, filesystem (FAT12, FAT16 and FAT32 variants).
+ ///
public sealed partial class FAT : IReadOnlyFilesystem
{
uint _bytesPerCluster;
@@ -65,17 +68,23 @@ namespace Aaru.Filesystems
FileSystemInfo _statfs;
bool _useFirstFat;
+ ///
public FileSystemType XmlFsType { get; private set; }
-
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Microsoft File Allocation Table";
+ ///
public Guid Id => new Guid("33513B2C-0D26-0D2D-32C3-79D8611158E0");
+ ///
public string Author => "Natalia Portillo";
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => new Dictionary
{
{
diff --git a/Aaru.Filesystems/FAT/File.cs b/Aaru.Filesystems/FAT/File.cs
index c545ae83c..1401101ed 100644
--- a/Aaru.Filesystems/FAT/File.cs
+++ b/Aaru.Filesystems/FAT/File.cs
@@ -42,6 +42,7 @@ namespace Aaru.Filesystems
{
public sealed partial class FAT
{
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
@@ -68,6 +69,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -85,6 +87,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
if(!_mounted)
@@ -145,6 +148,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/FAT/Info.cs b/Aaru.Filesystems/FAT/Info.cs
index d98837d41..bfad4d4a2 100644
--- a/Aaru.Filesystems/FAT/Info.cs
+++ b/Aaru.Filesystems/FAT/Info.cs
@@ -49,6 +49,7 @@ namespace Aaru.Filesystems
{
public sealed partial class FAT
{
+ ///
[SuppressMessage("ReSharper", "JoinDeclarationAndInitializer")]
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
@@ -406,6 +407,7 @@ namespace Aaru.Filesystems
return fatId == fat2Sector[0];
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/FATX/Dir.cs b/Aaru.Filesystems/FATX/Dir.cs
index 70c1e6e54..e38bae17c 100644
--- a/Aaru.Filesystems/FATX/Dir.cs
+++ b/Aaru.Filesystems/FATX/Dir.cs
@@ -40,6 +40,7 @@ namespace Aaru.Filesystems
{
public sealed partial class XboxFatPlugin
{
+ ///
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/FATX/FATX.cs b/Aaru.Filesystems/FATX/FATX.cs
index 6c62fe90b..376fccaab 100644
--- a/Aaru.Filesystems/FATX/FATX.cs
+++ b/Aaru.Filesystems/FATX/FATX.cs
@@ -40,6 +40,9 @@ using Schemas;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements the Xbox File Allocation Table (FATX or XTAF) filesystem.
+ ///
public sealed partial class XboxFatPlugin : IReadOnlyFilesystem
{
uint _bytesPerCluster;
@@ -58,12 +61,18 @@ namespace Aaru.Filesystems
FileSystemInfo _statfs;
Superblock _superblock;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "FATX Filesystem Plugin";
+ ///
public Guid Id => new Guid("ED27A721-4A17-4649-89FD-33633B46E228");
+ ///
public string Author => "Natalia Portillo";
+ ///
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
@@ -71,8 +80,10 @@ namespace Aaru.Filesystems
return Errno.NotSupported;
}
+ ///
public Errno GetXattr(string path, string xattr, ref byte[] buf) => Errno.NotSupported;
+ ///
public Errno ReadLink(string path, out string dest)
{
dest = null;
@@ -80,10 +91,12 @@ namespace Aaru.Filesystems
return Errno.NotSupported;
}
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => null;
static Dictionary GetDefaultOptions() => new Dictionary
diff --git a/Aaru.Filesystems/FATX/File.cs b/Aaru.Filesystems/FATX/File.cs
index 1a84bfac0..430f5c58a 100644
--- a/Aaru.Filesystems/FATX/File.cs
+++ b/Aaru.Filesystems/FATX/File.cs
@@ -42,6 +42,7 @@ namespace Aaru.Filesystems
{
public sealed partial class XboxFatPlugin
{
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
@@ -68,6 +69,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -85,6 +87,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
if(!_mounted)
@@ -136,6 +139,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/FATX/Info.cs b/Aaru.Filesystems/FATX/Info.cs
index b477107a7..d4c6d16bd 100644
--- a/Aaru.Filesystems/FATX/Info.cs
+++ b/Aaru.Filesystems/FATX/Info.cs
@@ -40,6 +40,7 @@ namespace Aaru.Filesystems
{
public sealed partial class XboxFatPlugin
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -52,6 +53,7 @@ namespace Aaru.Filesystems
return sb.magic == FATX_MAGIC || sb.magic == FATX_CIGAM;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/FATX/Super.cs b/Aaru.Filesystems/FATX/Super.cs
index 84fecefcc..aeaa5554e 100644
--- a/Aaru.Filesystems/FATX/Super.cs
+++ b/Aaru.Filesystems/FATX/Super.cs
@@ -47,6 +47,7 @@ namespace Aaru.Filesystems
{
public sealed partial class XboxFatPlugin
{
+ ///
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -257,6 +258,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Unmount()
{
if(!_mounted)
@@ -270,6 +272,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno StatFs(out FileSystemInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/FFS.cs b/Aaru.Filesystems/FFS.cs
index f757ee13a..f8c1a08fb 100644
--- a/Aaru.Filesystems/FFS.cs
+++ b/Aaru.Filesystems/FFS.cs
@@ -47,6 +47,9 @@ using ufs_daddr_t = System.Int32;
namespace Aaru.Filesystems
{
// Using information from Linux kernel headers
+ ///
+ /// Implements detection of BSD Fast File System (FFS, aka UNIX File System)
+ ///
[SuppressMessage("ReSharper", "InconsistentNaming")]
public sealed class FFSPlugin : IFilesystem
{
@@ -93,12 +96,18 @@ namespace Aaru.Filesystems
// Big-endian incomplete newfs
const uint UFS_BAD_CIGAM = 0x08049619;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "BSD Fast File System (aka UNIX File System, UFS)";
+ ///
public Guid Id => new Guid("CC90D342-05DB-48A8-988C-C1FE000034A3");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -135,6 +144,7 @@ namespace Aaru.Filesystems
}
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Fossil.cs b/Aaru.Filesystems/Fossil.cs
index c58e024de..53348f2c3 100644
--- a/Aaru.Filesystems/Fossil.cs
+++ b/Aaru.Filesystems/Fossil.cs
@@ -42,6 +42,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection for the Plan-9 Fossil on-disk filesystem
+ ///
public sealed class Fossil : IFilesystem
{
const uint FOSSIL_HDR_MAGIC = 0x3776AE89;
@@ -50,12 +53,18 @@ namespace Aaru.Filesystems
// Fossil header starts at 128KiB
const ulong HEADER_POS = 128 * 1024;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Fossil Filesystem Plugin";
+ ///
public Guid Id => new Guid("932BF104-43F6-494F-973C-45EF58A51DA9");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
ulong hdrSector = HEADER_POS / imagePlugin.Info.SectorSize;
@@ -72,6 +81,7 @@ namespace Aaru.Filesystems
return hdr.magic == FOSSIL_HDR_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/HAMMER.cs b/Aaru.Filesystems/HAMMER.cs
index 01e8aef08..c307e44a0 100644
--- a/Aaru.Filesystems/HAMMER.cs
+++ b/Aaru.Filesystems/HAMMER.cs
@@ -47,6 +47,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection for the HAMMER filesystem
+ ///
public sealed class HAMMER : IFilesystem
{
const ulong HAMMER_FSBUF_VOLUME = 0xC8414D4DC5523031;
@@ -54,12 +57,18 @@ namespace Aaru.Filesystems
const uint HAMMER_VOLHDR_SIZE = 1928;
const int HAMMER_BIGBLOCK_SIZE = 8192 * 1024;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "HAMMER Filesystem";
+ ///
public Guid Id => new Guid("91A188BF-5FD7-4677-BBD3-F59EBA9C864D");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
uint run = HAMMER_VOLHDR_SIZE / imagePlugin.Info.SectorSize;
@@ -77,6 +86,7 @@ namespace Aaru.Filesystems
return magic == HAMMER_FSBUF_VOLUME || magic == HAMMER_FSBUF_VOLUME_REV;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/HPFS.cs b/Aaru.Filesystems/HPFS.cs
index 69615e766..44a529f1c 100644
--- a/Aaru.Filesystems/HPFS.cs
+++ b/Aaru.Filesystems/HPFS.cs
@@ -43,14 +43,23 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from an old unnamed document
+ ///
+ /// Implements detection of IBM's High Performance File System (HPFS)
+ ///
public sealed class HPFS : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "OS/2 High Performance File System";
+ ///
public Guid Id => new Guid("33513B2C-f590-4acb-8bf2-0b1d5e19dec5");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(16 + partition.Start >= partition.End)
@@ -65,6 +74,7 @@ namespace Aaru.Filesystems
return magic1 == 0xF995E849 && magic2 == 0xFA53E9C5;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/HPOFS/HPOFS.cs b/Aaru.Filesystems/HPOFS/HPOFS.cs
index 6e9991e2e..fbbd7124d 100644
--- a/Aaru.Filesystems/HPOFS/HPOFS.cs
+++ b/Aaru.Filesystems/HPOFS/HPOFS.cs
@@ -39,12 +39,20 @@ namespace Aaru.Filesystems
{
// Information from test floppy images created with OS/2 HPOFS 2.0
// Need to get IBM document GA32-0224 -> IBM 3995 Optical Library Dataserver Products: Optical Disk Format
+ ///
+ /// Implements identification of IBM's High Performance Optical File System
+ ///
public sealed partial class HPOFS : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "High Performance Optical File System";
+ ///
public Guid Id => new Guid("1b72dcd5-d031-4757-8a9f-8d2fb18c59e2");
+ ///
public string Author => "Natalia Portillo";
}
}
\ No newline at end of file
diff --git a/Aaru.Filesystems/HPOFS/Info.cs b/Aaru.Filesystems/HPOFS/Info.cs
index 9b9dad9c7..479f23da4 100644
--- a/Aaru.Filesystems/HPOFS/Info.cs
+++ b/Aaru.Filesystems/HPOFS/Info.cs
@@ -43,6 +43,7 @@ namespace Aaru.Filesystems
{
public sealed partial class HPOFS
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(16 + partition.Start >= partition.End)
@@ -59,6 +60,7 @@ namespace Aaru.Filesystems
return bpb.fs_type.SequenceEqual(_type);
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ISO9660/Dir.cs b/Aaru.Filesystems/ISO9660/Dir.cs
index 6acf80feb..06b05bfde 100644
--- a/Aaru.Filesystems/ISO9660/Dir.cs
+++ b/Aaru.Filesystems/ISO9660/Dir.cs
@@ -46,6 +46,7 @@ namespace Aaru.Filesystems
{
Dictionary> _directoryCache;
+ ///
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/ISO9660/File.cs b/Aaru.Filesystems/ISO9660/File.cs
index 174956fce..b7c96f779 100644
--- a/Aaru.Filesystems/ISO9660/File.cs
+++ b/Aaru.Filesystems/ISO9660/File.cs
@@ -47,6 +47,7 @@ namespace Aaru.Filesystems
{
public sealed partial class ISO9660
{
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
@@ -72,6 +73,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -90,6 +92,7 @@ namespace Aaru.Filesystems
}
// TODO: Resolve symbolic link
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
buf = null;
@@ -161,6 +164,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
@@ -412,6 +416,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno ReadLink(string path, out string dest)
{
dest = null;
diff --git a/Aaru.Filesystems/ISO9660/ISO9660.cs b/Aaru.Filesystems/ISO9660/ISO9660.cs
index 7951d5d89..29494689f 100644
--- a/Aaru.Filesystems/ISO9660/ISO9660.cs
+++ b/Aaru.Filesystems/ISO9660/ISO9660.cs
@@ -42,6 +42,9 @@ using Schemas;
namespace Aaru.Filesystems
{
// This is coded following ECMA-119.
+ ///
+ /// Implements the High Sierra, ISO9660 and CD-i filesystems
+ ///
[SuppressMessage("ReSharper", "UnusedType.Local")]
public sealed partial class ISO9660 : IReadOnlyFilesystem
{
@@ -60,12 +63,18 @@ namespace Aaru.Filesystems
bool _useTransTbl;
ushort _blockSize;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "ISO9660 Filesystem";
+ ///
public Guid Id => new Guid("d812f4d3-c357-400d-90fd-3b22ef786aa8");
+ ///
public string Author => "Natalia Portillo";
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{
@@ -75,6 +84,7 @@ namespace Aaru.Filesystems
"If present, use Enhanced Volume Descriptor with specified encoding (overrides namespace)")
};
+ ///
public Dictionary Namespaces => new Dictionary
{
{
diff --git a/Aaru.Filesystems/ISO9660/Info.cs b/Aaru.Filesystems/ISO9660/Info.cs
index 88582e462..cd845b4b5 100644
--- a/Aaru.Filesystems/ISO9660/Info.cs
+++ b/Aaru.Filesystems/ISO9660/Info.cs
@@ -46,6 +46,7 @@ namespace Aaru.Filesystems
{
public sealed partial class ISO9660
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
// ISO9660 is designed for 2048 bytes/sector devices
@@ -83,6 +84,7 @@ namespace Aaru.Filesystems
Encoding.ASCII.GetString(vdMagic) == CDI_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ISO9660/Super.cs b/Aaru.Filesystems/ISO9660/Super.cs
index 942d7c411..7b4cbfe76 100644
--- a/Aaru.Filesystems/ISO9660/Super.cs
+++ b/Aaru.Filesystems/ISO9660/Super.cs
@@ -46,6 +46,7 @@ namespace Aaru.Filesystems
{
public sealed partial class ISO9660
{
+ ///
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -753,6 +754,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Unmount()
{
if(!_mounted)
@@ -765,6 +767,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno StatFs(out FileSystemInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/ISO9660/Xattr.cs b/Aaru.Filesystems/ISO9660/Xattr.cs
index 2fedfeb3a..e584fdee2 100644
--- a/Aaru.Filesystems/ISO9660/Xattr.cs
+++ b/Aaru.Filesystems/ISO9660/Xattr.cs
@@ -40,6 +40,7 @@ namespace Aaru.Filesystems
{
public sealed partial class ISO9660
{
+ ///
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
@@ -102,6 +103,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno GetXattr(string path, string xattr, ref byte[] buf)
{
buf = null;
diff --git a/Aaru.Filesystems/JFS.cs b/Aaru.Filesystems/JFS.cs
index 290e71ec4..fb563e368 100644
--- a/Aaru.Filesystems/JFS.cs
+++ b/Aaru.Filesystems/JFS.cs
@@ -43,17 +43,26 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of IBM's Journaled File System
+ ///
public sealed class JFS : IFilesystem
{
const uint JFS_BOOT_BLOCKS_SIZE = 0x8000;
const uint JFS_MAGIC = 0x3153464A;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "JFS Plugin";
+ ///
public Guid Id => new Guid("D3BE2A41-8F28-4055-94DC-BB6C72A0E9C4");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
uint bootSectors = JFS_BOOT_BLOCKS_SIZE / imagePlugin.Info.SectorSize;
@@ -71,6 +80,7 @@ namespace Aaru.Filesystems
return jfsSb.s_magic == JFS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/LIF.cs b/Aaru.Filesystems/LIF.cs
index 2939b78bc..c2a57fcf5 100644
--- a/Aaru.Filesystems/LIF.cs
+++ b/Aaru.Filesystems/LIF.cs
@@ -43,16 +43,25 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from http://www.hp9845.net/9845/projects/hpdir/#lif_filesystem
+ ///
+ /// Implements detection of the LIF filesystem
+ ///
public sealed class LIF : IFilesystem
{
const uint LIF_MAGIC = 0x8000;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "HP Logical Interchange Format Plugin";
+ ///
public Guid Id => new Guid("41535647-77A5-477B-9206-DA727ACDC704");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 256)
@@ -65,6 +74,7 @@ namespace Aaru.Filesystems
return lifSb.magic == LIF_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/LisaFS/Dir.cs b/Aaru.Filesystems/LisaFS/Dir.cs
index 6dd0d7a65..39e97da4c 100644
--- a/Aaru.Filesystems/LisaFS/Dir.cs
+++ b/Aaru.Filesystems/LisaFS/Dir.cs
@@ -43,9 +43,6 @@ namespace Aaru.Filesystems.LisaFS
public sealed partial class LisaFS
{
///
- /// Solves a symbolic link.
- /// Link path.
- /// Link destination.
public Errno ReadLink(string path, out string dest)
{
dest = null;
@@ -55,9 +52,6 @@ namespace Aaru.Filesystems.LisaFS
}
///
- /// Lists contents from a directory.
- /// Directory path.
- /// Directory contents.
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/LisaFS/Extent.cs b/Aaru.Filesystems/LisaFS/Extent.cs
index fbd40f590..6a090c637 100644
--- a/Aaru.Filesystems/LisaFS/Extent.cs
+++ b/Aaru.Filesystems/LisaFS/Extent.cs
@@ -41,6 +41,7 @@ namespace Aaru.Filesystems.LisaFS
{
public sealed partial class LisaFS
{
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
diff --git a/Aaru.Filesystems/LisaFS/File.cs b/Aaru.Filesystems/LisaFS/File.cs
index d9d6d8ac2..ab5d856a6 100644
--- a/Aaru.Filesystems/LisaFS/File.cs
+++ b/Aaru.Filesystems/LisaFS/File.cs
@@ -41,6 +41,7 @@ namespace Aaru.Filesystems.LisaFS
{
public sealed partial class LisaFS
{
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -58,6 +59,7 @@ namespace Aaru.Filesystems.LisaFS
return Errno.NoError;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
if(size == 0)
@@ -112,6 +114,7 @@ namespace Aaru.Filesystems.LisaFS
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/LisaFS/Info.cs b/Aaru.Filesystems/LisaFS/Info.cs
index bea97c560..ad30394c2 100644
--- a/Aaru.Filesystems/LisaFS/Info.cs
+++ b/Aaru.Filesystems/LisaFS/Info.cs
@@ -46,6 +46,7 @@ namespace Aaru.Filesystems.LisaFS
{
public sealed partial class LisaFS
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
try
@@ -130,6 +131,7 @@ namespace Aaru.Filesystems.LisaFS
}
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/LisaFS/LisaFS.cs b/Aaru.Filesystems/LisaFS/LisaFS.cs
index 6f9ce31b4..51b6a66a4 100644
--- a/Aaru.Filesystems/LisaFS/LisaFS.cs
+++ b/Aaru.Filesystems/LisaFS/LisaFS.cs
@@ -40,6 +40,9 @@ namespace Aaru.Filesystems.LisaFS
{
// All information by Natalia Portillo
// Variable names from Lisa API
+ ///
+ /// Implements the Apple Lisa File System
+ ///
public sealed partial class LisaFS : IReadOnlyFilesystem
{
bool _debug;
@@ -50,17 +53,24 @@ namespace Aaru.Filesystems.LisaFS
SRecord[] _srecords;
ulong _volumePrefix;
+ ///
public string Name => "Apple Lisa File System";
+ ///
public Guid Id => new Guid("7E6034D1-D823-4248-A54D-239742B28391");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Author => "Natalia Portillo";
// TODO: Implement Lisa 7/7 namespace (needs decoding {!CATALOG} file)
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => new Dictionary
{
{
diff --git a/Aaru.Filesystems/LisaFS/Super.cs b/Aaru.Filesystems/LisaFS/Super.cs
index 75743b47b..a7e171f13 100644
--- a/Aaru.Filesystems/LisaFS/Super.cs
+++ b/Aaru.Filesystems/LisaFS/Super.cs
@@ -48,7 +48,6 @@ namespace Aaru.Filesystems.LisaFS
public sealed partial class LisaFS
{
///
- /// Mounts an Apple Lisa filesystem
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -358,7 +357,6 @@ namespace Aaru.Filesystems.LisaFS
}
///
- /// Unmounts this Lisa filesystem
public Errno Unmount()
{
_mounted = false;
@@ -377,8 +375,6 @@ namespace Aaru.Filesystems.LisaFS
}
///
- /// Gets information about the mounted volume.
- /// Information about the mounted volume.
public Errno StatFs(out FileSystemInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/LisaFS/Xattr.cs b/Aaru.Filesystems/LisaFS/Xattr.cs
index 4e429a1e0..febb11820 100644
--- a/Aaru.Filesystems/LisaFS/Xattr.cs
+++ b/Aaru.Filesystems/LisaFS/Xattr.cs
@@ -43,10 +43,6 @@ namespace Aaru.Filesystems.LisaFS
public sealed partial class LisaFS
{
///
- /// Lists all extended attributes, alternate data streams and forks of the given file.
- /// Error number.
- /// Path.
- /// List of extended attributes, alternate data streams and forks.
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
@@ -59,11 +55,6 @@ namespace Aaru.Filesystems.LisaFS
}
///
- /// Reads an extended attribute, alternate data stream or fork from the given file.
- /// Error number.
- /// File path.
- /// Extended attribute, alternate data stream or fork name.
- /// Buffer.
public Errno GetXattr(string path, string xattr, ref byte[] buf)
{
Errno error = LookupFileId(path, out short fileId, out bool isDir);
diff --git a/Aaru.Filesystems/Locus.cs b/Aaru.Filesystems/Locus.cs
index c610c0a95..416bb8d57 100644
--- a/Aaru.Filesystems/Locus.cs
+++ b/Aaru.Filesystems/Locus.cs
@@ -67,6 +67,9 @@ using time_t = System.Int32;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Locus filesystem
+ ///
public sealed class Locus : IFilesystem
{
const int NICINOD = 325;
@@ -79,12 +82,18 @@ namespace Aaru.Filesystems
const uint LOCUS_MAGIC_OLD = 0xFFEEDDCC;
const uint LOCUS_CIGAM_OLD = 0xCCDDEEFF;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Locus Filesystem Plugin";
+ ///
public Guid Id => new Guid("1A70B30A-437D-479A-88E1-D0C9C1797FF4");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -119,6 +128,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/MicroDOS.cs b/Aaru.Filesystems/MicroDOS.cs
index 3106e29cc..150429cd7 100644
--- a/Aaru.Filesystems/MicroDOS.cs
+++ b/Aaru.Filesystems/MicroDOS.cs
@@ -43,19 +43,29 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
- // Information from http://www.owg.ru/mkt/BK/MKDOS.TXT
- // Thanks to tarlabnor for translating it
+ ///
+ /// Implements detection for the MicroDOS filesystem.
+ ///
+ /// Information from http://www.owg.ru/mkt/BK/MKDOS.TXT
+ /// Thanks to tarlabnor for translating it
+ ///
public sealed class MicroDOS : IFilesystem
{
const ushort MAGIC = 0xA72E;
const ushort MAGIC2 = 0x530C;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "MicroDOS file system";
+ ///
public Guid Id => new Guid("9F9A364A-1A27-48A3-B730-7A7122000324");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(1 + partition.Start >= partition.End)
@@ -71,6 +81,7 @@ namespace Aaru.Filesystems
return block0.label == MAGIC && block0.mklabel == MAGIC2;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/MinixFS.cs b/Aaru.Filesystems/MinixFS.cs
index 65a767c38..d6ccd58b0 100644
--- a/Aaru.Filesystems/MinixFS.cs
+++ b/Aaru.Filesystems/MinixFS.cs
@@ -42,6 +42,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from the Linux kernel
+ ///
+ /// Implements detection of the MINIX filesystem
+ ///
public sealed class MinixFS : IFilesystem
{
/// Minix v1, 14 char filenames
@@ -67,12 +70,18 @@ namespace Aaru.Filesystems
/// Minix v3, 60 char filenames
const ushort MINIX3_CIGAM = 0x5A4D;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Minix Filesystem";
+ ///
public Guid Id => new Guid("FE248C3B-B727-4AE5-A39F-79EA9A07D4B3");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
uint sector = 2;
@@ -115,6 +124,7 @@ namespace Aaru.Filesystems
magic == MINIX2_CIGAM || magic == MINIX3_CIGAM;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/NILFS2.cs b/Aaru.Filesystems/NILFS2.cs
index d21956331..f143c3907 100644
--- a/Aaru.Filesystems/NILFS2.cs
+++ b/Aaru.Filesystems/NILFS2.cs
@@ -43,17 +43,26 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the New Implementation of a Log-structured File System v2
+ ///
public sealed class NILFS2 : IFilesystem
{
const ushort NILFS2_MAGIC = 0x3434;
const uint NILFS2_SUPER_OFFSET = 1024;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "NILFS2 Plugin";
+ ///
public Guid Id => new Guid("35224226-C5CC-48B5-8FFD-3781E91E86B6");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -82,6 +91,7 @@ namespace Aaru.Filesystems
return nilfsSb.magic == NILFS2_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/NTFS.cs b/Aaru.Filesystems/NTFS.cs
index 1f6c70120..8e4f6487b 100644
--- a/Aaru.Filesystems/NTFS.cs
+++ b/Aaru.Filesystems/NTFS.cs
@@ -43,14 +43,23 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from Inside Windows NT
+ ///
+ /// Implements detection of the New Technology File System (NTFS)
+ ///
public sealed class NTFS : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "New Technology File System (NTFS)";
+ ///
public Guid Id => new Guid("33513B2C-1e6d-4d21-a660-0bbc789c3871");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -79,6 +88,7 @@ namespace Aaru.Filesystems
return signature == 0xAA55;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Nintendo.cs b/Aaru.Filesystems/Nintendo.cs
index 38eafa807..e6ad57f0d 100644
--- a/Aaru.Filesystems/Nintendo.cs
+++ b/Aaru.Filesystems/Nintendo.cs
@@ -40,14 +40,23 @@ using Schemas;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the filesystem used by Nintendo Gamecube and Wii discs
+ ///
public sealed class NintendoPlugin : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Nintendo optical filesystems";
+ ///
public Guid Id => new Guid("4675fcb4-4418-4288-9e4a-33d6a4ac1126");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start != 0)
@@ -64,6 +73,7 @@ namespace Aaru.Filesystems
return magicGc == 0xC2339F3D || magicWii == 0x5D1C9EA3;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ODS.cs b/Aaru.Filesystems/ODS.cs
index 236a36fb5..9382c1b72 100644
--- a/Aaru.Filesystems/ODS.cs
+++ b/Aaru.Filesystems/ODS.cs
@@ -52,14 +52,23 @@ namespace Aaru.Filesystems
// There is an ODS with signature "DECFILES11A", yet to be seen
// Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00.
// TODO: Implement checksum
+ ///
+ /// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem
+ ///
public sealed class ODS : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Files-11 On-Disk Structure";
+ ///
public Guid Id => new Guid("de20633c-8021-4384-aeb0-83b0df14491f");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -97,6 +106,7 @@ namespace Aaru.Filesystems
return magic == "DECFILE11A " || magic == "DECFILE11B ";
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Opera/Dir.cs b/Aaru.Filesystems/Opera/Dir.cs
index edefbc4fc..29905a46e 100644
--- a/Aaru.Filesystems/Opera/Dir.cs
+++ b/Aaru.Filesystems/Opera/Dir.cs
@@ -41,6 +41,7 @@ namespace Aaru.Filesystems
{
public sealed partial class OperaFS
{
+ ///
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/Opera/File.cs b/Aaru.Filesystems/Opera/File.cs
index b7ed36650..a48d07c14 100644
--- a/Aaru.Filesystems/Opera/File.cs
+++ b/Aaru.Filesystems/Opera/File.cs
@@ -40,6 +40,7 @@ namespace Aaru.Filesystems
{
public sealed partial class OperaFS
{
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
@@ -61,6 +62,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -78,6 +80,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
buf = null;
@@ -135,6 +138,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/Opera/Info.cs b/Aaru.Filesystems/Opera/Info.cs
index 67584f687..15691d10a 100644
--- a/Aaru.Filesystems/Opera/Info.cs
+++ b/Aaru.Filesystems/Opera/Info.cs
@@ -41,6 +41,7 @@ namespace Aaru.Filesystems
{
public sealed partial class OperaFS
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -61,6 +62,7 @@ namespace Aaru.Filesystems
return Encoding.ASCII.GetString(syncBytes) == SYNC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Opera/Opera.cs b/Aaru.Filesystems/Opera/Opera.cs
index db7281ae8..0129f38a8 100644
--- a/Aaru.Filesystems/Opera/Opera.cs
+++ b/Aaru.Filesystems/Opera/Opera.cs
@@ -39,6 +39,9 @@ using Schemas;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements the 3DO Opera filesystem
+ ///
public sealed partial class OperaFS : IReadOnlyFilesystem
{
bool _debug;
@@ -49,12 +52,18 @@ namespace Aaru.Filesystems
FileSystemInfo _statfs;
uint _volumeBlockSizeRatio;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Opera Filesystem Plugin";
+ ///
public Guid Id => new Guid("0ec84ec7-eae6-4196-83fe-943b3fe46dbd");
+ ///
public string Author => "Natalia Portillo";
+ ///
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
@@ -62,8 +71,10 @@ namespace Aaru.Filesystems
return Errno.NotSupported;
}
+ ///
public Errno GetXattr(string path, string xattr, ref byte[] buf) => Errno.NotSupported;
+ ///
public Errno ReadLink(string path, out string dest)
{
dest = null;
@@ -71,10 +82,12 @@ namespace Aaru.Filesystems
return Errno.NotSupported;
}
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => null;
static Dictionary GetDefaultOptions() => new Dictionary
diff --git a/Aaru.Filesystems/Opera/Super.cs b/Aaru.Filesystems/Opera/Super.cs
index 4a7e36abe..4b6b6c70f 100644
--- a/Aaru.Filesystems/Opera/Super.cs
+++ b/Aaru.Filesystems/Opera/Super.cs
@@ -42,6 +42,7 @@ namespace Aaru.Filesystems
{
public sealed partial class OperaFS
{
+ ///
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -104,6 +105,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno Unmount()
{
if(!_mounted)
@@ -114,6 +116,7 @@ namespace Aaru.Filesystems
return Errno.NoError;
}
+ ///
public Errno StatFs(out FileSystemInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/PCEngine.cs b/Aaru.Filesystems/PCEngine.cs
index 991822558..e0dbb5864 100644
--- a/Aaru.Filesystems/PCEngine.cs
+++ b/Aaru.Filesystems/PCEngine.cs
@@ -38,14 +38,23 @@ using Schemas;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the PC-Engine CD file headers
+ ///
public sealed class PCEnginePlugin : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "PC Engine CD Plugin";
+ ///
public Guid Id => new Guid("e5ee6d7c-90fa-49bd-ac89-14ef750b8af3");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -59,6 +68,7 @@ namespace Aaru.Filesystems
return Encoding.ASCII.GetString(systemDescriptor) == "PC Engine CD-ROM SYSTEM";
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/PCFX.cs b/Aaru.Filesystems/PCFX.cs
index 64b91fd77..6ac57c49b 100644
--- a/Aaru.Filesystems/PCFX.cs
+++ b/Aaru.Filesystems/PCFX.cs
@@ -43,15 +43,24 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Not a filesystem, more like an executable header
+ ///
+ /// Implements detection of NEC PC-FX headers
+ ///
public sealed class PCFX : IFilesystem
{
const string IDENTIFIER = "PC-FX:Hu_CD-ROM ";
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "PC-FX Plugin";
+ ///
public Guid Id => new Guid("8BC27CCE-D9E9-48F8-BA93-C66A86EB565A");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End ||
@@ -65,6 +74,7 @@ namespace Aaru.Filesystems
return encoding.GetString(sector, 0, 16) == IDENTIFIER;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/PFS.cs b/Aaru.Filesystems/PFS.cs
index 75ade6abd..27847df57 100644
--- a/Aaru.Filesystems/PFS.cs
+++ b/Aaru.Filesystems/PFS.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Professional File System
+ ///
public sealed class PFS : IFilesystem
{
/// Identifier for AFS (PFS v1)
@@ -56,12 +59,18 @@ namespace Aaru.Filesystems
/// Identifier for multi-user PFS
const uint MUPFS_DISK = 0x6D755046;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Professional File System";
+ ///
public Guid Id => new Guid("68DE769E-D957-406A-8AE4-3781CA8CDA77");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Length < 3)
@@ -75,6 +84,7 @@ namespace Aaru.Filesystems
magic == MUPFS_DISK;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ProDOS.cs b/Aaru.Filesystems/ProDOS.cs
index 974630e29..2fd55d08c 100644
--- a/Aaru.Filesystems/ProDOS.cs
+++ b/Aaru.Filesystems/ProDOS.cs
@@ -46,6 +46,9 @@ using Encoding = System.Text.Encoding;
namespace Aaru.Filesystems
{
// Information from Apple ProDOS 8 Technical Reference
+ ///
+ /// Implements detection of Apple ProDOS filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")]
public sealed class ProDOSPlugin : IFilesystem
{
@@ -81,12 +84,18 @@ namespace Aaru.Filesystems
const byte ENTRY_LENGTH = 0x27;
const byte ENTRIES_PER_BLOCK = 0x0D;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Apple ProDOS filesystem";
+ ///
public Guid Id => new Guid("43874265-7B8A-4739-BCF7-07F80D5932BF");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Length < 3)
@@ -159,6 +168,7 @@ namespace Aaru.Filesystems
return totalBlocks <= partition.End - partition.Start + 1;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/QNX4.cs b/Aaru.Filesystems/QNX4.cs
index 4685b3271..69cb1cccb 100644
--- a/Aaru.Filesystems/QNX4.cs
+++ b/Aaru.Filesystems/QNX4.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of QNX 4 filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedType.Local")]
public sealed class QNX4 : IFilesystem
{
@@ -51,12 +54,18 @@ namespace Aaru.Filesystems
0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "QNX4 Plugin";
+ ///
public Guid Id => new Guid("E73A63FA-B5B0-48BF-BF82-DA5F0A8170D2");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start + 1 >= imagePlugin.Info.Sectors)
@@ -97,6 +106,7 @@ namespace Aaru.Filesystems
return true;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/QNX6.cs b/Aaru.Filesystems/QNX6.cs
index 62e988592..ade2378ae 100644
--- a/Aaru.Filesystems/QNX6.cs
+++ b/Aaru.Filesystems/QNX6.cs
@@ -41,18 +41,27 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of QNX 6 filesystem
+ ///
public sealed class QNX6 : IFilesystem
{
const uint QNX6_SUPER_BLOCK_SIZE = 0x1000;
const uint QNX6_BOOT_BLOCKS_SIZE = 0x2000;
const uint QNX6_MAGIC = 0x68191122;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "QNX6 Plugin";
+ ///
public Guid Id => new Guid("3E610EA2-4D08-4D70-8947-830CD4C74FC0");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
uint sectors = QNX6_SUPER_BLOCK_SIZE / imagePlugin.Info.SectorSize;
@@ -74,6 +83,7 @@ namespace Aaru.Filesystems
return qnxSb.magic == QNX6_MAGIC || audiSb.magic == QNX6_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/RBF.cs b/Aaru.Filesystems/RBF.cs
index 4416950bc..5bc533d87 100644
--- a/Aaru.Filesystems/RBF.cs
+++ b/Aaru.Filesystems/RBF.cs
@@ -42,18 +42,27 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Locus filesystem
+ ///
public sealed class RBF : IFilesystem
{
/// Magic number for OS-9. Same for OS-9000?
const uint RBF_SYNC = 0x4372757A;
const uint RBF_CNYS = 0x7A757243;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "OS-9 Random Block File Plugin";
+ ///
public Guid Id => new Guid("E864E45B-0B52-4D29-A858-7BDFA9199FB2");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 256)
@@ -98,6 +107,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/RT11.cs b/Aaru.Filesystems/RT11.cs
index ad0e24c83..4109ebad8 100644
--- a/Aaru.Filesystems/RT11.cs
+++ b/Aaru.Filesystems/RT11.cs
@@ -44,15 +44,23 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from http://www.trailing-edge.com/~shoppa/rt11fs/
- // TODO: Implement Radix-50
+ ///
+ /// Implements detection of the DEC RT-11 filesystem
+ ///
public sealed class RT11 : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "RT-11 file system";
+ ///
public Guid Id => new Guid("DB3E2F98-8F98-463C-8126-E937843DA024");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(1 + partition.Start >= partition.End)
@@ -70,6 +78,7 @@ namespace Aaru.Filesystems
return magic == "DECRT11A ";
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ReFS.cs b/Aaru.Filesystems/ReFS.cs
index 08841d3e2..2e8d5643e 100644
--- a/Aaru.Filesystems/ReFS.cs
+++ b/Aaru.Filesystems/ReFS.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of Microsoft's Resilient filesystem (ReFS)
+ ///
public sealed class ReFS : IFilesystem
{
const uint FSRS = 0x53525346;
@@ -50,12 +53,18 @@ namespace Aaru.Filesystems
{
0x52, 0x65, 0x46, 0x53, 0x00, 0x00, 0x00, 0x00
};
+ ///
public string Name => "Resilient File System plugin";
+ ///
public Guid Id => new Guid("37766C4E-EBF5-4113-A712-B758B756ABD6");
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize);
@@ -77,6 +86,7 @@ namespace Aaru.Filesystems
vhdr.signature.SequenceEqual(_signature);
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Register.cs b/Aaru.Filesystems/Register.cs
index e0a8ccc41..c2a124103 100644
--- a/Aaru.Filesystems/Register.cs
+++ b/Aaru.Filesystems/Register.cs
@@ -44,33 +44,44 @@ using Aaru.CommonTypes.Interfaces;
namespace Aaru.Filesystems
{
+ ///
public sealed class Register : IPluginRegister
{
+ ///
public List GetAllChecksumPlugins() => null;
+ ///
public List GetAllFilesystemPlugins() => Assembly.GetExecutingAssembly().GetTypes().
Where(t => t.GetInterfaces().
Contains(typeof(IFilesystem))).
Where(t => t.IsClass).ToList();
+ ///
public List GetAllFilterPlugins() => null;
+ ///
public List GetAllFloppyImagePlugins() => null;
+ ///
public List GetAllMediaImagePlugins() => null;
+ ///
public List GetAllPartitionPlugins() => null;
+ ///
public List GetAllReadOnlyFilesystemPlugins() => Assembly.GetExecutingAssembly().GetTypes().
Where(t => t.GetInterfaces().
Contains(typeof(IReadOnlyFilesystem
))).Where(t => t.IsClass).
ToList();
+ ///
public List GetAllWritableFloppyImagePlugins() => null;
+ ///
public List GetAllWritableImagePlugins() => null;
+ ///
public List GetAllArchivePlugins() => null;
}
}
diff --git a/Aaru.Filesystems/Reiser.cs b/Aaru.Filesystems/Reiser.cs
index 8244dfc8b..2b915361a 100644
--- a/Aaru.Filesystems/Reiser.cs
+++ b/Aaru.Filesystems/Reiser.cs
@@ -42,6 +42,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Reiser v3 filesystem
+ ///
public sealed class Reiser : IFilesystem
{
const uint REISER_SUPER_OFFSET = 0x10000;
@@ -59,12 +62,18 @@ namespace Aaru.Filesystems
0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x33, 0x46, 0x73, 0x00
};
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Reiser Filesystem Plugin";
+ ///
public Guid Id => new Guid("1D8CD8B8-27E6-410F-9973-D16409225FBA");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -94,6 +103,7 @@ namespace Aaru.Filesystems
_magicJr.SequenceEqual(reiserSb.magic);
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Reiser4.cs b/Aaru.Filesystems/Reiser4.cs
index 6987b38a1..8f59778cb 100644
--- a/Aaru.Filesystems/Reiser4.cs
+++ b/Aaru.Filesystems/Reiser4.cs
@@ -42,6 +42,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Reiser v4 filesystem
+ ///
public sealed class Reiser4 : IFilesystem
{
const uint REISER4_SUPER_OFFSET = 0x10000;
@@ -51,12 +54,18 @@ namespace Aaru.Filesystems
0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Reiser4 Filesystem Plugin";
+ ///
public Guid Id => new Guid("301F2D00-E8D5-4F04-934E-81DFB21D15BA");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -85,6 +94,7 @@ namespace Aaru.Filesystems
return _magic.SequenceEqual(reiserSb.magic);
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/SFS.cs b/Aaru.Filesystems/SFS.cs
index c744837bd..1f2192ee2 100644
--- a/Aaru.Filesystems/SFS.cs
+++ b/Aaru.Filesystems/SFS.cs
@@ -41,6 +41,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Smart File System
+ ///
public sealed class SFS : IFilesystem
{
/// Identifier for SFS v1
@@ -48,12 +51,18 @@ namespace Aaru.Filesystems
/// Identifier for SFS v2
const uint SFS2_MAGIC = 0x53465302;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "SmartFileSystem";
+ ///
public Guid Id => new Guid("26550C19-3671-4A2D-BC2F-F20CEB7F48DC");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start >= partition.End)
@@ -66,6 +75,7 @@ namespace Aaru.Filesystems
return magic == SFS_MAGIC || magic == SFS2_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/SolarFS.cs b/Aaru.Filesystems/SolarFS.cs
index de1e55e1d..f720805bb 100644
--- a/Aaru.Filesystems/SolarFS.cs
+++ b/Aaru.Filesystems/SolarFS.cs
@@ -41,14 +41,23 @@ using Schemas;
namespace Aaru.Filesystems
{
// Based on FAT's BPB, cannot find a FAT or directory
+ ///
+ /// Implements detection of the Solar OS filesystem
+ ///
public sealed class SolarFS : IFilesystem
{
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Solar_OS filesystem";
+ ///
public Guid Id => new Guid("EA3101C1-E777-4B4F-B5A3-8C57F50F6E65");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -65,6 +74,7 @@ namespace Aaru.Filesystems
return signature == 0x29 && fsType == "SOL_FS ";
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Squash.cs b/Aaru.Filesystems/Squash.cs
index ee51799d2..fe7e06562 100644
--- a/Aaru.Filesystems/Squash.cs
+++ b/Aaru.Filesystems/Squash.cs
@@ -41,18 +41,27 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the squash filesystem
+ ///
public sealed class Squash : IFilesystem
{
/// Identifier for Squash
const uint SQUASH_MAGIC = 0x73717368;
const uint SQUASH_CIGAM = 0x68737173;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Squash filesystem";
+ ///
public Guid Id => new Guid("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start >= partition.End)
@@ -65,6 +74,7 @@ namespace Aaru.Filesystems
return magic == SQUASH_MAGIC || magic == SQUASH_CIGAM;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/SysV.cs b/Aaru.Filesystems/SysV.cs
index 2b0637644..25b2014b3 100644
--- a/Aaru.Filesystems/SysV.cs
+++ b/Aaru.Filesystems/SysV.cs
@@ -44,6 +44,9 @@ using Schemas;
namespace Aaru.Filesystems
{
// Information from the Linux kernel
+ ///
+ /// Implements detection of the UNIX System V filesystem
+ ///
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local"),
SuppressMessage("ReSharper", "UnusedType.Local")]
public sealed class SysVfs : IFilesystem
@@ -69,12 +72,18 @@ namespace Aaru.Filesystems
const ushort V7_NICFREE = 100;
const uint V7_MAXSIZE = 0x00FFFFFF;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "UNIX System V filesystem";
+ ///
public Guid Id => new Guid("9B8D016A-8561-400E-A12A-A198283C211D");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -188,6 +197,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/UCSDPascal/Dir.cs b/Aaru.Filesystems/UCSDPascal/Dir.cs
index 469b332a0..0337a2416 100644
--- a/Aaru.Filesystems/UCSDPascal/Dir.cs
+++ b/Aaru.Filesystems/UCSDPascal/Dir.cs
@@ -41,6 +41,7 @@ namespace Aaru.Filesystems.UCSDPascal
// Information from Call-A.P.P.L.E. Pascal Disk Directory Structure
public sealed partial class PascalPlugin
{
+ ///
public Errno ReadDir(string path, out List contents)
{
contents = null;
diff --git a/Aaru.Filesystems/UCSDPascal/File.cs b/Aaru.Filesystems/UCSDPascal/File.cs
index d1ace5bbc..937a3e799 100644
--- a/Aaru.Filesystems/UCSDPascal/File.cs
+++ b/Aaru.Filesystems/UCSDPascal/File.cs
@@ -40,6 +40,7 @@ namespace Aaru.Filesystems.UCSDPascal
// Information from Call-A.P.P.L.E. Pascal Disk Directory Structure
public sealed partial class PascalPlugin
{
+ ///
public Errno MapBlock(string path, long fileBlock, out long deviceBlock)
{
deviceBlock = 0;
@@ -47,6 +48,7 @@ namespace Aaru.Filesystems.UCSDPascal
return !_mounted ? Errno.AccessDenied : Errno.NotImplemented;
}
+ ///
public Errno GetAttributes(string path, out FileAttributes attributes)
{
attributes = new FileAttributes();
@@ -72,6 +74,7 @@ namespace Aaru.Filesystems.UCSDPascal
return error;
}
+ ///
public Errno Read(string path, long offset, long size, ref byte[] buf)
{
if(!_mounted)
@@ -119,6 +122,7 @@ namespace Aaru.Filesystems.UCSDPascal
return Errno.NoError;
}
+ ///
public Errno Stat(string path, out FileEntryInfo stat)
{
stat = null;
diff --git a/Aaru.Filesystems/UCSDPascal/Info.cs b/Aaru.Filesystems/UCSDPascal/Info.cs
index c57bd06f0..8650772ca 100644
--- a/Aaru.Filesystems/UCSDPascal/Info.cs
+++ b/Aaru.Filesystems/UCSDPascal/Info.cs
@@ -45,6 +45,7 @@ namespace Aaru.Filesystems.UCSDPascal
// Information from Call-A.P.P.L.E. Pascal Disk Directory Structure
public sealed partial class PascalPlugin
{
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Length < 3)
@@ -112,6 +113,7 @@ namespace Aaru.Filesystems.UCSDPascal
return volEntry.Files >= 0;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/UCSDPascal/Super.cs b/Aaru.Filesystems/UCSDPascal/Super.cs
index a2827cccd..8f92795a9 100644
--- a/Aaru.Filesystems/UCSDPascal/Super.cs
+++ b/Aaru.Filesystems/UCSDPascal/Super.cs
@@ -45,6 +45,7 @@ namespace Aaru.Filesystems.UCSDPascal
// Information from Call-A.P.P.L.E. Pascal Disk Directory Structure
public sealed partial class PascalPlugin
{
+ ///
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary options, string @namespace)
{
@@ -138,6 +139,7 @@ namespace Aaru.Filesystems.UCSDPascal
return Errno.NoError;
}
+ ///
public Errno Unmount()
{
_mounted = false;
@@ -146,6 +148,7 @@ namespace Aaru.Filesystems.UCSDPascal
return Errno.NoError;
}
+ ///
public Errno StatFs(out FileSystemInfo stat)
{
stat = new FileSystemInfo
diff --git a/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs b/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs
index ee2fa11d8..c05121f47 100644
--- a/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs
+++ b/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs
@@ -40,6 +40,9 @@ using Schemas;
namespace Aaru.Filesystems.UCSDPascal
{
// Information from Call-A.P.P.L.E. Pascal Disk Directory Structure
+ ///
+ /// Implements the U.C.S.D. Pascal filesystem
+ ///
public sealed partial class PascalPlugin : IReadOnlyFilesystem
{
byte[] _bootBlocks;
@@ -52,12 +55,18 @@ namespace Aaru.Filesystems.UCSDPascal
/// Apple II disks use 256 bytes / sector, but filesystem assumes it's 512 bytes / sector
uint _multiplier;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Name => "U.C.S.D. Pascal filesystem";
+ ///
public Guid Id => new Guid("B0AC2CB5-72AA-473A-9200-270B5A2C2D53");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public Errno ListXAttr(string path, out List xattrs)
{
xattrs = null;
@@ -65,8 +74,10 @@ namespace Aaru.Filesystems.UCSDPascal
return Errno.NotSupported;
}
+ ///
public Errno GetXattr(string path, string xattr, ref byte[] buf) => Errno.NotSupported;
+ ///
public Errno ReadLink(string path, out string dest)
{
dest = null;
@@ -74,10 +85,12 @@ namespace Aaru.Filesystems.UCSDPascal
return Errno.NotSupported;
}
+ ///
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
+ ///
public Dictionary Namespaces => null;
static Dictionary GetDefaultOptions() => new Dictionary
diff --git a/Aaru.Filesystems/UDF.cs b/Aaru.Filesystems/UDF.cs
index 64155b4e7..1e25dbb98 100644
--- a/Aaru.Filesystems/UDF.cs
+++ b/Aaru.Filesystems/UDF.cs
@@ -45,6 +45,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// TODO: Detect bootable
+ ///
+ /// Implements detection of the Universal Disk Format filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class UDF : IFilesystem
{
@@ -54,12 +57,18 @@ namespace Aaru.Filesystems
0x74, 0x00, 0x00, 0x00, 0x00
};
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Universal Disk Format";
+ ///
public Guid Id => new Guid("83976FEC-A91B-464B-9293-56C719461BAB");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
// UDF needs at least that
@@ -199,6 +208,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/UNICOS.cs b/Aaru.Filesystems/UNICOS.cs
index 49589dc3f..b68196679 100644
--- a/Aaru.Filesystems/UNICOS.cs
+++ b/Aaru.Filesystems/UNICOS.cs
@@ -51,6 +51,9 @@ using time_t = System.Int64;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection for the Cray UNICOS filesystem
+ ///
public sealed class UNICOS : IFilesystem
{
const int NC1_MAXPART = 64;
@@ -59,12 +62,18 @@ namespace Aaru.Filesystems
const ulong UNICOS_MAGIC = 0x6e6331667331636e;
const ulong UNICOS_SECURE = 0xcd076d1771d670cd;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "UNICOS Filesystem Plugin";
+ ///
public Guid Id => new Guid("61712F04-066C-44D5-A2A0-1E44C66B33F0");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -91,6 +100,7 @@ namespace Aaru.Filesystems
return unicosSb.s_magic == UNICOS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/UNIXBFS.cs b/Aaru.Filesystems/UNIXBFS.cs
index b9e16b1e3..86131ac31 100644
--- a/Aaru.Filesystems/UNIXBFS.cs
+++ b/Aaru.Filesystems/UNIXBFS.cs
@@ -41,16 +41,25 @@ using Schemas;
namespace Aaru.Filesystems
{
// Information from the Linux kernel
+ ///
+ /// Implements detection of the UNIX boot filesystem
+ ///
public sealed class BFS : IFilesystem
{
const uint BFS_MAGIC = 0x1BADFACE;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "UNIX Boot filesystem";
+ ///
public Guid Id => new Guid("1E6E0DA6-F7E4-494C-80C6-CB5929E96155");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(2 + partition.Start >= partition.End)
@@ -61,6 +70,7 @@ namespace Aaru.Filesystems
return magic == BFS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/VMfs.cs b/Aaru.Filesystems/VMfs.cs
index 7e25aed41..397e6c434 100644
--- a/Aaru.Filesystems/VMfs.cs
+++ b/Aaru.Filesystems/VMfs.cs
@@ -42,6 +42,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the VMware filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedType.Local"), SuppressMessage("ReSharper", "IdentifierTypo"),
SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class VMfs : IFilesystem
@@ -50,12 +53,18 @@ namespace Aaru.Filesystems
const uint VMFS_MAGIC = 0xC001D00D;
const uint VMFS_BASE = 0x00100000;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "VMware filesystem";
+ ///
public Guid Id => new Guid("EE52BDB8-B49C-4122-A3DA-AD21CBE79843");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(partition.Start >= partition.End)
@@ -73,6 +82,7 @@ namespace Aaru.Filesystems
return magic == VMFS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/VxFS.cs b/Aaru.Filesystems/VxFS.cs
index 17c7bd188..fca45bf20 100644
--- a/Aaru.Filesystems/VxFS.cs
+++ b/Aaru.Filesystems/VxFS.cs
@@ -41,18 +41,27 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of the Veritas filesystem
+ ///
public sealed class VxFS : IFilesystem
{
/// Identifier for VxFS
const uint VXFS_MAGIC = 0xA501FCF5;
const uint VXFS_BASE = 0x400;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Veritas filesystem";
+ ///
public Guid Id => new Guid("EC372605-7687-453C-8BEA-7E0DFF79CB03");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
ulong vmfsSuperOff = VXFS_BASE / imagePlugin.Info.SectorSize;
@@ -67,6 +76,7 @@ namespace Aaru.Filesystems
return magic == VXFS_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/XFS.cs b/Aaru.Filesystems/XFS.cs
index 99437bd67..36022e37a 100644
--- a/Aaru.Filesystems/XFS.cs
+++ b/Aaru.Filesystems/XFS.cs
@@ -43,16 +43,25 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements detection of SGI's XFS
+ ///
public sealed class XFS : IFilesystem
{
const uint XFS_MAGIC = 0x58465342;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "XFS Filesystem Plugin";
+ ///
public Guid Id => new Guid("1D8CD8B8-27E6-410F-9973-D16409225FBA");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -119,6 +128,7 @@ namespace Aaru.Filesystems
return false;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/Xia.cs b/Aaru.Filesystems/Xia.cs
index 8bce8c79b..1d0c2cde4 100644
--- a/Aaru.Filesystems/Xia.cs
+++ b/Aaru.Filesystems/Xia.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from the Linux kernel
+ ///
+ /// Implements detection for the Xia filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")]
public sealed class Xia : IFilesystem
{
@@ -54,12 +57,18 @@ namespace Aaru.Filesystems
const int XIAFS_NUM_BLOCK_POINTERS = 10;
const int XIAFS_NAME_LEN = 248;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Xia filesystem";
+ ///
public Guid Id => new Guid("169E1DE5-24F2-4EF6-A04D-A4B2CA66DE9D");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
int sbSizeInBytes = Marshal.SizeOf();
@@ -77,6 +86,7 @@ namespace Aaru.Filesystems
return supblk.s_magic == XIAFS_SUPER_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ZFS.cs b/Aaru.Filesystems/ZFS.cs
index 84a20a583..fce3574a5 100644
--- a/Aaru.Filesystems/ZFS.cs
+++ b/Aaru.Filesystems/ZFS.cs
@@ -61,6 +61,9 @@ namespace Aaru.Filesystems
* It can also be encoded little or big endian.
* Because of this variations, ZFS stored a header indicating the used encoding and endianess before the encoded nvlist.
*/
+ ///
+ /// Implements detection for the Zettabyte File System (ZFS)
+ ///
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"),
SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")]
public sealed class ZFS : IFilesystem
@@ -78,12 +81,18 @@ namespace Aaru.Filesystems
const uint ZFS_MAGIC = 0x58465342;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "ZFS Filesystem Plugin";
+ ///
public Guid Id => new Guid("0750014F-A714-4692-A369-E23F6EC3659C");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -111,6 +120,7 @@ namespace Aaru.Filesystems
return magic == ZEC_MAGIC || magic == ZEC_CIGAM;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/dump.cs b/Aaru.Filesystems/dump.cs
index 3db35dc02..781216b2e 100644
--- a/Aaru.Filesystems/dump.cs
+++ b/Aaru.Filesystems/dump.cs
@@ -44,6 +44,9 @@ using ufs_daddr_t = System.Int32;
namespace Aaru.Filesystems
{
+ ///
+ /// Implements identification of a dump(8) image (virtual filesystem on a file)
+ ///
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class dump : IFilesystem
{
@@ -88,12 +91,18 @@ namespace Aaru.Filesystems
const int NDADDR = 12;
const int NIADDR = 3;
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "dump(8) Plugin";
+ ///
public Guid Id => new Guid("E53B4D28-C858-4800-B092-DDAE80D361B9");
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -126,6 +135,7 @@ namespace Aaru.Filesystems
newHdr.c_magic == NFS_CIGAM || newHdr.c_magic == UFS2_MAGIC || newHdr.c_magic == UFS2_CIGAM;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/exFAT.cs b/Aaru.Filesystems/exFAT.cs
index eb26ad3d0..b536da063 100644
--- a/Aaru.Filesystems/exFAT.cs
+++ b/Aaru.Filesystems/exFAT.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from https://www.sans.org/reading-room/whitepapers/forensics/reverse-engineering-microsoft-exfat-file-system-33274
+ ///
+ /// Implements detection of the exFAT filesystem
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class exFAT : IFilesystem
{
@@ -53,12 +56,18 @@ namespace Aaru.Filesystems
0x45, 0x58, 0x46, 0x41, 0x54, 0x20, 0x20, 0x20
};
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Microsoft Extended File Allocation Table";
+ ///
public Guid Id => new Guid("8271D088-1533-4CB3-AC28-D802B68BB95C");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(12 + partition.Start >= partition.End)
@@ -74,6 +83,7 @@ namespace Aaru.Filesystems
return _signature.SequenceEqual(vbr.signature);
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/ext2FS.cs b/Aaru.Filesystems/ext2FS.cs
index 3c4832864..3002a048e 100644
--- a/Aaru.Filesystems/ext2FS.cs
+++ b/Aaru.Filesystems/ext2FS.cs
@@ -43,6 +43,9 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
// Information from the Linux kernel
+ ///
+ /// Implements detection of the Linux extended filesystem v2, v3 and v4
+ ///
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class ext2FS : IFilesystem
{
@@ -162,12 +165,18 @@ namespace Aaru.Filesystems
/// Testing development code
const uint EXT2_FLAGS_TEST_FILESYS = 0x00000004;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Name => "Linux extended Filesystem 2, 3 and 4";
+ ///
public Guid Id => new Guid("6AA91B88-150B-4A7B-AD56-F84FB2DF4184");
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
ulong sbSectorOff = SB_POS / imagePlugin.Info.SectorSize;
@@ -195,6 +204,7 @@ namespace Aaru.Filesystems
return magic == EXT2_MAGIC || magic == EXT2_MAGIC_OLD;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filesystems/extFS.cs b/Aaru.Filesystems/extFS.cs
index f0440ea77..0518516ec 100644
--- a/Aaru.Filesystems/extFS.cs
+++ b/Aaru.Filesystems/extFS.cs
@@ -40,6 +40,9 @@ using Schemas;
namespace Aaru.Filesystems
{
// Information from the Linux kernel
+ ///
+ /// Implements detection of the Linux extended filesystem
+ ///
public sealed class extFS : IFilesystem
{
const int SB_POS = 0x400;
@@ -47,12 +50,18 @@ namespace Aaru.Filesystems
/// ext superblock magic
const ushort EXT_MAGIC = 0x137D;
+ ///
public FileSystemType XmlFsType { get; private set; }
+ ///
public string Name => "Linux extended Filesystem";
+ ///
public Guid Id => new Guid("076CB3A2-08C2-4D69-BC8A-FCAA2E502BE2");
+ ///
public Encoding Encoding { get; private set; }
+ ///
public string Author => "Natalia Portillo";
+ ///
public bool Identify(IMediaImage imagePlugin, Partition partition)
{
if(imagePlugin.Info.SectorSize < 512)
@@ -77,6 +86,7 @@ namespace Aaru.Filesystems
return magic == EXT_MAGIC;
}
+ ///
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
Encoding encoding)
{
diff --git a/Aaru.Filters/AppleDouble.cs b/Aaru.Filters/AppleDouble.cs
index b62729259..b96b4a347 100644
--- a/Aaru.Filters/AppleDouble.cs
+++ b/Aaru.Filters/AppleDouble.cs
@@ -82,32 +82,47 @@ namespace Aaru.Filters
bool _opened;
Entry _rsrcFork;
+ ///
public string Name => "AppleDouble";
+ ///
public Guid Id => new Guid("1B2165EE-C9DF-4B21-BBBB-9E5892B2DF4D");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close() => _opened = false;
+ ///
public string GetBasePath() => _basePath;
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _dataFork.length;
+ ///
public Stream GetDataForkStream() => new FileStream(_basePath, FileMode.Open, FileAccess.Read);
+ ///
public string GetFilename() => Path.GetFileName(_basePath);
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _dataFork.length + _rsrcFork.length;
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public string GetPath() => _basePath;
+ ///
public long GetResourceForkLength() => _rsrcFork.length;
+ ///
public Stream GetResourceForkStream()
{
if(_rsrcFork.length == 0)
@@ -117,12 +132,16 @@ namespace Aaru.Filters
(_rsrcFork.offset + _rsrcFork.length) - 1);
}
+ ///
public bool HasResourceFork() => _rsrcFork.length > 0;
+ ///
public bool Identify(byte[] buffer) => false;
+ ///
public bool Identify(Stream stream) => false;
+ ///
public bool Identify(string path)
{
string filename = Path.GetFileName(path);
@@ -302,14 +321,18 @@ namespace Aaru.Filters
return _header.magic == MAGIC && (_header.version == VERSION || _header.version == VERSION2);
}
+ ///
public bool IsOpened() => _opened;
// Now way to have two files in a single byte array
+ ///
public void Open(byte[] buffer) => throw new NotSupportedException();
// Now way to have two files in a single stream
+ ///
public void Open(Stream stream) => throw new NotSupportedException();
+ ///
public void Open(string path)
{
string filename = Path.GetFileName(path);
diff --git a/Aaru.Filters/AppleSingle.cs b/Aaru.Filters/AppleSingle.cs
index 4b6b16c89..ee878c295 100644
--- a/Aaru.Filters/AppleSingle.cs
+++ b/Aaru.Filters/AppleSingle.cs
@@ -83,10 +83,14 @@ namespace Aaru.Filters
Entry _rsrcFork;
Stream _stream;
+ ///
public string Name => "AppleSingle";
+ ///
public Guid Id => new Guid("A69B20E8-F4D3-42BB-BD2B-4A7263394A05");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close()
{
_bytes = null;
@@ -97,12 +101,16 @@ namespace Aaru.Filters
_opened = false;
}
+ ///
public string GetBasePath() => _basePath;
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _dataFork.length;
+ ///
public Stream GetDataForkStream()
{
if(_dataFork.length == 0)
@@ -121,18 +129,25 @@ namespace Aaru.Filters
return null;
}
+ ///
public string GetFilename() => Path.GetFileName(_basePath);
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _dataFork.length + _rsrcFork.length;
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public string GetPath() => _basePath;
+ ///
public long GetResourceForkLength() => _rsrcFork.length;
+ ///
public Stream GetResourceForkStream()
{
if(_rsrcFork.length == 0)
@@ -151,8 +166,10 @@ namespace Aaru.Filters
return null;
}
+ ///
public bool HasResourceFork() => _rsrcFork.length > 0;
+ ///
public bool Identify(byte[] buffer)
{
if(buffer == null ||
@@ -166,6 +183,7 @@ namespace Aaru.Filters
return _header.magic == MAGIC && (_header.version == VERSION || _header.version == VERSION2);
}
+ ///
public bool Identify(Stream stream)
{
if(stream == null ||
@@ -180,6 +198,7 @@ namespace Aaru.Filters
return _header.magic == MAGIC && (_header.version == VERSION || _header.version == VERSION2);
}
+ ///
public bool Identify(string path)
{
if(!File.Exists(path))
@@ -199,8 +218,10 @@ namespace Aaru.Filters
return _header.magic == MAGIC && (_header.version == VERSION || _header.version == VERSION2);
}
+ ///
public bool IsOpened() => _opened;
+ ///
public void Open(byte[] buffer)
{
var ms = new MemoryStream(buffer);
@@ -287,6 +308,7 @@ namespace Aaru.Filters
_bytes = buffer;
}
+ ///
public void Open(Stream stream)
{
stream.Seek(0, SeekOrigin.Begin);
@@ -372,6 +394,7 @@ namespace Aaru.Filters
_stream = stream;
}
+ ///
public void Open(string path)
{
var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
diff --git a/Aaru.Filters/BZip2.cs b/Aaru.Filters/BZip2.cs
index 14d4dd2c2..cea83996a 100644
--- a/Aaru.Filters/BZip2.cs
+++ b/Aaru.Filters/BZip2.cs
@@ -49,10 +49,14 @@ namespace Aaru.Filters
DateTime _lastWriteTime;
bool _opened;
+ ///
public string Name => "BZip2";
+ ///
public Guid Id => new Guid("FCCFB0C3-32EF-40D8-9714-2333F6AC72A9");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close()
{
_dataStream?.Close();
@@ -61,16 +65,22 @@ namespace Aaru.Filters
_opened = false;
}
+ ///
public string GetBasePath() => _basePath;
+ ///
public Stream GetDataForkStream() => _innerStream;
+ ///
public string GetPath() => _basePath;
+ ///
public Stream GetResourceForkStream() => null;
+ ///
public bool HasResourceFork() => false;
+ ///
public bool Identify(byte[] buffer)
{
if(buffer[0] != 0x42 ||
@@ -86,6 +96,7 @@ namespace Aaru.Filters
return buffer[^512] != 0x6B || buffer[^511] != 0x6F || buffer[^510] != 0x6C || buffer[^509] != 0x79;
}
+ ///
public bool Identify(Stream stream)
{
byte[] buffer = new byte[4];
@@ -112,6 +123,7 @@ namespace Aaru.Filters
return buffer[0] != 0x6B || buffer[1] != 0x6F || buffer[2] != 0x6C || buffer[3] != 0x79;
}
+ ///
public bool Identify(string path)
{
if(!File.Exists(path))
@@ -142,6 +154,7 @@ namespace Aaru.Filters
return buffer[0] != 0x6B || buffer[1] != 0x6F || buffer[2] != 0x6C || buffer[3] != 0x79;
}
+ ///
public void Open(byte[] buffer)
{
_dataStream = new MemoryStream(buffer);
@@ -153,6 +166,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(Stream stream)
{
_dataStream = stream;
@@ -164,6 +178,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(string path)
{
_dataStream = new FileStream(path, FileMode.Open, FileAccess.Read);
@@ -177,16 +192,22 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _decompressedSize;
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _decompressedSize;
+ ///
public long GetResourceForkLength() => 0;
+ ///
public string GetFilename()
{
if(_basePath?.EndsWith(".bz2", StringComparison.InvariantCultureIgnoreCase) == true)
@@ -196,8 +217,10 @@ namespace Aaru.Filters
? _basePath.Substring(0, _basePath.Length - 6) : _basePath;
}
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public bool IsOpened() => _opened;
}
}
\ No newline at end of file
diff --git a/Aaru.Filters/ForcedSeekStream.cs b/Aaru.Filters/ForcedSeekStream.cs
index fcd6bb90d..bc77119e2 100644
--- a/Aaru.Filters/ForcedSeekStream.cs
+++ b/Aaru.Filters/ForcedSeekStream.cs
@@ -39,6 +39,7 @@ namespace Aaru.Filters
/// ForcedSeekStream allows to seek a forward-readable stream (like System.IO.Compression streams) by doing the
/// slow and known trick of rewinding and forward reading until arriving the desired position.
///
+ ///
public sealed class ForcedSeekStream : Stream where T : Stream
{
const int BUFFER_LEN = 1048576;
@@ -50,6 +51,7 @@ namespace Aaru.Filters
/// Initializes a new instance of the class.
/// The real (uncompressed) length of the stream.
/// Parameters that are used to create the base stream.
+ ///
public ForcedSeekStream(long length, params object[] args)
{
_streamLength = length;
@@ -63,6 +65,7 @@ namespace Aaru.Filters
/// Initializes a new instance of the class.
/// Parameters that are used to create the base stream.
+ ///
public ForcedSeekStream(params object[] args)
{
_baseStream = (T)Activator.CreateInstance(typeof(T), args);
@@ -71,14 +74,19 @@ namespace Aaru.Filters
CalculateLength();
}
+ ///
public override bool CanRead => _baseStream.CanRead;
+ ///
public override bool CanSeek => true;
+ ///
public override bool CanWrite => false;
+ ///
public override long Length => _streamLength;
+ ///
public override long Position
{
get => _backStream.Position;
@@ -139,12 +147,14 @@ namespace Aaru.Filters
_backStream.Write(buffer, 0, restToRead);
}
+ ///
public override void Flush()
{
_baseStream.Flush();
_backStream.Flush();
}
+ ///
public override int Read(byte[] buffer, int offset, int count)
{
if(_backStream.Position + count > _streamLength)
@@ -159,6 +169,7 @@ namespace Aaru.Filters
return _backStream.Read(buffer, offset, count);
}
+ ///
public override int ReadByte()
{
if(_backStream.Position + 1 > _streamLength)
@@ -173,6 +184,7 @@ namespace Aaru.Filters
return _backStream.ReadByte();
}
+ ///
public override long Seek(long offset, SeekOrigin origin)
{
switch(origin)
@@ -203,10 +215,13 @@ namespace Aaru.Filters
return _backStream.Position;
}
+ ///
public override void SetLength(long value) => throw new NotSupportedException();
+ ///
public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException();
+ ///
public override void Close()
{
_backStream?.Close();
diff --git a/Aaru.Filters/GZip.cs b/Aaru.Filters/GZip.cs
index 08b7b4a18..87314d1c0 100644
--- a/Aaru.Filters/GZip.cs
+++ b/Aaru.Filters/GZip.cs
@@ -49,10 +49,14 @@ namespace Aaru.Filters
bool _opened;
Stream _zStream;
+ ///
public string Name => "GZip";
+ ///
public Guid Id => new Guid("F4996661-4A29-42C9-A2C7-3904EF40F3B0");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close()
{
_dataStream?.Close();
@@ -61,18 +65,25 @@ namespace Aaru.Filters
_opened = false;
}
+ ///
public string GetBasePath() => _basePath;
+ ///
public Stream GetDataForkStream() => _zStream;
+ ///
public string GetPath() => _basePath;
+ ///
public Stream GetResourceForkStream() => null;
+ ///
public bool HasResourceFork() => false;
+ ///
public bool Identify(byte[] buffer) => buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08;
+ ///
public bool Identify(Stream stream)
{
byte[] buffer = new byte[3];
@@ -84,6 +95,7 @@ namespace Aaru.Filters
return buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08;
}
+ ///
public bool Identify(string path)
{
if(!File.Exists(path))
@@ -99,6 +111,7 @@ namespace Aaru.Filters
return buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08;
}
+ ///
public void Open(byte[] buffer)
{
byte[] mtimeB = new byte[4];
@@ -125,6 +138,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(Stream stream)
{
byte[] mtimeB = new byte[4];
@@ -151,6 +165,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(string path)
{
byte[] mtimeB = new byte[4];
@@ -176,16 +191,22 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _decompressedSize;
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _decompressedSize;
+ ///
public long GetResourceForkLength() => 0;
+ ///
public string GetFilename()
{
if(_basePath?.EndsWith(".gz", StringComparison.InvariantCultureIgnoreCase) == true)
@@ -195,8 +216,10 @@ namespace Aaru.Filters
? _basePath.Substring(0, _basePath.Length - 5) : _basePath;
}
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public bool IsOpened() => _opened;
}
}
\ No newline at end of file
diff --git a/Aaru.Filters/LZip.cs b/Aaru.Filters/LZip.cs
index d13d06b33..ef4079f94 100644
--- a/Aaru.Filters/LZip.cs
+++ b/Aaru.Filters/LZip.cs
@@ -49,10 +49,14 @@ namespace Aaru.Filters
DateTime _lastWriteTime;
bool _opened;
+ ///
public string Name => "LZip";
+ ///
public Guid Id => new Guid("09D715E9-20C0-48B1-A8D9-D8897CEC57C9");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close()
{
_dataStream?.Close();
@@ -61,19 +65,26 @@ namespace Aaru.Filters
_opened = false;
}
+ ///
public string GetBasePath() => _basePath;
+ ///
public Stream GetDataForkStream() => _innerStream;
+ ///
public string GetPath() => _basePath;
+ ///
public Stream GetResourceForkStream() => null;
+ ///
public bool HasResourceFork() => false;
+ ///
public bool Identify(byte[] buffer) => buffer[0] == 0x4C && buffer[1] == 0x5A && buffer[2] == 0x49 &&
buffer[3] == 0x50 && buffer[4] == 0x01;
+ ///
public bool Identify(Stream stream)
{
byte[] buffer = new byte[5];
@@ -86,6 +97,7 @@ namespace Aaru.Filters
buffer[4] == 0x01;
}
+ ///
public bool Identify(string path)
{
if(!File.Exists(path))
@@ -102,6 +114,7 @@ namespace Aaru.Filters
buffer[4] == 0x01;
}
+ ///
public void Open(byte[] buffer)
{
_dataStream = new MemoryStream(buffer);
@@ -115,6 +128,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(Stream stream)
{
_dataStream = stream;
@@ -130,6 +144,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(string path)
{
_dataStream = new FileStream(path, FileMode.Open, FileAccess.Read);
@@ -147,16 +162,22 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _decompressedSize;
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _decompressedSize;
+ ///
public long GetResourceForkLength() => 0;
+ ///
public string GetFilename()
{
if(_basePath?.EndsWith(".lz", StringComparison.InvariantCultureIgnoreCase) == true)
@@ -166,8 +187,10 @@ namespace Aaru.Filters
? _basePath.Substring(0, _basePath.Length - 5) : _basePath;
}
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public bool IsOpened() => _opened;
}
}
\ No newline at end of file
diff --git a/Aaru.Filters/MacBinary.cs b/Aaru.Filters/MacBinary.cs
index ebca2aef4..2a9542673 100644
--- a/Aaru.Filters/MacBinary.cs
+++ b/Aaru.Filters/MacBinary.cs
@@ -56,10 +56,14 @@ namespace Aaru.Filters
long _rsrcForkOff;
Stream _stream;
+ ///
public string Name => "MacBinary";
+ ///
public Guid Id => new Guid("D7C321D3-E51F-45DF-A150-F6BFDF0D7704");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close()
{
_bytes = null;
@@ -70,12 +74,16 @@ namespace Aaru.Filters
_opened = false;
}
+ ///
public string GetBasePath() => _basePath;
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _header.dataLength;
+ ///
public Stream GetDataForkStream()
{
if(_header.dataLength == 0)
@@ -94,18 +102,25 @@ namespace Aaru.Filters
return null;
}
+ ///
public string GetFilename() => _filename;
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _header.dataLength + _header.resourceLength;
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public string GetPath() => _basePath;
+ ///
public long GetResourceForkLength() => _header.resourceLength;
+ ///
public Stream GetResourceForkStream()
{
if(_header.resourceLength == 0)
@@ -124,8 +139,10 @@ namespace Aaru.Filters
return null;
}
+ ///
public bool HasResourceFork() => _header.resourceLength > 0;
+ ///
public bool Identify(byte[] buffer)
{
if(buffer == null ||
@@ -142,6 +159,7 @@ namespace Aaru.Filters
(_header.dataLength > 0 || _header.resourceLength > 0));
}
+ ///
public bool Identify(Stream stream)
{
if(stream == null ||
@@ -159,6 +177,7 @@ namespace Aaru.Filters
(_header.dataLength > 0 || _header.resourceLength > 0));
}
+ ///
public bool Identify(string path)
{
if(!File.Exists(path))
@@ -181,8 +200,10 @@ namespace Aaru.Filters
(_header.dataLength > 0 || _header.resourceLength > 0));
}
+ ///
public bool IsOpened() => _opened;
+ ///
public void Open(byte[] buffer)
{
var ms = new MemoryStream(buffer);
@@ -216,6 +237,7 @@ namespace Aaru.Filters
_bytes = buffer;
}
+ ///
public void Open(Stream stream)
{
stream.Seek(0, SeekOrigin.Begin);
@@ -248,6 +270,7 @@ namespace Aaru.Filters
_stream = stream;
}
+ ///
public void Open(string path)
{
var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
diff --git a/Aaru.Filters/OffsetStream.cs b/Aaru.Filters/OffsetStream.cs
index c2f194c32..a9bb2b1bd 100644
--- a/Aaru.Filters/OffsetStream.cs
+++ b/Aaru.Filters/OffsetStream.cs
@@ -41,12 +41,20 @@ using Microsoft.Win32.SafeHandles;
namespace Aaru.Filters
{
/// Creates a stream that is a subset of another stream.
+ ///
public sealed class OffsetStream : Stream
{
readonly Stream _baseStream;
readonly long _streamEnd;
readonly long _streamStart;
+ ///
+ /// Initializes a stream that only allows reading from to of the specified stream, both inclusive.
+ ///
+ /// Base stream
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(Stream stream, long start, long end)
{
if(start < 0)
@@ -66,6 +74,18 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
+ /// A bitwise combination of the enumeration values that specifies additional file options.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize,
FileOptions options, long start, long end)
{
@@ -86,6 +106,14 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A file handle for the file that the stream will encapsulate.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(SafeFileHandle handle, FileAccess access, long start, long end)
{
if(start < 0)
@@ -105,6 +133,15 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A file handle for the file that the stream will encapsulate.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(SafeFileHandle handle, FileAccess access, int bufferSize, long start, long end)
{
if(start < 0)
@@ -124,6 +161,16 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A file handle for the file that the stream will encapsulate.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
+ /// Specifies whether to use asynchronous I/O or synchronous I/O.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync, long start,
long end)
{
@@ -144,6 +191,18 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
+ /// Specifies whether to use asynchronous I/O or synchronous I/O.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize,
bool useAsync, long start, long end)
{
@@ -164,6 +223,17 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, long start,
long end)
{
@@ -184,6 +254,16 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(string path, FileMode mode, FileAccess access, FileShare share, long start, long end)
{
if(start < 0)
@@ -203,6 +283,15 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(string path, FileMode mode, FileAccess access, long start, long end)
{
if(start < 0)
@@ -222,6 +311,14 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified file, both inclusive.
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(string path, FileMode mode, long start, long end)
{
if(start < 0)
@@ -241,6 +338,17 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified byte array, both inclusive.
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The index into at which the stream begins.
+ /// The length in bytes to add to the end of the current stream.
+ /// The setting of the CanWrite property, currently ignored.
+ /// Currently ignored.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(byte[] buffer, int index, int count, bool writable, bool publiclyVisible, long start,
long end)
{
@@ -261,6 +369,16 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified byte array, both inclusive.
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The index into at which the stream begins.
+ /// The length in bytes to add to the end of the current stream.
+ /// The setting of the CanWrite property, currently ignored.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(byte[] buffer, int index, int count, bool writable, long start, long end)
{
if(start < 0)
@@ -280,6 +398,15 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified byte array, both inclusive.
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The index into at which the stream begins.
+ /// The length in bytes to add to the end of the current stream.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(byte[] buffer, int index, int count, long start, long end)
{
if(start < 0)
@@ -299,6 +426,14 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified byte array, both inclusive.
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The setting of the CanWrite property, currently ignored.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(byte[] buffer, bool writable, long start, long end)
{
if(start < 0)
@@ -318,6 +453,13 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
+ /// Initializes a stream that only allows reading from to of the specified byte array, both inclusive.
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// Start position
+ /// Last readable position
+ /// Invalid range
public OffsetStream(byte[] buffer, long start, long end)
{
if(start < 0)
@@ -337,14 +479,19 @@ namespace Aaru.Filters
_baseStream.Position = start;
}
+ ///
public override bool CanRead => _baseStream.CanRead;
+ ///
public override bool CanSeek => _baseStream.CanSeek;
+ ///
public override bool CanWrite => _baseStream.CanWrite;
+ ///
public override long Length => _streamEnd - _streamStart + 1;
+ ///
public override long Position
{
get => _baseStream.Position - _streamStart;
@@ -364,6 +511,7 @@ namespace Aaru.Filters
_baseStream.Dispose();
}
+ ///
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback,
object state)
{
@@ -373,6 +521,7 @@ namespace Aaru.Filters
return _baseStream.BeginRead(buffer, offset, count, callback, state);
}
+ ///
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback,
object state)
{
@@ -382,6 +531,7 @@ namespace Aaru.Filters
return _baseStream.BeginWrite(buffer, offset, count, callback, state);
}
+ ///
public override void Close() => _baseStream.Close();
new void Dispose()
@@ -390,12 +540,16 @@ namespace Aaru.Filters
base.Dispose();
}
+ ///
public override int EndRead(IAsyncResult asyncResult) => _baseStream.EndRead(asyncResult);
+ ///
public override void EndWrite(IAsyncResult asyncResult) => _baseStream.EndWrite(asyncResult);
+ ///
public override int ReadByte() => _baseStream.Position == _streamEnd + 1 ? -1 : _baseStream.ReadByte();
+ ///
public override void WriteByte(byte value)
{
if(_baseStream.Position + 1 > _streamEnd)
@@ -404,8 +558,10 @@ namespace Aaru.Filters
_baseStream.WriteByte(value);
}
+ ///
public override void Flush() => _baseStream.Flush();
+ ///
public override int Read(byte[] buffer, int offset, int count)
{
if(_baseStream.Position + count > _streamEnd + 1)
@@ -414,6 +570,7 @@ namespace Aaru.Filters
return _baseStream.Read(buffer, offset, count);
}
+ ///
public override long Seek(long offset, SeekOrigin origin)
{
switch(origin)
@@ -436,9 +593,11 @@ namespace Aaru.Filters
}
}
+ ///
public override void SetLength(long value) =>
throw new NotSupportedException("Growing OffsetStream is not supported.");
+ ///
public override void Write(byte[] buffer, int offset, int count)
{
if(_baseStream.Position + count > _streamEnd)
diff --git a/Aaru.Filters/PCExchange.cs b/Aaru.Filters/PCExchange.cs
index c974669af..6c56c9d78 100644
--- a/Aaru.Filters/PCExchange.cs
+++ b/Aaru.Filters/PCExchange.cs
@@ -59,40 +59,59 @@ namespace Aaru.Filters
long _rsrcLen;
string _rsrcPath;
+ ///
public string Name => "PCExchange";
+ ///
public Guid Id => new Guid("9264EB9F-D634-4F9B-BE12-C24CD44988C6");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close() => _opened = false;
+ ///
public string GetBasePath() => _basePath;
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _dataLen;
+ ///
public Stream GetDataForkStream() => new FileStream(_dataPath, FileMode.Open, FileAccess.Read);
+ ///
public string GetFilename() => Path.GetFileName(_basePath);
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _dataLen + _rsrcLen;
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public string GetPath() => _basePath;
+ ///
public long GetResourceForkLength() => _rsrcLen;
+ ///
public Stream GetResourceForkStream() => new FileStream(_rsrcPath, FileMode.Open, FileAccess.Read);
+ ///
public bool HasResourceFork() => _rsrcPath != null;
+ ///
public bool Identify(byte[] buffer) => false;
+ ///
public bool Identify(Stream stream) => false;
+ ///
public bool Identify(string path)
{
string parentFolder = Path.GetDirectoryName(path);
@@ -154,12 +173,16 @@ namespace Aaru.Filters
return dataFound && rsrcFound;
}
+ ///
public bool IsOpened() => _opened;
+ ///
public void Open(byte[] buffer) => throw new NotSupportedException();
+ ///
public void Open(Stream stream) => throw new NotSupportedException();
+ ///
public void Open(string path)
{
string parentFolder = Path.GetDirectoryName(path);
diff --git a/Aaru.Filters/Register.cs b/Aaru.Filters/Register.cs
index 474c4c885..003abb74b 100644
--- a/Aaru.Filters/Register.cs
+++ b/Aaru.Filters/Register.cs
@@ -44,28 +44,39 @@ using Aaru.CommonTypes.Interfaces;
namespace Aaru.Filters
{
+ ///
public class Register : IPluginRegister
{
+ ///
public List GetAllChecksumPlugins() => null;
+ ///
public List GetAllFilesystemPlugins() => null;
+ ///
public List GetAllFilterPlugins() => Assembly.GetExecutingAssembly().GetTypes().
Where(t => t.GetInterfaces().Contains(typeof(IFilter))).
Where(t => t.IsClass).ToList();
+ ///
public List GetAllFloppyImagePlugins() => null;
+ ///
public List GetAllMediaImagePlugins() => null;
+ ///
public List GetAllPartitionPlugins() => null;
+ ///
public List GetAllReadOnlyFilesystemPlugins() => null;
+ ///
public List GetAllWritableFloppyImagePlugins() => null;
+ ///
public List GetAllWritableImagePlugins() => null;
+ ///
public List GetAllArchivePlugins() => null;
}
}
diff --git a/Aaru.Filters/SplitJoinStream.cs b/Aaru.Filters/SplitJoinStream.cs
index 2ec783d54..0a47779f3 100644
--- a/Aaru.Filters/SplitJoinStream.cs
+++ b/Aaru.Filters/SplitJoinStream.cs
@@ -8,12 +8,16 @@ using Microsoft.Win32.SafeHandles;
namespace Aaru.Filters
{
+ ///
+ /// Implements a stream that joins two or more files (sequentially) as a single stream
+ ///
public class SplitJoinStream : Stream
{
readonly Dictionary _baseStreams;
long _position;
long _streamLength;
+ ///
public SplitJoinStream()
{
_baseStreams = new Dictionary();
@@ -23,14 +27,19 @@ namespace Aaru.Filters
Filter.Open(this);
}
+ ///
public override bool CanRead => true;
+ ///
public override bool CanSeek => true;
+ ///
public override bool CanWrite => false;
+ ///
public override long Length => _streamLength;
+ ///
public override long Position
{
get => _position;
@@ -44,8 +53,16 @@ namespace Aaru.Filters
}
}
+ ///
+ /// Gets a filter from this stream
+ ///
public IFilter Filter { get; }
+ ///
+ /// Adds a stream at the end of the current stream
+ ///
+ /// Stream to add
+ /// The specified stream is non-readable or non-seekable
public void Add(Stream stream)
{
if(!stream.CanSeek)
@@ -58,44 +75,146 @@ namespace Aaru.Filters
_streamLength += stream.Length;
}
+
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
+ /// A bitwise combination of the enumeration values that specifies additional file options.
public void Add(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize,
FileOptions options) => Add(new FileStream(path, mode, access, share, bufferSize, options));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A file handle for the file that the stream will encapsulate.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
public void Add(SafeFileHandle handle, FileAccess access) => Add(new FileStream(handle, access));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A file handle for the file that the stream will encapsulate.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
public void Add(SafeFileHandle handle, FileAccess access, int bufferSize) =>
Add(new FileStream(handle, access, bufferSize));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A file handle for the file that the stream will encapsulate.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
public void Add(SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync) =>
Add(new FileStream(handle, access, bufferSize, isAsync));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
+ /// Specifies whether to use asynchronous I/O or synchronous I/O.
public void Add(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize,
bool useAsync) => Add(new FileStream(path, mode, access, share, bufferSize, useAsync));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
+ /// A positive Int32 value greater than 0 indicating the buffer size. The default buffer size is 4096.
public void Add(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize) =>
Add(new FileStream(path, mode, access, share, bufferSize));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
+ /// A bitwise combination of the enumeration values that determines how the file will be shared by processes.
public void Add(string path, FileMode mode, FileAccess access, FileShare share) =>
Add(new FileStream(path, mode, access, share));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
+ /// A bitwise combination of the enumeration values that determines how the file can be accessed by a object.
public void Add(string path, FileMode mode, FileAccess access) => Add(new FileStream(path, mode, access));
+ ///
+ /// Adds the specified file to the end of the current stream
+ ///
+ /// A relative or absolute path for the file that the stream will encapsulate.
+ /// One of the enumeration values that determines how to open or create the file.
public void Add(string path, FileMode mode) => Add(new FileStream(path, mode));
+ ///
+ /// Adds the specified byte array to the end of the current stream
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The index into at which the stream begins.
+ /// The length in bytes to add to the end of the current stream.
+ /// The setting of the CanWrite property, currently ignored.
+ /// Currently ignored.
public void Add(byte[] buffer, int index, int count, bool writable, bool publiclyVisible) =>
Add(new MemoryStream(buffer, index, count, writable, publiclyVisible));
+ ///
+ /// Adds the specified byte array to the end of the current stream
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The index into at which the stream begins.
+ /// The length in bytes to add to the end of the current stream.
+ /// The setting of the CanWrite property, currently ignored.
public void Add(byte[] buffer, int index, int count, bool writable, long start, long end) =>
Add(new MemoryStream(buffer, index, count, writable));
+ ///
+ /// Adds the specified byte array to the end of the current stream
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The index into at which the stream begins.
+ /// The length in bytes to add to the end of the current stream.
public void Add(byte[] buffer, int index, int count) => Add(new MemoryStream(buffer, index, count));
+ ///
+ /// Adds the specified byte array to the end of the current stream
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
+ /// The setting of the CanWrite property, currently ignored.
public void Add(byte[] buffer, bool writable) => Add(new MemoryStream(buffer, writable));
+ ///
+ /// Adds the specified byte array to the end of the current stream
+ ///
+ /// The array of unsigned bytes to add at the end of this stream.
public void Add(byte[] buffer) => Add(new MemoryStream(buffer));
+ ///
+ /// Adds the data fork of the specified filter to the end of the current stream
+ ///
+ /// Filter
public void Add(IFilter filter) => Add(filter.GetDataForkStream());
+ ///
+ /// Adds a range of files to the end of the current stream, alphabetically sorted
+ ///
+ /// Base file path, directory path only
+ /// Counter format, includes filename and a formatting string
+ /// Counter start, defaults to 0
public void AddRange(string basePath, string counterFormat = "{0:D3}", int counterStart = 0)
{
while(true)
@@ -123,14 +242,17 @@ namespace Aaru.Filters
_position = 0;
}
+ ///
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback,
object state) =>
throw new NotSupportedException("Asynchronous I/O is not supported.");
+ ///
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback,
object state) =>
throw new NotSupportedException("Asynchronous I/O is not supported.");
+ ///
public override void Close()
{
foreach(Stream stream in _baseStreams.Values)
@@ -151,12 +273,15 @@ namespace Aaru.Filters
base.Dispose();
}
+ ///
public override int EndRead(IAsyncResult asyncResult) =>
throw new NotSupportedException("Asynchronous I/O is not supported.");
+ ///
public override void EndWrite(IAsyncResult asyncResult) =>
throw new NotSupportedException("Asynchronous I/O is not supported.");
+ ///
public override int ReadByte()
{
if(_position >= _streamLength)
@@ -173,10 +298,13 @@ namespace Aaru.Filters
return baseStream.Value.ReadByte();
}
+ ///
public override void WriteByte(byte value) => throw new ReadOnlyException("This stream is read-only");
+ ///
public override void Flush() {}
+ ///
public override int Read(byte[] buffer, int offset, int count)
{
int read = 0;
@@ -204,6 +332,7 @@ namespace Aaru.Filters
return read;
}
+ ///
public override long Seek(long offset, SeekOrigin origin)
{
switch(origin)
@@ -234,8 +363,10 @@ namespace Aaru.Filters
return _position;
}
+ ///
public override void SetLength(long value) => throw new ReadOnlyException("This stream is read-only");
+ ///
public override void Write(byte[] buffer, int offset, int count) =>
throw new ReadOnlyException("This stream is read-only");
}
diff --git a/Aaru.Filters/XZ.cs b/Aaru.Filters/XZ.cs
index cffda0de0..973800988 100644
--- a/Aaru.Filters/XZ.cs
+++ b/Aaru.Filters/XZ.cs
@@ -48,10 +48,14 @@ namespace Aaru.Filters
DateTime _lastWriteTime;
bool _opened;
+ ///
public string Name => "XZ";
+ ///
public Guid Id => new Guid("666A8617-0444-4C05-9F4F-DF0FD758D0D2");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close()
{
_dataStream?.Close();
@@ -60,20 +64,27 @@ namespace Aaru.Filters
_opened = false;
}
+ ///
public string GetBasePath() => _basePath;
+ ///
public Stream GetDataForkStream() => _innerStream;
+ ///
public string GetPath() => _basePath;
+ ///
public Stream GetResourceForkStream() => null;
+ ///
public bool HasResourceFork() => false;
+ ///
public bool Identify(byte[] buffer) => buffer[0] == 0xFD && buffer[1] == 0x37 && buffer[2] == 0x7A &&
buffer[3] == 0x58 && buffer[4] == 0x5A && buffer[5] == 0x00 &&
buffer[^2] == 0x59 && buffer[^1] == 0x5A;
+ ///
public bool Identify(Stream stream)
{
byte[] buffer = new byte[6];
@@ -92,6 +103,7 @@ namespace Aaru.Filters
buffer[4] == 0x5A && buffer[5] == 0x00 && footer[0] == 0x59 && footer[1] == 0x5A;
}
+ ///
public bool Identify(string path)
{
if(!File.Exists(path))
@@ -114,6 +126,7 @@ namespace Aaru.Filters
buffer[4] == 0x5A && buffer[5] == 0x00 && footer[0] == 0x59 && footer[1] == 0x5A;
}
+ ///
public void Open(byte[] buffer)
{
_dataStream = new MemoryStream(buffer);
@@ -125,6 +138,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(Stream stream)
{
_dataStream = stream;
@@ -136,6 +150,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(string path)
{
_dataStream = new FileStream(path, FileMode.Open, FileAccess.Read);
@@ -149,16 +164,22 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _decompressedSize;
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _decompressedSize;
+ ///
public long GetResourceForkLength() => 0;
+ ///
public string GetFilename()
{
if(_basePath?.EndsWith(".xz", StringComparison.InvariantCultureIgnoreCase) == true)
@@ -168,8 +189,10 @@ namespace Aaru.Filters
? _basePath.Substring(0, _basePath.Length - 5) : _basePath;
}
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public bool IsOpened() => _opened;
void GuessSize()
diff --git a/Aaru.Filters/ZZZNoFilter.cs b/Aaru.Filters/ZZZNoFilter.cs
index 6141d23b8..e1f13b0e5 100644
--- a/Aaru.Filters/ZZZNoFilter.cs
+++ b/Aaru.Filters/ZZZNoFilter.cs
@@ -45,10 +45,14 @@ namespace Aaru.Filters
DateTime _lastWriteTime;
bool _opened;
+ ///
public string Name => "No filter";
+ ///
public Guid Id => new Guid("12345678-AAAA-BBBB-CCCC-123456789000");
+ ///
public string Author => "Natalia Portillo";
+ ///
public void Close()
{
_dataStream?.Close();
@@ -57,22 +61,31 @@ namespace Aaru.Filters
_opened = false;
}
+ ///
public string GetBasePath() => _basePath;
+ ///
public Stream GetDataForkStream() => _dataStream;
+ ///
public string GetPath() => _basePath;
+ ///
public Stream GetResourceForkStream() => null;
+ ///
public bool HasResourceFork() => false;
+ ///
public bool Identify(byte[] buffer) => buffer != null && buffer.Length > 0;
+ ///
public bool Identify(Stream stream) => stream != null && stream.Length > 0;
+ ///
public bool Identify(string path) => File.Exists(path);
+ ///
public void Open(byte[] buffer)
{
_dataStream = new MemoryStream(buffer);
@@ -82,6 +95,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(Stream stream)
{
_dataStream = stream;
@@ -91,6 +105,7 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public void Open(string path)
{
_dataStream = new FileStream(path, FileMode.Open, FileAccess.Read);
@@ -101,20 +116,28 @@ namespace Aaru.Filters
_opened = true;
}
+ ///
public DateTime GetCreationTime() => _creationTime;
+ ///
public long GetDataForkLength() => _dataStream.Length;
+ ///
public DateTime GetLastWriteTime() => _lastWriteTime;
+ ///
public long GetLength() => _dataStream.Length;
+ ///
public long GetResourceForkLength() => 0;
+ ///
public string GetFilename() => Path.GetFileName(_basePath);
+ ///
public string GetParentFolder() => Path.GetDirectoryName(_basePath);
+ ///
public bool IsOpened() => _opened;
}
}
\ No newline at end of file
diff --git a/Aaru.Helpers b/Aaru.Helpers
index d7db55d5f..138c6c1f4 160000
--- a/Aaru.Helpers
+++ b/Aaru.Helpers
@@ -1 +1 @@
-Subproject commit d7db55d5f229eec69e05bde6ac91202e6cbcfec0
+Subproject commit 138c6c1f4585d6c6a971aeffa691ec99e5629ef1
diff --git a/Aaru.Images/AaruFormat/AaruFormat.cs b/Aaru.Images/AaruFormat/AaruFormat.cs
index 1d5b4799a..b55f4f47a 100644
--- a/Aaru.Images/AaruFormat/AaruFormat.cs
+++ b/Aaru.Images/AaruFormat/AaruFormat.cs
@@ -82,6 +82,9 @@ using SharpCompress.Compressors.LZMA;
namespace Aaru.DiscImages
{
+ ///
+ /// Implements reading and writing AaruFormat media images
+ ///
public sealed partial class AaruFormat : IWritableOpticalImage, IVerifiableImage, IWritableTapeImage
{
bool _alreadyWrittenZero;
diff --git a/Aaru.Images/AaruFormat/Identify.cs b/Aaru.Images/AaruFormat/Identify.cs
index 29434843c..c70abaa24 100644
--- a/Aaru.Images/AaruFormat/Identify.cs
+++ b/Aaru.Images/AaruFormat/Identify.cs
@@ -38,6 +38,7 @@ namespace Aaru.DiscImages
{
public sealed partial class AaruFormat
{
+ ///
public bool Identify(IFilter imageFilter)
{
_imageStream = imageFilter.GetDataForkStream();
diff --git a/Aaru.Images/AaruFormat/Properties.cs b/Aaru.Images/AaruFormat/Properties.cs
index d536a8c4f..193cdd6f7 100644
--- a/Aaru.Images/AaruFormat/Properties.cs
+++ b/Aaru.Images/AaruFormat/Properties.cs
@@ -42,6 +42,7 @@ namespace Aaru.DiscImages
{
public sealed partial class AaruFormat
{
+ ///
public OpticalImageCapabilities OpticalCapabilities => OpticalImageCapabilities.CanStoreAudioTracks |
OpticalImageCapabilities.CanStoreDataTracks |
OpticalImageCapabilities.CanStorePregaps |
@@ -56,21 +57,35 @@ namespace Aaru.DiscImages
OpticalImageCapabilities.CanStoreNotCdSessions |
OpticalImageCapabilities.CanStoreNotCdTracks |
OpticalImageCapabilities.CanStoreIndexes;
+ ///
public ImageInfo Info => _imageInfo;
+ ///
public string Name => "Aaru Format";
+ ///
public Guid Id => new Guid("49360069-1784-4A2F-B723-0C844D610B0A");
+ ///
public string Format => "Aaru";
+ ///
public string Author => "Natalia Portillo";
+ ///
public List Partitions { get; private set; }
+ ///
public List