From b7b086b644afc9e98b16693a1af1b906c54106db Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 20 Apr 2019 16:24:17 +0100 Subject: [PATCH] Fix dumpers documentation. --- DiscImageChef.Core/Devices/Dumping/Dump.cs | 47 +++++++++++++++---- DiscImageChef.Core/Devices/Dumping/MMC.cs | 16 ------- DiscImageChef.Core/Devices/Dumping/SBC.cs | 14 ------ DiscImageChef.Core/Devices/Dumping/SCSI.cs | 15 ------ DiscImageChef.Core/Devices/Dumping/SSC.cs | 5 -- .../Devices/Dumping/SecureDigital.cs | 15 ------ DiscImageChef.Core/Devices/Dumping/XGD.cs | 14 ------ 7 files changed, 38 insertions(+), 88 deletions(-) diff --git a/DiscImageChef.Core/Devices/Dumping/Dump.cs b/DiscImageChef.Core/Devices/Dumping/Dump.cs index 45b7ccc25..166f98d30 100644 --- a/DiscImageChef.Core/Devices/Dumping/Dump.cs +++ b/DiscImageChef.Core/Devices/Dumping/Dump.cs @@ -14,9 +14,8 @@ namespace DiscImageChef.Core.Devices.Dumping { public partial class Dump { - readonly Device dev; - readonly string devicePath; - + readonly Device dev; + readonly string devicePath; readonly bool doResume; readonly DumpLog dumpLog; readonly bool dumpRaw; @@ -37,7 +36,9 @@ namespace DiscImageChef.Core.Devices.Dumping uint skip; /// + /// Initializes dumpers /// + /// Should resume? /// Device /// Path to the device /// Prefix for output log files @@ -52,7 +53,11 @@ namespace DiscImageChef.Core.Devices.Dumping /// Encoding to use when analyzing dump /// Path to output file /// Formats to pass to output file plugin + /// Do not trim errors from skipped sectors /// Try to read and dump as much first track pregap as possible + /// Sidecar to store in dumped image + /// How many sectors to skip reading on error + /// Create metadata sidecar after dump? public Dump(bool doResume, Device dev, string devicePath, IWritableImage outputPlugin, ushort retryPasses, bool force, bool dumpRaw, bool persistent, @@ -84,6 +89,9 @@ namespace DiscImageChef.Core.Devices.Dumping this.dumpFirstTrackPregap = dumpFirstTrackPregap; } + /// + /// Starts dumping with the stablished fields and autodetecting the device type + /// public void Start() { if(dev.IsUsb && dev.UsbVendorId == 0x054C && @@ -128,12 +136,33 @@ namespace DiscImageChef.Core.Devices.Dumping fs.Close(); } - public event EndProgressHandler EndProgress; - public event InitProgressHandler InitProgress; - public event UpdateStatusHandler UpdateStatus; - public event ErrorMessageHandler ErrorMessage; - public event ErrorMessageHandler StoppingErrorMessage; + /// + /// Event raised when the progress bar is not longer needed + /// + public event EndProgressHandler EndProgress; + /// + /// Event raised when a progress bar is needed + /// + public event InitProgressHandler InitProgress; + /// + /// Event raised to report status updates + /// + public event UpdateStatusHandler UpdateStatus; + /// + /// Event raised to report a non-fatal error + /// + public event ErrorMessageHandler ErrorMessage; + /// + /// Event raised to report a fatal error that stops the dumping operation and should call user's attention + /// + public event ErrorMessageHandler StoppingErrorMessage; + /// + /// Event raised to update the values of a determinate progress bar + /// public event UpdateProgressHandler UpdateProgress; - public event PulseProgressHandler PulseProgress; + /// + /// Event raised to update the status of an undeterminate progress bar + /// + public event PulseProgressHandler PulseProgress; } } \ No newline at end of file diff --git a/DiscImageChef.Core/Devices/Dumping/MMC.cs b/DiscImageChef.Core/Devices/Dumping/MMC.cs index 6cc37b88f..2d00f40bc 100644 --- a/DiscImageChef.Core/Devices/Dumping/MMC.cs +++ b/DiscImageChef.Core/Devices/Dumping/MMC.cs @@ -54,22 +54,6 @@ namespace DiscImageChef.Core.Devices.Dumping /// /// Dumps an optical disc /// - /// Device - /// Path to the device - /// Prefix for output data files - /// Plugin for output file - /// How many times to retry - /// Force to continue dump whenever possible - /// Dump raw/long sectors - /// Store whatever data the drive returned on error - /// Stop dump on first error - /// Information for dump resuming - /// Dump logger - /// Encoding to use when analyzing dump - /// Disc type as detected in MMC layer - /// Try to read and dump as much Lead-in as possible - /// Path to output file - /// Formats to pass to output file plugin internal void Mmc(ref MediaType dskType) { bool sense; diff --git a/DiscImageChef.Core/Devices/Dumping/SBC.cs b/DiscImageChef.Core/Devices/Dumping/SBC.cs index 3106b0bfa..bdb853fee 100644 --- a/DiscImageChef.Core/Devices/Dumping/SBC.cs +++ b/DiscImageChef.Core/Devices/Dumping/SBC.cs @@ -59,23 +59,9 @@ namespace DiscImageChef.Core.Devices.Dumping /// /// Dumps a SCSI Block Commands device or a Reduced Block Commands devices /// - /// Device - /// Path to the device - /// Prefix for output data files - /// Plugin for output file - /// How many times to retry - /// Force to continue dump whenever possible - /// Dump long or scrambled sectors - /// Store whatever data the drive returned on error - /// Stop dump on first error - /// Information for dump resuming - /// Dump logger - /// Encoding to use when analyzing dump /// If device contains an optical disc (e.g. DVD or BD) /// Media tags as retrieved in MMC layer /// Disc type as detected in SCSI or MMC layer - /// Path to output file - /// Formats to pass to output file plugin internal void Sbc(Dictionary mediaTags, ref MediaType dskType, bool opticalDisc) { bool sense; diff --git a/DiscImageChef.Core/Devices/Dumping/SCSI.cs b/DiscImageChef.Core/Devices/Dumping/SCSI.cs index c2547429a..7306e42ba 100644 --- a/DiscImageChef.Core/Devices/Dumping/SCSI.cs +++ b/DiscImageChef.Core/Devices/Dumping/SCSI.cs @@ -46,21 +46,6 @@ namespace DiscImageChef.Core.Devices.Dumping /// /// Dumps a SCSI Block Commands device or a Reduced Block Commands devices /// - /// Device - /// Path to the device - /// Prefix for output data files - /// Plugin for output file - /// How many times to retry - /// Force to continue dump whenever possible - /// Dump long or scrambled sectors - /// Store whatever data the drive returned on error - /// Stop dump on first error - /// Information for dump resuming - /// Dump logger - /// Encoding to use when analyzing dump - /// Try to read and dump as much Lead-in as possible - /// Path to output file - /// Formats to pass to output file plugin public void Scsi() { MediaType dskType = MediaType.Unknown; diff --git a/DiscImageChef.Core/Devices/Dumping/SSC.cs b/DiscImageChef.Core/Devices/Dumping/SSC.cs index 72ac5a6e4..7fb094e44 100644 --- a/DiscImageChef.Core/Devices/Dumping/SSC.cs +++ b/DiscImageChef.Core/Devices/Dumping/SSC.cs @@ -52,11 +52,6 @@ namespace DiscImageChef.Core.Devices.Dumping /// /// Dumps the tape from a SCSI Streaming device /// - /// Device - /// Path to the device - /// Prefix for output data files - /// Information for dump resuming - /// Dump logger internal void Ssc() { FixedSense? fxSense; diff --git a/DiscImageChef.Core/Devices/Dumping/SecureDigital.cs b/DiscImageChef.Core/Devices/Dumping/SecureDigital.cs index 881ad8d0b..282ec0535 100644 --- a/DiscImageChef.Core/Devices/Dumping/SecureDigital.cs +++ b/DiscImageChef.Core/Devices/Dumping/SecureDigital.cs @@ -55,21 +55,6 @@ namespace DiscImageChef.Core.Devices.Dumping /// /// Dumps a MultiMediaCard or SecureDigital flash card /// - /// Device - /// Path to the device - /// Prefix for output data files - /// Plugin for output file - /// How many times to retry - /// Force to continue dump whenever possible - /// Dump long or scrambled sectors - /// Store whatever data the drive returned on error - /// Stop dump on first error - /// Information for dump resuming - /// Dump logger - /// Encoding to use when analyzing dump - /// Path to output file - /// Formats to pass to output file plugin - /// If you asked to dump long sectors from a SCSI Streaming device public void SecureDigital() { bool aborted; diff --git a/DiscImageChef.Core/Devices/Dumping/XGD.cs b/DiscImageChef.Core/Devices/Dumping/XGD.cs index fab86837e..ddfe87c8d 100644 --- a/DiscImageChef.Core/Devices/Dumping/XGD.cs +++ b/DiscImageChef.Core/Devices/Dumping/XGD.cs @@ -61,22 +61,8 @@ namespace DiscImageChef.Core.Devices.Dumping /// /// Dumps an Xbox Game Disc using a Kreon drive /// - /// Device - /// Path to the device - /// Prefix for output data files - /// Plugin for output file - /// How many times to retry - /// Force to continue dump whenever possible - /// Dump raw/long sectors - /// Store whatever data the drive returned on error - /// Stop dump on first error - /// Information for dump resuming - /// Dump logger - /// Encoding to use when analyzing dump /// Media tags as retrieved in MMC layer /// Disc type as detected in MMC layer - /// Path to output file - /// Formats to pass to output file plugin internal void Xgd(Dictionary mediaTags, ref MediaType dskType) { bool sense;