Use device report version 2 for the database.

This commit is contained in:
2018-11-26 23:16:54 +00:00
parent 9a746909d7
commit ad5c633180
46 changed files with 1718 additions and 4685 deletions

View File

@@ -293,41 +293,13 @@
<e p="Context.cs" t="Include" /> <e p="Context.cs" t="Include" />
<e p="DiscImageChef.Database.csproj" t="IncludeRecursive" /> <e p="DiscImageChef.Database.csproj" t="IncludeRecursive" />
<e p="Migrations" t="Include"> <e p="Migrations" t="Include">
<e p="20180805182209_InitialCreate.Designer.cs" t="Include" /> <e p="20181126222301_DeviceReportV2.Designer.cs" t="Include" />
<e p="20180805182209_InitialCreate.cs" t="Include" /> <e p="20181126222301_DeviceReportV2.cs" t="Include" />
<e p="DicContextModelSnapshot.cs" t="Include" /> <e p="DicContextModelSnapshot.cs" t="Include" />
</e> </e>
<e p="Models" t="Include"> <e p="Models" t="Include">
<e p="ATA.cs" t="Include" />
<e p="BaseEntity.cs" t="Include" />
<e p="BaseTypes.cs" t="Include" />
<e p="CHS.cs" t="Include" />
<e p="Device.cs" t="Include" /> <e p="Device.cs" t="Include" />
<e p="FireWire.cs" t="Include" /> <e p="Report.cs" t="Include" />
<e p="PCMCIA.cs" t="Include" />
<e p="SCSI" t="Include">
<e p="BlockDescriptor.cs" t="Include" />
<e p="Inquiry.cs" t="Include" />
<e p="MMC" t="Include">
<e p="Features.cs" t="Include" />
<e p="MMC.cs" t="Include" />
<e p="Mode2A.cs" t="Include" />
<e p="WriteDescriptor.cs" t="Include" />
</e>
<e p="Mode.cs" t="Include" />
<e p="ModePage.cs" t="Include" />
<e p="Page.cs" t="Include" />
<e p="SCSI.cs" t="Include" />
<e p="SSC" t="Include">
<e p="SSC.cs" t="Include" />
<e p="SequentialMedia.cs" t="Include" />
<e p="SupportedDensity.cs" t="Include" />
</e>
<e p="SupportedMedia.cs" t="Include" />
</e>
<e p="SecureDigital.cs" t="Include" />
<e p="TestedMedia.cs" t="Include" />
<e p="Usb.cs" t="Include" />
</e> </e>
<e p="bin" t="ExcludeRecursive" /> <e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive"> <e p="obj" t="ExcludeRecursive">
@@ -1125,6 +1097,18 @@
</e> </e>
</e> </e>
</e> </e>
<e p="DiscImageChef.EntityFramework" t="IncludeRecursive">
<e p="DiscImageChef.EntityFramework.csproj" t="IncludeRecursive" />
<e p="Program.cs" t="Include" />
<e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive">
<e p="Debug" t="Include">
<e p="netcoreapp2.1" t="Include">
<e p="DiscImageChef.EntityFramework.AssemblyInfo.cs" t="Include" />
</e>
</e>
</e>
</e>
<e p="DiscImageChef.Filesystems" t="IncludeRecursive"> <e p="DiscImageChef.Filesystems" t="IncludeRecursive">
<e p="AODOS.cs" t="Include" /> <e p="AODOS.cs" t="Include" />
<e p="APFS.cs" t="Include" /> <e p="APFS.cs" t="Include" />

View File

@@ -44,6 +44,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\..\..\.nuget\packages\system.componentmodel.annotations\4.5.0\ref\netstandard2.0\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\CICMMetadata\dotnet\cicm.cs"> <Compile Include="..\CICMMetadata\dotnet\cicm.cs">
@@ -90,6 +93,7 @@
<Compile Include="Structs\Images.cs" /> <Compile Include="Structs\Images.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="System.ValueTuple" Version="4.4.0" /> <PackageReference Include="System.ValueTuple" Version="4.4.0" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.2-beta" /> <PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.2-beta" />
</ItemGroup> </ItemGroup>

View File

@@ -41,6 +41,7 @@ using System.Xml.Serialization;
using DiscImageChef.Decoders.ATA; using DiscImageChef.Decoders.ATA;
using DiscImageChef.Decoders.SCSI; using DiscImageChef.Decoders.SCSI;
using DiscImageChef.Decoders.SCSI.MMC; using DiscImageChef.Decoders.SCSI.MMC;
using Newtonsoft.Json;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
// ReSharper disable UnusedAutoPropertyAccessor.Global // ReSharper disable UnusedAutoPropertyAccessor.Global
@@ -978,8 +979,11 @@ namespace DiscImageChef.CommonTypes.Metadata
public bool MinBlockLengthSpecified { get; set; } public bool MinBlockLengthSpecified { get; set; }
} }
public struct SupportedDensity public class SupportedDensity
{ {
[XmlIgnore]
[JsonIgnore]
public int Id { get; set; }
public byte PrimaryCode { get; set; } public byte PrimaryCode { get; set; }
public byte SecondaryCode { get; set; } public byte SecondaryCode { get; set; }
public bool Writable { get; set; } public bool Writable { get; set; }
@@ -994,8 +998,11 @@ namespace DiscImageChef.CommonTypes.Metadata
public string Description { get; set; } public string Description { get; set; }
} }
public struct SupportedMedia public class SupportedMedia
{ {
[XmlIgnore]
[JsonIgnore]
public int Id { get; set; }
public byte MediumType { get; set; } public byte MediumType { get; set; }
public int[] DensityCodes { get; set; } public int[] DensityCodes { get; set; }
public ushort Width { get; set; } public ushort Width { get; set; }

View File

@@ -37,9 +37,11 @@
// ****************************************************************************/ // ****************************************************************************/
using System; using System;
using System.ComponentModel.DataAnnotations;
using DiscImageChef.Decoders.ATA; using DiscImageChef.Decoders.ATA;
using DiscImageChef.Decoders.SCSI; using DiscImageChef.Decoders.SCSI;
using DiscImageChef.Decoders.SCSI.MMC; using DiscImageChef.Decoders.SCSI.MMC;
using Newtonsoft.Json;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
// ReSharper disable UnusedAutoPropertyAccessor.Global // ReSharper disable UnusedAutoPropertyAccessor.Global
@@ -48,6 +50,8 @@ namespace DiscImageChef.CommonTypes.Metadata
{ {
public class DeviceReportV2 public class DeviceReportV2
{ {
[JsonIgnore]
public int Id { get; set; }
public Usb USB { get; set; } public Usb USB { get; set; }
public FireWire FireWire { get; set; } public FireWire FireWire { get; set; }
public Pcmcia PCMCIA { get; set; } public Pcmcia PCMCIA { get; set; }
@@ -61,6 +65,8 @@ namespace DiscImageChef.CommonTypes.Metadata
public class Usb public class Usb
{ {
[JsonIgnore]
public int Id { get; set; }
public ushort VendorID { get; set; } public ushort VendorID { get; set; }
public ushort ProductID { get; set; } public ushort ProductID { get; set; }
public string Manufacturer { get; set; } public string Manufacturer { get; set; }
@@ -71,6 +77,8 @@ namespace DiscImageChef.CommonTypes.Metadata
public class FireWire public class FireWire
{ {
[JsonIgnore]
public int Id { get; set; }
public uint VendorID { get; set; } public uint VendorID { get; set; }
public uint ProductID { get; set; } public uint ProductID { get; set; }
public string Manufacturer { get; set; } public string Manufacturer { get; set; }
@@ -80,16 +88,18 @@ namespace DiscImageChef.CommonTypes.Metadata
public class Ata public class Ata
{ {
public Identify.IdentifyDevice? IdentifyDevice { get; set; } public Identify.IdentifyDevice? IdentifyDevice;
[JsonIgnore]
public byte[] Identify { get; set; } public int Id { get; set; }
public byte[] Identify { get; set; }
public TestedMedia ReadCapabilities { get; set; } public TestedMedia ReadCapabilities { get; set; }
public TestedMedia[] RemovableMedias { get; set; } public TestedMedia[] RemovableMedias { get; set; }
} }
public class Chs public class Chs
{ {
[JsonIgnore]
public int Id { get; set; }
public ushort Cylinders { get; set; } public ushort Cylinders { get; set; }
public ushort Heads { get; set; } public ushort Heads { get; set; }
public ushort Sectors { get; set; } public ushort Sectors { get; set; }
@@ -97,23 +107,27 @@ namespace DiscImageChef.CommonTypes.Metadata
public class Scsi public class Scsi
{ {
public Inquiry.SCSIInquiry? Inquiry { get; set; } public Inquiry.SCSIInquiry? Inquiry;
public byte[] InquiryData { get; set; } [JsonIgnore]
public ScsiPage[] EVPDPages { get; set; } public int Id { get; set; }
public bool SupportsModeSense6 { get; set; } public byte[] InquiryData { get; set; }
public bool SupportsModeSense10 { get; set; } public ScsiPage[] EVPDPages { get; set; }
public bool SupportsModeSubpages { get; set; } public bool SupportsModeSense6 { get; set; }
public ScsiMode ModeSense { get; set; } public bool SupportsModeSense10 { get; set; }
public Mmc MultiMediaDevice { get; set; } public bool SupportsModeSubpages { get; set; }
public TestedMedia ReadCapabilities { get; set; } public ScsiMode ModeSense { get; set; }
public TestedMedia[] RemovableMedias { get; set; } public Mmc MultiMediaDevice { get; set; }
public Ssc SequentialDevice { get; set; } public TestedMedia ReadCapabilities { get; set; }
public byte[] ModeSense6Data { get; set; } public TestedMedia[] RemovableMedias { get; set; }
public byte[] ModeSense10Data { get; set; } public Ssc SequentialDevice { get; set; }
public byte[] ModeSense6Data { get; set; }
public byte[] ModeSense10Data { get; set; }
} }
public class ScsiMode public class ScsiMode
{ {
[JsonIgnore]
public int Id { get; set; }
public byte? MediumType { get; set; } public byte? MediumType { get; set; }
public bool WriteProtected { get; set; } public bool WriteProtected { get; set; }
public BlockDescriptor[] BlockDescriptors { get; set; } public BlockDescriptor[] BlockDescriptors { get; set; }
@@ -126,6 +140,8 @@ namespace DiscImageChef.CommonTypes.Metadata
public class BlockDescriptor public class BlockDescriptor
{ {
[JsonIgnore]
public int Id { get; set; }
public byte Density { get; set; } public byte Density { get; set; }
public ulong? Blocks { get; set; } public ulong? Blocks { get; set; }
public uint? BlockLength { get; set; } public uint? BlockLength { get; set; }
@@ -133,6 +149,8 @@ namespace DiscImageChef.CommonTypes.Metadata
public class ScsiPage public class ScsiPage
{ {
[JsonIgnore]
public int Id { get; set; }
public byte page { get; set; } public byte page { get; set; }
public byte? subpage { get; set; } public byte? subpage { get; set; }
public byte[] value { get; set; } public byte[] value { get; set; }
@@ -140,13 +158,17 @@ namespace DiscImageChef.CommonTypes.Metadata
public class Mmc public class Mmc
{ {
public Modes.ModePage_2A? ModeSense2A { get; set; } [JsonIgnore]
public MmcFeatures Features { get; set; } public int Id { get; set; }
public TestedMedia[] TestedMedia { get; set; } public Modes.ModePage_2A ModeSense2A { get; set; }
public MmcFeatures Features { get; set; }
public TestedMedia[] TestedMedia { get; set; }
} }
public class MmcFeatures public class MmcFeatures
{ {
[JsonIgnore]
public int Id { get; set; }
public byte? AACSVersion { get; set; } public byte? AACSVersion { get; set; }
public byte? AGIDs { get; set; } public byte? AGIDs { get; set; }
public byte? BindingNonceBlocks { get; set; } public byte? BindingNonceBlocks { get; set; }
@@ -275,66 +297,68 @@ namespace DiscImageChef.CommonTypes.Metadata
public class TestedMedia public class TestedMedia
{ {
public Identify.IdentifyDevice? IdentifyDevice { get; set; } public Identify.IdentifyDevice? IdentifyDevice;
public byte[] IdentifyData { get; set; } [JsonIgnore]
public ulong? Blocks { get; set; } public int Id { get; set; }
public uint? BlockSize { get; set; } public byte[] IdentifyData { get; set; }
public bool? CanReadAACS { get; set; } public ulong? Blocks { get; set; }
public bool? CanReadADIP { get; set; } public uint? BlockSize { get; set; }
public bool? CanReadATIP { get; set; } public bool? CanReadAACS { get; set; }
public bool? CanReadBCA { get; set; } public bool? CanReadADIP { get; set; }
public bool? CanReadC2Pointers { get; set; } public bool? CanReadATIP { get; set; }
public bool? CanReadCMI { get; set; } public bool? CanReadBCA { get; set; }
public bool? CanReadCorrectedSubchannel { get; set; } public bool? CanReadC2Pointers { get; set; }
public bool? CanReadCorrectedSubchannelWithC2 { get; set; } public bool? CanReadCMI { get; set; }
public bool? CanReadDCB { get; set; } public bool? CanReadCorrectedSubchannel { get; set; }
public bool? CanReadDDS { get; set; } public bool? CanReadCorrectedSubchannelWithC2 { get; set; }
public bool? CanReadDMI { get; set; } public bool? CanReadDCB { get; set; }
public bool? CanReadDiscInformation { get; set; } public bool? CanReadDDS { get; set; }
public bool? CanReadFullTOC { get; set; } public bool? CanReadDMI { get; set; }
public bool? CanReadHDCMI { get; set; } public bool? CanReadDiscInformation { get; set; }
public bool? CanReadLayerCapacity { get; set; } public bool? CanReadFullTOC { get; set; }
public bool? CanReadFirstTrackPreGap { get; set; } public bool? CanReadHDCMI { get; set; }
public bool? CanReadLeadIn { get; set; } public bool? CanReadLayerCapacity { get; set; }
public bool? CanReadLeadOut { get; set; } public bool? CanReadFirstTrackPreGap { get; set; }
public bool? CanReadMediaID { get; set; } public bool? CanReadLeadIn { get; set; }
public bool? CanReadMediaSerial { get; set; } public bool? CanReadLeadOut { get; set; }
public bool? CanReadPAC { get; set; } public bool? CanReadMediaID { get; set; }
public bool? CanReadPFI { get; set; } public bool? CanReadMediaSerial { get; set; }
public bool? CanReadPMA { get; set; } public bool? CanReadPAC { get; set; }
public bool? CanReadPQSubchannel { get; set; } public bool? CanReadPFI { get; set; }
public bool? CanReadPQSubchannelWithC2 { get; set; } public bool? CanReadPMA { get; set; }
public bool? CanReadPRI { get; set; } public bool? CanReadPQSubchannel { get; set; }
public bool? CanReadRWSubchannel { get; set; } public bool? CanReadPQSubchannelWithC2 { get; set; }
public bool? CanReadRWSubchannelWithC2 { get; set; } public bool? CanReadPRI { get; set; }
public bool? CanReadRecordablePFI { get; set; } public bool? CanReadRWSubchannel { get; set; }
public bool? CanReadSpareAreaInformation { get; set; } public bool? CanReadRWSubchannelWithC2 { get; set; }
public bool? CanReadTOC { get; set; } public bool? CanReadRecordablePFI { get; set; }
public byte? Density { get; set; } public bool? CanReadSpareAreaInformation { get; set; }
public uint? LongBlockSize { get; set; } public bool? CanReadTOC { get; set; }
public string Manufacturer { get; set; } public byte? Density { get; set; }
public bool MediaIsRecognized { get; set; } public uint? LongBlockSize { get; set; }
public byte? MediumType { get; set; } public string Manufacturer { get; set; }
public string MediumTypeName { get; set; } public bool MediaIsRecognized { get; set; }
public string Model { get; set; } public byte? MediumType { get; set; }
public bool? SupportsHLDTSTReadRawDVD { get; set; } public string MediumTypeName { get; set; }
public bool? SupportsNECReadCDDA { get; set; } public string Model { get; set; }
public bool? SupportsPioneerReadCDDA { get; set; } public bool? SupportsHLDTSTReadRawDVD { get; set; }
public bool? SupportsPioneerReadCDDAMSF { get; set; } public bool? SupportsNECReadCDDA { get; set; }
public bool? SupportsPlextorReadCDDA { get; set; } public bool? SupportsPioneerReadCDDA { get; set; }
public bool? SupportsPlextorReadRawDVD { get; set; } public bool? SupportsPioneerReadCDDAMSF { get; set; }
public bool? SupportsRead10 { get; set; } public bool? SupportsPlextorReadCDDA { get; set; }
public bool? SupportsRead12 { get; set; } public bool? SupportsPlextorReadRawDVD { get; set; }
public bool? SupportsRead16 { get; set; } public bool? SupportsRead10 { get; set; }
public bool? SupportsRead6 { get; set; } public bool? SupportsRead12 { get; set; }
public bool? SupportsReadCapacity16 { get; set; } public bool? SupportsRead16 { get; set; }
public bool? SupportsReadCapacity { get; set; } public bool? SupportsRead6 { get; set; }
public bool? SupportsReadCd { get; set; } public bool? SupportsReadCapacity16 { get; set; }
public bool? SupportsReadCdMsf { get; set; } public bool? SupportsReadCapacity { get; set; }
public bool? SupportsReadCdRaw { get; set; } public bool? SupportsReadCd { get; set; }
public bool? SupportsReadCdMsfRaw { get; set; } public bool? SupportsReadCdMsf { get; set; }
public bool? SupportsReadLong16 { get; set; } public bool? SupportsReadCdRaw { get; set; }
public bool? SupportsReadLong { get; set; } public bool? SupportsReadCdMsfRaw { get; set; }
public bool? SupportsReadLong16 { get; set; }
public bool? SupportsReadLong { get; set; }
public byte[] ModeSense6Data { get; set; } public byte[] ModeSense6Data { get; set; }
public byte[] ModeSense10Data { get; set; } public byte[] ModeSense10Data { get; set; }
@@ -371,26 +395,30 @@ namespace DiscImageChef.CommonTypes.Metadata
public class Ssc public class Ssc
{ {
[JsonIgnore]
public int Id { get; set; }
public byte? BlockSizeGranularity { get; set; } public byte? BlockSizeGranularity { get; set; }
public uint? MaxBlockLength { get; set; } public uint? MaxBlockLength { get; set; }
public uint? MinBlockLength { get; set; } public uint? MinBlockLength { get; set; }
public SupportedDensity[] SupportedDensities { get; set; } public SupportedDensity[] SupportedDensities { get; set; }
public SupportedMedia[] SupportedMediaTypes { get; set; } public SscSupportedMedia[] SupportedMediaTypes { get; set; }
public TestedSequentialMedia[] TestedMedia { get; set; } public TestedSequentialMedia[] TestedMedia { get; set; }
} }
public struct TestedSequentialMedia public class TestedSequentialMedia
{ {
public bool? CanReadMediaSerial { get; set; } [JsonIgnore]
public byte? Density { get; set; } public int Id { get; set; }
public string Manufacturer { get; set; } public bool? CanReadMediaSerial { get; set; }
public bool MediaIsRecognized { get; set; } public byte? Density { get; set; }
public byte? MediumType { get; set; } public string Manufacturer { get; set; }
public string MediumTypeName { get; set; } public bool MediaIsRecognized { get; set; }
public string Model { get; set; } public byte? MediumType { get; set; }
public SupportedDensity[] SupportedDensities { get; set; } public string MediumTypeName { get; set; }
public SupportedMedia[] SupportedMediaTypes { get; set; } public string Model { get; set; }
public SupportedDensity[] SupportedDensities { get; set; }
public SscSupportedMedia[] SupportedMediaTypes { get; set; }
public byte[] ModeSense6Data { get; set; } public byte[] ModeSense6Data { get; set; }
public byte[] ModeSense10Data { get; set; } public byte[] ModeSense10Data { get; set; }
@@ -398,21 +426,44 @@ namespace DiscImageChef.CommonTypes.Metadata
public class Pcmcia public class Pcmcia
{ {
public byte[] CIS { get; set; } public string[] AdditionalInformation;
public string Compliance { get; set; } [JsonIgnore]
public ushort? ManufacturerCode { get; set; } public int Id { get; set; }
public ushort? CardCode { get; set; } public byte[] CIS { get; set; }
public string Manufacturer { get; set; } public string Compliance { get; set; }
public string ProductName { get; set; } public ushort? ManufacturerCode { get; set; }
public string[] AdditionalInformation { get; set; } public ushort? CardCode { get; set; }
public string Manufacturer { get; set; }
public string ProductName { get; set; }
} }
public class MmcSd public class MmcSd
{ {
[JsonIgnore]
public int Id { get; set; }
public byte[] CID { get; set; } public byte[] CID { get; set; }
public byte[] CSD { get; set; } public byte[] CSD { get; set; }
public byte[] OCR { get; set; } public byte[] OCR { get; set; }
public byte[] SCR { get; set; } public byte[] SCR { get; set; }
public byte[] ExtendedCSD { get; set; } public byte[] ExtendedCSD { get; set; }
} }
public class SscSupportedMedia
{
[JsonIgnore]
public int Id { get; set; }
public byte MediumType { get; set; }
public DensityCode[] DensityCodes { get; set; }
public ushort Width { get; set; }
public ushort Length { get; set; }
public string Organization { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
public class DensityCode
{
[Key]
public int Code { get; set; }
}
} }

View File

@@ -91,7 +91,7 @@ namespace DiscImageChef.Core.Devices.Report
DensitySupport.MediaTypeSupportHeader? mtsh = DensitySupport.DecodeMediumType(buffer); DensitySupport.MediaTypeSupportHeader? mtsh = DensitySupport.DecodeMediumType(buffer);
if(!mtsh.HasValue) return report; if(!mtsh.HasValue) return report;
report.SupportedMediaTypes = new SupportedMedia[mtsh.Value.descriptors.Length]; report.SupportedMediaTypes = new SscSupportedMedia[mtsh.Value.descriptors.Length];
for(int i = 0; i < mtsh.Value.descriptors.Length; i++) for(int i = 0; i < mtsh.Value.descriptors.Length; i++)
{ {
report.SupportedMediaTypes[i].Description = mtsh.Value.descriptors[i].description; report.SupportedMediaTypes[i].Description = mtsh.Value.descriptors[i].description;
@@ -102,9 +102,11 @@ namespace DiscImageChef.Core.Devices.Report
report.SupportedMediaTypes[i].Width = mtsh.Value.descriptors[i].width; report.SupportedMediaTypes[i].Width = mtsh.Value.descriptors[i].width;
if(mtsh.Value.descriptors[i].densityCodes == null) continue; if(mtsh.Value.descriptors[i].densityCodes == null) continue;
report.SupportedMediaTypes[i].DensityCodes = new int[mtsh.Value.descriptors[i].densityCodes.Length]; report.SupportedMediaTypes[i].DensityCodes =
new DensityCode[mtsh.Value.descriptors[i].densityCodes.Length];
for(int j = 0; j < mtsh.Value.descriptors.Length; j++) for(int j = 0; j < mtsh.Value.descriptors.Length; j++)
report.SupportedMediaTypes[i].DensityCodes[j] = mtsh.Value.descriptors[i].densityCodes[j]; report.SupportedMediaTypes[i].DensityCodes[j] =
new DensityCode {Code = mtsh.Value.descriptors[i].densityCodes[j]};
} }
return report; return report;
@@ -173,7 +175,7 @@ namespace DiscImageChef.Core.Devices.Report
DensitySupport.MediaTypeSupportHeader? mtsh = DensitySupport.DecodeMediumType(buffer); DensitySupport.MediaTypeSupportHeader? mtsh = DensitySupport.DecodeMediumType(buffer);
if(mtsh.HasValue) if(mtsh.HasValue)
{ {
seqTest.SupportedMediaTypes = new SupportedMedia[mtsh.Value.descriptors.Length]; seqTest.SupportedMediaTypes = new SscSupportedMedia[mtsh.Value.descriptors.Length];
for(int i = 0; i < mtsh.Value.descriptors.Length; i++) for(int i = 0; i < mtsh.Value.descriptors.Length; i++)
{ {
seqTest.SupportedMediaTypes[i].Description = mtsh.Value.descriptors[i].description; seqTest.SupportedMediaTypes[i].Description = mtsh.Value.descriptors[i].description;
@@ -185,9 +187,10 @@ namespace DiscImageChef.Core.Devices.Report
if(mtsh.Value.descriptors[i].densityCodes == null) continue; if(mtsh.Value.descriptors[i].densityCodes == null) continue;
seqTest.SupportedMediaTypes[i].DensityCodes = seqTest.SupportedMediaTypes[i].DensityCodes =
new int[mtsh.Value.descriptors[i].densityCodes.Length]; new DensityCode[mtsh.Value.descriptors[i].densityCodes.Length];
for(int j = 0; j < mtsh.Value.descriptors.Length; j++) for(int j = 0; j < mtsh.Value.descriptors.Length; j++)
seqTest.SupportedMediaTypes[i].DensityCodes[j] = mtsh.Value.descriptors[i].densityCodes[j]; seqTest.SupportedMediaTypes[i].DensityCodes[j] =
new DensityCode {Code = mtsh.Value.descriptors[i].densityCodes[j]};
} }
} }
} }

View File

@@ -82,7 +82,7 @@ namespace DiscImageChef.Core.Devices.Report
return evpds.Count > 0 ? evpds.ToArray() : null; return evpds.Count > 0 ? evpds.ToArray() : null;
} }
public void ReportScsiModes(ref DeviceReportV2 report, ref Modes.ModePage_2A? cdromMode) public void ReportScsiModes(ref DeviceReportV2 report, ref Modes.ModePage_2A cdromMode)
{ {
Modes.DecodedMode? decMode = null; Modes.DecodedMode? decMode = null;
PeripheralDeviceTypes devType = dev.ScsiType; PeripheralDeviceTypes devType = dev.ScsiType;

View File

@@ -30,15 +30,21 @@
// Copyright © 2011-2018 Natalia Portillo // Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Database.Models; using DiscImageChef.Database.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace DiscImageChef.Database namespace DiscImageChef.Database
{ {
public class DicContext : DbContext public sealed class DicContext : DbContext
{ {
public DbSet<Device> Devices { get; set; } public DbSet<Device> Devices { get; set; }
public DbSet<Device> Reports { get; set; } public DbSet<DeviceReportV2> Reports { get; set; }
public DicContext()
{
Database.EnsureCreated();
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{ {

View File

@@ -57,33 +57,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Context.cs" /> <Compile Include="Context.cs" />
<Compile Include="Migrations\20180805182209_InitialCreate.cs" /> <Compile Include="Migrations\20181126222301_DeviceReportV2.cs" />
<Compile Include="Migrations\20180805182209_InitialCreate.Designer.cs" /> <Compile Include="Migrations\20181126222301_DeviceReportV2.Designer.cs" />
<Compile Include="Migrations\DicContextModelSnapshot.cs" /> <Compile Include="Migrations\DicContextModelSnapshot.cs" />
<Compile Include="Models\ATA.cs" />
<Compile Include="Models\BaseEntity.cs" />
<Compile Include="Models\BaseTypes.cs" />
<Compile Include="Models\CHS.cs" />
<Compile Include="Models\Device.cs" /> <Compile Include="Models\Device.cs" />
<Compile Include="Models\FireWire.cs" /> <Compile Include="Models\Report.cs" />
<Compile Include="Models\PCMCIA.cs" />
<Compile Include="Models\SCSI\BlockDescriptor.cs" />
<Compile Include="Models\SCSI\Inquiry.cs" />
<Compile Include="Models\SCSI\MMC\Features.cs" />
<Compile Include="Models\SCSI\MMC\MMC.cs" />
<Compile Include="Models\SCSI\MMC\Mode2A.cs" />
<Compile Include="Models\SCSI\MMC\WriteDescriptor.cs" />
<Compile Include="Models\SCSI\Mode.cs" />
<Compile Include="Models\SCSI\ModePage.cs" />
<Compile Include="Models\SCSI\Page.cs" />
<Compile Include="Models\SCSI\SCSI.cs" />
<Compile Include="Models\SCSI\SSC\SequentialMedia.cs" />
<Compile Include="Models\SCSI\SSC\SSC.cs" />
<Compile Include="Models\SCSI\SSC\SupportedDensity.cs" />
<Compile Include="Models\SCSI\SupportedMedia.cs" />
<Compile Include="Models\SecureDigital.cs" />
<Compile Include="Models\TestedMedia.cs" />
<Compile Include="Models\Usb.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj" /> <ProjectReference Include="..\DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj" />

File diff suppressed because it is too large Load Diff

View File

@@ -1,225 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : ATA.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for ATA/ATAPI device information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Decoders.ATA;
namespace DiscImageChef.Database.Models
{
public class ATA : BaseEntity
{
public string AdditionalPID { get; set; }
public Identify.TransferMode? APIOSupported { get; set; }
public ushort? ATAPIByteCount { get; set; }
public ushort? BufferType { get; set; }
public ushort? BufferSize { get; set; }
public Identify.CapabilitiesBit? Capabilities { get; set; }
public Identify.CapabilitiesBit2? Capabilities2 { get; set; }
public Identify.CapabilitiesBit3? Capabilities3 { get; set; }
public ushort? CFAPowerMode { get; set; }
public Identify.CommandSetBit? CommandSet { get; set; }
public Identify.CommandSetBit2? CommandSet2 { get; set; }
public Identify.CommandSetBit3? CommandSet3 { get; set; }
public Identify.CommandSetBit4? CommandSet4 { get; set; }
public Identify.CommandSetBit5? CommandSet5 { get; set; }
public byte? CurrentAAM { get; set; }
public ushort? CurrentAPM { get; set; }
public Identify.DataSetMgmtBit? DataSetMgmt { get; set; }
public ushort? DataSetMgmtSize { get; set; }
public Identify.DeviceFormFactorEnum? DeviceFormFactor { get; set; }
public Identify.TransferMode? DMAActive { get; set; }
public Identify.TransferMode? DMASupported { get; set; }
public byte? DMATransferTimingMode { get; set; }
public ushort? EnhancedSecurityEraseTime { get; set; }
public Identify.CommandSetBit? EnabledCommandSet { get; set; }
public Identify.CommandSetBit2? EnabledCommandSet2 { get; set; }
public Identify.CommandSetBit3? EnabledCommandSet3 { get; set; }
public Identify.CommandSetBit4? EnabledCommandSet4 { get; set; }
public Identify.SATAFeaturesBit? EnabledSATAFeatures { get; set; }
public ulong? ExtendedUserSectors { get; set; }
public byte? FreeFallSensitivity { get; set; }
public string FirmwareRevision { get; set; }
public Identify.GeneralConfigurationBit? GeneralConfiguration { get; set; }
public ushort? HardwareResetResult { get; set; }
public ushort? InterseekDelay { get; set; }
public Identify.MajorVersionBit? MajorVersion { get; set; }
public ushort? MasterPasswordRevisionCode { get; set; }
public ushort? MaxDownloadMicroMode3 { get; set; }
public ushort? MaxQueueDepth { get; set; }
public Identify.TransferMode? MDMAActive { get; set; }
public Identify.TransferMode? MDMASupported { get; set; }
public ushort? MinDownloadMicroMode3 { get; set; }
public ushort? MinMDMACycleTime { get; set; }
public ushort? MinorVersion { get; set; }
public ushort? MinPIOCycleTimeNoFlow { get; set; }
public ushort? MinPIOCycleTimeFlow { get; set; }
public string Model { get; set; }
public byte? MultipleMaxSectors { get; set; }
public byte? MultipleSectorNumber { get; set; }
public ushort? NVCacheCaps { get; set; }
public uint? NVCacheSize { get; set; }
public ushort? NVCacheWriteSpeed { get; set; }
public byte? NVEstimatedSpinUp { get; set; }
public ushort? PacketBusRelease { get; set; }
public byte? PIOTransferTimingMode { get; set; }
public byte? RecommendedAAM { get; set; }
public ushort? RecommendedMDMACycleTime { get; set; }
public ushort? RemovableStatusSet { get; set; }
public Identify.SATACapabilitiesBit? SATACapabilities { get; set; }
public Identify.SATACapabilitiesBit2? SATACapabilities2 { get; set; }
public Identify.SATAFeaturesBit? SATAFeatures { get; set; }
public Identify.SCTCommandTransportBit? SCTCommandTransport { get; set; }
public uint? SectorsPerCard { get; set; }
public ushort? SecurityEraseTime { get; set; }
public Identify.SecurityStatusBit? SecurityStatus { get; set; }
public ushort? ServiceBusyClear { get; set; }
public Identify.SpecificConfigurationEnum? SpecificConfiguration { get; set; }
public ushort? StreamAccessLatency { get; set; }
public ushort? StreamMinReqSize { get; set; }
public uint? StreamPerformanceGranularity { get; set; }
public ushort? StreamTransferTimeDMA { get; set; }
public ushort? StreamTransferTimePIO { get; set; }
public ushort? TransportMajorVersion { get; set; }
public ushort? TransportMinorVersion { get; set; }
public Identify.TrustedComputingBit? TrustedComputing { get; set; }
public Identify.TransferMode? UDMAActive { get; set; }
public Identify.TransferMode? UDMASupported { get; set; }
public byte? WRVMode { get; set; }
public uint? WRVSectorCountMode3 { get; set; }
public uint? WRVSectorCountMode2 { get; set; }
public byte[] Identify { get; set; }
public TestedMedia ReadCapabilities { get; set; }
public List<TestedMedia> RemovableMedias { get; set; }
public static ATA MapAta(ataType oldAta)
{
if(oldAta == null) return null;
ATA newAta = new ATA
{
Identify = oldAta.Identify,
ReadCapabilities = TestedMedia.MapTestedMedia(oldAta.ReadCapabilities)
};
if(oldAta.AdditionalPIDSpecified) newAta.AdditionalPID = oldAta.AdditionalPID;
if(oldAta.APIOSupportedSpecified) newAta.APIOSupported = oldAta.APIOSupported;
if(oldAta.ATAPIByteCountSpecified) newAta.ATAPIByteCount = oldAta.ATAPIByteCount;
if(oldAta.BufferTypeSpecified) newAta.BufferType = oldAta.BufferType;
if(oldAta.BufferSizeSpecified) newAta.BufferSize = oldAta.BufferSize;
if(oldAta.CapabilitiesSpecified) newAta.Capabilities = oldAta.Capabilities;
if(oldAta.Capabilities2Specified) newAta.Capabilities2 = oldAta.Capabilities2;
if(oldAta.Capabilities3Specified) newAta.Capabilities3 = oldAta.Capabilities3;
if(oldAta.CFAPowerModeSpecified) newAta.CFAPowerMode = oldAta.CFAPowerMode;
if(oldAta.CommandSetSpecified) newAta.CommandSet = oldAta.CommandSet;
if(oldAta.CommandSet2Specified) newAta.CommandSet2 = oldAta.CommandSet2;
if(oldAta.CommandSet3Specified) newAta.CommandSet3 = oldAta.CommandSet3;
if(oldAta.CommandSet4Specified) newAta.CommandSet4 = oldAta.CommandSet4;
if(oldAta.CommandSet5Specified) newAta.CommandSet5 = oldAta.CommandSet5;
if(oldAta.CurrentAAMSpecified) newAta.CurrentAAM = oldAta.CurrentAAM;
if(oldAta.CurrentAPMSpecified) newAta.CurrentAPM = oldAta.CurrentAPM;
if(oldAta.DataSetMgmtSpecified) newAta.DataSetMgmt = oldAta.DataSetMgmt;
if(oldAta.DataSetMgmtSizeSpecified) newAta.DataSetMgmtSize = oldAta.DataSetMgmtSize;
if(oldAta.DeviceFormFactorSpecified) newAta.DeviceFormFactor = oldAta.DeviceFormFactor;
if(oldAta.DMAActiveSpecified) newAta.DMAActive = oldAta.DMAActive;
if(oldAta.DMASupportedSpecified) newAta.DMASupported = oldAta.DMASupported;
if(oldAta.DMATransferTimingModeSpecified) newAta.DMATransferTimingMode = oldAta.DMATransferTimingMode;
if(oldAta.EnhancedSecurityEraseTimeSpecified)
newAta.EnhancedSecurityEraseTime = oldAta.EnhancedSecurityEraseTime;
if(oldAta.EnabledCommandSetSpecified) newAta.EnabledCommandSet = oldAta.EnabledCommandSet;
if(oldAta.EnabledCommandSet2Specified) newAta.EnabledCommandSet2 = oldAta.EnabledCommandSet2;
if(oldAta.EnabledCommandSet3Specified) newAta.EnabledCommandSet3 = oldAta.EnabledCommandSet3;
if(oldAta.EnabledCommandSet4Specified) newAta.EnabledCommandSet4 = oldAta.EnabledCommandSet4;
if(oldAta.EnabledSATAFeaturesSpecified) newAta.EnabledSATAFeatures = oldAta.EnabledSATAFeatures;
if(oldAta.ExtendedUserSectorsSpecified) newAta.ExtendedUserSectors = oldAta.ExtendedUserSectors;
if(oldAta.FreeFallSensitivitySpecified) newAta.FreeFallSensitivity = oldAta.FreeFallSensitivity;
if(oldAta.FirmwareRevisionSpecified) newAta.FirmwareRevision = oldAta.FirmwareRevision;
if(oldAta.GeneralConfigurationSpecified) newAta.GeneralConfiguration = oldAta.GeneralConfiguration;
if(oldAta.HardwareResetResultSpecified) newAta.HardwareResetResult = oldAta.HardwareResetResult;
if(oldAta.InterseekDelaySpecified) newAta.InterseekDelay = oldAta.InterseekDelay;
if(oldAta.MajorVersionSpecified) newAta.MajorVersion = oldAta.MajorVersion;
if(oldAta.MasterPasswordRevisionCodeSpecified)
newAta.MasterPasswordRevisionCode = oldAta.MasterPasswordRevisionCode;
if(oldAta.MaxDownloadMicroMode3Specified) newAta.MaxDownloadMicroMode3 = oldAta.MaxDownloadMicroMode3;
if(oldAta.MaxQueueDepthSpecified) newAta.MaxQueueDepth = oldAta.MaxQueueDepth;
if(oldAta.MDMAActiveSpecified) newAta.MDMAActive = oldAta.MDMAActive;
if(oldAta.MDMASupportedSpecified) newAta.MDMASupported = oldAta.MDMASupported;
if(oldAta.MinDownloadMicroMode3Specified) newAta.MinDownloadMicroMode3 = oldAta.MinDownloadMicroMode3;
if(oldAta.MinMDMACycleTimeSpecified) newAta.MinMDMACycleTime = oldAta.MinMDMACycleTime;
if(oldAta.MinorVersionSpecified) newAta.MinorVersion = oldAta.MinorVersion;
if(oldAta.MinPIOCycleTimeNoFlowSpecified) newAta.MinPIOCycleTimeNoFlow = oldAta.MinPIOCycleTimeNoFlow;
if(oldAta.MinPIOCycleTimeFlowSpecified) newAta.MinPIOCycleTimeFlow = oldAta.MinPIOCycleTimeFlow;
if(oldAta.ModelSpecified) newAta.Model = oldAta.Model;
if(oldAta.MultipleMaxSectorsSpecified) newAta.MultipleMaxSectors = oldAta.MultipleMaxSectors;
if(oldAta.MultipleSectorNumberSpecified) newAta.MultipleSectorNumber = oldAta.MultipleSectorNumber;
if(oldAta.NVCacheCapsSpecified) newAta.NVCacheCaps = oldAta.NVCacheCaps;
if(oldAta.NVCacheSizeSpecified) newAta.NVCacheSize = oldAta.NVCacheSize;
if(oldAta.NVCacheWriteSpeedSpecified) newAta.NVCacheWriteSpeed = oldAta.NVCacheWriteSpeed;
if(oldAta.NVEstimatedSpinUpSpecified) newAta.NVEstimatedSpinUp = oldAta.NVEstimatedSpinUp;
if(oldAta.PacketBusReleaseSpecified) newAta.PacketBusRelease = oldAta.PacketBusRelease;
if(oldAta.PIOTransferTimingModeSpecified) newAta.PIOTransferTimingMode = oldAta.PIOTransferTimingMode;
if(oldAta.RecommendedAAMSpecified) newAta.RecommendedAAM = oldAta.RecommendedAAM;
if(oldAta.RecommendedMDMACycleTimeSpecified)
newAta.RecommendedMDMACycleTime = oldAta.RecommendedMDMACycleTime;
if(oldAta.RemovableStatusSetSpecified) newAta.RemovableStatusSet = oldAta.RemovableStatusSet;
if(oldAta.SATACapabilitiesSpecified) newAta.SATACapabilities = oldAta.SATACapabilities;
if(oldAta.SATACapabilities2Specified) newAta.SATACapabilities2 = oldAta.SATACapabilities2;
if(oldAta.SATAFeaturesSpecified) newAta.SATAFeatures = oldAta.SATAFeatures;
if(oldAta.SCTCommandTransportSpecified) newAta.SCTCommandTransport = oldAta.SCTCommandTransport;
if(oldAta.SectorsPerCardSpecified) newAta.SectorsPerCard = oldAta.SectorsPerCard;
if(oldAta.SecurityEraseTimeSpecified) newAta.SecurityEraseTime = oldAta.SecurityEraseTime;
if(oldAta.SecurityStatusSpecified) newAta.SecurityStatus = oldAta.SecurityStatus;
if(oldAta.ServiceBusyClearSpecified) newAta.ServiceBusyClear = oldAta.ServiceBusyClear;
if(oldAta.SpecificConfigurationSpecified) newAta.SpecificConfiguration = oldAta.SpecificConfiguration;
if(oldAta.StreamAccessLatencySpecified) newAta.StreamAccessLatency = oldAta.StreamAccessLatency;
if(oldAta.StreamMinReqSizeSpecified) newAta.StreamMinReqSize = oldAta.StreamMinReqSize;
if(oldAta.StreamPerformanceGranularitySpecified)
newAta.StreamPerformanceGranularity = oldAta.StreamPerformanceGranularity;
if(oldAta.StreamTransferTimeDMASpecified) newAta.StreamTransferTimeDMA = oldAta.StreamTransferTimeDMA;
if(oldAta.StreamTransferTimePIOSpecified) newAta.StreamTransferTimePIO = oldAta.StreamTransferTimePIO;
if(oldAta.TransportMajorVersionSpecified) newAta.TransportMajorVersion = oldAta.TransportMajorVersion;
if(oldAta.TransportMinorVersionSpecified) newAta.TransportMinorVersion = oldAta.TransportMinorVersion;
if(oldAta.TrustedComputingSpecified) newAta.TrustedComputing = oldAta.TrustedComputing;
if(oldAta.UDMAActiveSpecified) newAta.UDMAActive = oldAta.UDMAActive;
if(oldAta.UDMASupportedSpecified) newAta.UDMASupported = oldAta.UDMASupported;
if(oldAta.WRVModeSpecified) newAta.WRVMode = oldAta.WRVMode;
if(oldAta.WRVSectorCountMode3Specified) newAta.WRVSectorCountMode3 = oldAta.WRVSectorCountMode3;
if(oldAta.WRVSectorCountMode2Specified) newAta.WRVSectorCountMode2 = oldAta.WRVSectorCountMode2;
if(oldAta.RemovableMedias == null) return newAta;
newAta.RemovableMedias = new List<TestedMedia>(oldAta.RemovableMedias.Select(TestedMedia.MapTestedMedia));
return newAta;
}
}
}

View File

@@ -1,49 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : BaseEntity.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for base entities.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System;
using System.ComponentModel.DataAnnotations;
namespace DiscImageChef.Database.Models
{
public class BaseEntity
{
[Key]
public ulong Id { get; set; }
}
public class DatedEntity : BaseEntity
{
public DateTime WhenAdded { get; set; }
public DateTime? WhenModified { get; set; }
}
}

View File

@@ -1,52 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : BaseTypes.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database models for making arrays with C# base types.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace DiscImageChef.Database.Models
{
public class StringClass : BaseEntity
{
[Required]
public string Value { get; set; }
}
public class IntClass : BaseEntity
{
public int Value { get; set; }
}
public class UshortClass : BaseEntity
{
public ushort Value { get; set; }
}
}

View File

@@ -1,41 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : CHS.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for Cylinder/Head/Sector.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
namespace DiscImageChef.Database.Models
{
public class CHS : BaseEntity
{
public ushort Cylinders { get; set; }
public ushort Heads { get; set; }
public ushort Sectors { get; set; }
}
}

View File

@@ -1,163 +1,10 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : this.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for device information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System; using System;
using DiscImageChef.CommonTypes.Metadata; using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models namespace DiscImageChef.Database.Models
{ {
public class Device : DatedEntity public class Device : DeviceReportV2
{ {
public Device() public DateTime LastSynchronized { get; set; }
{
WhenAdded = DateTime.UtcNow;
}
public Device(DeviceReport report)
{
WhenAdded = DateTime.UtcNow;
if(report.SecureDigital != null) Type = DeviceType.SecureDigital;
else if(report.MultiMediaCard != null) Type = DeviceType.MMC;
else if(report.FireWire != null) Type = DeviceType.FireWire;
else if(report.USB != null) Type = DeviceType.USB;
else if(report.PCMCIA != null) Type = DeviceType.PCMCIA;
else if(report.ATAPI != null) Type = DeviceType.ATAPI;
else if(report.ATA != null) Type = DeviceType.ATA;
else if(report.SCSI?.Inquiry != null) Type = DeviceType.SCSI;
if(report.CompactFlashSpecified && report.CompactFlash) Type = DeviceType.CompactFlash;
if(!string.IsNullOrWhiteSpace(report.FireWire?.Manufacturer)) Manufacturer = report.FireWire.Manufacturer;
else if(!string.IsNullOrWhiteSpace(report.USB?.Manufacturer)) Manufacturer = report.USB.Manufacturer;
else if(!string.IsNullOrWhiteSpace(report.SCSI?.Inquiry?.VendorIdentification))
Manufacturer =
report.SCSI.Inquiry.VendorIdentification;
else if(!string.IsNullOrWhiteSpace(report.PCMCIA?.Manufacturer)) Manufacturer = report.PCMCIA.Manufacturer;
else if(!string.IsNullOrWhiteSpace(report.ATAPI?.Model))
{
string[] atapiSplit = report.ATAPI.Model.Split(' ');
Manufacturer = atapiSplit.Length > 1 ? atapiSplit[0] : report.ATAPI.Model;
}
else if(!string.IsNullOrWhiteSpace(report.ATA?.Model))
{
string[] ataSplit = report.ATA.Model.Split(' ');
Manufacturer = ataSplit.Length > 1 ? ataSplit[0] : report.ATA.Model;
}
if(!string.IsNullOrWhiteSpace(report.FireWire?.Product)) Model = report.FireWire.Product;
else if(!string.IsNullOrWhiteSpace(report.USB?.Product)) Model = report.USB.Product;
else if(!string.IsNullOrWhiteSpace(report.SCSI?.Inquiry?.ProductIdentification))
Model =
report.SCSI.Inquiry.ProductIdentification;
else if(!string.IsNullOrWhiteSpace(report.PCMCIA?.ProductName)) Model = report.PCMCIA.ProductName;
else if(!string.IsNullOrWhiteSpace(report.ATAPI?.Model))
{
string[] atapiSplit = report.ATAPI.Model.Split(' ');
Model = atapiSplit.Length > 1 ? report.ATAPI.Model.Substring(atapiSplit[0].Length + 1) : null;
}
else if(!string.IsNullOrWhiteSpace(report.ATA?.Model))
{
string[] ataSplit = report.ATA.Model.Split(' ');
Model = ataSplit.Length > 1 ? report.ATA.Model.Substring(ataSplit[0].Length + 1) : null;
}
if(!string.IsNullOrWhiteSpace(report.SCSI?.Inquiry?.ProductRevisionLevel))
Revision = report.SCSI.Inquiry.ProductRevisionLevel;
else if(!string.IsNullOrWhiteSpace(report.ATAPI?.FirmwareRevision))
Revision = report.ATAPI.FirmwareRevision;
else if(!string.IsNullOrWhiteSpace(report.ATA?.FirmwareRevision)) Revision = report.ATA.FirmwareRevision;
USB = USB.MapUsb(report.USB);
FireWire = FireWire.MapFirewire(report.FireWire);
PCMCIA = PCMCIA.MapPcmcia(report.PCMCIA);
ATA = ATA.MapAta(report.ATA);
ATAPI = ATA.MapAta(report.ATAPI);
SCSI = Models.SCSI.SCSI.MapScsi(report.SCSI);
MultiMediaCard = SecureDigital.MapSd(report.MultiMediaCard);
SecureDigital = SecureDigital.MapSd(report.SecureDigital);
WhenAdded = DateTime.UtcNow;
IsValid = true;
}
public Device(string manufacturer, string model, string revision, DeviceType type, DeviceReport report)
{
WhenAdded = DateTime.UtcNow;
Manufacturer = manufacturer;
Model = model;
Revision = revision;
Type = type;
USB = USB.MapUsb(report.USB);
FireWire = FireWire.MapFirewire(report.FireWire);
PCMCIA = PCMCIA.MapPcmcia(report.PCMCIA);
ATA = ATA.MapAta(report.ATA);
ATAPI = ATA.MapAta(report.ATAPI);
SCSI = Models.SCSI.SCSI.MapScsi(report.SCSI);
MultiMediaCard = SecureDigital.MapSd(report.MultiMediaCard);
SecureDigital = SecureDigital.MapSd(report.SecureDigital);
WhenAdded = DateTime.UtcNow;
IsValid = true;
}
public string Manufacturer { get; set; }
public string Model { get; set; }
public string Revision { get; set; }
public DeviceType Type { get; set; }
public USB USB { get; set; }
public FireWire FireWire { get; set; }
public PCMCIA PCMCIA { get; set; }
public ATA ATA { get; set; }
public ATA ATAPI { get; set; }
public SCSI.SCSI SCSI { get; set; }
public SecureDigital MultiMediaCard { get; set; }
public SecureDigital SecureDigital { get; set; }
public bool IsValid { get; set; }
public ulong TimesSeen { get; set; }
}
public enum DeviceType
{
Unknown,
ATA,
ATAPI,
SCSI,
SecureDigital,
MMC,
NVMe,
PCMCIA,
CompactFlash,
FireWire,
USB
} }
} }

View File

@@ -1,59 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : FireWire.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for FireWire device information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models
{
public class FireWire : BaseEntity
{
public uint VendorID { get; set; }
public uint ProductID { get; set; }
public string Manufacturer { get; set; }
public string Product { get; set; }
public bool RemovableMedia { get; set; }
public static FireWire MapFirewire(firewireType oldFirewire)
{
if(oldFirewire == null) return null;
return new FireWire
{
Manufacturer = oldFirewire.Manufacturer,
Product = oldFirewire.Product,
ProductID = oldFirewire.ProductID,
RemovableMedia = oldFirewire.RemovableMedia,
VendorID = oldFirewire.VendorID
};
}
}
}

View File

@@ -1,72 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : PCMCIA.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for PCMCIA device information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models
{
public class PCMCIA : BaseEntity
{
public byte[] CIS { get; set; }
public string Compliance { get; set; }
public ushort ManufacturerCode { get; set; }
public ushort CardCode { get; set; }
public string Manufacturer { get; set; }
public string ProductName { get; set; }
public List<StringClass> AdditionalInformation { get; set; }
public static PCMCIA MapPcmcia(pcmciaType oldPcmcia)
{
if(oldPcmcia == null) return null;
PCMCIA newPcmcia = new PCMCIA
{
CIS = oldPcmcia.CIS,
Compliance = oldPcmcia.Compliance,
Manufacturer = oldPcmcia.Manufacturer,
ProductName = oldPcmcia.ProductName
};
if(oldPcmcia.ManufacturerCodeSpecified) newPcmcia.ManufacturerCode = oldPcmcia.ManufacturerCode;
if(oldPcmcia.CardCodeSpecified) newPcmcia.CardCode = oldPcmcia.CardCode;
if(oldPcmcia.AdditionalInformation == null) return newPcmcia;
if(oldPcmcia.AdditionalInformation == null) return newPcmcia;
newPcmcia.AdditionalInformation =
new List<StringClass>(oldPcmcia.AdditionalInformation.Select(t => new StringClass {Value = t}));
return newPcmcia;
}
}
}

View File

@@ -0,0 +1,11 @@
using System;
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models
{
public class Report : DeviceReportV2
{
public DateTime Created { get; set; }
public bool Uploaded { get; set; }
}
}

View File

@@ -1,55 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : BlockDescriptor.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI block descriptor.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI
{
public class BlockDescriptor : BaseEntity
{
public byte Density { get; set; }
public ulong? Blocks { get; set; }
public uint? BlockLength { get; set; }
public static BlockDescriptor MapBlockDescriptor(blockDescriptorType oldBlockDescriptor)
{
if(oldBlockDescriptor == null) return null;
BlockDescriptor newBlockDescriptor = new BlockDescriptor {Density = oldBlockDescriptor.Density};
if(oldBlockDescriptor.BlockLengthSpecified) newBlockDescriptor.BlockLength = oldBlockDescriptor.BlockLength;
if(oldBlockDescriptor.BlocksSpecified) newBlockDescriptor.Blocks = oldBlockDescriptor.Blocks;
return newBlockDescriptor;
}
}
}

View File

@@ -1,141 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Inquiry.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI INQUIRY.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Decoders.SCSI;
namespace DiscImageChef.Database.Models.SCSI
{
public class Inquiry : BaseEntity
{
public bool AccessControlCoordinator { get; set; }
public bool ACKRequests { get; set; }
public bool AERCSupported { get; set; }
public bool Address16 { get; set; }
public bool Address32 { get; set; }
public byte? ANSIVersion { get; set; }
public TGPSValues AsymmetricalLUNAccess { get; set; }
public bool BasicQueueing { get; set; }
public byte? DeviceTypeModifier { get; set; }
public byte? ECMAVersion { get; set; }
public bool EnclosureServices { get; set; }
public bool HierarchicalLUN { get; set; }
public bool IUS { get; set; }
public byte? ISOVersion { get; set; }
public bool LinkedCommands { get; set; }
public bool MediumChanger { get; set; }
public bool MultiPortDevice { get; set; }
public bool NormalACA { get; set; }
public PeripheralDeviceTypes PeripheralDeviceType { get; set; }
public PeripheralQualifiers PeripheralQualifier { get; set; }
public string ProductIdentification { get; set; }
public string ProductRevisionLevel { get; set; }
public bool Protection { get; set; }
public bool QAS { get; set; }
public bool RelativeAddressing { get; set; }
public bool Removable { get; set; }
public byte? ResponseDataFormat { get; set; }
public bool TaggedCommandQueue { get; set; }
public bool TerminateTaskSupported { get; set; }
public bool ThirdPartyCopy { get; set; }
public bool TranferDisable { get; set; }
public bool SoftReset { get; set; }
public SPIClocking SPIClocking { get; set; }
public bool StorageArrayController { get; set; }
public bool SyncTransfer { get; set; }
public string VendorIdentification { get; set; }
public List<UshortClass> VersionDescriptors { get; set; }
public bool WideBus16 { get; set; }
public bool WideBus32 { get; set; }
public byte[] Data { get; set; }
public static Inquiry MapInquiry(scsiInquiryType oldInquiry)
{
if(oldInquiry == null) return null;
Inquiry newInquiry = new Inquiry
{
AccessControlCoordinator = oldInquiry.AccessControlCoordinator,
ACKRequests = oldInquiry.ACKRequests,
AERCSupported = oldInquiry.AERCSupported,
Address16 = oldInquiry.Address16,
Address32 = oldInquiry.Address32,
AsymmetricalLUNAccess = oldInquiry.AsymmetricalLUNAccess,
BasicQueueing = oldInquiry.BasicQueueing,
EnclosureServices = oldInquiry.EnclosureServices,
HierarchicalLUN = oldInquiry.HierarchicalLUN,
IUS = oldInquiry.IUS,
LinkedCommands = oldInquiry.LinkedCommands,
MediumChanger = oldInquiry.MediumChanger,
MultiPortDevice = oldInquiry.MultiPortDevice,
NormalACA = oldInquiry.NormalACA,
PeripheralDeviceType = oldInquiry.PeripheralDeviceType,
PeripheralQualifier = oldInquiry.PeripheralQualifier,
Protection = oldInquiry.Protection,
QAS = oldInquiry.QAS,
RelativeAddressing = oldInquiry.RelativeAddressing,
Removable = oldInquiry.Removable,
TaggedCommandQueue = oldInquiry.TaggedCommandQueue,
TerminateTaskSupported = oldInquiry.TerminateTaskSupported,
ThirdPartyCopy = oldInquiry.ThirdPartyCopy,
TranferDisable = oldInquiry.TranferDisable,
SoftReset = oldInquiry.SoftReset,
SPIClocking = oldInquiry.SPIClocking,
StorageArrayController = oldInquiry.StorageArrayController,
SyncTransfer = oldInquiry.SyncTransfer,
WideBus16 = oldInquiry.WideBus16,
WideBus32 = oldInquiry.WideBus32,
Data = oldInquiry.Data
};
if(oldInquiry.ANSIVersionSpecified) newInquiry.ANSIVersion = oldInquiry.ANSIVersion;
if(oldInquiry.DeviceTypeModifierSpecified) newInquiry.DeviceTypeModifier = oldInquiry.DeviceTypeModifier;
if(oldInquiry.ECMAVersionSpecified) newInquiry.ECMAVersion = oldInquiry.ECMAVersion;
if(oldInquiry.ISOVersionSpecified) newInquiry.ISOVersion = oldInquiry.ISOVersion;
if(oldInquiry.ProductIdentificationSpecified)
newInquiry.ProductIdentification = oldInquiry.ProductIdentification;
if(oldInquiry.ProductRevisionLevelSpecified)
newInquiry.ProductRevisionLevel = oldInquiry.ProductRevisionLevel;
if(oldInquiry.ResponseDataFormatSpecified) newInquiry.ResponseDataFormat = oldInquiry.ResponseDataFormat;
if(oldInquiry.VendorIdentificationSpecified)
newInquiry.VendorIdentification = oldInquiry.VendorIdentification;
if(oldInquiry.VersionDescriptors == null) return newInquiry;
newInquiry.VersionDescriptors =
new List<UshortClass>(oldInquiry.VersionDescriptors.Select(t => new UshortClass {Value = t}));
return newInquiry;
}
}
}

View File

@@ -1,306 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Features.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for MMC features.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Decoders.SCSI.MMC;
namespace DiscImageChef.Database.Models.SCSI.MMC
{
public class Features : BaseEntity
{
public byte? AACSVersion { get; set; }
public byte? AGIDs { get; set; }
public byte? BindingNonceBlocks { get; set; }
public ushort? BlocksPerReadableUnit { get; set; }
public bool BufferUnderrunFreeInDVD { get; set; }
public bool BufferUnderrunFreeInSAO { get; set; }
public bool BufferUnderrunFreeInTAO { get; set; }
public bool CanAudioScan { get; set; }
public bool CanEject { get; set; }
public bool CanEraseSector { get; set; }
public bool CanExpandBDRESpareArea { get; set; }
public bool CanFormat { get; set; }
public bool CanFormatBDREWithoutSpare { get; set; }
public bool CanFormatCert { get; set; }
public bool CanFormatFRF { get; set; }
public bool CanFormatQCert { get; set; }
public bool CanFormatRRM { get; set; }
public bool CanGenerateBindingNonce { get; set; }
public bool CanLoad { get; set; }
public bool CanMuteSeparateChannels { get; set; }
public bool CanOverwriteSAOTrack { get; set; }
public bool CanOverwriteTAOTrack { get; set; }
public bool CanPlayCDAudio { get; set; }
public bool CanPseudoOverwriteBDR { get; set; }
public bool CanReadAllDualR { get; set; }
public bool CanReadAllDualRW { get; set; }
public bool CanReadBD { get; set; }
public bool CanReadBDR { get; set; }
public bool CanReadBDRE1 { get; set; }
public bool CanReadBDRE2 { get; set; }
public bool CanReadBDROM { get; set; }
public bool CanReadBluBCA { get; set; }
public bool CanReadCD { get; set; }
public bool CanReadCDMRW { get; set; }
public bool CanReadCPRM_MKB { get; set; }
public bool CanReadDDCD { get; set; }
public bool CanReadDVD { get; set; }
public bool CanReadDVDPlusMRW { get; set; }
public bool CanReadDVDPlusR { get; set; }
public bool CanReadDVDPlusRDL { get; set; }
public bool CanReadDVDPlusRW { get; set; }
public bool CanReadDVDPlusRWDL { get; set; }
public bool CanReadDriveAACSCertificate { get; set; }
public bool CanReadHDDVD { get; set; }
public bool CanReadHDDVDR { get; set; }
public bool CanReadHDDVDRAM { get; set; }
public bool CanReadLeadInCDText { get; set; }
public bool CanReadOldBDR { get; set; }
public bool CanReadOldBDRE { get; set; }
public bool CanReadOldBDROM { get; set; }
public bool CanReadSpareAreaInformation { get; set; }
public bool CanReportDriveSerial { get; set; }
public bool CanReportMediaSerial { get; set; }
public bool CanTestWriteDDCDR { get; set; }
public bool CanTestWriteDVD { get; set; }
public bool CanTestWriteInSAO { get; set; }
public bool CanTestWriteInTAO { get; set; }
public bool CanUpgradeFirmware { get; set; }
public bool CanWriteBD { get; set; }
public bool CanWriteBDR { get; set; }
public bool CanWriteBDRE1 { get; set; }
public bool CanWriteBDRE2 { get; set; }
public bool CanWriteBusEncryptedBlocks { get; set; }
public bool CanWriteCDMRW { get; set; }
public bool CanWriteCDRW { get; set; }
public bool CanWriteCDRWCAV { get; set; }
public bool CanWriteCDSAO { get; set; }
public bool CanWriteCDTAO { get; set; }
public bool CanWriteCSSManagedDVD { get; set; }
public bool CanWriteDDCDR { get; set; }
public bool CanWriteDDCDRW { get; set; }
public bool CanWriteDVDPlusMRW { get; set; }
public bool CanWriteDVDPlusR { get; set; }
public bool CanWriteDVDPlusRDL { get; set; }
public bool CanWriteDVDPlusRW { get; set; }
public bool CanWriteDVDPlusRWDL { get; set; }
public bool CanWriteDVDR { get; set; }
public bool CanWriteDVDRDL { get; set; }
public bool CanWriteDVDRW { get; set; }
public bool CanWriteHDDVDR { get; set; }
public bool CanWriteHDDVDRAM { get; set; }
public bool CanWriteOldBDR { get; set; }
public bool CanWriteOldBDRE { get; set; }
public bool CanWritePackedSubchannelInTAO { get; set; }
public bool CanWriteRWSubchannelInSAO { get; set; }
public bool CanWriteRWSubchannelInTAO { get; set; }
public bool CanWriteRaw { get; set; }
public bool CanWriteRawMultiSession { get; set; }
public bool CanWriteRawSubchannelInTAO { get; set; }
public bool ChangerIsSideChangeCapable { get; set; }
public byte ChangerSlots { get; set; }
public bool? ChangerSupportsDiscPresent { get; set; }
public byte? CPRMVersion { get; set; }
public byte? CSSVersion { get; set; }
public bool DBML { get; set; }
public bool DVDMultiRead { get; set; }
public bool EmbeddedChanger { get; set; }
public bool ErrorRecoveryPage { get; set; }
public DateTime? FirmwareDate { get; set; }
public byte? LoadingMechanismType { get; set; }
public bool Locked { get; set; }
public uint? LogicalBlockSize { get; set; }
public bool MultiRead { get; set; }
public PhysicalInterfaces? PhysicalInterfaceStandard { get; set; }
public uint? PhysicalInterfaceStandardNumber { get; set; }
public bool PreventJumper { get; set; }
public bool SupportsAACS { get; set; }
public bool SupportsBusEncryption { get; set; }
public bool SupportsC2 { get; set; }
public bool SupportsCPRM { get; set; }
public bool SupportsCSS { get; set; }
public bool SupportsDAP { get; set; }
public bool SupportsDeviceBusyEvent { get; set; }
public bool SupportsHybridDiscs { get; set; }
public bool SupportsModePage1Ch { get; set; }
public bool SupportsOSSC { get; set; }
public bool SupportsPWP { get; set; }
public bool SupportsSWPP { get; set; }
public bool SupportsSecurDisc { get; set; }
public bool SupportsSeparateVolume { get; set; }
public bool SupportsVCPS { get; set; }
public bool SupportsWriteInhibitDCB { get; set; }
public bool SupportsWriteProtectPAC { get; set; }
public ushort? VolumeLevels { get; set; }
public static Features MapFeatures(mmcFeaturesType oldFeatures)
{
if(oldFeatures == null) return null;
Features newFeatures = new Features
{
BufferUnderrunFreeInDVD = oldFeatures.BufferUnderrunFreeInDVD,
BufferUnderrunFreeInSAO = oldFeatures.BufferUnderrunFreeInSAO,
BufferUnderrunFreeInTAO = oldFeatures.BufferUnderrunFreeInTAO,
CanAudioScan = oldFeatures.CanAudioScan,
CanEject = oldFeatures.CanEject,
CanEraseSector = oldFeatures.CanEraseSector,
CanExpandBDRESpareArea = oldFeatures.CanExpandBDRESpareArea,
CanFormat = oldFeatures.CanFormat,
CanFormatBDREWithoutSpare = oldFeatures.CanFormatBDREWithoutSpare,
CanFormatCert = oldFeatures.CanFormatCert,
CanFormatFRF = oldFeatures.CanFormatFRF,
CanFormatQCert = oldFeatures.CanFormatQCert,
CanFormatRRM = oldFeatures.CanFormatRRM,
CanGenerateBindingNonce = oldFeatures.CanGenerateBindingNonce,
CanLoad = oldFeatures.CanLoad,
CanMuteSeparateChannels = oldFeatures.CanMuteSeparateChannels,
CanOverwriteSAOTrack = oldFeatures.CanOverwriteSAOTrack,
CanOverwriteTAOTrack = oldFeatures.CanOverwriteTAOTrack,
CanPlayCDAudio = oldFeatures.CanPlayCDAudio,
CanPseudoOverwriteBDR = oldFeatures.CanPseudoOverwriteBDR,
CanReadAllDualR = oldFeatures.CanReadAllDualR,
CanReadAllDualRW = oldFeatures.CanReadAllDualRW,
CanReadBD = oldFeatures.CanReadBD,
CanReadBDR = oldFeatures.CanReadBDR,
CanReadBDRE1 = oldFeatures.CanReadBDRE1,
CanReadBDRE2 = oldFeatures.CanReadBDRE2,
CanReadBDROM = oldFeatures.CanReadBDROM,
CanReadBluBCA = oldFeatures.CanReadBluBCA,
CanReadCD = oldFeatures.CanReadCD,
CanReadCDMRW = oldFeatures.CanReadCDMRW,
CanReadCPRM_MKB = oldFeatures.CanReadCPRM_MKB,
CanReadDDCD = oldFeatures.CanReadDDCD,
CanReadDVD = oldFeatures.CanReadDVD,
CanReadDVDPlusMRW = oldFeatures.CanReadDVDPlusMRW,
CanReadDVDPlusR = oldFeatures.CanReadDVDPlusR,
CanReadDVDPlusRDL = oldFeatures.CanReadDVDPlusRDL,
CanReadDVDPlusRW = oldFeatures.CanReadDVDPlusRW,
CanReadDVDPlusRWDL = oldFeatures.CanReadDVDPlusRWDL,
CanReadDriveAACSCertificate = oldFeatures.CanReadDriveAACSCertificate,
CanReadHDDVD = oldFeatures.CanReadHDDVD,
CanReadHDDVDR = oldFeatures.CanReadHDDVDR,
CanReadHDDVDRAM = oldFeatures.CanReadHDDVDRAM,
CanReadLeadInCDText = oldFeatures.CanReadLeadInCDText,
CanReadOldBDR = oldFeatures.CanReadOldBDR,
CanReadOldBDRE = oldFeatures.CanReadOldBDRE,
CanReadOldBDROM = oldFeatures.CanReadOldBDROM,
CanReadSpareAreaInformation = oldFeatures.CanReadSpareAreaInformation,
CanReportDriveSerial = oldFeatures.CanReportDriveSerial,
CanReportMediaSerial = oldFeatures.CanReportMediaSerial,
CanTestWriteDDCDR = oldFeatures.CanTestWriteDDCDR,
CanTestWriteDVD = oldFeatures.CanTestWriteDVD,
CanTestWriteInSAO = oldFeatures.CanTestWriteInSAO,
CanTestWriteInTAO = oldFeatures.CanTestWriteInTAO,
CanUpgradeFirmware = oldFeatures.CanUpgradeFirmware,
CanWriteBD = oldFeatures.CanWriteBD,
CanWriteBDR = oldFeatures.CanWriteBDR,
CanWriteBDRE1 = oldFeatures.CanWriteBDRE1,
CanWriteBDRE2 = oldFeatures.CanWriteBDRE2,
CanWriteBusEncryptedBlocks = oldFeatures.CanWriteBusEncryptedBlocks,
CanWriteCDMRW = oldFeatures.CanWriteCDMRW,
CanWriteCDRW = oldFeatures.CanWriteCDRW,
CanWriteCDRWCAV = oldFeatures.CanWriteCDRWCAV,
CanWriteCDSAO = oldFeatures.CanWriteCDSAO,
CanWriteCDTAO = oldFeatures.CanWriteCDTAO,
CanWriteCSSManagedDVD = oldFeatures.CanWriteCSSManagedDVD,
CanWriteDDCDR = oldFeatures.CanWriteDDCDR,
CanWriteDDCDRW = oldFeatures.CanWriteDDCDRW,
CanWriteDVDPlusMRW = oldFeatures.CanWriteDVDPlusMRW,
CanWriteDVDPlusR = oldFeatures.CanWriteDVDPlusR,
CanWriteDVDPlusRDL = oldFeatures.CanWriteDVDPlusRDL,
CanWriteDVDPlusRW = oldFeatures.CanWriteDVDPlusRW,
CanWriteDVDPlusRWDL = oldFeatures.CanWriteDVDPlusRWDL,
CanWriteDVDR = oldFeatures.CanWriteDVDR,
CanWriteDVDRDL = oldFeatures.CanWriteDVDRDL,
CanWriteDVDRW = oldFeatures.CanWriteDVDRW,
CanWriteHDDVDR = oldFeatures.CanWriteHDDVDR,
CanWriteHDDVDRAM = oldFeatures.CanWriteHDDVDRAM,
CanWriteOldBDR = oldFeatures.CanWriteOldBDR,
CanWriteOldBDRE = oldFeatures.CanWriteOldBDRE,
CanWritePackedSubchannelInTAO = oldFeatures.CanWritePackedSubchannelInTAO,
CanWriteRWSubchannelInSAO = oldFeatures.CanWriteRWSubchannelInSAO,
CanWriteRWSubchannelInTAO = oldFeatures.CanWriteRWSubchannelInTAO,
CanWriteRaw = oldFeatures.CanWriteRaw,
CanWriteRawMultiSession = oldFeatures.CanWriteRawMultiSession,
CanWriteRawSubchannelInTAO = oldFeatures.CanWriteRawSubchannelInTAO,
ChangerIsSideChangeCapable = oldFeatures.ChangerIsSideChangeCapable,
ChangerSlots = oldFeatures.ChangerSlots,
ChangerSupportsDiscPresent = oldFeatures.ChangerSupportsDiscPresent,
DBML = oldFeatures.DBML,
DVDMultiRead = oldFeatures.DVDMultiRead,
EmbeddedChanger = oldFeatures.EmbeddedChanger,
ErrorRecoveryPage = oldFeatures.ErrorRecoveryPage,
Locked = oldFeatures.Locked,
MultiRead = oldFeatures.MultiRead,
PreventJumper = oldFeatures.PreventJumper,
SupportsAACS = oldFeatures.SupportsAACS,
SupportsBusEncryption = oldFeatures.SupportsBusEncryption,
SupportsC2 = oldFeatures.SupportsC2,
SupportsCPRM = oldFeatures.SupportsCPRM,
SupportsCSS = oldFeatures.SupportsCSS,
SupportsDAP = oldFeatures.SupportsDAP,
SupportsDeviceBusyEvent = oldFeatures.SupportsDeviceBusyEvent,
SupportsHybridDiscs = oldFeatures.SupportsHybridDiscs,
SupportsModePage1Ch = oldFeatures.SupportsModePage1Ch,
SupportsOSSC = oldFeatures.SupportsOSSC,
SupportsPWP = oldFeatures.SupportsPWP,
SupportsSWPP = oldFeatures.SupportsSWPP,
SupportsSecurDisc = oldFeatures.SupportsSecurDisc,
SupportsSeparateVolume = oldFeatures.SupportsSeparateVolume,
SupportsVCPS = oldFeatures.SupportsVCPS,
SupportsWriteInhibitDCB = oldFeatures.SupportsWriteInhibitDCB,
SupportsWriteProtectPAC = oldFeatures.SupportsWriteProtectPAC
};
if(oldFeatures.AACSVersionSpecified) newFeatures.AACSVersion = oldFeatures.AACSVersion;
if(oldFeatures.AGIDsSpecified) newFeatures.AGIDs = oldFeatures.AGIDs;
if(oldFeatures.BindingNonceBlocksSpecified) newFeatures.BindingNonceBlocks = oldFeatures.BindingNonceBlocks;
if(oldFeatures.BlocksPerReadableUnitSpecified)
newFeatures.BlocksPerReadableUnit = oldFeatures.BlocksPerReadableUnit;
if(oldFeatures.CPRMVersionSpecified) newFeatures.CPRMVersion = oldFeatures.CPRMVersion;
if(oldFeatures.CSSVersionSpecified) newFeatures.CSSVersion = oldFeatures.CSSVersion;
if(oldFeatures.FirmwareDateSpecified) newFeatures.FirmwareDate = oldFeatures.FirmwareDate;
if(oldFeatures.LoadingMechanismTypeSpecified)
newFeatures.LoadingMechanismType = oldFeatures.LoadingMechanismType;
if(oldFeatures.LogicalBlockSizeSpecified) newFeatures.LogicalBlockSize = oldFeatures.LogicalBlockSize;
if(oldFeatures.PhysicalInterfaceStandardSpecified)
newFeatures.PhysicalInterfaceStandard = oldFeatures.PhysicalInterfaceStandard;
if(oldFeatures.PhysicalInterfaceStandardNumberSpecified)
newFeatures.PhysicalInterfaceStandardNumber = oldFeatures.PhysicalInterfaceStandardNumber;
if(oldFeatures.VolumeLevelsSpecified) newFeatures.VolumeLevels = oldFeatures.VolumeLevels;
return newFeatures;
}
}
}

View File

@@ -1,61 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : MMC.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI MultiMedia Command devices.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI.MMC
{
public class MMC : BaseEntity
{
public Mode2A ModeSense2A { get; set; }
public Features Features { get; set; }
public List<TestedMedia> TestedMedia { get; set; }
public static MMC MapMmc(mmcType oldMmc)
{
if(oldMmc == null) return null;
MMC newMmc = new MMC
{
Features = Features.MapFeatures(oldMmc.Features),
ModeSense2A = Mode2A.MapMode2A(oldMmc.ModeSense2A)
};
if(oldMmc.TestedMedia == null) return newMmc;
newMmc.TestedMedia = new List<TestedMedia>(oldMmc.TestedMedia.Select(Models.TestedMedia.MapTestedMedia));
return newMmc;
}
}
}

View File

@@ -1,166 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Mode2A.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI MODE 2Ah.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI.MMC
{
public class Mode2A : BaseEntity
{
public bool AccurateCDDA { get; set; }
public bool BCK { get; set; }
public ushort BufferSize { get; set; }
public bool? BufferUnderRunProtection { get; set; }
public bool CanEject { get; set; }
public bool CanLockMedia { get; set; }
public bool CDDACommand { get; set; }
public bool CompositeAudioVideo { get; set; }
public bool CSSandCPPMSupported { get; set; }
public ushort? CurrentSpeed { get; set; }
public ushort? CurrentWriteSpeed { get; set; }
public ushort? CurrentWriteSpeedSelected { get; set; }
public bool DeterministicSlotChanger { get; set; }
public bool DigitalPort1 { get; set; }
public bool DigitalPort2 { get; set; }
public bool LeadInPW { get; set; }
public byte LoadingMechanismType { get; set; }
public bool LockStatus { get; set; }
public bool LSBF { get; set; }
public ushort? MaximumSpeed { get; set; }
public ushort? MaximumWriteSpeed { get; set; }
public bool PlaysAudio { get; set; }
public bool PreventJumperStatus { get; set; }
public bool RCK { get; set; }
public bool ReadsBarcode { get; set; }
public bool ReadsBothSides { get; set; }
public bool ReadsCDR { get; set; }
public bool ReadsCDRW { get; set; }
public bool ReadsDeinterlavedSubchannel { get; set; }
public bool ReadsDVDR { get; set; }
public bool ReadsDVDRAM { get; set; }
public bool ReadsDVDROM { get; set; }
public bool ReadsISRC { get; set; }
public bool ReadsMode2Form2 { get; set; }
public bool ReadsMode2Form1 { get; set; }
public bool ReadsPacketCDR { get; set; }
public bool ReadsSubchannel { get; set; }
public bool ReadsUPC { get; set; }
public bool ReturnsC2Pointers { get; set; }
public byte? RotationControlSelected { get; set; }
public bool SeparateChannelMute { get; set; }
public bool SeparateChannelVolume { get; set; }
public bool SSS { get; set; }
public bool SupportsMultiSession { get; set; }
public ushort? SupportedVolumeLevels { get; set; }
public bool TestWrite { get; set; }
public bool WritesCDR { get; set; }
public bool WritesCDRW { get; set; }
public bool WritesDVDR { get; set; }
public bool WritesDVDRAM { get; set; }
public List<WriteDescriptor> WriteSpeedPerformanceDescriptors { get; set; }
public static Mode2A MapMode2A(mmcModeType oldMode)
{
if(oldMode == null) return null;
Mode2A newMode = new Mode2A
{
AccurateCDDA = oldMode.AccurateCDDA,
BCK = oldMode.BCK,
BufferUnderRunProtection = oldMode.BufferUnderRunProtection,
CanEject = oldMode.CanEject,
CanLockMedia = oldMode.CanLockMedia,
CDDACommand = oldMode.CDDACommand,
CompositeAudioVideo = oldMode.CompositeAudioVideo,
CSSandCPPMSupported = oldMode.CSSandCPPMSupported,
DeterministicSlotChanger = oldMode.DeterministicSlotChanger,
DigitalPort1 = oldMode.DigitalPort1,
DigitalPort2 = oldMode.DigitalPort2,
LeadInPW = oldMode.LeadInPW,
LoadingMechanismType = oldMode.LoadingMechanismType,
LockStatus = oldMode.LockStatus,
LSBF = oldMode.LSBF,
PlaysAudio = oldMode.PlaysAudio,
PreventJumperStatus = oldMode.PreventJumperStatus,
RCK = oldMode.RCK,
ReadsBarcode = oldMode.ReadsBarcode,
ReadsBothSides = oldMode.ReadsBothSides,
ReadsCDR = oldMode.ReadsCDR,
ReadsCDRW = oldMode.ReadsCDRW,
ReadsDeinterlavedSubchannel = oldMode.ReadsDeinterlavedSubchannel,
ReadsDVDR = oldMode.ReadsDVDR,
ReadsDVDRAM = oldMode.ReadsDVDRAM,
ReadsDVDROM = oldMode.ReadsDVDROM,
ReadsISRC = oldMode.ReadsISRC,
ReadsMode2Form2 = oldMode.ReadsMode2Form2,
ReadsMode2Form1 = oldMode.ReadsMode2Form1,
ReadsPacketCDR = oldMode.ReadsPacketCDR,
ReadsSubchannel = oldMode.ReadsSubchannel,
ReadsUPC = oldMode.ReadsUPC,
ReturnsC2Pointers = oldMode.ReturnsC2Pointers,
SeparateChannelMute = oldMode.SeparateChannelMute,
SeparateChannelVolume = oldMode.SeparateChannelVolume,
SSS = oldMode.SSS,
SupportsMultiSession = oldMode.SupportsMultiSession,
TestWrite = oldMode.TestWrite,
WritesCDR = oldMode.WritesCDR,
WritesCDRW = oldMode.WritesCDRW,
WritesDVDR = oldMode.WritesDVDR,
WritesDVDRAM = oldMode.WritesDVDRAM
};
if(oldMode.BufferSizeSpecified) newMode.BufferSize = oldMode.BufferSize;
if(oldMode.CurrentSpeedSpecified) newMode.CurrentSpeed = oldMode.CurrentSpeed;
if(oldMode.CurrentWriteSpeedSpecified) newMode.CurrentWriteSpeed = oldMode.CurrentWriteSpeed;
if(oldMode.CurrentWriteSpeedSelectedSpecified)
newMode.CurrentWriteSpeedSelected = oldMode.CurrentWriteSpeedSelected;
if(oldMode.MaximumSpeedSpecified) newMode.MaximumSpeed = oldMode.MaximumSpeed;
if(oldMode.MaximumWriteSpeedSpecified) newMode.MaximumWriteSpeed = oldMode.MaximumWriteSpeed;
if(oldMode.RotationControlSelectedSpecified)
newMode.RotationControlSelected = oldMode.RotationControlSelected;
if(oldMode.SupportedVolumeLevelsSpecified) newMode.SupportedVolumeLevels = oldMode.SupportedVolumeLevels;
if(oldMode.WriteSpeedPerformanceDescriptors == null) return newMode;
newMode.WriteSpeedPerformanceDescriptors =
new List<WriteDescriptor>(oldMode.WriteSpeedPerformanceDescriptors.Select(t => new WriteDescriptor
{
RotationControl = t.RotationControl,
WriteSpeed = t.WriteSpeed
}));
return newMode;
}
}
}

View File

@@ -1,51 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : WriteDescriptor.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI MODE 2Ah write descriptors.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.Decoders.SCSI;
namespace DiscImageChef.Database.Models.SCSI.MMC
{
public class WriteDescriptor : BaseEntity
{
public byte RotationControl { get; set; }
public ushort WriteSpeed { get; set; }
public static WriteDescriptor MapWriteDescriptor(Modes.ModePage_2A_WriteDescriptor oldDescriptor)
{
return new WriteDescriptor
{
RotationControl = oldDescriptor.RotationControl,
WriteSpeed = oldDescriptor.WriteSpeed
};
}
}
}

View File

@@ -1,78 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Mode.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI MODE.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI
{
public class Mode : BaseEntity
{
public byte? MediumType { get; set; }
public bool WriteProtected { get; set; }
public List<BlockDescriptor> BlockDescriptors { get; set; }
public byte? Speed { get; set; }
public byte? BufferedMode { get; set; }
public bool BlankCheckEnabled { get; set; }
public bool DPOandFUA { get; set; }
public List<ModePage> ModePages { get; set; }
public static Mode MapMode(modeType oldMode)
{
if(oldMode == null) return null;
Mode newMode = new Mode
{
WriteProtected = oldMode.WriteProtected,
BlankCheckEnabled = oldMode.BlankCheckEnabled,
DPOandFUA = oldMode.DPOandFUA
};
if(oldMode.BufferedModeSpecified) newMode.BufferedMode = oldMode.BufferedMode;
if(oldMode.MediumTypeSpecified) newMode.MediumType = oldMode.MediumType;
if(oldMode.SpeedSpecified) newMode.Speed = oldMode.Speed;
if(oldMode.BlockDescriptors != null)
newMode.BlockDescriptors =
new List<BlockDescriptor>(oldMode.BlockDescriptors.Select(BlockDescriptor.MapBlockDescriptor));
if(oldMode.ModePages == null) return newMode;
{
newMode.ModePages = new List<ModePage>(oldMode.ModePages.Select(ModePage.MapModePage));
}
return newMode;
}
}
}

View File

@@ -1,55 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : ModePage.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI MODE page.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI
{
public class ModePage : BaseEntity
{
public byte page { get; set; }
public byte subpage { get; set; }
public byte[] value { get; set; }
public static ModePage MapModePage(modePageType oldModePage)
{
return oldModePage == null
? null
: new ModePage
{
page = oldModePage.page,
subpage = oldModePage.subpage,
value = oldModePage.value
};
}
}
}

View File

@@ -1,47 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Page.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI EVPD page.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI
{
public class Page : BaseEntity
{
public byte page { get; set; }
public byte[] value { get; set; }
public static Page MapPage(pageType oldPage)
{
return oldPage == null ? null : new Page {page = oldPage.page, value = oldPage.value};
}
}
}

View File

@@ -1,84 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : SCSI.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI device information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI
{
public class SCSI : BaseEntity
{
public Inquiry Inquiry { get; set; }
public List<Page> EVPDPages { get; set; }
public bool SupportsModeSense6 { get; set; }
public bool SupportsModeSense10 { get; set; }
public bool SupportsModeSubpages { get; set; }
public Mode ModeSense { get; set; }
public MMC.MMC MultiMediaDevice { get; set; }
public TestedMedia ReadCapabilities { get; set; }
public List<TestedMedia> RemovableMedias { get; set; }
public SSC.SSC SequentialDevice { get; set; }
public byte[] ModeSense6Data { get; set; }
public byte[] ModeSense10Data { get; set; }
public static SCSI MapScsi(scsiType oldScsi)
{
if(oldScsi == null) return null;
SCSI newScsi = new SCSI
{
Inquiry = Inquiry.MapInquiry(oldScsi.Inquiry),
SupportsModeSense6 = oldScsi.SupportsModeSense6,
SupportsModeSense10 = oldScsi.SupportsModeSense10,
SupportsModeSubpages = oldScsi.SupportsModeSubpages,
ModeSense = Mode.MapMode(oldScsi.ModeSense),
MultiMediaDevice = MMC.MMC.MapMmc(oldScsi.MultiMediaDevice),
ReadCapabilities = TestedMedia.MapTestedMedia(oldScsi.ReadCapabilities),
SequentialDevice = SSC.SSC.MapSsc(oldScsi.SequentialDevice),
ModeSense6Data = oldScsi.ModeSense6Data,
ModeSense10Data = oldScsi.ModeSense10Data
};
if(oldScsi.EVPDPages != null) newScsi.EVPDPages = new List<Page>(oldScsi.EVPDPages.Select(Page.MapPage));
if(oldScsi.RemovableMedias == null) return newScsi;
{
newScsi.RemovableMedias =
new List<TestedMedia>(oldScsi.RemovableMedias.Select(TestedMedia.MapTestedMedia));
}
return newScsi;
}
}
}

View File

@@ -1,74 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : SSC.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI Streaming Command devices.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models.SCSI.SSC
{
public class SSC : BaseEntity
{
public byte? BlockSizeGranularity { get; set; }
public uint? MaxBlockLength { get; set; }
public uint? MinBlockLength { get; set; }
public List<SupportedDensity> SupportedDensities { get; set; }
public List<SupportedMedia> SupportedMediaTypes { get; set; }
public List<SequentialMedia> TestedMedia { get; set; }
public static SSC MapSsc(sscType oldSsc)
{
if(oldSsc == null) return null;
SSC newSsc = new SSC();
if(oldSsc.BlockSizeGranularitySpecified) newSsc.BlockSizeGranularity = oldSsc.BlockSizeGranularity;
if(oldSsc.MaxBlockLengthSpecified) newSsc.MaxBlockLength = oldSsc.MaxBlockLength;
if(oldSsc.MinBlockLengthSpecified) newSsc.MinBlockLength = oldSsc.MinBlockLength;
if(oldSsc.SupportedDensities != null)
newSsc.SupportedDensities =
new List<SupportedDensity>(oldSsc.SupportedDensities.Select(SupportedDensity.MapSupportedDensity));
if(oldSsc.SupportedMediaTypes != null)
newSsc.SupportedMediaTypes =
new List<SupportedMedia>(oldSsc.SupportedMediaTypes.Select(SupportedMedia.MapSupportedMedia));
if(oldSsc.TestedMedia == null) return newSsc;
newSsc.TestedMedia =
new List<SequentialMedia>(oldSsc.TestedMedia.Select(SequentialMedia.MapSequentialMedia));
return newSsc;
}
}
}

View File

@@ -1,82 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : SequentialMedia.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SSC tested media.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
namespace DiscImageChef.Database.Models.SCSI.SSC
{
public class SequentialMedia : BaseEntity
{
public bool? CanReadMediaSerial { get; set; }
public byte? Density { get; set; }
public string Manufacturer { get; set; }
public bool MediaIsRecognized { get; set; }
public byte? MediumType { get; set; }
public string MediumTypeName { get; set; }
public string Model { get; set; }
public List<SupportedDensity> SupportedDensities { get; set; }
public List<SupportedMedia> SupportedMediaTypes { get; set; }
public byte[] ModeSense6Data { get; set; }
public byte[] ModeSense10Data { get; set; }
public static SequentialMedia MapSequentialMedia(CommonTypes.Metadata.SequentialMedia oldSequentialMedia)
{
SequentialMedia newSequentialMedia = new SequentialMedia
{
Manufacturer = oldSequentialMedia.Manufacturer,
MediaIsRecognized = oldSequentialMedia.MediaIsRecognized,
MediumTypeName = oldSequentialMedia.MediumTypeName,
Model = oldSequentialMedia.Model,
ModeSense6Data = oldSequentialMedia.ModeSense6Data,
ModeSense10Data = oldSequentialMedia.ModeSense10Data
};
if(oldSequentialMedia.CanReadMediaSerialSpecified)
newSequentialMedia.CanReadMediaSerial = oldSequentialMedia.CanReadMediaSerial;
if(oldSequentialMedia.DensitySpecified) newSequentialMedia.Density = oldSequentialMedia.Density;
if(oldSequentialMedia.MediumTypeSpecified) newSequentialMedia.MediumType = oldSequentialMedia.MediumType;
if(newSequentialMedia.SupportedDensities != null)
newSequentialMedia.SupportedDensities =
new List<SupportedDensity>(oldSequentialMedia.SupportedDensities.Select(SupportedDensity
.MapSupportedDensity));
if(newSequentialMedia.SupportedMediaTypes == null) return newSequentialMedia;
newSequentialMedia.SupportedMediaTypes =
new List<SupportedMedia>(oldSequentialMedia
.SupportedMediaTypes.Select(SupportedMedia.MapSupportedMedia));
return newSequentialMedia;
}
}
}

View File

@@ -1,69 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : SupportedDensity.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SSC supported density.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
namespace DiscImageChef.Database.Models.SCSI.SSC
{
public class SupportedDensity : BaseEntity
{
public byte PrimaryCode { get; set; }
public byte SecondaryCode { get; set; }
public bool Writable { get; set; }
public bool Duplicate { get; set; }
public bool DefaultDensity { get; set; }
public uint BitsPerMm { get; set; }
public ushort Width { get; set; }
public ushort Tracks { get; set; }
public uint Capacity { get; set; }
public string Organization { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public static SupportedDensity MapSupportedDensity(CommonTypes.Metadata.SupportedDensity oldDensity)
{
return new SupportedDensity
{
PrimaryCode = oldDensity.PrimaryCode,
SecondaryCode = oldDensity.SecondaryCode,
Writable = oldDensity.Writable,
Duplicate = oldDensity.Duplicate,
DefaultDensity = oldDensity.DefaultDensity,
BitsPerMm = oldDensity.BitsPerMm,
Width = oldDensity.Width,
Tracks = oldDensity.Tracks,
Capacity = oldDensity.Capacity,
Organization = oldDensity.Organization,
Name = oldDensity.Name,
Description = oldDensity.Description
};
}
}
}

View File

@@ -1,68 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : SupportedMedia.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SCSI supported media information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
namespace DiscImageChef.Database.Models.SCSI
{
public class SupportedMedia : BaseEntity
{
public byte MediumType { get; set; }
public List<IntClass> DensityCodes { get; set; }
public ushort Width { get; set; }
public ushort Length { get; set; }
public string Organization { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public static SupportedMedia MapSupportedMedia(CommonTypes.Metadata.SupportedMedia oldSupportedMedia)
{
SupportedMedia newSupportedMedia = new SupportedMedia
{
MediumType = oldSupportedMedia.MediumType,
Width = oldSupportedMedia.Width,
Length = oldSupportedMedia.Length,
Organization = oldSupportedMedia.Organization,
Name = oldSupportedMedia.Name,
Description = oldSupportedMedia.Description
};
if(oldSupportedMedia.DensityCodes == null) return newSupportedMedia;
newSupportedMedia.DensityCodes =
new List<IntClass>(oldSupportedMedia.DensityCodes.Select(t => new IntClass {Value = t}));
return newSupportedMedia;
}
}
}

View File

@@ -1,59 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : SecureDigital.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for SecureDigital and MMC device information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models
{
public class SecureDigital : BaseEntity
{
public byte[] CID { get; set; }
public byte[] CSD { get; set; }
public byte[] OCR { get; set; }
public byte[] SCR { get; set; }
public byte[] ExtendedCSD { get; set; }
public static SecureDigital MapSd(mmcsdType oldSd)
{
if(oldSd == null) return null;
return new SecureDigital
{
CID = oldSd.CID,
CSD = oldSd.CSD,
ExtendedCSD = oldSd.ExtendedCSD,
OCR = oldSd.OCR,
SCR = oldSd.SCR
};
}
}
}

View File

@@ -1,243 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : TestedMedia.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for tested media reports.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models
{
public class TestedMedia : BaseEntity
{
public ulong? Blocks { get; set; }
public uint? BlockSize { get; set; }
public bool? CanReadAACS { get; set; }
public bool? CanReadADIP { get; set; }
public bool? CanReadATIP { get; set; }
public bool? CanReadBCA { get; set; }
public bool? CanReadC2Pointers { get; set; }
public bool? CanReadCMI { get; set; }
public bool? CanReadCorrectedSubchannel { get; set; }
public bool? CanReadCorrectedSubchannelWithC2 { get; set; }
public bool? CanReadDCB { get; set; }
public bool? CanReadDDS { get; set; }
public bool? CanReadDMI { get; set; }
public bool? CanReadDiscInformation { get; set; }
public bool? CanReadFullTOC { get; set; }
public bool? CanReadHDCMI { get; set; }
public bool? CanReadLayerCapacity { get; set; }
public bool? CanReadLeadIn { get; set; }
public bool? CanReadLeadInPostgap { get; set; }
public bool? CanReadLeadOut { get; set; }
public bool? CanReadMediaID { get; set; }
public bool? CanReadMediaSerial { get; set; }
public bool? CanReadPAC { get; set; }
public bool? CanReadPFI { get; set; }
public bool? CanReadPMA { get; set; }
public bool? CanReadPQSubchannel { get; set; }
public bool? CanReadPQSubchannelWithC2 { get; set; }
public bool? CanReadPRI { get; set; }
public bool? CanReadRWSubchannel { get; set; }
public bool? CanReadRWSubchannelWithC2 { get; set; }
public bool? CanReadRecordablePFI { get; set; }
public bool? CanReadSpareAreaInformation { get; set; }
public bool? CanReadTOC { get; set; }
public byte? Density { get; set; }
public uint? LongBlockSize { get; set; }
public string Manufacturer { get; set; }
public bool MediaIsRecognized { get; set; }
public byte? MediumType { get; set; }
public string MediumTypeName { get; set; }
public string Model { get; set; }
public bool? SupportsHLDTSTReadRawDVD { get; set; }
public bool? SupportsNECReadCDDA { get; set; }
public bool? SupportsPioneerReadCDDA { get; set; }
public bool? SupportsPioneerReadCDDAMSF { get; set; }
public bool? SupportsPlextorReadCDDA { get; set; }
public bool? SupportsPlextorReadRawDVD { get; set; }
public bool? SupportsRead10 { get; set; }
public bool? SupportsRead12 { get; set; }
public bool? SupportsRead16 { get; set; }
public bool? SupportsRead { get; set; }
public bool? SupportsReadCapacity16 { get; set; }
public bool? SupportsReadCapacity { get; set; }
public bool? SupportsReadCd { get; set; }
public bool? SupportsReadCdMsf { get; set; }
public bool? SupportsReadCdRaw { get; set; }
public bool? SupportsReadCdMsfRaw { get; set; }
public bool? SupportsReadLong16 { get; set; }
public bool? SupportsReadLong { get; set; }
public byte[] ModeSense6Data { get; set; }
public byte[] ModeSense10Data { get; set; }
public CHS CHS { get; set; }
public CHS CurrentCHS { get; set; }
public uint? LBASectors { get; set; }
public ulong? LBA48Sectors { get; set; }
public ushort? LogicalAlignment { get; set; }
public ushort? NominalRotationRate { get; set; }
public uint? PhysicalBlockSize { get; set; }
public bool? SolidStateDevice { get; set; }
public ushort? UnformattedBPT { get; set; }
public ushort? UnformattedBPS { get; set; }
public bool? SupportsReadDmaLba { get; set; }
public bool? SupportsReadDmaRetryLba { get; set; }
public bool? SupportsReadLba { get; set; }
public bool? SupportsReadRetryLba { get; set; }
public bool? SupportsReadLongLba { get; set; }
public bool? SupportsReadLongRetryLba { get; set; }
public bool? SupportsSeekLba { get; set; }
public bool? SupportsReadDmaLba48 { get; set; }
public bool? SupportsReadLba48 { get; set; }
public bool? SupportsReadDma { get; set; }
public bool? SupportsReadDmaRetry { get; set; }
public bool? SupportsReadRetry { get; set; }
public bool? SupportsReadLongRetry { get; set; }
public bool? SupportsSeek { get; set; }
public static TestedMedia MapTestedMedia(testedMediaType oldMedia)
{
if(oldMedia == null) return null;
TestedMedia newMedia = new TestedMedia();
if(oldMedia.BlocksSpecified) newMedia.Blocks = oldMedia.Blocks;
if(oldMedia.BlockSizeSpecified) newMedia.BlockSize = oldMedia.BlockSize;
if(oldMedia.CanReadAACSSpecified) newMedia.CanReadAACS = oldMedia.CanReadAACS;
if(oldMedia.CanReadADIPSpecified) newMedia.CanReadADIP = oldMedia.CanReadADIP;
if(oldMedia.CanReadATIPSpecified) newMedia.CanReadATIP = oldMedia.CanReadATIP;
if(oldMedia.CanReadBCASpecified) newMedia.CanReadBCA = oldMedia.CanReadBCA;
if(oldMedia.CanReadC2PointersSpecified) newMedia.CanReadC2Pointers = oldMedia.CanReadC2Pointers;
if(oldMedia.CanReadCMISpecified) newMedia.CanReadCMI = oldMedia.CanReadCMI;
if(oldMedia.CanReadCorrectedSubchannelSpecified)
newMedia.CanReadCorrectedSubchannel = oldMedia.CanReadCorrectedSubchannel;
if(oldMedia.CanReadCorrectedSubchannelWithC2Specified)
newMedia.CanReadCorrectedSubchannelWithC2 = oldMedia.CanReadCorrectedSubchannelWithC2;
if(oldMedia.CanReadDCBSpecified) newMedia.CanReadDCB = oldMedia.CanReadDCB;
if(oldMedia.CanReadDDSSpecified) newMedia.CanReadDDS = oldMedia.CanReadDDS;
if(oldMedia.CanReadDMISpecified) newMedia.CanReadDMI = oldMedia.CanReadDMI;
if(oldMedia.CanReadDiscInformationSpecified)
newMedia.CanReadDiscInformation = oldMedia.CanReadDiscInformation;
if(oldMedia.CanReadFullTOCSpecified) newMedia.CanReadFullTOC = oldMedia.CanReadFullTOC;
if(oldMedia.CanReadHDCMISpecified) newMedia.CanReadHDCMI = oldMedia.CanReadHDCMI;
if(oldMedia.CanReadLayerCapacitySpecified) newMedia.CanReadLayerCapacity = oldMedia.CanReadLayerCapacity;
if(oldMedia.CanReadLeadInSpecified) newMedia.CanReadLeadInPostgap = oldMedia.CanReadLeadIn;
if(oldMedia.CanReadLeadOutSpecified) newMedia.CanReadLeadOut = oldMedia.CanReadLeadOut;
if(oldMedia.CanReadMediaIDSpecified) newMedia.CanReadMediaID = oldMedia.CanReadMediaID;
if(oldMedia.CanReadMediaSerialSpecified) newMedia.CanReadMediaSerial = oldMedia.CanReadMediaSerial;
if(oldMedia.CanReadPACSpecified) newMedia.CanReadPAC = oldMedia.CanReadPAC;
if(oldMedia.CanReadPFISpecified) newMedia.CanReadPFI = oldMedia.CanReadPFI;
if(oldMedia.CanReadPMASpecified) newMedia.CanReadPMA = oldMedia.CanReadPMA;
if(oldMedia.CanReadPQSubchannelSpecified) newMedia.CanReadPQSubchannel = oldMedia.CanReadPQSubchannel;
if(oldMedia.CanReadPQSubchannelWithC2Specified)
newMedia.CanReadPQSubchannelWithC2 = oldMedia.CanReadPQSubchannelWithC2;
if(oldMedia.CanReadPRISpecified) newMedia.CanReadPRI = oldMedia.CanReadPRI;
if(oldMedia.CanReadRWSubchannelSpecified) newMedia.CanReadRWSubchannel = oldMedia.CanReadRWSubchannel;
if(oldMedia.CanReadRWSubchannelWithC2Specified)
newMedia.CanReadRWSubchannelWithC2 = oldMedia.CanReadRWSubchannelWithC2;
if(oldMedia.CanReadRecordablePFISpecified) newMedia.CanReadRecordablePFI = oldMedia.CanReadRecordablePFI;
if(oldMedia.CanReadSpareAreaInformationSpecified)
newMedia.CanReadSpareAreaInformation = oldMedia.CanReadSpareAreaInformation;
if(oldMedia.CanReadTOCSpecified) newMedia.CanReadTOC = oldMedia.CanReadTOC;
if(oldMedia.DensitySpecified) newMedia.Density = oldMedia.Density;
if(oldMedia.LongBlockSizeSpecified) newMedia.LongBlockSize = oldMedia.LongBlockSize;
if(oldMedia.ManufacturerSpecified) newMedia.Manufacturer = oldMedia.Manufacturer;
newMedia.MediaIsRecognized = oldMedia.MediaIsRecognized;
if(oldMedia.MediumTypeSpecified) newMedia.MediumType = oldMedia.MediumType;
newMedia.MediumTypeName = oldMedia.MediumTypeName;
if(oldMedia.ModelSpecified) newMedia.Model = oldMedia.Model;
if(oldMedia.SupportsHLDTSTReadRawDVDSpecified)
newMedia.SupportsHLDTSTReadRawDVD = oldMedia.SupportsHLDTSTReadRawDVD;
if(oldMedia.SupportsNECReadCDDASpecified) newMedia.SupportsNECReadCDDA = oldMedia.SupportsNECReadCDDA;
if(oldMedia.SupportsPioneerReadCDDASpecified)
newMedia.SupportsPioneerReadCDDA = oldMedia.SupportsPioneerReadCDDA;
if(oldMedia.SupportsPioneerReadCDDAMSFSpecified)
newMedia.SupportsPioneerReadCDDAMSF = oldMedia.SupportsPioneerReadCDDAMSF;
if(oldMedia.SupportsPlextorReadCDDASpecified)
newMedia.SupportsPlextorReadCDDA = oldMedia.SupportsPlextorReadCDDA;
if(oldMedia.SupportsPlextorReadRawDVDSpecified)
newMedia.SupportsPlextorReadRawDVD = oldMedia.SupportsPlextorReadRawDVD;
if(oldMedia.SupportsRead10Specified) newMedia.SupportsRead10 = oldMedia.SupportsRead10;
if(oldMedia.SupportsRead12Specified) newMedia.SupportsRead12 = oldMedia.SupportsRead12;
if(oldMedia.SupportsRead16Specified) newMedia.SupportsRead16 = oldMedia.SupportsRead16;
if(oldMedia.SupportsReadSpecified) newMedia.SupportsRead = oldMedia.SupportsRead;
if(oldMedia.SupportsReadCapacity16Specified)
newMedia.SupportsReadCapacity16 = oldMedia.SupportsReadCapacity16;
if(oldMedia.SupportsReadCapacitySpecified) newMedia.SupportsReadCapacity = oldMedia.SupportsReadCapacity;
if(oldMedia.SupportsReadCdSpecified) newMedia.SupportsReadCd = oldMedia.SupportsReadCd;
if(oldMedia.SupportsReadCdMsfSpecified) newMedia.SupportsReadCdMsf = oldMedia.SupportsReadCdMsf;
if(oldMedia.SupportsReadCdRawSpecified) newMedia.SupportsReadCdRaw = oldMedia.SupportsReadCdRaw;
if(oldMedia.SupportsReadCdMsfRawSpecified) newMedia.SupportsReadCdMsfRaw = oldMedia.SupportsReadCdMsfRaw;
if(oldMedia.SupportsReadLong16Specified) newMedia.SupportsReadLong16 = oldMedia.SupportsReadLong16;
if(oldMedia.SupportsReadLongSpecified) newMedia.SupportsReadLong = oldMedia.SupportsReadLong;
newMedia.ModeSense6Data = oldMedia.ModeSense6Data;
newMedia.ModeSense10Data = oldMedia.ModeSense10Data;
if(oldMedia.LBASectorsSpecified) newMedia.LBASectors = oldMedia.LBASectors;
if(oldMedia.LBA48SectorsSpecified) newMedia.LBA48Sectors = oldMedia.LBA48Sectors;
if(oldMedia.LogicalAlignmentSpecified) newMedia.LogicalAlignment = oldMedia.LogicalAlignment;
if(oldMedia.NominalRotationRateSpecified) newMedia.NominalRotationRate = oldMedia.NominalRotationRate;
if(oldMedia.PhysicalBlockSizeSpecified) newMedia.PhysicalBlockSize = oldMedia.PhysicalBlockSize;
if(oldMedia.SolidStateDeviceSpecified) newMedia.SolidStateDevice = oldMedia.SolidStateDevice;
if(oldMedia.UnformattedBPTSpecified) newMedia.UnformattedBPT = oldMedia.UnformattedBPT;
if(oldMedia.UnformattedBPSSpecified) newMedia.UnformattedBPS = oldMedia.UnformattedBPS;
if(oldMedia.SupportsReadDmaLbaSpecified) newMedia.SupportsReadDmaLba = oldMedia.SupportsReadDmaLba;
if(oldMedia.SupportsReadDmaRetryLbaSpecified)
newMedia.SupportsReadDmaRetryLba = oldMedia.SupportsReadDmaRetryLba;
if(oldMedia.SupportsReadLbaSpecified) newMedia.SupportsReadLba = oldMedia.SupportsReadLba;
if(oldMedia.SupportsReadRetryLbaSpecified) newMedia.SupportsReadRetryLba = oldMedia.SupportsReadRetryLba;
if(oldMedia.SupportsReadLongLbaSpecified) newMedia.SupportsReadLongLba = oldMedia.SupportsReadLongLba;
if(oldMedia.SupportsReadLongRetryLbaSpecified)
newMedia.SupportsReadLongRetryLba = oldMedia.SupportsReadLongRetryLba;
if(oldMedia.SupportsSeekLbaSpecified) newMedia.SupportsSeekLba = oldMedia.SupportsSeekLba;
if(oldMedia.SupportsReadDmaLba48Specified) newMedia.SupportsReadDmaLba48 = oldMedia.SupportsReadDmaLba48;
if(oldMedia.SupportsReadLba48Specified) newMedia.SupportsReadLba48 = oldMedia.SupportsReadLba48;
if(oldMedia.SupportsReadDmaSpecified) newMedia.SupportsReadDma = oldMedia.SupportsReadDma;
if(oldMedia.SupportsReadDmaRetrySpecified) newMedia.SupportsReadDmaRetry = oldMedia.SupportsReadDmaRetry;
if(oldMedia.SupportsReadRetrySpecified) newMedia.SupportsReadRetry = oldMedia.SupportsReadRetry;
if(oldMedia.SupportsReadLongRetrySpecified) newMedia.SupportsReadLongRetry = oldMedia.SupportsReadLongRetry;
if(oldMedia.SupportsSeekSpecified) newMedia.SupportsSeek = oldMedia.SupportsSeek;
if(oldMedia.CHS != null)
newMedia.CHS = new CHS
{
Cylinders = oldMedia.CHS.Cylinders,
Heads = oldMedia.CHS.Heads,
Sectors = oldMedia.CHS.Sectors
};
if(oldMedia.CurrentCHS != null)
newMedia.CurrentCHS = new CHS
{
Cylinders = oldMedia.CurrentCHS.Cylinders,
Heads = oldMedia.CurrentCHS.Heads,
Sectors = oldMedia.CurrentCHS.Sectors
};
return newMedia;
}
}
}

View File

@@ -1,61 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Usb.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Database.
//
// --[ Description ] ----------------------------------------------------------
//
// Database model for USB device information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Metadata;
namespace DiscImageChef.Database.Models
{
public class USB : BaseEntity
{
public ushort VendorID { get; set; }
public ushort ProductID { get; set; }
public string Manufacturer { get; set; }
public string Product { get; set; }
public bool RemovableMedia { get; set; }
public byte[] Descriptors { get; set; }
public static USB MapUsb(usbType oldUsb)
{
if(oldUsb == null) return null;
return new USB
{
Descriptors = oldUsb.Descriptors,
Manufacturer = oldUsb.Manufacturer,
Product = oldUsb.Product,
ProductID = oldUsb.ProductID,
RemovableMedia = oldUsb.RemovableMedia,
VendorID = oldUsb.VendorID
};
}
}
}

View File

@@ -43,7 +43,13 @@
<ConsolePause>false</ConsolePause> <ConsolePause>false</ConsolePause>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\..\..\.nuget\packages\newtonsoft.json\11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\..\..\.nuget\packages\system.componentmodel.annotations\4.5.0\ref\netstandard2.0\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="SCSI\Inquiry.cs" /> <Compile Include="SCSI\Inquiry.cs" />

View File

@@ -172,10 +172,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_81(byte[] pageResponse) public static string PrettifyPage_81(byte[] pageResponse) => PrettifyPage_81(DecodePage_81(pageResponse));
{
return PrettifyPage_81(DecodePage_81(pageResponse));
}
public static string DefinitionToString(ScsiDefinitions definition) public static string DefinitionToString(ScsiDefinitions definition)
{ {
@@ -430,10 +427,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_83(byte[] pageResponse) public static string PrettifyPage_83(byte[] pageResponse) => PrettifyPage_83(DecodePage_83(pageResponse));
{
return PrettifyPage_83(DecodePage_83(pageResponse));
}
public static string PrettifyPage_83(Page_83? modePage) public static string PrettifyPage_83(Page_83? modePage)
{ {
@@ -823,10 +817,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_84(byte[] pageResponse) public static string PrettifyPage_84(byte[] pageResponse) => PrettifyPage_84(DecodePage_84(pageResponse));
{
return PrettifyPage_84(DecodePage_84(pageResponse));
}
public static string PrettifyPage_84(Page_84? modePage) public static string PrettifyPage_84(Page_84? modePage)
{ {
@@ -955,10 +946,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_85(byte[] pageResponse) public static string PrettifyPage_85(byte[] pageResponse) => PrettifyPage_85(DecodePage_85(pageResponse));
{
return PrettifyPage_85(DecodePage_85(pageResponse));
}
public static string PrettifyPage_85(Page_85? modePage) public static string PrettifyPage_85(Page_85? modePage)
{ {
@@ -1216,10 +1204,7 @@ namespace DiscImageChef.Decoders.SCSI
}; };
} }
public static string PrettifyPage_86(byte[] pageResponse) public static string PrettifyPage_86(byte[] pageResponse) => PrettifyPage_86(DecodePage_86(pageResponse));
{
return PrettifyPage_86(DecodePage_86(pageResponse));
}
public static string PrettifyPage_86(Page_86? modePage) public static string PrettifyPage_86(Page_86? modePage)
{ {
@@ -1384,10 +1369,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_89(byte[] pageResponse) public static string PrettifyPage_89(byte[] pageResponse) => PrettifyPage_89(DecodePage_89(pageResponse));
{
return PrettifyPage_89(DecodePage_89(pageResponse));
}
// TODO: Decode ATA signature? // TODO: Decode ATA signature?
public static string PrettifyPage_89(Page_89? modePage) public static string PrettifyPage_89(Page_89? modePage)
@@ -1433,7 +1415,7 @@ namespace DiscImageChef.Decoders.SCSI
} }
Identify.IdentifyDevice? id = Identify.Decode(page.IdentifyData); Identify.IdentifyDevice? id = Identify.Decode(page.IdentifyData);
if(id.HasValue) if(id != null)
{ {
sb.AppendLine("\tATA IDENTIFY information follows:"); sb.AppendLine("\tATA IDENTIFY information follows:");
sb.AppendFormat("{0}", Identify.Prettify(id)).AppendLine(); sb.AppendFormat("{0}", Identify.Prettify(id)).AppendLine();
@@ -1511,10 +1493,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_C0_Quantum(byte[] pageResponse) public static string PrettifyPage_C0_Quantum(byte[] pageResponse) =>
{ PrettifyPage_C0_Quantum(DecodePage_C0_Quantum(pageResponse));
return PrettifyPage_C0_Quantum(DecodePage_C0_Quantum(pageResponse));
}
public static string PrettifyPage_C0_Quantum(Page_C0_Quantum? modePage) public static string PrettifyPage_C0_Quantum(Page_C0_Quantum? modePage)
{ {
@@ -1593,10 +1573,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_C0_C1_Certance(byte[] pageResponse) public static string PrettifyPage_C0_C1_Certance(byte[] pageResponse) =>
{ PrettifyPage_C0_C1_Certance(DecodePage_C0_C1_Certance(pageResponse));
return PrettifyPage_C0_C1_Certance(DecodePage_C0_C1_Certance(pageResponse));
}
public static string PrettifyPage_C0_C1_Certance(Page_C0_C1_Certance? modePage) public static string PrettifyPage_C0_C1_Certance(Page_C0_C1_Certance? modePage)
{ {
@@ -1666,10 +1644,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(byte[] pageResponse) public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(byte[] pageResponse) =>
{ PrettifyPage_C2_C3_C4_C5_C6_Certance(DecodePage_C2_C3_C4_C5_C6_Certance(pageResponse));
return PrettifyPage_C2_C3_C4_C5_C6_Certance(DecodePage_C2_C3_C4_C5_C6_Certance(pageResponse));
}
public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(Page_C2_C3_C4_C5_C6_Certance? modePage) public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(Page_C2_C3_C4_C5_C6_Certance? modePage)
{ {
@@ -1837,10 +1813,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_DF_Certance(byte[] pageResponse) public static string PrettifyPage_DF_Certance(byte[] pageResponse) =>
{ PrettifyPage_DF_Certance(DecodePage_DF_Certance(pageResponse));
return PrettifyPage_DF_Certance(DecodePage_DF_Certance(pageResponse));
}
public static string PrettifyPage_DF_Certance(Page_DF_Certance? modePage) public static string PrettifyPage_DF_Certance(Page_DF_Certance? modePage)
{ {
@@ -2013,10 +1987,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_C0_IBM(byte[] pageResponse) public static string PrettifyPage_C0_IBM(byte[] pageResponse) =>
{ PrettifyPage_C0_IBM(DecodePage_C0_IBM(pageResponse));
return PrettifyPage_C0_IBM(DecodePage_C0_IBM(pageResponse));
}
public static string PrettifyPage_C0_IBM(Page_C0_IBM? modePage) public static string PrettifyPage_C0_IBM(Page_C0_IBM? modePage)
{ {
@@ -2084,10 +2056,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_C1_IBM(byte[] pageResponse) public static string PrettifyPage_C1_IBM(byte[] pageResponse) =>
{ PrettifyPage_C1_IBM(DecodePage_C1_IBM(pageResponse));
return PrettifyPage_C1_IBM(DecodePage_C1_IBM(pageResponse));
}
public static string PrettifyPage_C1_IBM(Page_C1_IBM? modePage) public static string PrettifyPage_C1_IBM(Page_C1_IBM? modePage)
{ {
@@ -2154,10 +2124,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_B0(byte[] pageResponse) public static string PrettifyPage_B0(byte[] pageResponse) => PrettifyPage_B0(DecodePage_B0(pageResponse));
{
return PrettifyPage_B0(DecodePage_B0(pageResponse));
}
public static string PrettifyPage_B0(Page_B0? modePage) public static string PrettifyPage_B0(Page_B0? modePage)
{ {
@@ -2339,10 +2306,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_C0_to_C5_HP(byte[] pageResponse) public static string PrettifyPage_C0_to_C5_HP(byte[] pageResponse) =>
{ PrettifyPage_C0_to_C5_HP(DecodePage_C0_to_C5_HP(pageResponse));
return PrettifyPage_C0_to_C5_HP(DecodePage_C0_to_C5_HP(pageResponse));
}
public static string PrettifyPage_C0_to_C5_HP(Page_C0_to_C5_HP? modePage) public static string PrettifyPage_C0_to_C5_HP(Page_C0_to_C5_HP? modePage)
{ {
@@ -2442,10 +2407,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyPage_C0_Seagate(byte[] pageResponse) public static string PrettifyPage_C0_Seagate(byte[] pageResponse) =>
{ PrettifyPage_C0_Seagate(DecodePage_C0_Seagate(pageResponse));
return PrettifyPage_C0_Seagate(DecodePage_C0_Seagate(pageResponse));
}
public static string PrettifyPage_C0_Seagate(Page_C0_Seagate? modePage) public static string PrettifyPage_C0_Seagate(Page_C0_Seagate? modePage)
{ {

View File

@@ -30,9 +30,11 @@
// Copyright © 2011-2018 Natalia Portillo // Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/ // ****************************************************************************/
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Newtonsoft.Json;
namespace DiscImageChef.Decoders.SCSI namespace DiscImageChef.Decoders.SCSI
{ {
@@ -52,135 +54,139 @@ namespace DiscImageChef.Decoders.SCSI
/// 26 bytes in MMC-2 /// 26 bytes in MMC-2
/// Variable bytes in MMC-3 /// Variable bytes in MMC-3
/// </summary> /// </summary>
public struct ModePage_2A public class ModePage_2A
{ {
public ModePage_2A_WriteDescriptor[] WriteSpeedPerformanceDescriptors;
/// <summary> /// <summary>
/// Parameters can be saved /// Parameters can be saved
/// </summary> /// </summary>
public bool PS; public bool PS { get; set; }
/// <summary> /// <summary>
/// Drive supports multi-session and/or Photo-CD /// Drive supports multi-session and/or Photo-CD
/// </summary> /// </summary>
public bool MultiSession; public bool MultiSession { get; set; }
/// <summary> /// <summary>
/// Drive is capable of reading sectors in Mode 2 Form 2 format /// Drive is capable of reading sectors in Mode 2 Form 2 format
/// </summary> /// </summary>
public bool Mode2Form2; public bool Mode2Form2 { get; set; }
/// <summary> /// <summary>
/// Drive is capable of reading sectors in Mode 2 Form 1 format /// Drive is capable of reading sectors in Mode 2 Form 1 format
/// </summary> /// </summary>
public bool Mode2Form1; public bool Mode2Form1 { get; set; }
/// <summary> /// <summary>
/// Drive is capable of playing audio /// Drive is capable of playing audio
/// </summary> /// </summary>
public bool AudioPlay; public bool AudioPlay { get; set; }
/// <summary> /// <summary>
/// Drive can return the ISRC /// Drive can return the ISRC
/// </summary> /// </summary>
public bool ISRC; public bool ISRC { get; set; }
/// <summary> /// <summary>
/// Drive can return the media catalogue number /// Drive can return the media catalogue number
/// </summary> /// </summary>
public bool UPC; public bool UPC { get; set; }
/// <summary> /// <summary>
/// Drive can return C2 pointers /// Drive can return C2 pointers
/// </summary> /// </summary>
public bool C2Pointer; public bool C2Pointer { get; set; }
/// <summary> /// <summary>
/// Drive can read, deinterlave and correct R-W subchannels /// Drive can read, deinterlave and correct R-W subchannels
/// </summary> /// </summary>
public bool DeinterlaveSubchannel; public bool DeinterlaveSubchannel { get; set; }
/// <summary> /// <summary>
/// Drive can read interleaved and uncorrected R-W subchannels /// Drive can read interleaved and uncorrected R-W subchannels
/// </summary> /// </summary>
public bool Subchannel; public bool Subchannel { get; set; }
/// <summary> /// <summary>
/// Drive can continue from a loss of streaming on audio reading /// Drive can continue from a loss of streaming on audio reading
/// </summary> /// </summary>
public bool AccurateCDDA; public bool AccurateCDDA { get; set; }
/// <summary> /// <summary>
/// Audio can be read as digital data /// Audio can be read as digital data
/// </summary> /// </summary>
public bool CDDACommand; public bool CDDACommand { get; set; }
/// <summary> /// <summary>
/// Loading Mechanism Type /// Loading Mechanism Type
/// </summary> /// </summary>
public byte LoadingMechanism; public byte LoadingMechanism { get; set; }
/// <summary> /// <summary>
/// Drive can eject discs /// Drive can eject discs
/// </summary> /// </summary>
public bool Eject; public bool Eject { get; set; }
/// <summary> /// <summary>
/// Drive's optional prevent jumper status /// Drive's optional prevent jumper status
/// </summary> /// </summary>
public bool PreventJumper; public bool PreventJumper { get; set; }
/// <summary> /// <summary>
/// Current lock status /// Current lock status
/// </summary> /// </summary>
public bool LockState; public bool LockState { get; set; }
/// <summary> /// <summary>
/// Drive can lock media /// Drive can lock media
/// </summary> /// </summary>
public bool Lock; public bool Lock { get; set; }
/// <summary> /// <summary>
/// Each channel can be muted independently /// Each channel can be muted independently
/// </summary> /// </summary>
public bool SeparateChannelMute; public bool SeparateChannelMute { get; set; }
/// <summary> /// <summary>
/// Each channel's volume can be controlled independently /// Each channel's volume can be controlled independently
/// </summary> /// </summary>
public bool SeparateChannelVolume; public bool SeparateChannelVolume { get; set; }
/// <summary> /// <summary>
/// Maximum drive speed in Kbytes/second /// Maximum drive speed in Kbytes/second
/// </summary> /// </summary>
public ushort MaximumSpeed; public ushort MaximumSpeed { get; set; }
/// <summary> /// <summary>
/// Supported volume levels /// Supported volume levels
/// </summary> /// </summary>
public ushort SupportedVolumeLevels; public ushort SupportedVolumeLevels { get; set; }
/// <summary> /// <summary>
/// Buffer size in Kbytes /// Buffer size in Kbytes
/// </summary> /// </summary>
public ushort BufferSize; public ushort BufferSize { get; set; }
/// <summary> /// <summary>
/// Current drive speed in Kbytes/second /// Current drive speed in Kbytes/second
/// </summary> /// </summary>
public ushort CurrentSpeed; public ushort CurrentSpeed { get; set; }
public bool Method2; public bool Method2 { get; set; }
public bool ReadCDRW; public bool ReadCDRW { get; set; }
public bool ReadCDR; public bool ReadCDR { get; set; }
public bool WriteCDRW; public bool WriteCDRW { get; set; }
public bool WriteCDR; public bool WriteCDR { get; set; }
public bool DigitalPort2; public bool DigitalPort2 { get; set; }
public bool DigitalPort1; public bool DigitalPort1 { get; set; }
public bool Composite; public bool Composite { get; set; }
public bool SSS; public bool SSS { get; set; }
public bool SDP; public bool SDP { get; set; }
public byte Length; public byte Length { get; set; }
public bool LSBF; public bool LSBF { get; set; }
public bool RCK; public bool RCK { get; set; }
public bool BCK; public bool BCK { get; set; }
public bool TestWrite; public bool TestWrite { get; set; }
public ushort MaxWriteSpeed; public ushort MaxWriteSpeed { get; set; }
public ushort CurrentWriteSpeed; public ushort CurrentWriteSpeed { get; set; }
public bool ReadBarcode; public bool ReadBarcode { get; set; }
public bool ReadDVDRAM; public bool ReadDVDRAM { get; set; }
public bool ReadDVDR; public bool ReadDVDR { get; set; }
public bool ReadDVDROM; public bool ReadDVDROM { get; set; }
public bool WriteDVDRAM; public bool WriteDVDRAM { get; set; }
public bool WriteDVDR; public bool WriteDVDR { get; set; }
public bool LeadInPW; public bool LeadInPW { get; set; }
public bool SCC; public bool SCC { get; set; }
public ushort CMRSupported; public ushort CMRSupported { get; set; }
public bool BUF; public bool BUF { get; set; }
public byte RotationControlSelected; public byte RotationControlSelected { get; set; }
public ushort CurrentWriteSpeedSelected; public ushort CurrentWriteSpeedSelected { get; set; }
public ModePage_2A_WriteDescriptor[] WriteSpeedPerformanceDescriptors;
[JsonIgnore]
[Key]
public int Id { get; set; }
} }
public struct ModePage_2A_WriteDescriptor public struct ModePage_2A_WriteDescriptor
@@ -189,7 +195,7 @@ namespace DiscImageChef.Decoders.SCSI
public ushort WriteSpeed; public ushort WriteSpeed;
} }
public static ModePage_2A? DecodeModePage_2A(byte[] pageResponse) public static ModePage_2A DecodeModePage_2A(byte[] pageResponse)
{ {
if((pageResponse?[0] & 0x40) == 0x40) return null; if((pageResponse?[0] & 0x40) == 0x40) return null;
@@ -293,16 +299,14 @@ namespace DiscImageChef.Decoders.SCSI
return decoded; return decoded;
} }
public static string PrettifyModePage_2A(byte[] pageResponse) public static string PrettifyModePage_2A(byte[] pageResponse) =>
{ PrettifyModePage_2A(DecodeModePage_2A(pageResponse));
return PrettifyModePage_2A(DecodeModePage_2A(pageResponse));
}
public static string PrettifyModePage_2A(ModePage_2A? modePage) public static string PrettifyModePage_2A(ModePage_2A modePage)
{ {
if(!modePage.HasValue) return null; if(modePage is null) return null;
ModePage_2A page = modePage.Value; ModePage_2A page = modePage;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("SCSI CD-ROM capabilities page:"); sb.AppendLine("SCSI CD-ROM capabilities page:");

View File

@@ -125,8 +125,8 @@ namespace DiscImageChef.DiscImages
{ {
stream.Read(mode2A, 0, mode2A.Length); stream.Read(mode2A, 0, mode2A.Length);
mode2A[1] -= 2; mode2A[1] -= 2;
Modes.ModePage_2A? decoded2A = Modes.DecodeModePage_2A(mode2A); Modes.ModePage_2A decoded2A = Modes.DecodeModePage_2A(mode2A);
if(decoded2A.HasValue) if(!(decoded2A is null))
DicConsole.DebugWriteLine("BlindWrite5 plugin", "mode page 2A: {0}", DicConsole.DebugWriteLine("BlindWrite5 plugin", "mode page 2A: {0}",
Modes.PrettifyModePage_2A(decoded2A)); Modes.PrettifyModePage_2A(decoded2A));
else mode2A = null; else mode2A = null;
@@ -1016,25 +1016,14 @@ namespace DiscImageChef.DiscImages
} }
} }
public byte[] ReadSector(ulong sectorAddress) public byte[] ReadSector(ulong sectorAddress) => ReadSectors(sectorAddress, 1);
{
return ReadSectors(sectorAddress, 1);
}
public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) => ReadSectorsTag(sectorAddress, 1, tag);
{
return ReadSectorsTag(sectorAddress, 1, tag);
}
public byte[] ReadSector(ulong sectorAddress, uint track) public byte[] ReadSector(ulong sectorAddress, uint track) => ReadSectors(sectorAddress, 1, track);
{
return ReadSectors(sectorAddress, 1, track);
}
public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) =>
{ ReadSectorsTag(sectorAddress, 1, track, tag);
return ReadSectorsTag(sectorAddress, 1, track, tag);
}
public byte[] ReadSectors(ulong sectorAddress, uint length) public byte[] ReadSectors(ulong sectorAddress, uint length)
{ {
@@ -1469,15 +1458,9 @@ namespace DiscImageChef.DiscImages
return buffer; return buffer;
} }
public byte[] ReadSectorLong(ulong sectorAddress) public byte[] ReadSectorLong(ulong sectorAddress) => ReadSectorsLong(sectorAddress, 1);
{
return ReadSectorsLong(sectorAddress, 1);
}
public byte[] ReadSectorLong(ulong sectorAddress, uint track) public byte[] ReadSectorLong(ulong sectorAddress, uint track) => ReadSectorsLong(sectorAddress, 1, track);
{
return ReadSectorsLong(sectorAddress, 1, track);
}
public byte[] ReadSectorsLong(ulong sectorAddress, uint length) public byte[] ReadSectorsLong(ulong sectorAddress, uint length)
{ {
@@ -1672,9 +1655,6 @@ namespace DiscImageChef.DiscImages
return failingLbas.Count <= 0; return failingLbas.Count <= 0;
} }
public bool? VerifyMediaImage() public bool? VerifyMediaImage() => null;
{
return null;
}
} }
} }

View File

@@ -0,0 +1,228 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.8
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Helpers", "DiscImageChef.Helpers\DiscImageChef.Helpers.csproj", "{F8BDF57B-1571-4CD0-84B3-B422088D359A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.CommonTypes", "DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj", "{F2B84194-26EB-4227-B1C5-6602517E85AE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Decoders", "DiscImageChef.Decoders\DiscImageChef.Decoders.csproj", "{0BEB3088-B634-4289-AE17-CDF2D25D00D5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Console", "DiscImageChef.Console\DiscImageChef.Console.csproj", "{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Database", "DiscImageChef.Database\DiscImageChef.Database.csproj", "{FA0749B5-EFE0-4148-9545-CD420B45BC36}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.EntityFramework", "DiscImageChef.EntityFramework\DiscImageChef.EntityFramework.csproj", "{F43772BD-7B8A-488F-BE3A-939DF32F51B0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Debug|x86.ActiveCfg = Debug|Any CPU
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Debug|x86.Build.0 = Debug|Any CPU
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Release|Any CPU.Build.0 = Release|Any CPU
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Release|x86.ActiveCfg = Release|Any CPU
{7A4B05BE-73C9-4F34-87FE-E80CCF1F732D}.Release|x86.Build.0 = Release|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|x86.ActiveCfg = Debug|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|x86.Build.0 = Debug|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|Any CPU.Build.0 = Release|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.ActiveCfg = Release|Any CPU
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.Build.0 = Release|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|x86.ActiveCfg = Debug|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|x86.Build.0 = Debug|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.Build.0 = Release|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|x86.ActiveCfg = Release|Any CPU
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|x86.Build.0 = Release|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Debug|x86.ActiveCfg = Debug|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Debug|x86.Build.0 = Debug|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Release|Any CPU.Build.0 = Release|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Release|x86.ActiveCfg = Release|Any CPU
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Release|x86.Build.0 = Release|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|x86.ActiveCfg = Debug|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|x86.Build.0 = Debug|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.Build.0 = Release|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|x86.ActiveCfg = Release|Any CPU
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|x86.Build.0 = Release|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|x86.ActiveCfg = Debug|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|x86.Build.0 = Debug|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|Any CPU.Build.0 = Release|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|x86.ActiveCfg = Release|Any CPU
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|x86.Build.0 = Release|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|x86.ActiveCfg = Debug|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|x86.Build.0 = Debug|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|Any CPU.Build.0 = Release|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|x86.ActiveCfg = Release|Any CPU
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|x86.Build.0 = Release|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Debug|x86.ActiveCfg = Debug|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Debug|x86.Build.0 = Debug|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Release|Any CPU.Build.0 = Release|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Release|x86.ActiveCfg = Release|Any CPU
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Release|x86.Build.0 = Release|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Debug|x86.ActiveCfg = Debug|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Debug|x86.Build.0 = Debug|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Release|Any CPU.Build.0 = Release|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Release|x86.ActiveCfg = Release|Any CPU
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Release|x86.Build.0 = Release|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|x86.ActiveCfg = Debug|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|x86.Build.0 = Debug|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.Build.0 = Release|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|x86.ActiveCfg = Release|Any CPU
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|x86.Build.0 = Release|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|x86.ActiveCfg = Debug|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|x86.Build.0 = Debug|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|Any CPU.Build.0 = Release|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|x86.ActiveCfg = Release|Any CPU
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|x86.Build.0 = Release|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Debug|x86.ActiveCfg = Debug|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Debug|x86.Build.0 = Debug|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Release|Any CPU.Build.0 = Release|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Release|x86.ActiveCfg = Release|Any CPU
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Release|x86.Build.0 = Release|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Debug|x86.ActiveCfg = Debug|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Debug|x86.Build.0 = Debug|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Release|Any CPU.Build.0 = Release|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Release|x86.ActiveCfg = Release|Any CPU
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Release|x86.Build.0 = Release|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Debug|x86.ActiveCfg = Debug|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Debug|x86.Build.0 = Debug|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Release|Any CPU.Build.0 = Release|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Release|x86.ActiveCfg = Release|Any CPU
{75342D7A-C5EA-4A6F-A511-850B54310E5B}.Release|x86.Build.0 = Release|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Debug|x86.ActiveCfg = Debug|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Debug|x86.Build.0 = Debug|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Release|Any CPU.Build.0 = Release|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Release|x86.ActiveCfg = Release|Any CPU
{B2ABC1F2-C365-4515-9F23-A5725050CC48}.Release|x86.Build.0 = Release|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Debug|x86.ActiveCfg = Debug|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Debug|x86.Build.0 = Debug|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Release|Any CPU.Build.0 = Release|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Release|x86.ActiveCfg = Release|Any CPU
{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}.Release|x86.Build.0 = Release|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Debug|x86.ActiveCfg = Debug|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Debug|x86.Build.0 = Debug|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Release|Any CPU.Build.0 = Release|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Release|x86.ActiveCfg = Release|Any CPU
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Release|x86.Build.0 = Release|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Debug|x86.ActiveCfg = Debug|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Debug|x86.Build.0 = Debug|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Release|Any CPU.Build.0 = Release|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Release|x86.ActiveCfg = Release|Any CPU
{FA0749B5-EFE0-4148-9545-CD420B45BC36}.Release|x86.Build.0 = Release|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Debug|x86.ActiveCfg = Debug|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Debug|x86.Build.0 = Debug|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Release|Any CPU.Build.0 = Release|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Release|x86.ActiveCfg = Release|Any CPU
{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}.Release|x86.Build.0 = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Debug|x86.ActiveCfg = Debug|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Debug|x86.Build.0 = Debug|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|Any CPU.Build.0 = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.ActiveCfg = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.Build.0 = Release|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Debug|x86.ActiveCfg = Debug|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Debug|x86.Build.0 = Debug|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Release|Any CPU.Build.0 = Release|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Release|x86.ActiveCfg = Release|Any CPU
{F43772BD-7B8A-488F-BE3A-939DF32F51B0}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A004EA3D-916D-495A-A130-D4E4F0A168C8}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.StandardHeader = $1
$1.Text = @/***************************************************************************\nThe Disc Image Chef\n----------------------------------------------------------------------------\n \nFilename : ${FileName}\nVersion : 1.0\nAuthor(s) : ${AuthorName}\n \nComponent : Component\n\nRevision : $Revision$\nLast change by : $Author$\nDate : $Date$\n \n--[ Description ] ----------------------------------------------------------\n \nDescription\n \n--[ License ] --------------------------------------------------------------\n \n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n----------------------------------------------------------------------------\nCopyright (C) 2011-2015 Claunia.com\n****************************************************************************/\n//$Id$
$0.TextStylePolicy = $2
$2.scope = text/x-csharp
$2.TabsToSpaces = True
$0.CSharpFormattingPolicy = $3
$3.scope = text/x-csharp
$3.IndentBraces = True
$3.IndentBlock = False
$3.IndentSwitchCaseSection = False
$0.DotNetNamingPolicy = $4
$4.DirectoryNamespaceAssociation = Hierarchical
$4.ResourceNamePolicy = MSBuild
$0.XmlFormattingPolicy = $5
$5.DefaultFormat = $6
$6.AlignAttributes = True
$5.inheritsSet = null
$5.inheritsScope = application/xml
$5.scope = application/config+xml
$0.NameConventionPolicy = $7
$7.Rules = $8
$8.NamingRule = $28
description = The Disc Image Chef.
version = 4.0.99.0
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DiscImageChef.Database\DiscImageChef.Database.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,7 @@
namespace DiscImageChef.EntityFramework
{
class Program
{
static void Main(string[] args) { }
}
}

View File

@@ -43,6 +43,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Gui", "DiscIm
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Gui.XamMac", "DiscImageChef.Gui.XamMac\DiscImageChef.Gui.XamMac.csproj", "{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Gui.XamMac", "DiscImageChef.Gui.XamMac\DiscImageChef.Gui.XamMac.csproj", "{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.EntityFramework", "DiscImageChef.EntityFramework\DiscImageChef.EntityFramework.csproj", "{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -211,6 +213,14 @@ Global
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|Any CPU.Build.0 = Release|Any CPU {9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|Any CPU.Build.0 = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.ActiveCfg = Release|Any CPU {9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.ActiveCfg = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.Build.0 = Release|Any CPU {9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.Build.0 = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|x86.ActiveCfg = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|x86.Build.0 = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|Any CPU.Build.0 = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|x86.ActiveCfg = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Database", "D
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Gui", "DiscImageChef.Gui\DiscImageChef.Gui.csproj", "{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Gui", "DiscImageChef.Gui\DiscImageChef.Gui.csproj", "{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.EntityFramework", "DiscImageChef.EntityFramework\DiscImageChef.EntityFramework.csproj", "{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -209,6 +211,14 @@ Global
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|Any CPU.Build.0 = Release|Any CPU {9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|Any CPU.Build.0 = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.ActiveCfg = Release|Any CPU {9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.ActiveCfg = Release|Any CPU
{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.Build.0 = Release|Any CPU {9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}.Release|x86.Build.0 = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|x86.ActiveCfg = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Debug|x86.Build.0 = Debug|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|Any CPU.Build.0 = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|x86.ActiveCfg = Release|Any CPU
{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -282,7 +282,7 @@ namespace DiscImageChef.Commands
report.SCSI.EVPDPages = reporter.ReportEvpdPages(); report.SCSI.EVPDPages = reporter.ReportEvpdPages();
Modes.ModePage_2A? cdromMode = null; Modes.ModePage_2A cdromMode = null;
reporter.ReportScsiModes(ref report, ref cdromMode); reporter.ReportScsiModes(ref report, ref cdromMode);
@@ -301,15 +301,15 @@ namespace DiscImageChef.Commands
ModeSense2A = cdromMode, Features = reporter.ReportMmcFeatures() ModeSense2A = cdromMode, Features = reporter.ReportMmcFeatures()
}; };
if(cdromMode.HasValue) if(cdromMode != null)
{ {
mediaTypes.Add("CD-ROM"); mediaTypes.Add("CD-ROM");
mediaTypes.Add("Audio CD"); mediaTypes.Add("Audio CD");
if(cdromMode.Value.ReadCDR) mediaTypes.Add("CD-R"); if(cdromMode.ReadCDR) mediaTypes.Add("CD-R");
if(cdromMode.Value.ReadCDRW) mediaTypes.Add("CD-RW"); if(cdromMode.ReadCDRW) mediaTypes.Add("CD-RW");
if(cdromMode.Value.ReadDVDROM) mediaTypes.Add("DVD-ROM"); if(cdromMode.ReadDVDROM) mediaTypes.Add("DVD-ROM");
if(cdromMode.Value.ReadDVDRAM) mediaTypes.Add("DVD-RAM"); if(cdromMode.ReadDVDRAM) mediaTypes.Add("DVD-RAM");
if(cdromMode.Value.ReadDVDR) mediaTypes.Add("DVD-R"); if(cdromMode.ReadDVDR) mediaTypes.Add("DVD-R");
} }
if(report.SCSI.MultiMediaDevice.Features != null) if(report.SCSI.MultiMediaDevice.Features != null)