mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move DeviceType to CommonTypes.
This commit is contained in:
1
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
1
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -95,6 +95,7 @@
|
||||
<e p="DiscImageChef.CommonTypes" t="IncludeRecursive">
|
||||
<e p="DiscImageChef.CommonTypes.csproj" t="IncludeRecursive" />
|
||||
<e p="Enums" t="Include">
|
||||
<e p="DeviceType.cs" t="Include" />
|
||||
<e p="Images.cs" t="Include" />
|
||||
</e>
|
||||
<e p="Exceptions" t="Include">
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<Compile Include="..\CICMMetadata\dotnet\cicm.cs">
|
||||
<Link>Metadata/cicm.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Enums\DeviceType.cs" />
|
||||
<Compile Include="Enums\Images.cs" />
|
||||
<Compile Include="Exceptions\Images.cs" />
|
||||
<Compile Include="Extents\ExtentsByte.cs" />
|
||||
|
||||
13
DiscImageChef.CommonTypes/Enums/DeviceType.cs
Normal file
13
DiscImageChef.CommonTypes/Enums/DeviceType.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace DiscImageChef.CommonTypes.Enums
|
||||
{
|
||||
public enum DeviceType
|
||||
{
|
||||
Unknown,
|
||||
ATA,
|
||||
ATAPI,
|
||||
SCSI,
|
||||
SecureDigital,
|
||||
MMC,
|
||||
NVMe
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.Decoders.SCSI.SSC;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.Devices;
|
||||
|
||||
@@ -123,15 +124,11 @@ namespace DiscImageChef.Core.Devices
|
||||
}
|
||||
}
|
||||
|
||||
internal bool ReadBlock(out byte[] buffer, ulong block, out double duration)
|
||||
{
|
||||
return ReadBlocks(out buffer, block, 1, out duration);
|
||||
}
|
||||
internal bool ReadBlock(out byte[] buffer, ulong block, out double duration) =>
|
||||
ReadBlocks(out buffer, block, 1, out duration);
|
||||
|
||||
internal bool ReadBlocks(out byte[] buffer, ulong block, out double duration)
|
||||
{
|
||||
return ReadBlocks(out buffer, block, BlocksToRead, out duration);
|
||||
}
|
||||
internal bool ReadBlocks(out byte[] buffer, ulong block, out double duration) =>
|
||||
ReadBlocks(out buffer, block, BlocksToRead, out duration);
|
||||
|
||||
internal bool ReadBlocks(out byte[] buffer, ulong block, uint count, out double duration)
|
||||
{
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.Devices;
|
||||
|
||||
namespace DiscImageChef.Core.Devices
|
||||
{
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
// Copyright © 2011-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Devices;
|
||||
|
||||
namespace DiscImageChef.Core.Devices.Report
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Core.Logging;
|
||||
using DiscImageChef.Decoders.MMC;
|
||||
|
||||
@@ -34,6 +34,7 @@ using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Devices;
|
||||
|
||||
namespace DiscImageChef.Core.Logging
|
||||
|
||||
@@ -37,6 +37,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using DiscImageChef.Checksums;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Core.Media.Detection;
|
||||
using DiscImageChef.Decoders.CD;
|
||||
|
||||
@@ -35,6 +35,7 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interop;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
@@ -475,7 +476,9 @@ namespace DiscImageChef.Devices
|
||||
|
||||
// I have to search for USB disks, floppies and CD-ROMs as separate device types
|
||||
foreach(string devGuid in new[]
|
||||
{Usb.GuidDevinterfaceFloppy, Usb.GuidDevinterfaceCdrom, Usb.GuidDevinterfaceDisk})
|
||||
{
|
||||
Usb.GuidDevinterfaceFloppy, Usb.GuidDevinterfaceCdrom, Usb.GuidDevinterfaceDisk
|
||||
})
|
||||
{
|
||||
usbDevice = Usb.FindDrivePath(devicePath, devGuid);
|
||||
if(usbDevice != null) break;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
// Copyright © 2011-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interop;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
|
||||
|
||||
@@ -37,17 +37,6 @@ using System;
|
||||
|
||||
namespace DiscImageChef.Devices
|
||||
{
|
||||
public enum DeviceType
|
||||
{
|
||||
Unknown,
|
||||
ATA,
|
||||
ATAPI,
|
||||
SCSI,
|
||||
SecureDigital,
|
||||
MMC,
|
||||
NVMe
|
||||
}
|
||||
|
||||
#region ATA Commands
|
||||
/// <summary>
|
||||
/// All known ATA commands
|
||||
|
||||
@@ -39,6 +39,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Core;
|
||||
|
||||
@@ -36,6 +36,7 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.CommonTypes.Structs;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Core;
|
||||
using DiscImageChef.Core.Devices.Scanning;
|
||||
using DiscImageChef.Core.Media.Info;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// Copyright © 2011-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using DiscImageChef.Devices;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Core;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
|
||||
@@ -34,6 +34,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Core;
|
||||
|
||||
@@ -37,6 +37,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Core;
|
||||
using DiscImageChef.Core.Media.Info;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Core.Devices.Scanning;
|
||||
using DiscImageChef.Devices;
|
||||
|
||||
Reference in New Issue
Block a user