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" t="IncludeRecursive">
|
||||||
<e p="DiscImageChef.CommonTypes.csproj" t="IncludeRecursive" />
|
<e p="DiscImageChef.CommonTypes.csproj" t="IncludeRecursive" />
|
||||||
<e p="Enums" t="Include">
|
<e p="Enums" t="Include">
|
||||||
|
<e p="DeviceType.cs" t="Include" />
|
||||||
<e p="Images.cs" t="Include" />
|
<e p="Images.cs" t="Include" />
|
||||||
</e>
|
</e>
|
||||||
<e p="Exceptions" t="Include">
|
<e p="Exceptions" t="Include">
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
<Compile Include="..\CICMMetadata\dotnet\cicm.cs">
|
<Compile Include="..\CICMMetadata\dotnet\cicm.cs">
|
||||||
<Link>Metadata/cicm.cs</Link>
|
<Link>Metadata/cicm.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Enums\DeviceType.cs" />
|
||||||
<Compile Include="Enums\Images.cs" />
|
<Compile Include="Enums\Images.cs" />
|
||||||
<Compile Include="Exceptions\Images.cs" />
|
<Compile Include="Exceptions\Images.cs" />
|
||||||
<Compile Include="Extents\ExtentsByte.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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Decoders.ATA;
|
using DiscImageChef.Decoders.ATA;
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Decoders.ATA;
|
using DiscImageChef.Decoders.ATA;
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
using DiscImageChef.Decoders.SCSI.SSC;
|
using DiscImageChef.Decoders.SCSI.SSC;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Decoders.ATA;
|
using DiscImageChef.Decoders.ATA;
|
||||||
using DiscImageChef.Devices;
|
using DiscImageChef.Devices;
|
||||||
|
|
||||||
@@ -123,15 +124,11 @@ namespace DiscImageChef.Core.Devices
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool ReadBlock(out byte[] buffer, ulong block, out double duration)
|
internal bool ReadBlock(out byte[] buffer, ulong block, out double duration) =>
|
||||||
{
|
ReadBlocks(out buffer, block, 1, out duration);
|
||||||
return ReadBlocks(out buffer, block, 1, out duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal bool ReadBlocks(out byte[] buffer, ulong block, out double duration)
|
internal bool ReadBlocks(out byte[] buffer, ulong block, out double duration) =>
|
||||||
{
|
ReadBlocks(out buffer, block, BlocksToRead, out duration);
|
||||||
return ReadBlocks(out buffer, block, BlocksToRead, out duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal bool ReadBlocks(out byte[] buffer, ulong block, uint count, out double duration)
|
internal bool ReadBlocks(out byte[] buffer, ulong block, uint count, out double duration)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Decoders.ATA;
|
using DiscImageChef.Decoders.ATA;
|
||||||
using DiscImageChef.Devices;
|
|
||||||
|
|
||||||
namespace DiscImageChef.Core.Devices
|
namespace DiscImageChef.Core.Devices
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
// Copyright © 2011-2018 Natalia Portillo
|
// Copyright © 2011-2018 Natalia Portillo
|
||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Devices;
|
|
||||||
|
|
||||||
namespace DiscImageChef.Core.Devices.Report
|
namespace DiscImageChef.Core.Devices.Report
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Core.Logging;
|
using DiscImageChef.Core.Logging;
|
||||||
using DiscImageChef.Decoders.MMC;
|
using DiscImageChef.Decoders.MMC;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ using System;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Devices;
|
using DiscImageChef.Devices;
|
||||||
|
|
||||||
namespace DiscImageChef.Core.Logging
|
namespace DiscImageChef.Core.Logging
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ using System.Linq;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using DiscImageChef.Checksums;
|
using DiscImageChef.Checksums;
|
||||||
using DiscImageChef.CommonTypes;
|
using DiscImageChef.CommonTypes;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Core.Media.Detection;
|
using DiscImageChef.Core.Media.Detection;
|
||||||
using DiscImageChef.Decoders.CD;
|
using DiscImageChef.Decoders.CD;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.CommonTypes.Interop;
|
using DiscImageChef.CommonTypes.Interop;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Decoders.ATA;
|
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
|
// I have to search for USB disks, floppies and CD-ROMs as separate device types
|
||||||
foreach(string devGuid in new[]
|
foreach(string devGuid in new[]
|
||||||
{Usb.GuidDevinterfaceFloppy, Usb.GuidDevinterfaceCdrom, Usb.GuidDevinterfaceDisk})
|
{
|
||||||
|
Usb.GuidDevinterfaceFloppy, Usb.GuidDevinterfaceCdrom, Usb.GuidDevinterfaceDisk
|
||||||
|
})
|
||||||
{
|
{
|
||||||
usbDevice = Usb.FindDrivePath(devicePath, devGuid);
|
usbDevice = Usb.FindDrivePath(devicePath, devGuid);
|
||||||
if(usbDevice != null) break;
|
if(usbDevice != null) break;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
// Copyright © 2011-2018 Natalia Portillo
|
// Copyright © 2011-2018 Natalia Portillo
|
||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.CommonTypes.Interop;
|
using DiscImageChef.CommonTypes.Interop;
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
|
|
||||||
|
|||||||
@@ -37,17 +37,6 @@ using System;
|
|||||||
|
|
||||||
namespace DiscImageChef.Devices
|
namespace DiscImageChef.Devices
|
||||||
{
|
{
|
||||||
public enum DeviceType
|
|
||||||
{
|
|
||||||
Unknown,
|
|
||||||
ATA,
|
|
||||||
ATAPI,
|
|
||||||
SCSI,
|
|
||||||
SecureDigital,
|
|
||||||
MMC,
|
|
||||||
NVMe
|
|
||||||
}
|
|
||||||
|
|
||||||
#region ATA Commands
|
#region ATA Commands
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All known ATA commands
|
/// All known ATA commands
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using DiscImageChef.CommonTypes;
|
using DiscImageChef.CommonTypes;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.CommonTypes.Interfaces;
|
using DiscImageChef.CommonTypes.Interfaces;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Core;
|
using DiscImageChef.Core;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ using System.ComponentModel;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using DiscImageChef.CommonTypes;
|
using DiscImageChef.CommonTypes;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.CommonTypes.Interfaces;
|
using DiscImageChef.CommonTypes.Interfaces;
|
||||||
using DiscImageChef.CommonTypes.Structs;
|
using DiscImageChef.CommonTypes.Structs;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using DiscImageChef.CommonTypes;
|
using DiscImageChef.CommonTypes;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Core;
|
using DiscImageChef.Core;
|
||||||
using DiscImageChef.Core.Devices.Scanning;
|
using DiscImageChef.Core.Devices.Scanning;
|
||||||
using DiscImageChef.Core.Media.Info;
|
using DiscImageChef.Core.Media.Info;
|
||||||
@@ -68,8 +69,8 @@ namespace DiscImageChef.Gui.Forms
|
|||||||
// TODO: Allow to save MHDD and ImgBurn log files
|
// TODO: Allow to save MHDD and ImgBurn log files
|
||||||
void OnBtnScanClick(object sender, EventArgs e)
|
void OnBtnScanClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
btnStop.Visible = true;
|
btnStop.Visible = true;
|
||||||
btnScan.Visible = false;
|
btnScan.Visible = false;
|
||||||
btnCancel.Visible = false;
|
btnCancel.Visible = false;
|
||||||
|
|
||||||
if(devicePath.Length == 2 && devicePath[1] == ':' && devicePath[0] != '/' && char.IsLetter(devicePath[0]))
|
if(devicePath.Length == 2 && devicePath[1] == ':' && devicePath[0] != '/' && char.IsLetter(devicePath[0]))
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
// Copyright © 2011-2018 Natalia Portillo
|
// Copyright © 2011-2018 Natalia Portillo
|
||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using DiscImageChef.Devices;
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using Eto.Forms;
|
using Eto.Forms;
|
||||||
using Eto.Serialization.Xaml;
|
using Eto.Serialization.Xaml;
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Core;
|
using DiscImageChef.Core;
|
||||||
using DiscImageChef.Decoders.ATA;
|
using DiscImageChef.Decoders.ATA;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Core;
|
using DiscImageChef.Core;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using DiscImageChef.CommonTypes;
|
using DiscImageChef.CommonTypes;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.CommonTypes.Interfaces;
|
using DiscImageChef.CommonTypes.Interfaces;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Core;
|
using DiscImageChef.Core;
|
||||||
using DiscImageChef.Core.Media.Info;
|
using DiscImageChef.Core.Media.Info;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using DiscImageChef.CommonTypes.Enums;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Core.Devices.Scanning;
|
using DiscImageChef.Core.Devices.Scanning;
|
||||||
using DiscImageChef.Devices;
|
using DiscImageChef.Devices;
|
||||||
|
|||||||
Reference in New Issue
Block a user