mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move common dumper fields to Dump class.
This commit is contained in:
@@ -31,16 +31,10 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Core.Logging;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.Devices;
|
||||
using Schemas;
|
||||
using MediaType = DiscImageChef.CommonTypes.MediaType;
|
||||
|
||||
namespace DiscImageChef.Core.Devices.Dumping
|
||||
{
|
||||
@@ -69,15 +63,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
/// <param name="outputPath">Path to output file</param>
|
||||
/// <param name="formatOptions">Formats to pass to output file plugin</param>
|
||||
/// <exception cref="ArgumentException">If you asked to dump long sectors from a SCSI Streaming device</exception>
|
||||
public void Scsi(Device dev, string devicePath,
|
||||
IWritableImage outputPlugin, ushort retryPasses, bool force,
|
||||
bool dumpRaw, bool persistent,
|
||||
bool stopOnError, ref Resume resume, ref DumpLog dumpLog,
|
||||
bool dumpFirstTrackPregap, Encoding encoding,
|
||||
string outputPrefix, string outputPath,
|
||||
Dictionary<string, string> formatOptions, CICMMetadataType preSidecar,
|
||||
uint skip,
|
||||
bool nometadata, bool notrim)
|
||||
public void Scsi()
|
||||
{
|
||||
MediaType dskType = MediaType.Unknown;
|
||||
int resets = 0;
|
||||
@@ -226,24 +212,16 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
case PeripheralDeviceTypes.SequentialAccess:
|
||||
if(dumpRaw) throw new ArgumentException("Tapes cannot be dumped raw.");
|
||||
|
||||
Ssc(dev, outputPrefix, devicePath, ref resume, ref dumpLog, preSidecar);
|
||||
Ssc();
|
||||
return;
|
||||
case PeripheralDeviceTypes.MultiMediaDevice:
|
||||
if(outputPlugin is IWritableOpticalImage opticalPlugin)
|
||||
Mmc(dev, devicePath, opticalPlugin, retryPasses, force, dumpRaw,
|
||||
persistent, stopOnError,
|
||||
ref dskType, ref resume, ref dumpLog, dumpFirstTrackPregap, encoding, outputPrefix,
|
||||
outputPath, formatOptions, preSidecar, skip, nometadata, notrim);
|
||||
if(outputPlugin is IWritableOpticalImage opticalPlugin) Mmc(ref dskType, dumpFirstTrackPregap);
|
||||
else
|
||||
StoppingErrorMessage
|
||||
?.Invoke("The specified plugin does not support storing optical disc images.");
|
||||
return;
|
||||
default:
|
||||
Sbc(dev, devicePath, outputPlugin, retryPasses, force, dumpRaw, persistent,
|
||||
stopOnError, null,
|
||||
ref dskType, false, ref resume, ref dumpLog, encoding, outputPrefix, outputPath,
|
||||
formatOptions,
|
||||
preSidecar, skip, nometadata, notrim);
|
||||
Sbc(null, ref dskType, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user