From ad5c633180cb6492e3597e35ea20d3eec7adac94 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 26 Nov 2018 23:16:54 +0000 Subject: [PATCH] Use device report version 2 for the database. --- .../.idea/contentModel.xml | 46 +- .../DiscImageChef.CommonTypes.csproj | 4 + .../Metadata/DeviceReport.cs | 11 +- .../Metadata/DeviceReportV2.cs | 247 ++-- DiscImageChef.Core/Devices/Report/SSC.cs | 15 +- DiscImageChef.Core/Devices/Report/Scsi.cs | 2 +- DiscImageChef.Database/Context.cs | 10 +- .../DiscImageChef.Database.csproj | 28 +- ...20181126222301_DeviceReportV2.Designer.cs} | 1146 ++++++----------- ...te.cs => 20181126222301_DeviceReportV2.cs} | 862 +++++-------- .../Migrations/DicContextModelSnapshot.cs | 1122 ++++++---------- DiscImageChef.Database/Models/ATA.cs | 225 ---- DiscImageChef.Database/Models/BaseEntity.cs | 49 - DiscImageChef.Database/Models/BaseTypes.cs | 52 - DiscImageChef.Database/Models/CHS.cs | 41 - DiscImageChef.Database/Models/Device.cs | 157 +-- DiscImageChef.Database/Models/FireWire.cs | 59 - DiscImageChef.Database/Models/PCMCIA.cs | 72 -- DiscImageChef.Database/Models/Report.cs | 11 + .../Models/SCSI/BlockDescriptor.cs | 55 - DiscImageChef.Database/Models/SCSI/Inquiry.cs | 141 -- .../Models/SCSI/MMC/Features.cs | 306 ----- DiscImageChef.Database/Models/SCSI/MMC/MMC.cs | 61 - .../Models/SCSI/MMC/Mode2A.cs | 166 --- .../Models/SCSI/MMC/WriteDescriptor.cs | 51 - DiscImageChef.Database/Models/SCSI/Mode.cs | 78 -- .../Models/SCSI/ModePage.cs | 55 - DiscImageChef.Database/Models/SCSI/Page.cs | 47 - DiscImageChef.Database/Models/SCSI/SCSI.cs | 84 -- DiscImageChef.Database/Models/SCSI/SSC/SSC.cs | 74 -- .../Models/SCSI/SSC/SequentialMedia.cs | 82 -- .../Models/SCSI/SSC/SupportedDensity.cs | 69 - .../Models/SCSI/SupportedMedia.cs | 68 - .../Models/SecureDigital.cs | 59 - DiscImageChef.Database/Models/TestedMedia.cs | 243 ---- DiscImageChef.Database/Models/Usb.cs | 61 - .../DiscImageChef.Decoders.csproj | 6 + DiscImageChef.Decoders/SCSI/EVPD.cs | 85 +- DiscImageChef.Decoders/SCSI/Modes/2A.cs | 128 +- DiscImageChef.DiscImages/BlindWrite5/Read.cs | 40 +- DiscImageChef.EntityFramework.sln | 228 ++++ .../DiscImageChef.EntityFramework.csproj | 16 + DiscImageChef.EntityFramework/Program.cs | 7 + DiscImageChef.XamMac.sln | 10 + DiscImageChef.sln | 10 + DiscImageChef/Commands/DeviceReport.cs | 14 +- 46 files changed, 1718 insertions(+), 4685 deletions(-) rename DiscImageChef.Database/Migrations/{20180805182209_InitialCreate.Designer.cs => 20181126222301_DeviceReportV2.Designer.cs} (52%) rename DiscImageChef.Database/Migrations/{20180805182209_InitialCreate.cs => 20181126222301_DeviceReportV2.cs} (52%) delete mode 100644 DiscImageChef.Database/Models/ATA.cs delete mode 100644 DiscImageChef.Database/Models/BaseEntity.cs delete mode 100644 DiscImageChef.Database/Models/BaseTypes.cs delete mode 100644 DiscImageChef.Database/Models/CHS.cs delete mode 100644 DiscImageChef.Database/Models/FireWire.cs delete mode 100644 DiscImageChef.Database/Models/PCMCIA.cs create mode 100644 DiscImageChef.Database/Models/Report.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/BlockDescriptor.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/Inquiry.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/MMC/Features.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/MMC/MMC.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/MMC/Mode2A.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/MMC/WriteDescriptor.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/Mode.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/ModePage.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/Page.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/SCSI.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/SSC/SSC.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/SSC/SequentialMedia.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/SSC/SupportedDensity.cs delete mode 100644 DiscImageChef.Database/Models/SCSI/SupportedMedia.cs delete mode 100644 DiscImageChef.Database/Models/SecureDigital.cs delete mode 100644 DiscImageChef.Database/Models/TestedMedia.cs delete mode 100644 DiscImageChef.Database/Models/Usb.cs create mode 100644 DiscImageChef.EntityFramework.sln create mode 100644 DiscImageChef.EntityFramework/DiscImageChef.EntityFramework.csproj create mode 100644 DiscImageChef.EntityFramework/Program.cs diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml index fb2cf8b5b..532e31014 100644 --- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml +++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml @@ -293,41 +293,13 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1125,6 +1097,18 @@ + + + + + + + + + + + + diff --git a/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj b/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj index 6032dc4dd..158e6a5f4 100644 --- a/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj +++ b/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj @@ -44,6 +44,9 @@ + + ..\..\..\.nuget\packages\system.componentmodel.annotations\4.5.0\ref\netstandard2.0\System.ComponentModel.Annotations.dll + @@ -90,6 +93,7 @@ + diff --git a/DiscImageChef.CommonTypes/Metadata/DeviceReport.cs b/DiscImageChef.CommonTypes/Metadata/DeviceReport.cs index 7ad5e7df5..32bf4bb09 100644 --- a/DiscImageChef.CommonTypes/Metadata/DeviceReport.cs +++ b/DiscImageChef.CommonTypes/Metadata/DeviceReport.cs @@ -41,6 +41,7 @@ using System.Xml.Serialization; using DiscImageChef.Decoders.ATA; using DiscImageChef.Decoders.SCSI; using DiscImageChef.Decoders.SCSI.MMC; +using Newtonsoft.Json; // ReSharper disable InconsistentNaming // ReSharper disable UnusedAutoPropertyAccessor.Global @@ -978,8 +979,11 @@ namespace DiscImageChef.CommonTypes.Metadata 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 SecondaryCode { get; set; } public bool Writable { get; set; } @@ -994,8 +998,11 @@ namespace DiscImageChef.CommonTypes.Metadata public string Description { get; set; } } - public struct SupportedMedia + public class SupportedMedia { + [XmlIgnore] + [JsonIgnore] + public int Id { get; set; } public byte MediumType { get; set; } public int[] DensityCodes { get; set; } public ushort Width { get; set; } diff --git a/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs b/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs index e9fd8a05e..a1c07dd40 100644 --- a/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs +++ b/DiscImageChef.CommonTypes/Metadata/DeviceReportV2.cs @@ -37,9 +37,11 @@ // ****************************************************************************/ using System; +using System.ComponentModel.DataAnnotations; using DiscImageChef.Decoders.ATA; using DiscImageChef.Decoders.SCSI; using DiscImageChef.Decoders.SCSI.MMC; +using Newtonsoft.Json; // ReSharper disable InconsistentNaming // ReSharper disable UnusedAutoPropertyAccessor.Global @@ -48,6 +50,8 @@ namespace DiscImageChef.CommonTypes.Metadata { public class DeviceReportV2 { + [JsonIgnore] + public int Id { get; set; } public Usb USB { get; set; } public FireWire FireWire { get; set; } public Pcmcia PCMCIA { get; set; } @@ -61,6 +65,8 @@ namespace DiscImageChef.CommonTypes.Metadata public class Usb { + [JsonIgnore] + public int Id { get; set; } public ushort VendorID { get; set; } public ushort ProductID { get; set; } public string Manufacturer { get; set; } @@ -71,6 +77,8 @@ namespace DiscImageChef.CommonTypes.Metadata public class FireWire { + [JsonIgnore] + public int Id { get; set; } public uint VendorID { get; set; } public uint ProductID { get; set; } public string Manufacturer { get; set; } @@ -80,16 +88,18 @@ namespace DiscImageChef.CommonTypes.Metadata public class Ata { - public Identify.IdentifyDevice? IdentifyDevice { get; set; } - - public byte[] Identify { get; set; } - + public Identify.IdentifyDevice? IdentifyDevice; + [JsonIgnore] + public int Id { get; set; } + public byte[] Identify { get; set; } public TestedMedia ReadCapabilities { get; set; } public TestedMedia[] RemovableMedias { get; set; } } public class Chs { + [JsonIgnore] + public int Id { get; set; } public ushort Cylinders { get; set; } public ushort Heads { get; set; } public ushort Sectors { get; set; } @@ -97,23 +107,27 @@ namespace DiscImageChef.CommonTypes.Metadata public class Scsi { - public Inquiry.SCSIInquiry? Inquiry { get; set; } - public byte[] InquiryData { get; set; } - public ScsiPage[] EVPDPages { get; set; } - public bool SupportsModeSense6 { get; set; } - public bool SupportsModeSense10 { get; set; } - public bool SupportsModeSubpages { get; set; } - public ScsiMode ModeSense { get; set; } - public Mmc MultiMediaDevice { get; set; } - public TestedMedia ReadCapabilities { get; set; } - public TestedMedia[] RemovableMedias { get; set; } - public Ssc SequentialDevice { get; set; } - public byte[] ModeSense6Data { get; set; } - public byte[] ModeSense10Data { get; set; } + public Inquiry.SCSIInquiry? Inquiry; + [JsonIgnore] + public int Id { get; set; } + public byte[] InquiryData { get; set; } + public ScsiPage[] EVPDPages { get; set; } + public bool SupportsModeSense6 { get; set; } + public bool SupportsModeSense10 { get; set; } + public bool SupportsModeSubpages { get; set; } + public ScsiMode ModeSense { get; set; } + public Mmc MultiMediaDevice { get; set; } + public TestedMedia ReadCapabilities { get; set; } + public TestedMedia[] RemovableMedias { get; set; } + public Ssc SequentialDevice { get; set; } + public byte[] ModeSense6Data { get; set; } + public byte[] ModeSense10Data { get; set; } } public class ScsiMode { + [JsonIgnore] + public int Id { get; set; } public byte? MediumType { get; set; } public bool WriteProtected { get; set; } public BlockDescriptor[] BlockDescriptors { get; set; } @@ -126,6 +140,8 @@ namespace DiscImageChef.CommonTypes.Metadata public class BlockDescriptor { + [JsonIgnore] + public int Id { get; set; } public byte Density { get; set; } public ulong? Blocks { get; set; } public uint? BlockLength { get; set; } @@ -133,6 +149,8 @@ namespace DiscImageChef.CommonTypes.Metadata public class ScsiPage { + [JsonIgnore] + public int Id { get; set; } public byte page { get; set; } public byte? subpage { get; set; } public byte[] value { get; set; } @@ -140,13 +158,17 @@ namespace DiscImageChef.CommonTypes.Metadata public class Mmc { - public Modes.ModePage_2A? ModeSense2A { get; set; } - public MmcFeatures Features { get; set; } - public TestedMedia[] TestedMedia { get; set; } + [JsonIgnore] + public int Id { get; set; } + public Modes.ModePage_2A ModeSense2A { get; set; } + public MmcFeatures Features { get; set; } + public TestedMedia[] TestedMedia { get; set; } } public class MmcFeatures { + [JsonIgnore] + public int Id { get; set; } public byte? AACSVersion { get; set; } public byte? AGIDs { get; set; } public byte? BindingNonceBlocks { get; set; } @@ -275,66 +297,68 @@ namespace DiscImageChef.CommonTypes.Metadata public class TestedMedia { - public Identify.IdentifyDevice? IdentifyDevice { get; set; } - public byte[] IdentifyData { get; set; } - 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? CanReadFirstTrackPreGap { get; set; } - public bool? CanReadLeadIn { 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? SupportsRead6 { 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 Identify.IdentifyDevice? IdentifyDevice; + [JsonIgnore] + public int Id { get; set; } + public byte[] IdentifyData { get; set; } + 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? CanReadFirstTrackPreGap { get; set; } + public bool? CanReadLeadIn { 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? SupportsRead6 { 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; } @@ -371,26 +395,30 @@ namespace DiscImageChef.CommonTypes.Metadata public class Ssc { + [JsonIgnore] + public int Id { get; set; } public byte? BlockSizeGranularity { get; set; } public uint? MaxBlockLength { get; set; } public uint? MinBlockLength { get; set; } public SupportedDensity[] SupportedDensities { get; set; } - public SupportedMedia[] SupportedMediaTypes { get; set; } + public SscSupportedMedia[] SupportedMediaTypes { get; set; } public TestedSequentialMedia[] TestedMedia { get; set; } } - public struct TestedSequentialMedia + public class TestedSequentialMedia { - 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 SupportedDensity[] SupportedDensities { get; set; } - public SupportedMedia[] SupportedMediaTypes { get; set; } + [JsonIgnore] + public int Id { get; set; } + 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 SupportedDensity[] SupportedDensities { get; set; } + public SscSupportedMedia[] SupportedMediaTypes { get; set; } public byte[] ModeSense6Data { get; set; } public byte[] ModeSense10Data { get; set; } @@ -398,21 +426,44 @@ namespace DiscImageChef.CommonTypes.Metadata public class Pcmcia { - 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 string[] AdditionalInformation { get; set; } + public string[] AdditionalInformation; + [JsonIgnore] + public int Id { get; set; } + 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 class MmcSd { + [JsonIgnore] + public int Id { get; set; } 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 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; } + } } \ No newline at end of file diff --git a/DiscImageChef.Core/Devices/Report/SSC.cs b/DiscImageChef.Core/Devices/Report/SSC.cs index e2168911e..c06bd235a 100644 --- a/DiscImageChef.Core/Devices/Report/SSC.cs +++ b/DiscImageChef.Core/Devices/Report/SSC.cs @@ -91,7 +91,7 @@ namespace DiscImageChef.Core.Devices.Report DensitySupport.MediaTypeSupportHeader? mtsh = DensitySupport.DecodeMediumType(buffer); 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++) { 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; 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++) - 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; @@ -173,7 +175,7 @@ namespace DiscImageChef.Core.Devices.Report DensitySupport.MediaTypeSupportHeader? mtsh = DensitySupport.DecodeMediumType(buffer); 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++) { 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; 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++) - 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]}; } } } diff --git a/DiscImageChef.Core/Devices/Report/Scsi.cs b/DiscImageChef.Core/Devices/Report/Scsi.cs index eeaf495b6..568c0714a 100644 --- a/DiscImageChef.Core/Devices/Report/Scsi.cs +++ b/DiscImageChef.Core/Devices/Report/Scsi.cs @@ -82,7 +82,7 @@ namespace DiscImageChef.Core.Devices.Report 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; PeripheralDeviceTypes devType = dev.ScsiType; diff --git a/DiscImageChef.Database/Context.cs b/DiscImageChef.Database/Context.cs index 398319720..e528247e5 100644 --- a/DiscImageChef.Database/Context.cs +++ b/DiscImageChef.Database/Context.cs @@ -30,15 +30,21 @@ // Copyright © 2011-2018 Natalia Portillo // ****************************************************************************/ +using DiscImageChef.CommonTypes.Metadata; using DiscImageChef.Database.Models; using Microsoft.EntityFrameworkCore; namespace DiscImageChef.Database { - public class DicContext : DbContext + public sealed class DicContext : DbContext { public DbSet Devices { get; set; } - public DbSet Reports { get; set; } + public DbSet Reports { get; set; } + + public DicContext() + { + Database.EnsureCreated(); + } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { diff --git a/DiscImageChef.Database/DiscImageChef.Database.csproj b/DiscImageChef.Database/DiscImageChef.Database.csproj index 1ac3fda51..7cff96f1e 100644 --- a/DiscImageChef.Database/DiscImageChef.Database.csproj +++ b/DiscImageChef.Database/DiscImageChef.Database.csproj @@ -57,33 +57,11 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/DiscImageChef.Database/Migrations/20180805182209_InitialCreate.Designer.cs b/DiscImageChef.Database/Migrations/20181126222301_DeviceReportV2.Designer.cs similarity index 52% rename from DiscImageChef.Database/Migrations/20180805182209_InitialCreate.Designer.cs rename to DiscImageChef.Database/Migrations/20181126222301_DeviceReportV2.Designer.cs index dce372498..9f78a2b5d 100644 --- a/DiscImageChef.Database/Migrations/20180805182209_InitialCreate.Designer.cs +++ b/DiscImageChef.Database/Migrations/20181126222301_DeviceReportV2.Designer.cs @@ -1,5 +1,6 @@ // using System; +using DiscImageChef.Database; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -8,192 +9,54 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace DiscImageChef.Database.Migrations { [DbContext(typeof(DicContext))] - [Migration("20180805182209_InitialCreate")] - partial class InitialCreate + [Migration("20181126222301_DeviceReportV2")] + partial class DeviceReportV2 { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.1-rtm-30846"); + .HasAnnotation("ProductVersion", "2.1.4-rtm-31024"); - modelBuilder.Entity("EFTest.Models.ATA", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("APIOSupported"); - - b.Property("ATAPIByteCount"); - - b.Property("AdditionalPID"); - - b.Property("BufferSize"); - - b.Property("BufferType"); - - b.Property("CFAPowerMode"); - - b.Property("Capabilities"); - - b.Property("Capabilities2"); - - b.Property("Capabilities3"); - - b.Property("CommandSet"); - - b.Property("CommandSet2"); - - b.Property("CommandSet3"); - - b.Property("CommandSet4"); - - b.Property("CommandSet5"); - - b.Property("CurrentAAM"); - - b.Property("CurrentAPM"); - - b.Property("DMAActive"); - - b.Property("DMASupported"); - - b.Property("DMATransferTimingMode"); - - b.Property("DataSetMgmt"); - - b.Property("DataSetMgmtSize"); - - b.Property("DeviceFormFactor"); - - b.Property("EnabledCommandSet"); - - b.Property("EnabledCommandSet2"); - - b.Property("EnabledCommandSet3"); - - b.Property("EnabledCommandSet4"); - - b.Property("EnabledSATAFeatures"); - - b.Property("EnhancedSecurityEraseTime"); - - b.Property("ExtendedUserSectors"); - - b.Property("FirmwareRevision"); - - b.Property("FreeFallSensitivity"); - - b.Property("GeneralConfiguration"); - - b.Property("HardwareResetResult"); - b.Property("Identify"); - b.Property("InterseekDelay"); - - b.Property("MDMAActive"); - - b.Property("MDMASupported"); - - b.Property("MajorVersion"); - - b.Property("MasterPasswordRevisionCode"); - - b.Property("MaxDownloadMicroMode3"); - - b.Property("MaxQueueDepth"); - - b.Property("MinDownloadMicroMode3"); - - b.Property("MinMDMACycleTime"); - - b.Property("MinPIOCycleTimeFlow"); - - b.Property("MinPIOCycleTimeNoFlow"); - - b.Property("MinorVersion"); - - b.Property("Model"); - - b.Property("MultipleMaxSectors"); - - b.Property("MultipleSectorNumber"); - - b.Property("NVCacheCaps"); - - b.Property("NVCacheSize"); - - b.Property("NVCacheWriteSpeed"); - - b.Property("NVEstimatedSpinUp"); - - b.Property("PIOTransferTimingMode"); - - b.Property("PacketBusRelease"); - - b.Property("ReadCapabilitiesId"); - - b.Property("RecommendedAAM"); - - b.Property("RecommendedMDMACycleTime"); - - b.Property("RemovableStatusSet"); - - b.Property("SATACapabilities"); - - b.Property("SATACapabilities2"); - - b.Property("SATAFeatures"); - - b.Property("SCTCommandTransport"); - - b.Property("SectorsPerCard"); - - b.Property("SecurityEraseTime"); - - b.Property("SecurityStatus"); - - b.Property("ServiceBusyClear"); - - b.Property("SpecificConfiguration"); - - b.Property("StreamAccessLatency"); - - b.Property("StreamMinReqSize"); - - b.Property("StreamPerformanceGranularity"); - - b.Property("StreamTransferTimeDMA"); - - b.Property("StreamTransferTimePIO"); - - b.Property("TransportMajorVersion"); - - b.Property("TransportMinorVersion"); - - b.Property("TrustedComputing"); - - b.Property("UDMAActive"); - - b.Property("UDMASupported"); - - b.Property("WRVMode"); - - b.Property("WRVSectorCountMode2"); - - b.Property("WRVSectorCountMode3"); + b.Property("ReadCapabilitiesId"); b.HasKey("Id"); b.HasIndex("ReadCapabilitiesId"); - b.ToTable("ATA"); + b.ToTable("Ata"); }); - modelBuilder.Entity("EFTest.Models.CHS", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.BlockDescriptor", b => { - b.Property("Id") + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BlockLength"); + + b.Property("Blocks"); + + b.Property("Density"); + + b.Property("ScsiModeId"); + + b.HasKey("Id"); + + b.HasIndex("ScsiModeId"); + + b.ToTable("BlockDescriptor"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Chs", b => + { + b.Property("Id") .ValueGeneratedOnAdd(); b.Property("Cylinders"); @@ -204,45 +67,48 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("CHS"); + b.ToTable("Chs"); }); - modelBuilder.Entity("EFTest.Models.Device", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", b => { - b.Property("Id") + b.Property("Code") .ValueGeneratedOnAdd(); - b.Property("ATAId"); + b.Property("SscSupportedMediaId"); - b.Property("ATAPIId"); + b.HasKey("Code"); - b.Property("FireWireId"); + b.HasIndex("SscSupportedMediaId"); - b.Property("IsValid"); + b.ToTable("DensityCode"); + }); - b.Property("Manufacturer"); + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DeviceReportV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("Model"); + b.Property("ATAId"); - b.Property("MultiMediaCardId"); + b.Property("ATAPIId"); - b.Property("PCMCIAId"); + b.Property("CompactFlash"); - b.Property("Revision"); + b.Property("Discriminator") + .IsRequired(); - b.Property("SCSIId"); + b.Property("FireWireId"); - b.Property("SecureDigitalId"); + b.Property("MultiMediaCardId"); - b.Property("TimesSeen"); + b.Property("PCMCIAId"); - b.Property("Type"); + b.Property("SCSIId"); - b.Property("USBId"); + b.Property("SecureDigitalId"); - b.Property("WhenAdded"); - - b.Property("WhenModified"); + b.Property("USBId"); b.HasKey("Id"); @@ -262,12 +128,14 @@ namespace DiscImageChef.Database.Migrations b.HasIndex("USBId"); - b.ToTable("Device"); + b.ToTable("Reports"); + + b.HasDiscriminator("Discriminator").HasValue("DeviceReportV2"); }); - modelBuilder.Entity("EFTest.Models.FireWire", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.FireWire", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); b.Property("Manufacturer"); @@ -285,155 +153,27 @@ namespace DiscImageChef.Database.Migrations b.ToTable("FireWire"); }); - modelBuilder.Entity("EFTest.Models.IntClass", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Mmc", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("SupportedMediaId"); + b.Property("FeaturesId"); - b.Property("Value"); + b.Property("ModeSense2AId"); b.HasKey("Id"); - b.HasIndex("SupportedMediaId"); + b.HasIndex("FeaturesId"); - b.ToTable("IntClass"); + b.HasIndex("ModeSense2AId"); + + b.ToTable("Mmc"); }); - modelBuilder.Entity("EFTest.Models.PCMCIA", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcFeatures", b => { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CIS"); - - b.Property("CardCode"); - - b.Property("Compliance"); - - b.Property("Manufacturer"); - - b.Property("ManufacturerCode"); - - b.Property("ProductName"); - - b.HasKey("Id"); - - b.ToTable("PCMCIA"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.BlockDescriptor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("BlockLength"); - - b.Property("Blocks"); - - b.Property("Density"); - - b.Property("ModeId"); - - b.HasKey("Id"); - - b.HasIndex("ModeId"); - - b.ToTable("BlockDescriptor"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.Inquiry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ACKRequests"); - - b.Property("AERCSupported"); - - b.Property("ANSIVersion"); - - b.Property("AccessControlCoordinator"); - - b.Property("Address16"); - - b.Property("Address32"); - - b.Property("AsymmetricalLUNAccess"); - - b.Property("BasicQueueing"); - - b.Property("Data"); - - b.Property("DeviceTypeModifier"); - - b.Property("ECMAVersion"); - - b.Property("EnclosureServices"); - - b.Property("HierarchicalLUN"); - - b.Property("ISOVersion"); - - b.Property("IUS"); - - b.Property("LinkedCommands"); - - b.Property("MediumChanger"); - - b.Property("MultiPortDevice"); - - b.Property("NormalACA"); - - b.Property("PeripheralDeviceType"); - - b.Property("PeripheralQualifier"); - - b.Property("ProductIdentification"); - - b.Property("ProductRevisionLevel"); - - b.Property("Protection"); - - b.Property("QAS"); - - b.Property("RelativeAddressing"); - - b.Property("Removable"); - - b.Property("ResponseDataFormat"); - - b.Property("SPIClocking"); - - b.Property("SoftReset"); - - b.Property("StorageArrayController"); - - b.Property("SyncTransfer"); - - b.Property("TaggedCommandQueue"); - - b.Property("TerminateTaskSupported"); - - b.Property("ThirdPartyCopy"); - - b.Property("TranferDisable"); - - b.Property("VendorIdentification"); - - b.Property("WideBus16"); - - b.Property("WideBus32"); - - b.HasKey("Id"); - - b.ToTable("Inquiry"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.MMC.Features", b => - { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); b.Property("AACSVersion"); @@ -622,7 +362,7 @@ namespace DiscImageChef.Database.Migrations b.Property("ChangerSlots"); - b.Property("ChangerSupportsDiscPresent"); + b.Property("ChangerSupportsDiscPresent"); b.Property("DBML"); @@ -686,158 +426,92 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("Features"); + b.ToTable("MmcFeatures"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.MMC", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcSd", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("FeaturesId"); + b.Property("CID"); - b.Property("ModeSense2AId"); + b.Property("CSD"); + + b.Property("ExtendedCSD"); + + b.Property("OCR"); + + b.Property("SCR"); b.HasKey("Id"); - b.HasIndex("FeaturesId"); - - b.HasIndex("ModeSense2AId"); - - b.ToTable("MMC"); + b.ToTable("MmcSd"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.Mode2A", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Pcmcia", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("AccurateCDDA"); + b.Property("CIS"); - b.Property("BCK"); + b.Property("CardCode"); - b.Property("BufferSize"); + b.Property("Compliance"); - b.Property("BufferUnderRunProtection"); + b.Property("Manufacturer"); - b.Property("CDDACommand"); + b.Property("ManufacturerCode"); - b.Property("CSSandCPPMSupported"); - - b.Property("CanEject"); - - b.Property("CanLockMedia"); - - b.Property("CompositeAudioVideo"); - - b.Property("CurrentSpeed"); - - b.Property("CurrentWriteSpeed"); - - b.Property("CurrentWriteSpeedSelected"); - - b.Property("DeterministicSlotChanger"); - - b.Property("DigitalPort1"); - - b.Property("DigitalPort2"); - - b.Property("LSBF"); - - b.Property("LeadInPW"); - - b.Property("LoadingMechanismType"); - - b.Property("LockStatus"); - - b.Property("MaximumSpeed"); - - b.Property("MaximumWriteSpeed"); - - b.Property("PlaysAudio"); - - b.Property("PreventJumperStatus"); - - b.Property("RCK"); - - b.Property("ReadsBarcode"); - - b.Property("ReadsBothSides"); - - b.Property("ReadsCDR"); - - b.Property("ReadsCDRW"); - - b.Property("ReadsDVDR"); - - b.Property("ReadsDVDRAM"); - - b.Property("ReadsDVDROM"); - - b.Property("ReadsDeinterlavedSubchannel"); - - b.Property("ReadsISRC"); - - b.Property("ReadsMode2Form1"); - - b.Property("ReadsMode2Form2"); - - b.Property("ReadsPacketCDR"); - - b.Property("ReadsSubchannel"); - - b.Property("ReadsUPC"); - - b.Property("ReturnsC2Pointers"); - - b.Property("RotationControlSelected"); - - b.Property("SSS"); - - b.Property("SeparateChannelMute"); - - b.Property("SeparateChannelVolume"); - - b.Property("SupportedVolumeLevels"); - - b.Property("SupportsMultiSession"); - - b.Property("TestWrite"); - - b.Property("WritesCDR"); - - b.Property("WritesCDRW"); - - b.Property("WritesDVDR"); - - b.Property("WritesDVDRAM"); + b.Property("ProductName"); b.HasKey("Id"); - b.ToTable("Mode2A"); + b.ToTable("Pcmcia"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.WriteDescriptor", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Scsi", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("Mode2AId"); + b.Property("InquiryData"); - b.Property("RotationControl"); + b.Property("ModeSense10Data"); - b.Property("WriteSpeed"); + b.Property("ModeSense6Data"); + + b.Property("ModeSenseId"); + + b.Property("MultiMediaDeviceId"); + + b.Property("ReadCapabilitiesId"); + + b.Property("SequentialDeviceId"); + + b.Property("SupportsModeSense10"); + + b.Property("SupportsModeSense6"); + + b.Property("SupportsModeSubpages"); b.HasKey("Id"); - b.HasIndex("Mode2AId"); + b.HasIndex("ModeSenseId"); - b.ToTable("WriteDescriptor"); + b.HasIndex("MultiMediaDeviceId"); + + b.HasIndex("ReadCapabilitiesId"); + + b.HasIndex("SequentialDeviceId"); + + b.ToTable("Scsi"); }); - modelBuilder.Entity("EFTest.Models.SCSI.Mode", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiMode", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); b.Property("BlankCheckEnabled"); @@ -854,122 +528,36 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("Mode"); + b.ToTable("ScsiMode"); }); - modelBuilder.Entity("EFTest.Models.SCSI.ModePage", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiPage", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("ModeId"); + b.Property("ScsiId"); + + b.Property("ScsiModeId"); b.Property("page"); - b.Property("subpage"); + b.Property("subpage"); b.Property("value"); b.HasKey("Id"); - b.HasIndex("ModeId"); + b.HasIndex("ScsiId"); - b.ToTable("ModePage"); + b.HasIndex("ScsiModeId"); + + b.ToTable("ScsiPage"); }); - modelBuilder.Entity("EFTest.Models.SCSI.Page", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ssc", b => { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("SCSIId"); - - b.Property("page"); - - b.Property("value"); - - b.HasKey("Id"); - - b.HasIndex("SCSIId"); - - b.ToTable("Page"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SCSI", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("InquiryId"); - - b.Property("ModeSense10Data"); - - b.Property("ModeSense6Data"); - - b.Property("ModeSenseId"); - - b.Property("MultiMediaDeviceId"); - - b.Property("ReadCapabilitiesId"); - - b.Property("SequentialDeviceId"); - - b.Property("SupportsModeSense10"); - - b.Property("SupportsModeSense6"); - - b.Property("SupportsModeSubpages"); - - b.HasKey("Id"); - - b.HasIndex("InquiryId"); - - b.HasIndex("ModeSenseId"); - - b.HasIndex("MultiMediaDeviceId"); - - b.HasIndex("ReadCapabilitiesId"); - - b.HasIndex("SequentialDeviceId"); - - b.ToTable("SCSI"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SequentialMedia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CanReadMediaSerial"); - - b.Property("Density"); - - b.Property("Manufacturer"); - - b.Property("MediaIsRecognized"); - - b.Property("MediumType"); - - b.Property("MediumTypeName"); - - b.Property("ModeSense10Data"); - - b.Property("ModeSense6Data"); - - b.Property("Model"); - - b.Property("SSCId"); - - b.HasKey("Id"); - - b.HasIndex("SSCId"); - - b.ToTable("SequentialMedia"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SSC", b => - { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); b.Property("BlockSizeGranularity"); @@ -980,12 +568,42 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("SSC"); + b.ToTable("Ssc"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SupportedDensity", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia", b => { - b.Property("Id") + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("Length"); + + b.Property("MediumType"); + + b.Property("Name"); + + b.Property("Organization"); + + b.Property("SscId"); + + b.Property("TestedSequentialMediaId"); + + b.Property("Width"); + + b.HasKey("Id"); + + b.HasIndex("SscId"); + + b.HasIndex("TestedSequentialMediaId"); + + b.ToTable("SscSupportedMedia"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SupportedDensity", b => + { + b.Property("Id") .ValueGeneratedOnAdd(); b.Property("BitsPerMm"); @@ -1004,11 +622,11 @@ namespace DiscImageChef.Database.Migrations b.Property("PrimaryCode"); - b.Property("SSCId"); - b.Property("SecondaryCode"); - b.Property("SequentialMediaId"); + b.Property("SscId"); + + b.Property("TestedSequentialMediaId"); b.Property("Tracks"); @@ -1018,92 +636,25 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.HasIndex("SSCId"); + b.HasIndex("SscId"); - b.HasIndex("SequentialMediaId"); + b.HasIndex("TestedSequentialMediaId"); b.ToTable("SupportedDensity"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SupportedMedia", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedMedia", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("Description"); - - b.Property("Length"); - - b.Property("MediumType"); - - b.Property("Name"); - - b.Property("Organization"); - - b.Property("SSCId"); - - b.Property("SequentialMediaId"); - - b.Property("Width"); - - b.HasKey("Id"); - - b.HasIndex("SSCId"); - - b.HasIndex("SequentialMediaId"); - - b.ToTable("SupportedMedia"); - }); - - modelBuilder.Entity("EFTest.Models.SecureDigital", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CID"); - - b.Property("CSD"); - - b.Property("ExtendedCSD"); - - b.Property("OCR"); - - b.Property("SCR"); - - b.HasKey("Id"); - - b.ToTable("SecureDigital"); - }); - - modelBuilder.Entity("EFTest.Models.StringClass", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("PCMCIAId"); - - b.Property("Value") - .IsRequired(); - - b.HasKey("Id"); - - b.HasIndex("PCMCIAId"); - - b.ToTable("StringClass"); - }); - - modelBuilder.Entity("EFTest.Models.TestedMedia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ATAId"); + b.Property("AtaId"); b.Property("BlockSize"); b.Property("Blocks"); - b.Property("CHSId"); + b.Property("CHSId"); b.Property("CanReadAACS"); @@ -1129,6 +680,8 @@ namespace DiscImageChef.Database.Migrations b.Property("CanReadDiscInformation"); + b.Property("CanReadFirstTrackPreGap"); + b.Property("CanReadFullTOC"); b.Property("CanReadHDCMI"); @@ -1137,8 +690,6 @@ namespace DiscImageChef.Database.Migrations b.Property("CanReadLeadIn"); - b.Property("CanReadLeadInPostgap"); - b.Property("CanReadLeadOut"); b.Property("CanReadMediaID"); @@ -1167,10 +718,12 @@ namespace DiscImageChef.Database.Migrations b.Property("CanReadTOC"); - b.Property("CurrentCHSId"); + b.Property("CurrentCHSId"); b.Property("Density"); + b.Property("IdentifyData"); + b.Property("LBA48Sectors"); b.Property("LBASectors"); @@ -1179,8 +732,6 @@ namespace DiscImageChef.Database.Migrations b.Property("LongBlockSize"); - b.Property("MMCId"); - b.Property("Manufacturer"); b.Property("MediaIsRecognized"); @@ -1189,6 +740,8 @@ namespace DiscImageChef.Database.Migrations b.Property("MediumTypeName"); + b.Property("MmcId"); + b.Property("ModeSense10Data"); b.Property("ModeSense6Data"); @@ -1199,7 +752,7 @@ namespace DiscImageChef.Database.Migrations b.Property("PhysicalBlockSize"); - b.Property("SCSIId"); + b.Property("ScsiId"); b.Property("SolidStateDevice"); @@ -1215,14 +768,14 @@ namespace DiscImageChef.Database.Migrations b.Property("SupportsPlextorReadRawDVD"); - b.Property("SupportsRead"); - b.Property("SupportsRead10"); b.Property("SupportsRead12"); b.Property("SupportsRead16"); + b.Property("SupportsRead6"); + b.Property("SupportsReadCapacity"); b.Property("SupportsReadCapacity16"); @@ -1263,6 +816,8 @@ namespace DiscImageChef.Database.Migrations b.Property("SupportsReadRetryLba"); + b.Property("SupportsReadSectors"); + b.Property("SupportsSeek"); b.Property("SupportsSeekLba"); @@ -1273,22 +828,54 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.HasIndex("ATAId"); + b.HasIndex("AtaId"); b.HasIndex("CHSId"); b.HasIndex("CurrentCHSId"); - b.HasIndex("MMCId"); + b.HasIndex("MmcId"); - b.HasIndex("SCSIId"); + b.HasIndex("ScsiId"); b.ToTable("TestedMedia"); }); - modelBuilder.Entity("EFTest.Models.USB", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia", b => { - b.Property("Id") + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CanReadMediaSerial"); + + b.Property("Density"); + + b.Property("Manufacturer"); + + b.Property("MediaIsRecognized"); + + b.Property("MediumType"); + + b.Property("MediumTypeName"); + + b.Property("ModeSense10Data"); + + b.Property("ModeSense6Data"); + + b.Property("Model"); + + b.Property("SscId"); + + b.HasKey("Id"); + + b.HasIndex("SscId"); + + b.ToTable("TestedSequentialMedia"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Usb", b => + { + b.Property("Id") .ValueGeneratedOnAdd(); b.Property("Descriptors"); @@ -1305,200 +892,281 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("USB"); + b.ToTable("Usb"); }); - modelBuilder.Entity("EFTest.Models.UshortClass", b => + modelBuilder.Entity("DiscImageChef.Decoders.SCSI.Modes+ModePage_2A", b => { - b.Property("Id") + b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("InquiryId"); + b.Property("AccurateCDDA"); - b.Property("Value"); + b.Property("AudioPlay"); + + b.Property("BCK"); + + b.Property("BUF"); + + b.Property("BufferSize"); + + b.Property("C2Pointer"); + + b.Property("CDDACommand"); + + b.Property("CMRSupported"); + + b.Property("Composite"); + + b.Property("CurrentSpeed"); + + b.Property("CurrentWriteSpeed"); + + b.Property("CurrentWriteSpeedSelected"); + + b.Property("DeinterlaveSubchannel"); + + b.Property("DigitalPort1"); + + b.Property("DigitalPort2"); + + b.Property("Eject"); + + b.Property("ISRC"); + + b.Property("LSBF"); + + b.Property("LeadInPW"); + + b.Property("Length"); + + b.Property("LoadingMechanism"); + + b.Property("Lock"); + + b.Property("LockState"); + + b.Property("MaxWriteSpeed"); + + b.Property("MaximumSpeed"); + + b.Property("Method2"); + + b.Property("Mode2Form1"); + + b.Property("Mode2Form2"); + + b.Property("MultiSession"); + + b.Property("PS"); + + b.Property("PreventJumper"); + + b.Property("RCK"); + + b.Property("ReadBarcode"); + + b.Property("ReadCDR"); + + b.Property("ReadCDRW"); + + b.Property("ReadDVDR"); + + b.Property("ReadDVDRAM"); + + b.Property("ReadDVDROM"); + + b.Property("RotationControlSelected"); + + b.Property("SCC"); + + b.Property("SDP"); + + b.Property("SSS"); + + b.Property("SeparateChannelMute"); + + b.Property("SeparateChannelVolume"); + + b.Property("Subchannel"); + + b.Property("SupportedVolumeLevels"); + + b.Property("TestWrite"); + + b.Property("UPC"); + + b.Property("WriteCDR"); + + b.Property("WriteCDRW"); + + b.Property("WriteDVDR"); + + b.Property("WriteDVDRAM"); b.HasKey("Id"); - b.HasIndex("InquiryId"); - - b.ToTable("UshortClass"); + b.ToTable("ModePage_2A"); }); - modelBuilder.Entity("EFTest.Models.ATA", b => + modelBuilder.Entity("DiscImageChef.Database.Models.Device", b => { - b.HasOne("EFTest.Models.TestedMedia", "ReadCapabilities") + b.HasBaseType("DiscImageChef.CommonTypes.Metadata.DeviceReportV2"); + + b.Property("LastSynchronized"); + + b.ToTable("Device"); + + b.HasDiscriminator().HasValue("Device"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b => + { + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedMedia", "ReadCapabilities") .WithMany() .HasForeignKey("ReadCapabilitiesId"); }); - modelBuilder.Entity("EFTest.Models.Device", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.BlockDescriptor", b => { - b.HasOne("EFTest.Models.ATA", "ATA") + b.HasOne("DiscImageChef.CommonTypes.Metadata.ScsiMode") + .WithMany("BlockDescriptors") + .HasForeignKey("ScsiModeId"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", b => + { + b.HasOne("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia") + .WithMany("DensityCodes") + .HasForeignKey("SscSupportedMediaId"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DeviceReportV2", b => + { + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ata", "ATA") .WithMany() .HasForeignKey("ATAId"); - b.HasOne("EFTest.Models.ATA", "ATAPI") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ata", "ATAPI") .WithMany() .HasForeignKey("ATAPIId"); - b.HasOne("EFTest.Models.FireWire", "FireWire") + b.HasOne("DiscImageChef.CommonTypes.Metadata.FireWire", "FireWire") .WithMany() .HasForeignKey("FireWireId"); - b.HasOne("EFTest.Models.SecureDigital", "MultiMediaCard") + b.HasOne("DiscImageChef.CommonTypes.Metadata.MmcSd", "MultiMediaCard") .WithMany() .HasForeignKey("MultiMediaCardId"); - b.HasOne("EFTest.Models.PCMCIA", "PCMCIA") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Pcmcia", "PCMCIA") .WithMany() .HasForeignKey("PCMCIAId"); - b.HasOne("EFTest.Models.SCSI.SCSI", "SCSI") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Scsi", "SCSI") .WithMany() .HasForeignKey("SCSIId"); - b.HasOne("EFTest.Models.SecureDigital", "SecureDigital") + b.HasOne("DiscImageChef.CommonTypes.Metadata.MmcSd", "SecureDigital") .WithMany() .HasForeignKey("SecureDigitalId"); - b.HasOne("EFTest.Models.USB", "USB") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Usb", "USB") .WithMany() .HasForeignKey("USBId"); }); - modelBuilder.Entity("EFTest.Models.IntClass", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Mmc", b => { - b.HasOne("EFTest.Models.SCSI.SupportedMedia") - .WithMany("DensityCodes") - .HasForeignKey("SupportedMediaId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.BlockDescriptor", b => - { - b.HasOne("EFTest.Models.SCSI.Mode") - .WithMany("BlockDescriptors") - .HasForeignKey("ModeId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.MMC.MMC", b => - { - b.HasOne("EFTest.Models.SCSI.MMC.Features", "Features") + b.HasOne("DiscImageChef.CommonTypes.Metadata.MmcFeatures", "Features") .WithMany() .HasForeignKey("FeaturesId"); - b.HasOne("EFTest.Models.SCSI.MMC.Mode2A", "ModeSense2A") + b.HasOne("DiscImageChef.Decoders.SCSI.Modes+ModePage_2A", "ModeSense2A") .WithMany() .HasForeignKey("ModeSense2AId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.WriteDescriptor", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Scsi", b => { - b.HasOne("EFTest.Models.SCSI.MMC.Mode2A") - .WithMany("WriteSpeedPerformanceDescriptors") - .HasForeignKey("Mode2AId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.ModePage", b => - { - b.HasOne("EFTest.Models.SCSI.Mode") - .WithMany("ModePages") - .HasForeignKey("ModeId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.Page", b => - { - b.HasOne("EFTest.Models.SCSI.SCSI") - .WithMany("EVPDPages") - .HasForeignKey("SCSIId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SCSI", b => - { - b.HasOne("EFTest.Models.SCSI.Inquiry", "Inquiry") - .WithMany() - .HasForeignKey("InquiryId"); - - b.HasOne("EFTest.Models.SCSI.Mode", "ModeSense") + b.HasOne("DiscImageChef.CommonTypes.Metadata.ScsiMode", "ModeSense") .WithMany() .HasForeignKey("ModeSenseId"); - b.HasOne("EFTest.Models.SCSI.MMC.MMC", "MultiMediaDevice") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Mmc", "MultiMediaDevice") .WithMany() .HasForeignKey("MultiMediaDeviceId"); - b.HasOne("EFTest.Models.TestedMedia", "ReadCapabilities") + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedMedia", "ReadCapabilities") .WithMany() .HasForeignKey("ReadCapabilitiesId"); - b.HasOne("EFTest.Models.SCSI.SSC.SSC", "SequentialDevice") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc", "SequentialDevice") .WithMany() .HasForeignKey("SequentialDeviceId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SequentialMedia", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiPage", b => { - b.HasOne("EFTest.Models.SCSI.SSC.SSC") - .WithMany("TestedMedia") - .HasForeignKey("SSCId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Scsi") + .WithMany("EVPDPages") + .HasForeignKey("ScsiId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.ScsiMode") + .WithMany("ModePages") + .HasForeignKey("ScsiModeId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SupportedDensity", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia", b => { - b.HasOne("EFTest.Models.SCSI.SSC.SSC") - .WithMany("SupportedDensities") - .HasForeignKey("SSCId"); - - b.HasOne("EFTest.Models.SCSI.SSC.SequentialMedia") - .WithMany("SupportedDensities") - .HasForeignKey("SequentialMediaId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SupportedMedia", b => - { - b.HasOne("EFTest.Models.SCSI.SSC.SSC") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc") .WithMany("SupportedMediaTypes") - .HasForeignKey("SSCId"); + .HasForeignKey("SscId"); - b.HasOne("EFTest.Models.SCSI.SSC.SequentialMedia") + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia") .WithMany("SupportedMediaTypes") - .HasForeignKey("SequentialMediaId"); + .HasForeignKey("TestedSequentialMediaId"); }); - modelBuilder.Entity("EFTest.Models.StringClass", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SupportedDensity", b => { - b.HasOne("EFTest.Models.PCMCIA") - .WithMany("AdditionalInformation") - .HasForeignKey("PCMCIAId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc") + .WithMany("SupportedDensities") + .HasForeignKey("SscId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia") + .WithMany("SupportedDensities") + .HasForeignKey("TestedSequentialMediaId"); }); - modelBuilder.Entity("EFTest.Models.TestedMedia", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedMedia", b => { - b.HasOne("EFTest.Models.ATA") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ata") .WithMany("RemovableMedias") - .HasForeignKey("ATAId"); + .HasForeignKey("AtaId"); - b.HasOne("EFTest.Models.CHS", "CHS") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Chs", "CHS") .WithMany() .HasForeignKey("CHSId"); - b.HasOne("EFTest.Models.CHS", "CurrentCHS") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Chs", "CurrentCHS") .WithMany() .HasForeignKey("CurrentCHSId"); - b.HasOne("EFTest.Models.SCSI.MMC.MMC") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Mmc") .WithMany("TestedMedia") - .HasForeignKey("MMCId"); + .HasForeignKey("MmcId"); - b.HasOne("EFTest.Models.SCSI.SCSI") + b.HasOne("DiscImageChef.CommonTypes.Metadata.Scsi") .WithMany("RemovableMedias") - .HasForeignKey("SCSIId"); + .HasForeignKey("ScsiId"); }); - modelBuilder.Entity("EFTest.Models.UshortClass", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia", b => { - b.HasOne("EFTest.Models.SCSI.Inquiry") - .WithMany("VersionDescriptors") - .HasForeignKey("InquiryId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc") + .WithMany("TestedMedia") + .HasForeignKey("SscId"); }); #pragma warning restore 612, 618 } diff --git a/DiscImageChef.Database/Migrations/20180805182209_InitialCreate.cs b/DiscImageChef.Database/Migrations/20181126222301_DeviceReportV2.cs similarity index 52% rename from DiscImageChef.Database/Migrations/20180805182209_InitialCreate.cs rename to DiscImageChef.Database/Migrations/20181126222301_DeviceReportV2.cs index 9b8c739af..f4b2c5df0 100644 --- a/DiscImageChef.Database/Migrations/20180805182209_InitialCreate.cs +++ b/DiscImageChef.Database/Migrations/20181126222301_DeviceReportV2.cs @@ -1,59 +1,39 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : 20180805163101_InitialCreate.cs -// Author(s) : Natalia Portillo -// -// Component : Database. -// -// --[ Description ] ---------------------------------------------------------- -// -// Initial database status. -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2011-2018 Natalia Portillo -// ****************************************************************************/ - -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; namespace DiscImageChef.Database.Migrations { - public partial class InitialCreate : Migration + public partial class DeviceReportV2 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.CreateTable("CHS", + migrationBuilder.CreateTable("Chs", table => new { - Id = table.Column(nullable: false) + Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Cylinders = table.Column(nullable: false), Heads = table.Column(nullable: false), Sectors = table.Column(nullable: false) - }, constraints: table => { table.PrimaryKey("PK_CHS", x => x.Id); }); + }, constraints: table => { table.PrimaryKey("PK_Chs", x => x.Id); }); - migrationBuilder.CreateTable("Features", + migrationBuilder.CreateTable("FireWire", + table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + VendorID = table.Column(nullable: false), + ProductID = table.Column(nullable: false), + Manufacturer = table.Column(nullable: true), + Product = table.Column(nullable: true), + RemovableMedia = table.Column(nullable: false) + }, constraints: table => { table.PrimaryKey("PK_FireWire", x => x.Id); }); + + migrationBuilder.CreateTable("MmcFeatures", table => new { Id = - table.Column(nullable: false) + table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), AACSVersion = table.Column(nullable: true), AGIDs = table.Column(nullable: true), @@ -146,7 +126,7 @@ namespace DiscImageChef.Database.Migrations CanWriteRawSubchannelInTAO = table.Column(nullable: false), ChangerIsSideChangeCapable = table.Column(nullable: false), ChangerSlots = table.Column(nullable: false), - ChangerSupportsDiscPresent = table.Column(nullable: true), + ChangerSupportsDiscPresent = table.Column(nullable: false), CPRMVersion = table.Column(nullable: true), CSSVersion = table.Column(nullable: true), DBML = table.Column(nullable: false), @@ -179,289 +159,170 @@ namespace DiscImageChef.Database.Migrations SupportsWriteInhibitDCB = table.Column(nullable: false), SupportsWriteProtectPAC = table.Column(nullable: false), VolumeLevels = table.Column(nullable: true) - }, constraints: table => { table.PrimaryKey("PK_Features", x => x.Id); }); + }, + constraints: table => { table.PrimaryKey("PK_MmcFeatures", x => x.Id); }); - migrationBuilder.CreateTable("FireWire", + migrationBuilder.CreateTable("MmcSd", table => new { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - VendorID = table.Column(nullable: false), - ProductID = table.Column(nullable: false), - Manufacturer = table.Column(nullable: true), - Product = table.Column(nullable: true), - RemovableMedia = table.Column(nullable: false) - }, constraints: table => { table.PrimaryKey("PK_FireWire", x => x.Id); }); + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + CID = table.Column(nullable: true), + CSD = table.Column(nullable: true), + OCR = table.Column(nullable: true), + SCR = table.Column(nullable: true), + ExtendedCSD = table.Column(nullable: true) + }, constraints: table => { table.PrimaryKey("PK_MmcSd", x => x.Id); }); - migrationBuilder.CreateTable("Inquiry", + migrationBuilder.CreateTable("ModePage_2A", table => new { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - AccessControlCoordinator = table.Column(nullable: false), - ACKRequests = table.Column(nullable: false), - AERCSupported = table.Column(nullable: false), - Address16 = table.Column(nullable: false), - Address32 = table.Column(nullable: false), - ANSIVersion = table.Column(nullable: true), - AsymmetricalLUNAccess = table.Column(nullable: false), - BasicQueueing = table.Column(nullable: false), - DeviceTypeModifier = table.Column(nullable: true), - ECMAVersion = table.Column(nullable: true), - EnclosureServices = table.Column(nullable: false), - HierarchicalLUN = table.Column(nullable: false), - IUS = table.Column(nullable: false), - ISOVersion = table.Column(nullable: true), - LinkedCommands = table.Column(nullable: false), - MediumChanger = table.Column(nullable: false), - MultiPortDevice = table.Column(nullable: false), - NormalACA = table.Column(nullable: false), - PeripheralDeviceType = table.Column(nullable: false), - PeripheralQualifier = table.Column(nullable: false), - ProductIdentification = table.Column(nullable: true), - ProductRevisionLevel = table.Column(nullable: true), - Protection = table.Column(nullable: false), - QAS = table.Column(nullable: false), - RelativeAddressing = table.Column(nullable: false), - Removable = table.Column(nullable: false), - ResponseDataFormat = table.Column(nullable: true), - TaggedCommandQueue = table.Column(nullable: false), - TerminateTaskSupported = table.Column(nullable: false), - ThirdPartyCopy = table.Column(nullable: false), - TranferDisable = table.Column(nullable: false), - SoftReset = table.Column(nullable: false), - SPIClocking = table.Column(nullable: false), - StorageArrayController = table.Column(nullable: false), - SyncTransfer = table.Column(nullable: false), - VendorIdentification = table.Column(nullable: true), - WideBus16 = table.Column(nullable: false), - WideBus32 = table.Column(nullable: false), - Data = table.Column(nullable: true) - }, constraints: table => { table.PrimaryKey("PK_Inquiry", x => x.Id); }); + PS = table.Column(nullable: false), + MultiSession = table.Column(nullable: false), + Mode2Form2 = table.Column(nullable: false), + Mode2Form1 = table.Column(nullable: false), + AudioPlay = table.Column(nullable: false), + ISRC = table.Column(nullable: false), + UPC = table.Column(nullable: false), + C2Pointer = table.Column(nullable: false), + DeinterlaveSubchannel = table.Column(nullable: false), + Subchannel = table.Column(nullable: false), + AccurateCDDA = table.Column(nullable: false), + CDDACommand = table.Column(nullable: false), + LoadingMechanism = table.Column(nullable: false), + Eject = table.Column(nullable: false), + PreventJumper = table.Column(nullable: false), + LockState = table.Column(nullable: false), + Lock = table.Column(nullable: false), + SeparateChannelMute = table.Column(nullable: false), + SeparateChannelVolume = table.Column(nullable: false), + MaximumSpeed = table.Column(nullable: false), + SupportedVolumeLevels = table.Column(nullable: false), + BufferSize = table.Column(nullable: false), + CurrentSpeed = table.Column(nullable: false), + Method2 = table.Column(nullable: false), + ReadCDRW = table.Column(nullable: false), + ReadCDR = table.Column(nullable: false), + WriteCDRW = table.Column(nullable: false), + WriteCDR = table.Column(nullable: false), + DigitalPort2 = table.Column(nullable: false), + DigitalPort1 = table.Column(nullable: false), + Composite = table.Column(nullable: false), + SSS = table.Column(nullable: false), + SDP = table.Column(nullable: false), + Length = table.Column(nullable: false), + LSBF = table.Column(nullable: false), + RCK = table.Column(nullable: false), + BCK = table.Column(nullable: false), + TestWrite = table.Column(nullable: false), + MaxWriteSpeed = table.Column(nullable: false), + CurrentWriteSpeed = table.Column(nullable: false), + ReadBarcode = table.Column(nullable: false), + ReadDVDRAM = table.Column(nullable: false), + ReadDVDR = table.Column(nullable: false), + ReadDVDROM = table.Column(nullable: false), + WriteDVDRAM = table.Column(nullable: false), + WriteDVDR = table.Column(nullable: false), + LeadInPW = table.Column(nullable: false), + SCC = table.Column(nullable: false), + CMRSupported = table.Column(nullable: false), + BUF = table.Column(nullable: false), + RotationControlSelected = table.Column(nullable: false), + CurrentWriteSpeedSelected = table.Column(nullable: false), + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true) + }, + constraints: table => { table.PrimaryKey("PK_ModePage_2A", x => x.Id); }); - migrationBuilder.CreateTable("Mode", + migrationBuilder.CreateTable("Pcmcia", table => new { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + CIS = table.Column(nullable: true), + Compliance = table.Column(nullable: true), + ManufacturerCode = table.Column(nullable: true), + CardCode = table.Column(nullable: true), + Manufacturer = table.Column(nullable: true), + ProductName = table.Column(nullable: true) + }, constraints: table => { table.PrimaryKey("PK_Pcmcia", x => x.Id); }); + + migrationBuilder.CreateTable("ScsiMode", + table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), MediumType = table.Column(nullable: true), WriteProtected = table.Column(nullable: false), Speed = table.Column(nullable: true), BufferedMode = table.Column(nullable: true), BlankCheckEnabled = table.Column(nullable: false), DPOandFUA = table.Column(nullable: false) - }, constraints: table => { table.PrimaryKey("PK_Mode", x => x.Id); }); + }, constraints: table => { table.PrimaryKey("PK_ScsiMode", x => x.Id); }); - migrationBuilder.CreateTable("Mode2A", + migrationBuilder.CreateTable("Ssc", table => new { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - AccurateCDDA = table.Column(nullable: false), - BCK = table.Column(nullable: false), - BufferSize = table.Column(nullable: false), - BufferUnderRunProtection = table.Column(nullable: true), - CanEject = table.Column(nullable: false), - CanLockMedia = table.Column(nullable: false), - CDDACommand = table.Column(nullable: false), - CompositeAudioVideo = table.Column(nullable: false), - CSSandCPPMSupported = table.Column(nullable: false), - CurrentSpeed = table.Column(nullable: true), - CurrentWriteSpeed = table.Column(nullable: true), - CurrentWriteSpeedSelected = table.Column(nullable: true), - DeterministicSlotChanger = table.Column(nullable: false), - DigitalPort1 = table.Column(nullable: false), - DigitalPort2 = table.Column(nullable: false), - LeadInPW = table.Column(nullable: false), - LoadingMechanismType = table.Column(nullable: false), - LockStatus = table.Column(nullable: false), - LSBF = table.Column(nullable: false), - MaximumSpeed = table.Column(nullable: true), - MaximumWriteSpeed = table.Column(nullable: true), - PlaysAudio = table.Column(nullable: false), - PreventJumperStatus = table.Column(nullable: false), - RCK = table.Column(nullable: false), - ReadsBarcode = table.Column(nullable: false), - ReadsBothSides = table.Column(nullable: false), - ReadsCDR = table.Column(nullable: false), - ReadsCDRW = table.Column(nullable: false), - ReadsDeinterlavedSubchannel = table.Column(nullable: false), - ReadsDVDR = table.Column(nullable: false), - ReadsDVDRAM = table.Column(nullable: false), - ReadsDVDROM = table.Column(nullable: false), - ReadsISRC = table.Column(nullable: false), - ReadsMode2Form2 = table.Column(nullable: false), - ReadsMode2Form1 = table.Column(nullable: false), - ReadsPacketCDR = table.Column(nullable: false), - ReadsSubchannel = table.Column(nullable: false), - ReadsUPC = table.Column(nullable: false), - ReturnsC2Pointers = table.Column(nullable: false), - RotationControlSelected = table.Column(nullable: true), - SeparateChannelMute = table.Column(nullable: false), - SeparateChannelVolume = table.Column(nullable: false), - SSS = table.Column(nullable: false), - SupportsMultiSession = table.Column(nullable: false), - SupportedVolumeLevels = table.Column(nullable: true), - TestWrite = table.Column(nullable: false), - WritesCDR = table.Column(nullable: false), - WritesCDRW = table.Column(nullable: false), - WritesDVDR = table.Column(nullable: false), - WritesDVDRAM = table.Column(nullable: false) - }, constraints: table => { table.PrimaryKey("PK_Mode2A", x => x.Id); }); - - migrationBuilder.CreateTable("PCMCIA", - table => new - { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - CIS = table.Column(nullable: true), - Compliance = table.Column(nullable: true), - ManufacturerCode = table.Column(nullable: false), - CardCode = table.Column(nullable: false), - Manufacturer = table.Column(nullable: true), - ProductName = table.Column(nullable: true) - }, constraints: table => { table.PrimaryKey("PK_PCMCIA", x => x.Id); }); - - migrationBuilder.CreateTable("SecureDigital", - table => new - { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - CID = table.Column(nullable: true), - CSD = table.Column(nullable: true), - OCR = table.Column(nullable: true), - SCR = table.Column(nullable: true), - ExtendedCSD = table.Column(nullable: true) - }, constraints: table => { table.PrimaryKey("PK_SecureDigital", x => x.Id); }); - - migrationBuilder.CreateTable("SSC", - table => new - { - Id = table.Column(nullable: false) + Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), BlockSizeGranularity = table.Column(nullable: true), MaxBlockLength = table.Column(nullable: true), MinBlockLength = table.Column(nullable: true) - }, constraints: table => { table.PrimaryKey("PK_SSC", x => x.Id); }); + }, constraints: table => { table.PrimaryKey("PK_Ssc", x => x.Id); }); - migrationBuilder.CreateTable("USB", + migrationBuilder.CreateTable("Usb", table => new { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), VendorID = table.Column(nullable: false), ProductID = table.Column(nullable: false), Manufacturer = table.Column(nullable: true), Product = table.Column(nullable: true), RemovableMedia = table.Column(nullable: false), Descriptors = table.Column(nullable: true) - }, constraints: table => { table.PrimaryKey("PK_USB", x => x.Id); }); + }, constraints: table => { table.PrimaryKey("PK_Usb", x => x.Id); }); - migrationBuilder.CreateTable("UshortClass", + migrationBuilder.CreateTable("Mmc", table => new { - Id = table.Column(nullable: false) + Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), - Value = table.Column(nullable: false), - InquiryId = table.Column(nullable: true) + ModeSense2AId = table.Column(nullable: true), + FeaturesId = table.Column(nullable: true) }, constraints: table => { - table.PrimaryKey("PK_UshortClass", x => x.Id); - table.ForeignKey("FK_UshortClass_Inquiry_InquiryId", x => x.InquiryId, - "Inquiry", "Id", onDelete: ReferentialAction.Restrict); + table.PrimaryKey("PK_Mmc", x => x.Id); + table.ForeignKey("FK_Mmc_MmcFeatures_FeaturesId", x => x.FeaturesId, + "MmcFeatures", "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey("FK_Mmc_ModePage_2A_ModeSense2AId", x => x.ModeSense2AId, + "ModePage_2A", "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("BlockDescriptor", table => new { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), Density = table.Column(nullable: false), Blocks = table.Column(nullable: true), BlockLength = table.Column(nullable: true), - ModeId = table.Column(nullable: true) + ScsiModeId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_BlockDescriptor", x => x.Id); - table.ForeignKey("FK_BlockDescriptor_Mode_ModeId", x => x.ModeId, "Mode", - "Id", onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable("ModePage", - table => new - { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - page = table.Column(nullable: false), - subpage = table.Column(nullable: false), - value = table.Column(nullable: true), - ModeId = table.Column(nullable: true) - }, constraints: table => - { - table.PrimaryKey("PK_ModePage", x => x.Id); - table.ForeignKey("FK_ModePage_Mode_ModeId", x => x.ModeId, "Mode", "Id", + table.ForeignKey("FK_BlockDescriptor_ScsiMode_ScsiModeId", + x => x.ScsiModeId, "ScsiMode", "Id", onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable("MMC", - table => new - { - Id = table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ModeSense2AId = table.Column(nullable: true), - FeaturesId = table.Column(nullable: true) - }, constraints: table => - { - table.PrimaryKey("PK_MMC", x => x.Id); - table.ForeignKey("FK_MMC_Features_FeaturesId", x => x.FeaturesId, - "Features", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_MMC_Mode2A_ModeSense2AId", x => x.ModeSense2AId, - "Mode2A", "Id", onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable("WriteDescriptor", - table => new - { - Id = table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - RotationControl = table.Column(nullable: false), - WriteSpeed = table.Column(nullable: false), - Mode2AId = table.Column(nullable: true) - }, constraints: table => - { - table.PrimaryKey("PK_WriteDescriptor", x => x.Id); - table.ForeignKey("FK_WriteDescriptor_Mode2A_Mode2AId", x => x.Mode2AId, - "Mode2A", "Id", onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable("StringClass", - table => new - { - Id = table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Value = table.Column(nullable: false), - PCMCIAId = table.Column(nullable: true) - }, constraints: table => - { - table.PrimaryKey("PK_StringClass", x => x.Id); - table.ForeignKey("FK_StringClass_PCMCIA_PCMCIAId", x => x.PCMCIAId, - "PCMCIA", "Id", onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable("SequentialMedia", + migrationBuilder.CreateTable("TestedSequentialMedia", table => new { Id = - table.Column(nullable: false) + table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), CanReadMediaSerial = table.Column(nullable: true), Density = table.Column(nullable: true), @@ -472,119 +333,117 @@ namespace DiscImageChef.Database.Migrations Model = table.Column(nullable: true), ModeSense6Data = table.Column(nullable: true), ModeSense10Data = table.Column(nullable: true), - SSCId = table.Column(nullable: true) + SscId = table.Column(nullable: true) }, constraints: table => { - table.PrimaryKey("PK_SequentialMedia", x => x.Id); - table.ForeignKey("FK_SequentialMedia_SSC_SSCId", x => x.SSCId, "SSC", "Id", - onDelete: ReferentialAction.Restrict); + table.PrimaryKey("PK_TestedSequentialMedia", x => x.Id); + table.ForeignKey("FK_TestedSequentialMedia_Ssc_SscId", x => x.SscId, "Ssc", + "Id", onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("SscSupportedMedia", + table => new + { + Id = + table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + MediumType = table.Column(nullable: false), + Width = table.Column(nullable: false), + Length = table.Column(nullable: false), + Organization = table.Column(nullable: true), + Name = table.Column(nullable: true), + Description = table.Column(nullable: true), + SscId = table.Column(nullable: true), + TestedSequentialMediaId = table.Column(nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_SscSupportedMedia", x => x.Id); + table.ForeignKey("FK_SscSupportedMedia_Ssc_SscId", x => x.SscId, "Ssc", + "Id", onDelete: ReferentialAction.Restrict); + table + .ForeignKey("FK_SscSupportedMedia_TestedSequentialMedia_TestedSequentialMediaId", + x => x.TestedSequentialMediaId, "TestedSequentialMedia", + "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("SupportedDensity", table => new { Id = - table.Column(nullable: false) + table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), - PrimaryCode = table.Column(nullable: false), - SecondaryCode = table.Column(nullable: false), - Writable = table.Column(nullable: false), - Duplicate = table.Column(nullable: false), - DefaultDensity = table.Column(nullable: false), - BitsPerMm = table.Column(nullable: false), - Width = table.Column(nullable: false), - Tracks = table.Column(nullable: false), - Capacity = table.Column(nullable: false), - Organization = table.Column(nullable: true), - Name = table.Column(nullable: true), - Description = table.Column(nullable: true), - SSCId = table.Column(nullable: true), - SequentialMediaId = table.Column(nullable: true) + PrimaryCode = table.Column(nullable: false), + SecondaryCode = table.Column(nullable: false), + Writable = table.Column(nullable: false), + Duplicate = table.Column(nullable: false), + DefaultDensity = table.Column(nullable: false), + BitsPerMm = table.Column(nullable: false), + Width = table.Column(nullable: false), + Tracks = table.Column(nullable: false), + Capacity = table.Column(nullable: false), + Organization = table.Column(nullable: true), + Name = table.Column(nullable: true), + Description = table.Column(nullable: true), + SscId = table.Column(nullable: true), + TestedSequentialMediaId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_SupportedDensity", x => x.Id); - table.ForeignKey("FK_SupportedDensity_SSC_SSCId", x => x.SSCId, "SSC", + table.ForeignKey("FK_SupportedDensity_Ssc_SscId", x => x.SscId, "Ssc", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_SupportedDensity_SequentialMedia_SequentialMediaId", - x => x.SequentialMediaId, "SequentialMedia", "Id", + table + .ForeignKey("FK_SupportedDensity_TestedSequentialMedia_TestedSequentialMediaId", + x => x.TestedSequentialMediaId, "TestedSequentialMedia", + "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("DensityCode", + table => new + { + Code = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + SscSupportedMediaId = table.Column(nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_DensityCode", x => x.Code); + table.ForeignKey("FK_DensityCode_SscSupportedMedia_SscSupportedMediaId", + x => x.SscSupportedMediaId, "SscSupportedMedia", "Id", onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable("SupportedMedia", + migrationBuilder.CreateTable("Reports", table => new { Id = - table.Column(nullable: false) + table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), - MediumType = table.Column(nullable: false), - Width = table.Column(nullable: false), - Length = table.Column(nullable: false), - Organization = table.Column(nullable: true), - Name = table.Column(nullable: true), - Description = table.Column(nullable: true), - SSCId = table.Column(nullable: true), - SequentialMediaId = table.Column(nullable: true) + USBId = table.Column(nullable: true), + FireWireId = table.Column(nullable: true), + PCMCIAId = table.Column(nullable: true), + CompactFlash = table.Column(nullable: false), + ATAId = table.Column(nullable: true), + ATAPIId = table.Column(nullable: true), + SCSIId = table.Column(nullable: true), + MultiMediaCardId = table.Column(nullable: true), + SecureDigitalId = table.Column(nullable: true), + Discriminator = table.Column(nullable: false), + LastSynchronized = table.Column(nullable: true) }, constraints: table => { - table.PrimaryKey("PK_SupportedMedia", x => x.Id); - table.ForeignKey("FK_SupportedMedia_SSC_SSCId", x => x.SSCId, "SSC", "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_SupportedMedia_SequentialMedia_SequentialMediaId", - x => x.SequentialMediaId, "SequentialMedia", "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable("IntClass", - table => new - { - Id = table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Value = table.Column(nullable: false), - SupportedMediaId = table.Column(nullable: true) - }, constraints: table => - { - table.PrimaryKey("PK_IntClass", x => x.Id); - table.ForeignKey("FK_IntClass_SupportedMedia_SupportedMediaId", - x => x.SupportedMediaId, "SupportedMedia", "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable("Device", - table => new - { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - WhenAdded = table.Column(nullable: false), - WhenModified = table.Column(nullable: true), - Manufacturer = table.Column(nullable: true), - Model = table.Column(nullable: true), - Revision = table.Column(nullable: true), - Type = table.Column(nullable: false), - USBId = table.Column(nullable: true), - FireWireId = table.Column(nullable: true), - PCMCIAId = table.Column(nullable: true), - ATAId = table.Column(nullable: true), - ATAPIId = table.Column(nullable: true), - SCSIId = table.Column(nullable: true), - MultiMediaCardId = table.Column(nullable: true), - SecureDigitalId = table.Column(nullable: true), - IsValid = table.Column(nullable: false), - TimesSeen = table.Column(nullable: false) - }, constraints: table => - { - table.PrimaryKey("PK_Device", x => x.Id); - table.ForeignKey("FK_Device_FireWire_FireWireId", x => x.FireWireId, + table.PrimaryKey("PK_Reports", x => x.Id); + table.ForeignKey("FK_Reports_FireWire_FireWireId", x => x.FireWireId, "FireWire", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_Device_SecureDigital_MultiMediaCardId", - x => x.MultiMediaCardId, "SecureDigital", "Id", + table.ForeignKey("FK_Reports_MmcSd_MultiMediaCardId", + x => x.MultiMediaCardId, "MmcSd", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_Device_PCMCIA_PCMCIAId", x => x.PCMCIAId, "PCMCIA", + table.ForeignKey("FK_Reports_Pcmcia_PCMCIAId", x => x.PCMCIAId, "Pcmcia", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_Device_SecureDigital_SecureDigitalId", - x => x.SecureDigitalId, "SecureDigital", "Id", + table.ForeignKey("FK_Reports_MmcSd_SecureDigitalId", + x => x.SecureDigitalId, "MmcSd", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_Device_USB_USBId", x => x.USBId, "USB", "Id", + table.ForeignKey("FK_Reports_Usb_USBId", x => x.USBId, "Usb", "Id", onDelete: ReferentialAction.Restrict); }); @@ -592,8 +451,9 @@ namespace DiscImageChef.Database.Migrations table => new { Id = - table.Column(nullable: false) + table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), + IdentifyData = table.Column(nullable: true), Blocks = table.Column(nullable: true), BlockSize = table.Column(nullable: true), CanReadAACS = table.Column(nullable: true), @@ -611,8 +471,8 @@ namespace DiscImageChef.Database.Migrations CanReadFullTOC = table.Column(nullable: true), CanReadHDCMI = table.Column(nullable: true), CanReadLayerCapacity = table.Column(nullable: true), + CanReadFirstTrackPreGap = table.Column(nullable: true), CanReadLeadIn = table.Column(nullable: true), - CanReadLeadInPostgap = table.Column(nullable: true), CanReadLeadOut = table.Column(nullable: true), CanReadMediaID = table.Column(nullable: true), CanReadMediaSerial = table.Column(nullable: true), @@ -643,7 +503,7 @@ namespace DiscImageChef.Database.Migrations SupportsRead10 = table.Column(nullable: true), SupportsRead12 = table.Column(nullable: true), SupportsRead16 = table.Column(nullable: true), - SupportsRead = table.Column(nullable: true), + SupportsRead6 = table.Column(nullable: true), SupportsReadCapacity16 = table.Column(nullable: true), SupportsReadCapacity = table.Column(nullable: true), SupportsReadCd = table.Column(nullable: true), @@ -654,8 +514,8 @@ namespace DiscImageChef.Database.Migrations SupportsReadLong = table.Column(nullable: true), ModeSense6Data = table.Column(nullable: true), ModeSense10Data = table.Column(nullable: true), - CHSId = table.Column(nullable: true), - CurrentCHSId = table.Column(nullable: true), + CHSId = table.Column(nullable: true), + CurrentCHSId = table.Column(nullable: true), LBASectors = table.Column(nullable: true), LBA48Sectors = table.Column(nullable: true), LogicalAlignment = table.Column(nullable: true), @@ -676,304 +536,210 @@ namespace DiscImageChef.Database.Migrations SupportsReadDma = table.Column(nullable: true), SupportsReadDmaRetry = table.Column(nullable: true), SupportsReadRetry = table.Column(nullable: true), + SupportsReadSectors = table.Column(nullable: true), SupportsReadLongRetry = table.Column(nullable: true), SupportsSeek = table.Column(nullable: true), - ATAId = table.Column(nullable: true), - MMCId = table.Column(nullable: true), - SCSIId = table.Column(nullable: true) + AtaId = table.Column(nullable: true), + MmcId = table.Column(nullable: true), + ScsiId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_TestedMedia", x => x.Id); - table.ForeignKey("FK_TestedMedia_CHS_CHSId", x => x.CHSId, "CHS", "Id", + table.ForeignKey("FK_TestedMedia_Chs_CHSId", x => x.CHSId, "Chs", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_TestedMedia_CHS_CurrentCHSId", x => x.CurrentCHSId, - "CHS", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_TestedMedia_MMC_MMCId", x => x.MMCId, "MMC", "Id", + table.ForeignKey("FK_TestedMedia_Chs_CurrentCHSId", x => x.CurrentCHSId, + "Chs", "Id", onDelete: ReferentialAction.Restrict); + table.ForeignKey("FK_TestedMedia_Mmc_MmcId", x => x.MmcId, "Mmc", "Id", onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable("ATA", + migrationBuilder.CreateTable("Ata", table => new { - Id = - table.Column(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - AdditionalPID = table.Column(nullable: true), - APIOSupported = table.Column(nullable: true), - ATAPIByteCount = table.Column(nullable: true), - BufferType = table.Column(nullable: true), - BufferSize = table.Column(nullable: true), - Capabilities = table.Column(nullable: true), - Capabilities2 = table.Column(nullable: true), - Capabilities3 = table.Column(nullable: true), - CFAPowerMode = table.Column(nullable: true), - CommandSet = table.Column(nullable: true), - CommandSet2 = table.Column(nullable: true), - CommandSet3 = table.Column(nullable: true), - CommandSet4 = table.Column(nullable: true), - CommandSet5 = table.Column(nullable: true), - CurrentAAM = table.Column(nullable: true), - CurrentAPM = table.Column(nullable: true), - DataSetMgmt = table.Column(nullable: true), - DataSetMgmtSize = table.Column(nullable: true), - DeviceFormFactor = table.Column(nullable: true), - DMAActive = table.Column(nullable: true), - DMASupported = table.Column(nullable: true), - DMATransferTimingMode = table.Column(nullable: true), - EnhancedSecurityEraseTime = table.Column(nullable: true), - EnabledCommandSet = table.Column(nullable: true), - EnabledCommandSet2 = table.Column(nullable: true), - EnabledCommandSet3 = table.Column(nullable: true), - EnabledCommandSet4 = table.Column(nullable: true), - EnabledSATAFeatures = table.Column(nullable: true), - ExtendedUserSectors = table.Column(nullable: true), - FreeFallSensitivity = table.Column(nullable: true), - FirmwareRevision = table.Column(nullable: true), - GeneralConfiguration = table.Column(nullable: true), - HardwareResetResult = table.Column(nullable: true), - InterseekDelay = table.Column(nullable: true), - MajorVersion = table.Column(nullable: true), - MasterPasswordRevisionCode = table.Column(nullable: true), - MaxDownloadMicroMode3 = table.Column(nullable: true), - MaxQueueDepth = table.Column(nullable: true), - MDMAActive = table.Column(nullable: true), - MDMASupported = table.Column(nullable: true), - MinDownloadMicroMode3 = table.Column(nullable: true), - MinMDMACycleTime = table.Column(nullable: true), - MinorVersion = table.Column(nullable: true), - MinPIOCycleTimeNoFlow = table.Column(nullable: true), - MinPIOCycleTimeFlow = table.Column(nullable: true), - Model = table.Column(nullable: true), - MultipleMaxSectors = table.Column(nullable: true), - MultipleSectorNumber = table.Column(nullable: true), - NVCacheCaps = table.Column(nullable: true), - NVCacheSize = table.Column(nullable: true), - NVCacheWriteSpeed = table.Column(nullable: true), - NVEstimatedSpinUp = table.Column(nullable: true), - PacketBusRelease = table.Column(nullable: true), - PIOTransferTimingMode = table.Column(nullable: true), - RecommendedAAM = table.Column(nullable: true), - RecommendedMDMACycleTime = table.Column(nullable: true), - RemovableStatusSet = table.Column(nullable: true), - SATACapabilities = table.Column(nullable: true), - SATACapabilities2 = table.Column(nullable: true), - SATAFeatures = table.Column(nullable: true), - SCTCommandTransport = table.Column(nullable: true), - SectorsPerCard = table.Column(nullable: true), - SecurityEraseTime = table.Column(nullable: true), - SecurityStatus = table.Column(nullable: true), - ServiceBusyClear = table.Column(nullable: true), - SpecificConfiguration = table.Column(nullable: true), - StreamAccessLatency = table.Column(nullable: true), - StreamMinReqSize = table.Column(nullable: true), - StreamPerformanceGranularity = table.Column(nullable: true), - StreamTransferTimeDMA = table.Column(nullable: true), - StreamTransferTimePIO = table.Column(nullable: true), - TransportMajorVersion = table.Column(nullable: true), - TransportMinorVersion = table.Column(nullable: true), - TrustedComputing = table.Column(nullable: true), - UDMAActive = table.Column(nullable: true), - UDMASupported = table.Column(nullable: true), - WRVMode = table.Column(nullable: true), - WRVSectorCountMode3 = table.Column(nullable: true), - WRVSectorCountMode2 = table.Column(nullable: true), - Identify = table.Column(nullable: true), - ReadCapabilitiesId = table.Column(nullable: true) + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Identify = table.Column(nullable: true), + ReadCapabilitiesId = table.Column(nullable: true) }, constraints: table => { - table.PrimaryKey("PK_ATA", x => x.Id); - table.ForeignKey("FK_ATA_TestedMedia_ReadCapabilitiesId", + table.PrimaryKey("PK_Ata", x => x.Id); + table.ForeignKey("FK_Ata_TestedMedia_ReadCapabilitiesId", x => x.ReadCapabilitiesId, "TestedMedia", "Id", onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable("SCSI", + migrationBuilder.CreateTable("Scsi", table => new { Id = - table.Column(nullable: false) + table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), - InquiryId = table.Column(nullable: true), + InquiryData = table.Column(nullable: true), SupportsModeSense6 = table.Column(nullable: false), SupportsModeSense10 = table.Column(nullable: false), SupportsModeSubpages = table.Column(nullable: false), - ModeSenseId = table.Column(nullable: true), - MultiMediaDeviceId = table.Column(nullable: true), - ReadCapabilitiesId = table.Column(nullable: true), - SequentialDeviceId = table.Column(nullable: true), + ModeSenseId = table.Column(nullable: true), + MultiMediaDeviceId = table.Column(nullable: true), + ReadCapabilitiesId = table.Column(nullable: true), + SequentialDeviceId = table.Column(nullable: true), ModeSense6Data = table.Column(nullable: true), ModeSense10Data = table.Column(nullable: true) }, constraints: table => { - table.PrimaryKey("PK_SCSI", x => x.Id); - table.ForeignKey("FK_SCSI_Inquiry_InquiryId", x => x.InquiryId, "Inquiry", - "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_SCSI_Mode_ModeSenseId", x => x.ModeSenseId, "Mode", - "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_SCSI_MMC_MultiMediaDeviceId", - x => x.MultiMediaDeviceId, "MMC", "Id", + table.PrimaryKey("PK_Scsi", x => x.Id); + table.ForeignKey("FK_Scsi_ScsiMode_ModeSenseId", x => x.ModeSenseId, + "ScsiMode", "Id", onDelete: ReferentialAction.Restrict); + table.ForeignKey("FK_Scsi_Mmc_MultiMediaDeviceId", + x => x.MultiMediaDeviceId, "Mmc", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_SCSI_TestedMedia_ReadCapabilitiesId", + table.ForeignKey("FK_Scsi_TestedMedia_ReadCapabilitiesId", x => x.ReadCapabilitiesId, "TestedMedia", "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey("FK_SCSI_SSC_SequentialDeviceId", - x => x.SequentialDeviceId, "SSC", "Id", + table.ForeignKey("FK_Scsi_Ssc_SequentialDeviceId", + x => x.SequentialDeviceId, "Ssc", "Id", onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable("Page", + migrationBuilder.CreateTable("ScsiPage", table => new { - Id = table.Column(nullable: false) + Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), - page = table.Column(nullable: false), - value = table.Column(nullable: true), - SCSIId = table.Column(nullable: true) + page = table.Column(nullable: false), + subpage = table.Column(nullable: true), + value = table.Column(nullable: true), + ScsiId = table.Column(nullable: true), + ScsiModeId = table.Column(nullable: true) }, constraints: table => { - table.PrimaryKey("PK_Page", x => x.Id); - table.ForeignKey("FK_Page_SCSI_SCSIId", x => x.SCSIId, "SCSI", "Id", + table.PrimaryKey("PK_ScsiPage", x => x.Id); + table.ForeignKey("FK_ScsiPage_Scsi_ScsiId", x => x.ScsiId, "Scsi", "Id", onDelete: ReferentialAction.Restrict); + table.ForeignKey("FK_ScsiPage_ScsiMode_ScsiModeId", x => x.ScsiModeId, + "ScsiMode", "Id", onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateIndex("IX_ATA_ReadCapabilitiesId", "ATA", "ReadCapabilitiesId"); + migrationBuilder.CreateIndex("IX_Ata_ReadCapabilitiesId", "Ata", "ReadCapabilitiesId"); - migrationBuilder.CreateIndex("IX_BlockDescriptor_ModeId", "BlockDescriptor", "ModeId"); + migrationBuilder.CreateIndex("IX_BlockDescriptor_ScsiModeId", "BlockDescriptor", "ScsiModeId"); - migrationBuilder.CreateIndex("IX_Device_ATAId", "Device", "ATAId"); + migrationBuilder.CreateIndex("IX_DensityCode_SscSupportedMediaId", "DensityCode", "SscSupportedMediaId"); - migrationBuilder.CreateIndex("IX_Device_ATAPIId", "Device", "ATAPIId"); + migrationBuilder.CreateIndex("IX_Mmc_FeaturesId", "Mmc", "FeaturesId"); - migrationBuilder.CreateIndex("IX_Device_FireWireId", "Device", "FireWireId"); + migrationBuilder.CreateIndex("IX_Mmc_ModeSense2AId", "Mmc", "ModeSense2AId"); - migrationBuilder.CreateIndex("IX_Device_MultiMediaCardId", "Device", "MultiMediaCardId"); + migrationBuilder.CreateIndex("IX_Reports_ATAId", "Reports", "ATAId"); - migrationBuilder.CreateIndex("IX_Device_PCMCIAId", "Device", "PCMCIAId"); + migrationBuilder.CreateIndex("IX_Reports_ATAPIId", "Reports", "ATAPIId"); - migrationBuilder.CreateIndex("IX_Device_SCSIId", "Device", "SCSIId"); + migrationBuilder.CreateIndex("IX_Reports_FireWireId", "Reports", "FireWireId"); - migrationBuilder.CreateIndex("IX_Device_SecureDigitalId", "Device", "SecureDigitalId"); + migrationBuilder.CreateIndex("IX_Reports_MultiMediaCardId", "Reports", "MultiMediaCardId"); - migrationBuilder.CreateIndex("IX_Device_USBId", "Device", "USBId"); + migrationBuilder.CreateIndex("IX_Reports_PCMCIAId", "Reports", "PCMCIAId"); - migrationBuilder.CreateIndex("IX_IntClass_SupportedMediaId", "IntClass", "SupportedMediaId"); + migrationBuilder.CreateIndex("IX_Reports_SCSIId", "Reports", "SCSIId"); - migrationBuilder.CreateIndex("IX_MMC_FeaturesId", "MMC", "FeaturesId"); + migrationBuilder.CreateIndex("IX_Reports_SecureDigitalId", "Reports", "SecureDigitalId"); - migrationBuilder.CreateIndex("IX_MMC_ModeSense2AId", "MMC", "ModeSense2AId"); + migrationBuilder.CreateIndex("IX_Reports_USBId", "Reports", "USBId"); - migrationBuilder.CreateIndex("IX_ModePage_ModeId", "ModePage", "ModeId"); + migrationBuilder.CreateIndex("IX_Scsi_ModeSenseId", "Scsi", "ModeSenseId"); - migrationBuilder.CreateIndex("IX_Page_SCSIId", "Page", "SCSIId"); + migrationBuilder.CreateIndex("IX_Scsi_MultiMediaDeviceId", "Scsi", "MultiMediaDeviceId"); - migrationBuilder.CreateIndex("IX_SCSI_InquiryId", "SCSI", "InquiryId"); + migrationBuilder.CreateIndex("IX_Scsi_ReadCapabilitiesId", "Scsi", "ReadCapabilitiesId"); - migrationBuilder.CreateIndex("IX_SCSI_ModeSenseId", "SCSI", "ModeSenseId"); + migrationBuilder.CreateIndex("IX_Scsi_SequentialDeviceId", "Scsi", "SequentialDeviceId"); - migrationBuilder.CreateIndex("IX_SCSI_MultiMediaDeviceId", "SCSI", "MultiMediaDeviceId"); + migrationBuilder.CreateIndex("IX_ScsiPage_ScsiId", "ScsiPage", "ScsiId"); - migrationBuilder.CreateIndex("IX_SCSI_ReadCapabilitiesId", "SCSI", "ReadCapabilitiesId"); + migrationBuilder.CreateIndex("IX_ScsiPage_ScsiModeId", "ScsiPage", "ScsiModeId"); - migrationBuilder.CreateIndex("IX_SCSI_SequentialDeviceId", "SCSI", "SequentialDeviceId"); + migrationBuilder.CreateIndex("IX_SscSupportedMedia_SscId", "SscSupportedMedia", "SscId"); - migrationBuilder.CreateIndex("IX_SequentialMedia_SSCId", "SequentialMedia", "SSCId"); + migrationBuilder.CreateIndex("IX_SscSupportedMedia_TestedSequentialMediaId", "SscSupportedMedia", + "TestedSequentialMediaId"); - migrationBuilder.CreateIndex("IX_StringClass_PCMCIAId", "StringClass", "PCMCIAId"); + migrationBuilder.CreateIndex("IX_SupportedDensity_SscId", "SupportedDensity", "SscId"); - migrationBuilder.CreateIndex("IX_SupportedDensity_SSCId", "SupportedDensity", "SSCId"); + migrationBuilder.CreateIndex("IX_SupportedDensity_TestedSequentialMediaId", "SupportedDensity", + "TestedSequentialMediaId"); - migrationBuilder.CreateIndex("IX_SupportedDensity_SequentialMediaId", "SupportedDensity", - "SequentialMediaId"); - - migrationBuilder.CreateIndex("IX_SupportedMedia_SSCId", "SupportedMedia", "SSCId"); - - migrationBuilder.CreateIndex("IX_SupportedMedia_SequentialMediaId", "SupportedMedia", "SequentialMediaId"); - - migrationBuilder.CreateIndex("IX_TestedMedia_ATAId", "TestedMedia", "ATAId"); + migrationBuilder.CreateIndex("IX_TestedMedia_AtaId", "TestedMedia", "AtaId"); migrationBuilder.CreateIndex("IX_TestedMedia_CHSId", "TestedMedia", "CHSId"); migrationBuilder.CreateIndex("IX_TestedMedia_CurrentCHSId", "TestedMedia", "CurrentCHSId"); - migrationBuilder.CreateIndex("IX_TestedMedia_MMCId", "TestedMedia", "MMCId"); + migrationBuilder.CreateIndex("IX_TestedMedia_MmcId", "TestedMedia", "MmcId"); - migrationBuilder.CreateIndex("IX_TestedMedia_SCSIId", "TestedMedia", "SCSIId"); + migrationBuilder.CreateIndex("IX_TestedMedia_ScsiId", "TestedMedia", "ScsiId"); - migrationBuilder.CreateIndex("IX_UshortClass_InquiryId", "UshortClass", "InquiryId"); + migrationBuilder.CreateIndex("IX_TestedSequentialMedia_SscId", "TestedSequentialMedia", "SscId"); - migrationBuilder.CreateIndex("IX_WriteDescriptor_Mode2AId", "WriteDescriptor", "Mode2AId"); - - migrationBuilder.AddForeignKey("FK_Device_ATA_ATAId", "Device", "ATAId", "ATA", principalColumn: "Id", + migrationBuilder.AddForeignKey("FK_Reports_Ata_ATAId", "Reports", "ATAId", "Ata", principalColumn: "Id", onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey("FK_Device_ATA_ATAPIId", "Device", "ATAPIId", "ATA", principalColumn: "Id", + migrationBuilder.AddForeignKey("FK_Reports_Ata_ATAPIId", "Reports", "ATAPIId", "Ata", principalColumn: "Id", onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey("FK_Device_SCSI_SCSIId", "Device", "SCSIId", "SCSI", principalColumn: "Id", + migrationBuilder.AddForeignKey("FK_Reports_Scsi_SCSIId", "Reports", "SCSIId", "Scsi", principalColumn: "Id", onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey("FK_TestedMedia_ATA_ATAId", "TestedMedia", "ATAId", "ATA", + migrationBuilder.AddForeignKey("FK_TestedMedia_Ata_AtaId", "TestedMedia", "AtaId", "Ata", principalColumn: "Id", onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey("FK_TestedMedia_SCSI_SCSIId", "TestedMedia", "SCSIId", "SCSI", + migrationBuilder.AddForeignKey("FK_TestedMedia_Scsi_ScsiId", "TestedMedia", "ScsiId", "Scsi", principalColumn: "Id", onDelete: ReferentialAction.Restrict); } protected override void Down(MigrationBuilder migrationBuilder) { - migrationBuilder.DropForeignKey("FK_ATA_TestedMedia_ReadCapabilitiesId", "ATA"); + migrationBuilder.DropForeignKey("FK_Ata_TestedMedia_ReadCapabilitiesId", "Ata"); - migrationBuilder.DropForeignKey("FK_SCSI_TestedMedia_ReadCapabilitiesId", "SCSI"); + migrationBuilder.DropForeignKey("FK_Scsi_TestedMedia_ReadCapabilitiesId", "Scsi"); migrationBuilder.DropTable("BlockDescriptor"); - migrationBuilder.DropTable("Device"); + migrationBuilder.DropTable("DensityCode"); - migrationBuilder.DropTable("IntClass"); + migrationBuilder.DropTable("Reports"); - migrationBuilder.DropTable("ModePage"); - - migrationBuilder.DropTable("Page"); - - migrationBuilder.DropTable("StringClass"); + migrationBuilder.DropTable("ScsiPage"); migrationBuilder.DropTable("SupportedDensity"); - migrationBuilder.DropTable("UshortClass"); - - migrationBuilder.DropTable("WriteDescriptor"); + migrationBuilder.DropTable("SscSupportedMedia"); migrationBuilder.DropTable("FireWire"); - migrationBuilder.DropTable("SecureDigital"); + migrationBuilder.DropTable("MmcSd"); - migrationBuilder.DropTable("USB"); + migrationBuilder.DropTable("Pcmcia"); - migrationBuilder.DropTable("SupportedMedia"); + migrationBuilder.DropTable("Usb"); - migrationBuilder.DropTable("PCMCIA"); - - migrationBuilder.DropTable("SequentialMedia"); + migrationBuilder.DropTable("TestedSequentialMedia"); migrationBuilder.DropTable("TestedMedia"); - migrationBuilder.DropTable("ATA"); + migrationBuilder.DropTable("Ata"); - migrationBuilder.DropTable("CHS"); + migrationBuilder.DropTable("Chs"); - migrationBuilder.DropTable("SCSI"); + migrationBuilder.DropTable("Scsi"); - migrationBuilder.DropTable("Inquiry"); + migrationBuilder.DropTable("ScsiMode"); - migrationBuilder.DropTable("Mode"); + migrationBuilder.DropTable("Mmc"); - migrationBuilder.DropTable("MMC"); + migrationBuilder.DropTable("Ssc"); - migrationBuilder.DropTable("SSC"); + migrationBuilder.DropTable("MmcFeatures"); - migrationBuilder.DropTable("Features"); - - migrationBuilder.DropTable("Mode2A"); + migrationBuilder.DropTable("ModePage_2A"); } } } \ No newline at end of file diff --git a/DiscImageChef.Database/Migrations/DicContextModelSnapshot.cs b/DiscImageChef.Database/Migrations/DicContextModelSnapshot.cs index bdc720212..63d9cdf30 100644 --- a/DiscImageChef.Database/Migrations/DicContextModelSnapshot.cs +++ b/DiscImageChef.Database/Migrations/DicContextModelSnapshot.cs @@ -12,184 +12,45 @@ namespace DiscImageChef.Database.Migrations protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "2.1.1-rtm-30846"); + modelBuilder.HasAnnotation("ProductVersion", "2.1.4-rtm-31024"); - modelBuilder.Entity("EFTest.Models.ATA", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b => { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("APIOSupported"); - - b.Property("ATAPIByteCount"); - - b.Property("AdditionalPID"); - - b.Property("BufferSize"); - - b.Property("BufferType"); - - b.Property("CFAPowerMode"); - - b.Property("Capabilities"); - - b.Property("Capabilities2"); - - b.Property("Capabilities3"); - - b.Property("CommandSet"); - - b.Property("CommandSet2"); - - b.Property("CommandSet3"); - - b.Property("CommandSet4"); - - b.Property("CommandSet5"); - - b.Property("CurrentAAM"); - - b.Property("CurrentAPM"); - - b.Property("DMAActive"); - - b.Property("DMASupported"); - - b.Property("DMATransferTimingMode"); - - b.Property("DataSetMgmt"); - - b.Property("DataSetMgmtSize"); - - b.Property("DeviceFormFactor"); - - b.Property("EnabledCommandSet"); - - b.Property("EnabledCommandSet2"); - - b.Property("EnabledCommandSet3"); - - b.Property("EnabledCommandSet4"); - - b.Property("EnabledSATAFeatures"); - - b.Property("EnhancedSecurityEraseTime"); - - b.Property("ExtendedUserSectors"); - - b.Property("FirmwareRevision"); - - b.Property("FreeFallSensitivity"); - - b.Property("GeneralConfiguration"); - - b.Property("HardwareResetResult"); + b.Property("Id").ValueGeneratedOnAdd(); b.Property("Identify"); - b.Property("InterseekDelay"); - - b.Property("MDMAActive"); - - b.Property("MDMASupported"); - - b.Property("MajorVersion"); - - b.Property("MasterPasswordRevisionCode"); - - b.Property("MaxDownloadMicroMode3"); - - b.Property("MaxQueueDepth"); - - b.Property("MinDownloadMicroMode3"); - - b.Property("MinMDMACycleTime"); - - b.Property("MinPIOCycleTimeFlow"); - - b.Property("MinPIOCycleTimeNoFlow"); - - b.Property("MinorVersion"); - - b.Property("Model"); - - b.Property("MultipleMaxSectors"); - - b.Property("MultipleSectorNumber"); - - b.Property("NVCacheCaps"); - - b.Property("NVCacheSize"); - - b.Property("NVCacheWriteSpeed"); - - b.Property("NVEstimatedSpinUp"); - - b.Property("PIOTransferTimingMode"); - - b.Property("PacketBusRelease"); - - b.Property("ReadCapabilitiesId"); - - b.Property("RecommendedAAM"); - - b.Property("RecommendedMDMACycleTime"); - - b.Property("RemovableStatusSet"); - - b.Property("SATACapabilities"); - - b.Property("SATACapabilities2"); - - b.Property("SATAFeatures"); - - b.Property("SCTCommandTransport"); - - b.Property("SectorsPerCard"); - - b.Property("SecurityEraseTime"); - - b.Property("SecurityStatus"); - - b.Property("ServiceBusyClear"); - - b.Property("SpecificConfiguration"); - - b.Property("StreamAccessLatency"); - - b.Property("StreamMinReqSize"); - - b.Property("StreamPerformanceGranularity"); - - b.Property("StreamTransferTimeDMA"); - - b.Property("StreamTransferTimePIO"); - - b.Property("TransportMajorVersion"); - - b.Property("TransportMinorVersion"); - - b.Property("TrustedComputing"); - - b.Property("UDMAActive"); - - b.Property("UDMASupported"); - - b.Property("WRVMode"); - - b.Property("WRVSectorCountMode2"); - - b.Property("WRVSectorCountMode3"); + b.Property("ReadCapabilitiesId"); b.HasKey("Id"); b.HasIndex("ReadCapabilitiesId"); - b.ToTable("ATA"); + b.ToTable("Ata"); }); - modelBuilder.Entity("EFTest.Models.CHS", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.BlockDescriptor", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); + + b.Property("BlockLength"); + + b.Property("Blocks"); + + b.Property("Density"); + + b.Property("ScsiModeId"); + + b.HasKey("Id"); + + b.HasIndex("ScsiModeId"); + + b.ToTable("BlockDescriptor"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Chs", b => + { + b.Property("Id").ValueGeneratedOnAdd(); b.Property("Cylinders"); @@ -199,44 +60,45 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("CHS"); + b.ToTable("Chs"); }); - modelBuilder.Entity("EFTest.Models.Device", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Code").ValueGeneratedOnAdd(); - b.Property("ATAId"); + b.Property("SscSupportedMediaId"); - b.Property("ATAPIId"); + b.HasKey("Code"); - b.Property("FireWireId"); + b.HasIndex("SscSupportedMediaId"); - b.Property("IsValid"); + b.ToTable("DensityCode"); + }); - b.Property("Manufacturer"); + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DeviceReportV2", b => + { + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("Model"); + b.Property("ATAId"); - b.Property("MultiMediaCardId"); + b.Property("ATAPIId"); - b.Property("PCMCIAId"); + b.Property("CompactFlash"); - b.Property("Revision"); + b.Property("Discriminator").IsRequired(); - b.Property("SCSIId"); + b.Property("FireWireId"); - b.Property("SecureDigitalId"); + b.Property("MultiMediaCardId"); - b.Property("TimesSeen"); + b.Property("PCMCIAId"); - b.Property("Type"); + b.Property("SCSIId"); - b.Property("USBId"); + b.Property("SecureDigitalId"); - b.Property("WhenAdded"); - - b.Property("WhenModified"); + b.Property("USBId"); b.HasKey("Id"); @@ -256,12 +118,14 @@ namespace DiscImageChef.Database.Migrations b.HasIndex("USBId"); - b.ToTable("Device"); + b.ToTable("Reports"); + + b.HasDiscriminator("Discriminator").HasValue("DeviceReportV2"); }); - modelBuilder.Entity("EFTest.Models.FireWire", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.FireWire", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); b.Property("Manufacturer"); @@ -278,151 +142,26 @@ namespace DiscImageChef.Database.Migrations b.ToTable("FireWire"); }); - modelBuilder.Entity("EFTest.Models.IntClass", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Mmc", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("SupportedMediaId"); + b.Property("FeaturesId"); - b.Property("Value"); + b.Property("ModeSense2AId"); b.HasKey("Id"); - b.HasIndex("SupportedMediaId"); + b.HasIndex("FeaturesId"); - b.ToTable("IntClass"); + b.HasIndex("ModeSense2AId"); + + b.ToTable("Mmc"); }); - modelBuilder.Entity("EFTest.Models.PCMCIA", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcFeatures", b => { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("CIS"); - - b.Property("CardCode"); - - b.Property("Compliance"); - - b.Property("Manufacturer"); - - b.Property("ManufacturerCode"); - - b.Property("ProductName"); - - b.HasKey("Id"); - - b.ToTable("PCMCIA"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.BlockDescriptor", b => - { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("BlockLength"); - - b.Property("Blocks"); - - b.Property("Density"); - - b.Property("ModeId"); - - b.HasKey("Id"); - - b.HasIndex("ModeId"); - - b.ToTable("BlockDescriptor"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.Inquiry", b => - { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("ACKRequests"); - - b.Property("AERCSupported"); - - b.Property("ANSIVersion"); - - b.Property("AccessControlCoordinator"); - - b.Property("Address16"); - - b.Property("Address32"); - - b.Property("AsymmetricalLUNAccess"); - - b.Property("BasicQueueing"); - - b.Property("Data"); - - b.Property("DeviceTypeModifier"); - - b.Property("ECMAVersion"); - - b.Property("EnclosureServices"); - - b.Property("HierarchicalLUN"); - - b.Property("ISOVersion"); - - b.Property("IUS"); - - b.Property("LinkedCommands"); - - b.Property("MediumChanger"); - - b.Property("MultiPortDevice"); - - b.Property("NormalACA"); - - b.Property("PeripheralDeviceType"); - - b.Property("PeripheralQualifier"); - - b.Property("ProductIdentification"); - - b.Property("ProductRevisionLevel"); - - b.Property("Protection"); - - b.Property("QAS"); - - b.Property("RelativeAddressing"); - - b.Property("Removable"); - - b.Property("ResponseDataFormat"); - - b.Property("SPIClocking"); - - b.Property("SoftReset"); - - b.Property("StorageArrayController"); - - b.Property("SyncTransfer"); - - b.Property("TaggedCommandQueue"); - - b.Property("TerminateTaskSupported"); - - b.Property("ThirdPartyCopy"); - - b.Property("TranferDisable"); - - b.Property("VendorIdentification"); - - b.Property("WideBus16"); - - b.Property("WideBus32"); - - b.HasKey("Id"); - - b.ToTable("Inquiry"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.MMC.Features", b => - { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); b.Property("AACSVersion"); @@ -610,7 +349,7 @@ namespace DiscImageChef.Database.Migrations b.Property("ChangerSlots"); - b.Property("ChangerSupportsDiscPresent"); + b.Property("ChangerSupportsDiscPresent"); b.Property("DBML"); @@ -674,155 +413,89 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("Features"); + b.ToTable("MmcFeatures"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.MMC", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcSd", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("FeaturesId"); + b.Property("CID"); - b.Property("ModeSense2AId"); + b.Property("CSD"); + + b.Property("ExtendedCSD"); + + b.Property("OCR"); + + b.Property("SCR"); b.HasKey("Id"); - b.HasIndex("FeaturesId"); - - b.HasIndex("ModeSense2AId"); - - b.ToTable("MMC"); + b.ToTable("MmcSd"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.Mode2A", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Pcmcia", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("AccurateCDDA"); + b.Property("CIS"); - b.Property("BCK"); + b.Property("CardCode"); - b.Property("BufferSize"); + b.Property("Compliance"); - b.Property("BufferUnderRunProtection"); + b.Property("Manufacturer"); - b.Property("CDDACommand"); + b.Property("ManufacturerCode"); - b.Property("CSSandCPPMSupported"); - - b.Property("CanEject"); - - b.Property("CanLockMedia"); - - b.Property("CompositeAudioVideo"); - - b.Property("CurrentSpeed"); - - b.Property("CurrentWriteSpeed"); - - b.Property("CurrentWriteSpeedSelected"); - - b.Property("DeterministicSlotChanger"); - - b.Property("DigitalPort1"); - - b.Property("DigitalPort2"); - - b.Property("LSBF"); - - b.Property("LeadInPW"); - - b.Property("LoadingMechanismType"); - - b.Property("LockStatus"); - - b.Property("MaximumSpeed"); - - b.Property("MaximumWriteSpeed"); - - b.Property("PlaysAudio"); - - b.Property("PreventJumperStatus"); - - b.Property("RCK"); - - b.Property("ReadsBarcode"); - - b.Property("ReadsBothSides"); - - b.Property("ReadsCDR"); - - b.Property("ReadsCDRW"); - - b.Property("ReadsDVDR"); - - b.Property("ReadsDVDRAM"); - - b.Property("ReadsDVDROM"); - - b.Property("ReadsDeinterlavedSubchannel"); - - b.Property("ReadsISRC"); - - b.Property("ReadsMode2Form1"); - - b.Property("ReadsMode2Form2"); - - b.Property("ReadsPacketCDR"); - - b.Property("ReadsSubchannel"); - - b.Property("ReadsUPC"); - - b.Property("ReturnsC2Pointers"); - - b.Property("RotationControlSelected"); - - b.Property("SSS"); - - b.Property("SeparateChannelMute"); - - b.Property("SeparateChannelVolume"); - - b.Property("SupportedVolumeLevels"); - - b.Property("SupportsMultiSession"); - - b.Property("TestWrite"); - - b.Property("WritesCDR"); - - b.Property("WritesCDRW"); - - b.Property("WritesDVDR"); - - b.Property("WritesDVDRAM"); + b.Property("ProductName"); b.HasKey("Id"); - b.ToTable("Mode2A"); + b.ToTable("Pcmcia"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.WriteDescriptor", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Scsi", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("Mode2AId"); + b.Property("InquiryData"); - b.Property("RotationControl"); + b.Property("ModeSense10Data"); - b.Property("WriteSpeed"); + b.Property("ModeSense6Data"); + + b.Property("ModeSenseId"); + + b.Property("MultiMediaDeviceId"); + + b.Property("ReadCapabilitiesId"); + + b.Property("SequentialDeviceId"); + + b.Property("SupportsModeSense10"); + + b.Property("SupportsModeSense6"); + + b.Property("SupportsModeSubpages"); b.HasKey("Id"); - b.HasIndex("Mode2AId"); + b.HasIndex("ModeSenseId"); - b.ToTable("WriteDescriptor"); + b.HasIndex("MultiMediaDeviceId"); + + b.HasIndex("ReadCapabilitiesId"); + + b.HasIndex("SequentialDeviceId"); + + b.ToTable("Scsi"); }); - modelBuilder.Entity("EFTest.Models.SCSI.Mode", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiMode", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); b.Property("BlankCheckEnabled"); @@ -838,118 +511,35 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("Mode"); + b.ToTable("ScsiMode"); }); - modelBuilder.Entity("EFTest.Models.SCSI.ModePage", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiPage", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("ModeId"); + b.Property("ScsiId"); + + b.Property("ScsiModeId"); b.Property("page"); - b.Property("subpage"); + b.Property("subpage"); b.Property("value"); b.HasKey("Id"); - b.HasIndex("ModeId"); + b.HasIndex("ScsiId"); - b.ToTable("ModePage"); + b.HasIndex("ScsiModeId"); + + b.ToTable("ScsiPage"); }); - modelBuilder.Entity("EFTest.Models.SCSI.Page", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ssc", b => { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("SCSIId"); - - b.Property("page"); - - b.Property("value"); - - b.HasKey("Id"); - - b.HasIndex("SCSIId"); - - b.ToTable("Page"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SCSI", b => - { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("InquiryId"); - - b.Property("ModeSense10Data"); - - b.Property("ModeSense6Data"); - - b.Property("ModeSenseId"); - - b.Property("MultiMediaDeviceId"); - - b.Property("ReadCapabilitiesId"); - - b.Property("SequentialDeviceId"); - - b.Property("SupportsModeSense10"); - - b.Property("SupportsModeSense6"); - - b.Property("SupportsModeSubpages"); - - b.HasKey("Id"); - - b.HasIndex("InquiryId"); - - b.HasIndex("ModeSenseId"); - - b.HasIndex("MultiMediaDeviceId"); - - b.HasIndex("ReadCapabilitiesId"); - - b.HasIndex("SequentialDeviceId"); - - b.ToTable("SCSI"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SequentialMedia", b => - { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("CanReadMediaSerial"); - - b.Property("Density"); - - b.Property("Manufacturer"); - - b.Property("MediaIsRecognized"); - - b.Property("MediumType"); - - b.Property("MediumTypeName"); - - b.Property("ModeSense10Data"); - - b.Property("ModeSense6Data"); - - b.Property("Model"); - - b.Property("SSCId"); - - b.HasKey("Id"); - - b.HasIndex("SSCId"); - - b.ToTable("SequentialMedia"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SSC", b => - { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); b.Property("BlockSizeGranularity"); @@ -959,12 +549,41 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("SSC"); + b.ToTable("Ssc"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SupportedDensity", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("Length"); + + b.Property("MediumType"); + + b.Property("Name"); + + b.Property("Organization"); + + b.Property("SscId"); + + b.Property("TestedSequentialMediaId"); + + b.Property("Width"); + + b.HasKey("Id"); + + b.HasIndex("SscId"); + + b.HasIndex("TestedSequentialMediaId"); + + b.ToTable("SscSupportedMedia"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SupportedDensity", b => + { + b.Property("Id").ValueGeneratedOnAdd(); b.Property("BitsPerMm"); @@ -982,11 +601,11 @@ namespace DiscImageChef.Database.Migrations b.Property("PrimaryCode"); - b.Property("SSCId"); - b.Property("SecondaryCode"); - b.Property("SequentialMediaId"); + b.Property("SscId"); + + b.Property("TestedSequentialMediaId"); b.Property("Tracks"); @@ -996,87 +615,24 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.HasIndex("SSCId"); + b.HasIndex("SscId"); - b.HasIndex("SequentialMediaId"); + b.HasIndex("TestedSequentialMediaId"); b.ToTable("SupportedDensity"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SupportedMedia", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedMedia", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("Description"); - - b.Property("Length"); - - b.Property("MediumType"); - - b.Property("Name"); - - b.Property("Organization"); - - b.Property("SSCId"); - - b.Property("SequentialMediaId"); - - b.Property("Width"); - - b.HasKey("Id"); - - b.HasIndex("SSCId"); - - b.HasIndex("SequentialMediaId"); - - b.ToTable("SupportedMedia"); - }); - - modelBuilder.Entity("EFTest.Models.SecureDigital", b => - { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("CID"); - - b.Property("CSD"); - - b.Property("ExtendedCSD"); - - b.Property("OCR"); - - b.Property("SCR"); - - b.HasKey("Id"); - - b.ToTable("SecureDigital"); - }); - - modelBuilder.Entity("EFTest.Models.StringClass", b => - { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("PCMCIAId"); - - b.Property("Value").IsRequired(); - - b.HasKey("Id"); - - b.HasIndex("PCMCIAId"); - - b.ToTable("StringClass"); - }); - - modelBuilder.Entity("EFTest.Models.TestedMedia", b => - { - b.Property("Id").ValueGeneratedOnAdd(); - - b.Property("ATAId"); + b.Property("AtaId"); b.Property("BlockSize"); b.Property("Blocks"); - b.Property("CHSId"); + b.Property("CHSId"); b.Property("CanReadAACS"); @@ -1102,6 +658,8 @@ namespace DiscImageChef.Database.Migrations b.Property("CanReadDiscInformation"); + b.Property("CanReadFirstTrackPreGap"); + b.Property("CanReadFullTOC"); b.Property("CanReadHDCMI"); @@ -1110,8 +668,6 @@ namespace DiscImageChef.Database.Migrations b.Property("CanReadLeadIn"); - b.Property("CanReadLeadInPostgap"); - b.Property("CanReadLeadOut"); b.Property("CanReadMediaID"); @@ -1140,10 +696,12 @@ namespace DiscImageChef.Database.Migrations b.Property("CanReadTOC"); - b.Property("CurrentCHSId"); + b.Property("CurrentCHSId"); b.Property("Density"); + b.Property("IdentifyData"); + b.Property("LBA48Sectors"); b.Property("LBASectors"); @@ -1152,8 +710,6 @@ namespace DiscImageChef.Database.Migrations b.Property("LongBlockSize"); - b.Property("MMCId"); - b.Property("Manufacturer"); b.Property("MediaIsRecognized"); @@ -1162,6 +718,8 @@ namespace DiscImageChef.Database.Migrations b.Property("MediumTypeName"); + b.Property("MmcId"); + b.Property("ModeSense10Data"); b.Property("ModeSense6Data"); @@ -1172,7 +730,7 @@ namespace DiscImageChef.Database.Migrations b.Property("PhysicalBlockSize"); - b.Property("SCSIId"); + b.Property("ScsiId"); b.Property("SolidStateDevice"); @@ -1188,14 +746,14 @@ namespace DiscImageChef.Database.Migrations b.Property("SupportsPlextorReadRawDVD"); - b.Property("SupportsRead"); - b.Property("SupportsRead10"); b.Property("SupportsRead12"); b.Property("SupportsRead16"); + b.Property("SupportsRead6"); + b.Property("SupportsReadCapacity"); b.Property("SupportsReadCapacity16"); @@ -1236,6 +794,8 @@ namespace DiscImageChef.Database.Migrations b.Property("SupportsReadRetryLba"); + b.Property("SupportsReadSectors"); + b.Property("SupportsSeek"); b.Property("SupportsSeekLba"); @@ -1246,22 +806,53 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.HasIndex("ATAId"); + b.HasIndex("AtaId"); b.HasIndex("CHSId"); b.HasIndex("CurrentCHSId"); - b.HasIndex("MMCId"); + b.HasIndex("MmcId"); - b.HasIndex("SCSIId"); + b.HasIndex("ScsiId"); b.ToTable("TestedMedia"); }); - modelBuilder.Entity("EFTest.Models.USB", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); + + b.Property("CanReadMediaSerial"); + + b.Property("Density"); + + b.Property("Manufacturer"); + + b.Property("MediaIsRecognized"); + + b.Property("MediumType"); + + b.Property("MediumTypeName"); + + b.Property("ModeSense10Data"); + + b.Property("ModeSense6Data"); + + b.Property("Model"); + + b.Property("SscId"); + + b.HasKey("Id"); + + b.HasIndex("SscId"); + + b.ToTable("TestedSequentialMedia"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Usb", b => + { + b.Property("Id").ValueGeneratedOnAdd(); b.Property("Descriptors"); @@ -1277,154 +868,245 @@ namespace DiscImageChef.Database.Migrations b.HasKey("Id"); - b.ToTable("USB"); + b.ToTable("Usb"); }); - modelBuilder.Entity("EFTest.Models.UshortClass", b => + modelBuilder.Entity("DiscImageChef.Decoders.SCSI.Modes+ModePage_2A", b => { - b.Property("Id").ValueGeneratedOnAdd(); + b.Property("Id").ValueGeneratedOnAdd(); - b.Property("InquiryId"); + b.Property("AccurateCDDA"); - b.Property("Value"); + b.Property("AudioPlay"); + + b.Property("BCK"); + + b.Property("BUF"); + + b.Property("BufferSize"); + + b.Property("C2Pointer"); + + b.Property("CDDACommand"); + + b.Property("CMRSupported"); + + b.Property("Composite"); + + b.Property("CurrentSpeed"); + + b.Property("CurrentWriteSpeed"); + + b.Property("CurrentWriteSpeedSelected"); + + b.Property("DeinterlaveSubchannel"); + + b.Property("DigitalPort1"); + + b.Property("DigitalPort2"); + + b.Property("Eject"); + + b.Property("ISRC"); + + b.Property("LSBF"); + + b.Property("LeadInPW"); + + b.Property("Length"); + + b.Property("LoadingMechanism"); + + b.Property("Lock"); + + b.Property("LockState"); + + b.Property("MaxWriteSpeed"); + + b.Property("MaximumSpeed"); + + b.Property("Method2"); + + b.Property("Mode2Form1"); + + b.Property("Mode2Form2"); + + b.Property("MultiSession"); + + b.Property("PS"); + + b.Property("PreventJumper"); + + b.Property("RCK"); + + b.Property("ReadBarcode"); + + b.Property("ReadCDR"); + + b.Property("ReadCDRW"); + + b.Property("ReadDVDR"); + + b.Property("ReadDVDRAM"); + + b.Property("ReadDVDROM"); + + b.Property("RotationControlSelected"); + + b.Property("SCC"); + + b.Property("SDP"); + + b.Property("SSS"); + + b.Property("SeparateChannelMute"); + + b.Property("SeparateChannelVolume"); + + b.Property("Subchannel"); + + b.Property("SupportedVolumeLevels"); + + b.Property("TestWrite"); + + b.Property("UPC"); + + b.Property("WriteCDR"); + + b.Property("WriteCDRW"); + + b.Property("WriteDVDR"); + + b.Property("WriteDVDRAM"); b.HasKey("Id"); - b.HasIndex("InquiryId"); - - b.ToTable("UshortClass"); + b.ToTable("ModePage_2A"); }); - modelBuilder.Entity("EFTest.Models.ATA", - b => - { - b.HasOne("EFTest.Models.TestedMedia", "ReadCapabilities").WithMany() - .HasForeignKey("ReadCapabilitiesId"); - }); - - modelBuilder.Entity("EFTest.Models.Device", b => + modelBuilder.Entity("DiscImageChef.Database.Models.Device", b => { - b.HasOne("EFTest.Models.ATA", "ATA").WithMany().HasForeignKey("ATAId"); + b.HasBaseType("DiscImageChef.CommonTypes.Metadata.DeviceReportV2"); - b.HasOne("EFTest.Models.ATA", "ATAPI").WithMany().HasForeignKey("ATAPIId"); + b.Property("LastSynchronized"); - b.HasOne("EFTest.Models.FireWire", "FireWire").WithMany().HasForeignKey("FireWireId"); + b.ToTable("Device"); - b.HasOne("EFTest.Models.SecureDigital", "MultiMediaCard").WithMany().HasForeignKey("MultiMediaCardId"); - - b.HasOne("EFTest.Models.PCMCIA", "PCMCIA").WithMany().HasForeignKey("PCMCIAId"); - - b.HasOne("EFTest.Models.SCSI.SCSI", "SCSI").WithMany().HasForeignKey("SCSIId"); - - b.HasOne("EFTest.Models.SecureDigital", "SecureDigital").WithMany().HasForeignKey("SecureDigitalId"); - - b.HasOne("EFTest.Models.USB", "USB").WithMany().HasForeignKey("USBId"); + b.HasDiscriminator().HasValue("Device"); }); - modelBuilder.Entity("EFTest.Models.IntClass", + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b => { - b.HasOne("EFTest.Models.SCSI.SupportedMedia").WithMany("DensityCodes") - .HasForeignKey("SupportedMediaId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedMedia", "ReadCapabilities") + .WithMany().HasForeignKey("ReadCapabilitiesId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.BlockDescriptor", + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.BlockDescriptor", b => { - b.HasOne("EFTest.Models.SCSI.Mode").WithMany("BlockDescriptors") - .HasForeignKey("ModeId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.ScsiMode").WithMany("BlockDescriptors") + .HasForeignKey("ScsiModeId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.MMC", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", + b => + { + b.HasOne("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia") + .WithMany("DensityCodes").HasForeignKey("SscSupportedMediaId"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DeviceReportV2", b => { - b.HasOne("EFTest.Models.SCSI.MMC.Features", "Features").WithMany().HasForeignKey("FeaturesId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ata", "ATA").WithMany().HasForeignKey("ATAId"); - b.HasOne("EFTest.Models.SCSI.MMC.Mode2A", "ModeSense2A").WithMany().HasForeignKey("ModeSense2AId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ata", "ATAPI").WithMany().HasForeignKey("ATAPIId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.FireWire", "FireWire").WithMany() + .HasForeignKey("FireWireId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.MmcSd", "MultiMediaCard").WithMany() + .HasForeignKey("MultiMediaCardId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Pcmcia", "PCMCIA").WithMany().HasForeignKey("PCMCIAId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Scsi", "SCSI").WithMany().HasForeignKey("SCSIId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.MmcSd", "SecureDigital").WithMany() + .HasForeignKey("SecureDigitalId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Usb", "USB").WithMany().HasForeignKey("USBId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.MMC.WriteDescriptor", - b => - { - b.HasOne("EFTest.Models.SCSI.MMC.Mode2A") - .WithMany("WriteSpeedPerformanceDescriptors").HasForeignKey("Mode2AId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.ModePage", - b => - { - b.HasOne("EFTest.Models.SCSI.Mode").WithMany("ModePages").HasForeignKey("ModeId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.Page", - b => - { - b.HasOne("EFTest.Models.SCSI.SCSI").WithMany("EVPDPages").HasForeignKey("SCSIId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SCSI", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Mmc", b => { - b.HasOne("EFTest.Models.SCSI.Inquiry", "Inquiry").WithMany().HasForeignKey("InquiryId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.MmcFeatures", "Features").WithMany() + .HasForeignKey("FeaturesId"); - b.HasOne("EFTest.Models.SCSI.Mode", "ModeSense").WithMany().HasForeignKey("ModeSenseId"); + b.HasOne("DiscImageChef.Decoders.SCSI.Modes+ModePage_2A", "ModeSense2A").WithMany() + .HasForeignKey("ModeSense2AId"); + }); - b.HasOne("EFTest.Models.SCSI.MMC.MMC", "MultiMediaDevice").WithMany() + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Scsi", b => + { + b.HasOne("DiscImageChef.CommonTypes.Metadata.ScsiMode", "ModeSense").WithMany() + .HasForeignKey("ModeSenseId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Mmc", "MultiMediaDevice").WithMany() .HasForeignKey("MultiMediaDeviceId"); - b.HasOne("EFTest.Models.TestedMedia", "ReadCapabilities").WithMany() + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedMedia", "ReadCapabilities").WithMany() .HasForeignKey("ReadCapabilitiesId"); - b.HasOne("EFTest.Models.SCSI.SSC.SSC", "SequentialDevice").WithMany() + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc", "SequentialDevice").WithMany() .HasForeignKey("SequentialDeviceId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SequentialMedia", - b => - { - b.HasOne("EFTest.Models.SCSI.SSC.SSC").WithMany("TestedMedia") - .HasForeignKey("SSCId"); - }); - - modelBuilder.Entity("EFTest.Models.SCSI.SSC.SupportedDensity", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiPage", b => { - b.HasOne("EFTest.Models.SCSI.SSC.SSC").WithMany("SupportedDensities").HasForeignKey("SSCId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Scsi").WithMany("EVPDPages").HasForeignKey("ScsiId"); - b.HasOne("EFTest.Models.SCSI.SSC.SequentialMedia").WithMany("SupportedDensities") - .HasForeignKey("SequentialMediaId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.ScsiMode").WithMany("ModePages") + .HasForeignKey("ScsiModeId"); }); - modelBuilder.Entity("EFTest.Models.SCSI.SupportedMedia", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia", b => { - b.HasOne("EFTest.Models.SCSI.SSC.SSC").WithMany("SupportedMediaTypes").HasForeignKey("SSCId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc").WithMany("SupportedMediaTypes") + .HasForeignKey("SscId"); - b.HasOne("EFTest.Models.SCSI.SSC.SequentialMedia").WithMany("SupportedMediaTypes") - .HasForeignKey("SequentialMediaId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia").WithMany("SupportedMediaTypes") + .HasForeignKey("TestedSequentialMediaId"); }); - modelBuilder.Entity("EFTest.Models.StringClass", - b => - { - b.HasOne("EFTest.Models.PCMCIA").WithMany("AdditionalInformation") - .HasForeignKey("PCMCIAId"); - }); - - modelBuilder.Entity("EFTest.Models.TestedMedia", b => + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SupportedDensity", b => { - b.HasOne("EFTest.Models.ATA").WithMany("RemovableMedias").HasForeignKey("ATAId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc").WithMany("SupportedDensities") + .HasForeignKey("SscId"); - b.HasOne("EFTest.Models.CHS", "CHS").WithMany().HasForeignKey("CHSId"); - - b.HasOne("EFTest.Models.CHS", "CurrentCHS").WithMany().HasForeignKey("CurrentCHSId"); - - b.HasOne("EFTest.Models.SCSI.MMC.MMC").WithMany("TestedMedia").HasForeignKey("MMCId"); - - b.HasOne("EFTest.Models.SCSI.SCSI").WithMany("RemovableMedias").HasForeignKey("SCSIId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia").WithMany("SupportedDensities") + .HasForeignKey("TestedSequentialMediaId"); }); - modelBuilder.Entity("EFTest.Models.UshortClass", + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedMedia", b => + { + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ata").WithMany("RemovableMedias").HasForeignKey("AtaId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Chs", "CHS").WithMany().HasForeignKey("CHSId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Chs", "CurrentCHS").WithMany() + .HasForeignKey("CurrentCHSId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Mmc").WithMany("TestedMedia").HasForeignKey("MmcId"); + + b.HasOne("DiscImageChef.CommonTypes.Metadata.Scsi").WithMany("RemovableMedias").HasForeignKey("ScsiId"); + }); + + modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedSequentialMedia", b => { - b.HasOne("EFTest.Models.SCSI.Inquiry").WithMany("VersionDescriptors") - .HasForeignKey("InquiryId"); + b.HasOne("DiscImageChef.CommonTypes.Metadata.Ssc").WithMany("TestedMedia") + .HasForeignKey("SscId"); }); #pragma warning restore 612, 618 } diff --git a/DiscImageChef.Database/Models/ATA.cs b/DiscImageChef.Database/Models/ATA.cs deleted file mode 100644 index 5ccdb52f9..000000000 --- a/DiscImageChef.Database/Models/ATA.cs +++ /dev/null @@ -1,225 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : ATA.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 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(oldAta.RemovableMedias.Select(TestedMedia.MapTestedMedia)); - - return newAta; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/BaseEntity.cs b/DiscImageChef.Database/Models/BaseEntity.cs deleted file mode 100644 index 1195a7908..000000000 --- a/DiscImageChef.Database/Models/BaseEntity.cs +++ /dev/null @@ -1,49 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : BaseEntity.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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; } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/BaseTypes.cs b/DiscImageChef.Database/Models/BaseTypes.cs deleted file mode 100644 index 7066445d1..000000000 --- a/DiscImageChef.Database/Models/BaseTypes.cs +++ /dev/null @@ -1,52 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : BaseTypes.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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; } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/CHS.cs b/DiscImageChef.Database/Models/CHS.cs deleted file mode 100644 index 2fe108666..000000000 --- a/DiscImageChef.Database/Models/CHS.cs +++ /dev/null @@ -1,41 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : CHS.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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; } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/Device.cs b/DiscImageChef.Database/Models/Device.cs index 18de54b1b..ac82d1ea9 100644 --- a/DiscImageChef.Database/Models/Device.cs +++ b/DiscImageChef.Database/Models/Device.cs @@ -1,163 +1,10 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : this.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2011-2018 Natalia Portillo -// ****************************************************************************/ - using System; using DiscImageChef.CommonTypes.Metadata; namespace DiscImageChef.Database.Models { - public class Device : DatedEntity + public class Device : DeviceReportV2 { - public Device() - { - 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 + public DateTime LastSynchronized { get; set; } } } \ No newline at end of file diff --git a/DiscImageChef.Database/Models/FireWire.cs b/DiscImageChef.Database/Models/FireWire.cs deleted file mode 100644 index 7daf58e85..000000000 --- a/DiscImageChef.Database/Models/FireWire.cs +++ /dev/null @@ -1,59 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : FireWire.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 - }; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/PCMCIA.cs b/DiscImageChef.Database/Models/PCMCIA.cs deleted file mode 100644 index 13aae1d74..000000000 --- a/DiscImageChef.Database/Models/PCMCIA.cs +++ /dev/null @@ -1,72 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : PCMCIA.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 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(oldPcmcia.AdditionalInformation.Select(t => new StringClass {Value = t})); - - return newPcmcia; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/Report.cs b/DiscImageChef.Database/Models/Report.cs new file mode 100644 index 000000000..fa46e1d53 --- /dev/null +++ b/DiscImageChef.Database/Models/Report.cs @@ -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; } + } +} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/BlockDescriptor.cs b/DiscImageChef.Database/Models/SCSI/BlockDescriptor.cs deleted file mode 100644 index 52b591fc9..000000000 --- a/DiscImageChef.Database/Models/SCSI/BlockDescriptor.cs +++ /dev/null @@ -1,55 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : BlockDescriptor.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/Inquiry.cs b/DiscImageChef.Database/Models/SCSI/Inquiry.cs deleted file mode 100644 index e256ad842..000000000 --- a/DiscImageChef.Database/Models/SCSI/Inquiry.cs +++ /dev/null @@ -1,141 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Inquiry.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 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(oldInquiry.VersionDescriptors.Select(t => new UshortClass {Value = t})); - - return newInquiry; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/MMC/Features.cs b/DiscImageChef.Database/Models/SCSI/MMC/Features.cs deleted file mode 100644 index 3b595d937..000000000 --- a/DiscImageChef.Database/Models/SCSI/MMC/Features.cs +++ /dev/null @@ -1,306 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Features.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/MMC/MMC.cs b/DiscImageChef.Database/Models/SCSI/MMC/MMC.cs deleted file mode 100644 index 2a1f0a8b9..000000000 --- a/DiscImageChef.Database/Models/SCSI/MMC/MMC.cs +++ /dev/null @@ -1,61 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : MMC.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 { 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(oldMmc.TestedMedia.Select(Models.TestedMedia.MapTestedMedia)); - - return newMmc; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/MMC/Mode2A.cs b/DiscImageChef.Database/Models/SCSI/MMC/Mode2A.cs deleted file mode 100644 index 0a4c2a312..000000000 --- a/DiscImageChef.Database/Models/SCSI/MMC/Mode2A.cs +++ /dev/null @@ -1,166 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Mode2A.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 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(oldMode.WriteSpeedPerformanceDescriptors.Select(t => new WriteDescriptor - { - RotationControl = t.RotationControl, - WriteSpeed = t.WriteSpeed - })); - - return newMode; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/MMC/WriteDescriptor.cs b/DiscImageChef.Database/Models/SCSI/MMC/WriteDescriptor.cs deleted file mode 100644 index 5dca89426..000000000 --- a/DiscImageChef.Database/Models/SCSI/MMC/WriteDescriptor.cs +++ /dev/null @@ -1,51 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : WriteDescriptor.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 - }; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/Mode.cs b/DiscImageChef.Database/Models/SCSI/Mode.cs deleted file mode 100644 index 5361fc900..000000000 --- a/DiscImageChef.Database/Models/SCSI/Mode.cs +++ /dev/null @@ -1,78 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Mode.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 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 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(oldMode.BlockDescriptors.Select(BlockDescriptor.MapBlockDescriptor)); - - if(oldMode.ModePages == null) return newMode; - - { - newMode.ModePages = new List(oldMode.ModePages.Select(ModePage.MapModePage)); - } - - return newMode; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/ModePage.cs b/DiscImageChef.Database/Models/SCSI/ModePage.cs deleted file mode 100644 index cf93f9aa7..000000000 --- a/DiscImageChef.Database/Models/SCSI/ModePage.cs +++ /dev/null @@ -1,55 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : ModePage.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 - }; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/Page.cs b/DiscImageChef.Database/Models/SCSI/Page.cs deleted file mode 100644 index b2a9cfc61..000000000 --- a/DiscImageChef.Database/Models/SCSI/Page.cs +++ /dev/null @@ -1,47 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Page.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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}; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/SCSI.cs b/DiscImageChef.Database/Models/SCSI/SCSI.cs deleted file mode 100644 index 78843004a..000000000 --- a/DiscImageChef.Database/Models/SCSI/SCSI.cs +++ /dev/null @@ -1,84 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : SCSI.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 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 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(oldScsi.EVPDPages.Select(Page.MapPage)); - - if(oldScsi.RemovableMedias == null) return newScsi; - - { - newScsi.RemovableMedias = - new List(oldScsi.RemovableMedias.Select(TestedMedia.MapTestedMedia)); - } - - return newScsi; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/SSC/SSC.cs b/DiscImageChef.Database/Models/SCSI/SSC/SSC.cs deleted file mode 100644 index 02e988b88..000000000 --- a/DiscImageChef.Database/Models/SCSI/SSC/SSC.cs +++ /dev/null @@ -1,74 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : SSC.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 SupportedDensities { get; set; } - public List SupportedMediaTypes { get; set; } - public List 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(oldSsc.SupportedDensities.Select(SupportedDensity.MapSupportedDensity)); - - if(oldSsc.SupportedMediaTypes != null) - newSsc.SupportedMediaTypes = - new List(oldSsc.SupportedMediaTypes.Select(SupportedMedia.MapSupportedMedia)); - - if(oldSsc.TestedMedia == null) return newSsc; - - newSsc.TestedMedia = - new List(oldSsc.TestedMedia.Select(SequentialMedia.MapSequentialMedia)); - - return newSsc; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/SSC/SequentialMedia.cs b/DiscImageChef.Database/Models/SCSI/SSC/SequentialMedia.cs deleted file mode 100644 index acce23be4..000000000 --- a/DiscImageChef.Database/Models/SCSI/SSC/SequentialMedia.cs +++ /dev/null @@ -1,82 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : SequentialMedia.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 SupportedDensities { get; set; } - public List 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(oldSequentialMedia.SupportedDensities.Select(SupportedDensity - .MapSupportedDensity)); - - if(newSequentialMedia.SupportedMediaTypes == null) return newSequentialMedia; - - newSequentialMedia.SupportedMediaTypes = - new List(oldSequentialMedia - .SupportedMediaTypes.Select(SupportedMedia.MapSupportedMedia)); - - return newSequentialMedia; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/SSC/SupportedDensity.cs b/DiscImageChef.Database/Models/SCSI/SSC/SupportedDensity.cs deleted file mode 100644 index 132f956f9..000000000 --- a/DiscImageChef.Database/Models/SCSI/SSC/SupportedDensity.cs +++ /dev/null @@ -1,69 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : SupportedDensity.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 - }; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SCSI/SupportedMedia.cs b/DiscImageChef.Database/Models/SCSI/SupportedMedia.cs deleted file mode 100644 index 0be317d57..000000000 --- a/DiscImageChef.Database/Models/SCSI/SupportedMedia.cs +++ /dev/null @@ -1,68 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : SupportedMedia.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 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(oldSupportedMedia.DensityCodes.Select(t => new IntClass {Value = t})); - - return newSupportedMedia; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/SecureDigital.cs b/DiscImageChef.Database/Models/SecureDigital.cs deleted file mode 100644 index 52a892a03..000000000 --- a/DiscImageChef.Database/Models/SecureDigital.cs +++ /dev/null @@ -1,59 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : SecureDigital.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 - }; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/TestedMedia.cs b/DiscImageChef.Database/Models/TestedMedia.cs deleted file mode 100644 index cfea74f25..000000000 --- a/DiscImageChef.Database/Models/TestedMedia.cs +++ /dev/null @@ -1,243 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : TestedMedia.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Database/Models/Usb.cs b/DiscImageChef.Database/Models/Usb.cs deleted file mode 100644 index 4fc4baf07..000000000 --- a/DiscImageChef.Database/Models/Usb.cs +++ /dev/null @@ -1,61 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Usb.cs -// Author(s) : Natalia Portillo -// -// 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 . -// -// ---------------------------------------------------------------------------- -// 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 - }; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Decoders/DiscImageChef.Decoders.csproj b/DiscImageChef.Decoders/DiscImageChef.Decoders.csproj index 82d05f815..0b5344f1c 100644 --- a/DiscImageChef.Decoders/DiscImageChef.Decoders.csproj +++ b/DiscImageChef.Decoders/DiscImageChef.Decoders.csproj @@ -43,7 +43,13 @@ false + + ..\..\..\.nuget\packages\newtonsoft.json\11.0.2\lib\net45\Newtonsoft.Json.dll + + + ..\..\..\.nuget\packages\system.componentmodel.annotations\4.5.0\ref\netstandard2.0\System.ComponentModel.Annotations.dll + diff --git a/DiscImageChef.Decoders/SCSI/EVPD.cs b/DiscImageChef.Decoders/SCSI/EVPD.cs index 953c96285..2d6222f7f 100644 --- a/DiscImageChef.Decoders/SCSI/EVPD.cs +++ b/DiscImageChef.Decoders/SCSI/EVPD.cs @@ -172,10 +172,7 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_81(byte[] pageResponse) - { - return PrettifyPage_81(DecodePage_81(pageResponse)); - } + public static string PrettifyPage_81(byte[] pageResponse) => PrettifyPage_81(DecodePage_81(pageResponse)); public static string DefinitionToString(ScsiDefinitions definition) { @@ -430,10 +427,7 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_83(byte[] pageResponse) - { - return PrettifyPage_83(DecodePage_83(pageResponse)); - } + public static string PrettifyPage_83(byte[] pageResponse) => PrettifyPage_83(DecodePage_83(pageResponse)); public static string PrettifyPage_83(Page_83? modePage) { @@ -823,10 +817,7 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_84(byte[] pageResponse) - { - return PrettifyPage_84(DecodePage_84(pageResponse)); - } + public static string PrettifyPage_84(byte[] pageResponse) => PrettifyPage_84(DecodePage_84(pageResponse)); public static string PrettifyPage_84(Page_84? modePage) { @@ -955,10 +946,7 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_85(byte[] pageResponse) - { - return PrettifyPage_85(DecodePage_85(pageResponse)); - } + public static string PrettifyPage_85(byte[] pageResponse) => PrettifyPage_85(DecodePage_85(pageResponse)); public static string PrettifyPage_85(Page_85? modePage) { @@ -1216,10 +1204,7 @@ namespace DiscImageChef.Decoders.SCSI }; } - public static string PrettifyPage_86(byte[] pageResponse) - { - return PrettifyPage_86(DecodePage_86(pageResponse)); - } + public static string PrettifyPage_86(byte[] pageResponse) => PrettifyPage_86(DecodePage_86(pageResponse)); public static string PrettifyPage_86(Page_86? modePage) { @@ -1384,10 +1369,7 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_89(byte[] pageResponse) - { - return PrettifyPage_89(DecodePage_89(pageResponse)); - } + public static string PrettifyPage_89(byte[] pageResponse) => PrettifyPage_89(DecodePage_89(pageResponse)); // TODO: Decode ATA signature? public static string PrettifyPage_89(Page_89? modePage) @@ -1433,7 +1415,7 @@ namespace DiscImageChef.Decoders.SCSI } Identify.IdentifyDevice? id = Identify.Decode(page.IdentifyData); - if(id.HasValue) + if(id != null) { sb.AppendLine("\tATA IDENTIFY information follows:"); sb.AppendFormat("{0}", Identify.Prettify(id)).AppendLine(); @@ -1511,10 +1493,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_C0_Quantum(byte[] pageResponse) - { - return PrettifyPage_C0_Quantum(DecodePage_C0_Quantum(pageResponse)); - } + public static string PrettifyPage_C0_Quantum(byte[] pageResponse) => + PrettifyPage_C0_Quantum(DecodePage_C0_Quantum(pageResponse)); public static string PrettifyPage_C0_Quantum(Page_C0_Quantum? modePage) { @@ -1593,10 +1573,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_C0_C1_Certance(byte[] pageResponse) - { - return PrettifyPage_C0_C1_Certance(DecodePage_C0_C1_Certance(pageResponse)); - } + public static string PrettifyPage_C0_C1_Certance(byte[] pageResponse) => + PrettifyPage_C0_C1_Certance(DecodePage_C0_C1_Certance(pageResponse)); public static string PrettifyPage_C0_C1_Certance(Page_C0_C1_Certance? modePage) { @@ -1666,10 +1644,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(byte[] 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(byte[] pageResponse) => + 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) { @@ -1837,10 +1813,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_DF_Certance(byte[] pageResponse) - { - return PrettifyPage_DF_Certance(DecodePage_DF_Certance(pageResponse)); - } + public static string PrettifyPage_DF_Certance(byte[] pageResponse) => + PrettifyPage_DF_Certance(DecodePage_DF_Certance(pageResponse)); public static string PrettifyPage_DF_Certance(Page_DF_Certance? modePage) { @@ -2013,10 +1987,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_C0_IBM(byte[] pageResponse) - { - return PrettifyPage_C0_IBM(DecodePage_C0_IBM(pageResponse)); - } + public static string PrettifyPage_C0_IBM(byte[] pageResponse) => + PrettifyPage_C0_IBM(DecodePage_C0_IBM(pageResponse)); public static string PrettifyPage_C0_IBM(Page_C0_IBM? modePage) { @@ -2084,10 +2056,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_C1_IBM(byte[] pageResponse) - { - return PrettifyPage_C1_IBM(DecodePage_C1_IBM(pageResponse)); - } + public static string PrettifyPage_C1_IBM(byte[] pageResponse) => + PrettifyPage_C1_IBM(DecodePage_C1_IBM(pageResponse)); public static string PrettifyPage_C1_IBM(Page_C1_IBM? modePage) { @@ -2154,10 +2124,7 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_B0(byte[] pageResponse) - { - return PrettifyPage_B0(DecodePage_B0(pageResponse)); - } + public static string PrettifyPage_B0(byte[] pageResponse) => PrettifyPage_B0(DecodePage_B0(pageResponse)); public static string PrettifyPage_B0(Page_B0? modePage) { @@ -2339,10 +2306,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_C0_to_C5_HP(byte[] pageResponse) - { - return PrettifyPage_C0_to_C5_HP(DecodePage_C0_to_C5_HP(pageResponse)); - } + public static string PrettifyPage_C0_to_C5_HP(byte[] pageResponse) => + 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) { @@ -2442,10 +2407,8 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyPage_C0_Seagate(byte[] pageResponse) - { - return PrettifyPage_C0_Seagate(DecodePage_C0_Seagate(pageResponse)); - } + public static string PrettifyPage_C0_Seagate(byte[] pageResponse) => + PrettifyPage_C0_Seagate(DecodePage_C0_Seagate(pageResponse)); public static string PrettifyPage_C0_Seagate(Page_C0_Seagate? modePage) { diff --git a/DiscImageChef.Decoders/SCSI/Modes/2A.cs b/DiscImageChef.Decoders/SCSI/Modes/2A.cs index e1a732e3d..05abba004 100644 --- a/DiscImageChef.Decoders/SCSI/Modes/2A.cs +++ b/DiscImageChef.Decoders/SCSI/Modes/2A.cs @@ -30,9 +30,11 @@ // Copyright © 2011-2018 Natalia Portillo // ****************************************************************************/ +using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; +using Newtonsoft.Json; namespace DiscImageChef.Decoders.SCSI { @@ -52,135 +54,139 @@ namespace DiscImageChef.Decoders.SCSI /// 26 bytes in MMC-2 /// Variable bytes in MMC-3 /// - public struct ModePage_2A + public class ModePage_2A { + public ModePage_2A_WriteDescriptor[] WriteSpeedPerformanceDescriptors; /// /// Parameters can be saved /// - public bool PS; + public bool PS { get; set; } /// /// Drive supports multi-session and/or Photo-CD /// - public bool MultiSession; + public bool MultiSession { get; set; } /// /// Drive is capable of reading sectors in Mode 2 Form 2 format /// - public bool Mode2Form2; + public bool Mode2Form2 { get; set; } /// /// Drive is capable of reading sectors in Mode 2 Form 1 format /// - public bool Mode2Form1; + public bool Mode2Form1 { get; set; } /// /// Drive is capable of playing audio /// - public bool AudioPlay; + public bool AudioPlay { get; set; } /// /// Drive can return the ISRC /// - public bool ISRC; + public bool ISRC { get; set; } /// /// Drive can return the media catalogue number /// - public bool UPC; + public bool UPC { get; set; } /// /// Drive can return C2 pointers /// - public bool C2Pointer; + public bool C2Pointer { get; set; } /// /// Drive can read, deinterlave and correct R-W subchannels /// - public bool DeinterlaveSubchannel; + public bool DeinterlaveSubchannel { get; set; } /// /// Drive can read interleaved and uncorrected R-W subchannels /// - public bool Subchannel; + public bool Subchannel { get; set; } /// /// Drive can continue from a loss of streaming on audio reading /// - public bool AccurateCDDA; + public bool AccurateCDDA { get; set; } /// /// Audio can be read as digital data /// - public bool CDDACommand; + public bool CDDACommand { get; set; } /// /// Loading Mechanism Type /// - public byte LoadingMechanism; + public byte LoadingMechanism { get; set; } /// /// Drive can eject discs /// - public bool Eject; + public bool Eject { get; set; } /// /// Drive's optional prevent jumper status /// - public bool PreventJumper; + public bool PreventJumper { get; set; } /// /// Current lock status /// - public bool LockState; + public bool LockState { get; set; } /// /// Drive can lock media /// - public bool Lock; + public bool Lock { get; set; } /// /// Each channel can be muted independently /// - public bool SeparateChannelMute; + public bool SeparateChannelMute { get; set; } /// /// Each channel's volume can be controlled independently /// - public bool SeparateChannelVolume; + public bool SeparateChannelVolume { get; set; } /// /// Maximum drive speed in Kbytes/second /// - public ushort MaximumSpeed; + public ushort MaximumSpeed { get; set; } /// /// Supported volume levels /// - public ushort SupportedVolumeLevels; + public ushort SupportedVolumeLevels { get; set; } /// /// Buffer size in Kbytes /// - public ushort BufferSize; + public ushort BufferSize { get; set; } /// /// Current drive speed in Kbytes/second /// - public ushort CurrentSpeed; + public ushort CurrentSpeed { get; set; } - public bool Method2; - public bool ReadCDRW; - public bool ReadCDR; - public bool WriteCDRW; - public bool WriteCDR; - public bool DigitalPort2; - public bool DigitalPort1; - public bool Composite; - public bool SSS; - public bool SDP; - public byte Length; - public bool LSBF; - public bool RCK; - public bool BCK; + public bool Method2 { get; set; } + public bool ReadCDRW { get; set; } + public bool ReadCDR { get; set; } + public bool WriteCDRW { get; set; } + public bool WriteCDR { get; set; } + public bool DigitalPort2 { get; set; } + public bool DigitalPort1 { get; set; } + public bool Composite { get; set; } + public bool SSS { get; set; } + public bool SDP { get; set; } + public byte Length { get; set; } + public bool LSBF { get; set; } + public bool RCK { get; set; } + public bool BCK { get; set; } - public bool TestWrite; - public ushort MaxWriteSpeed; - public ushort CurrentWriteSpeed; + public bool TestWrite { get; set; } + public ushort MaxWriteSpeed { get; set; } + public ushort CurrentWriteSpeed { get; set; } - public bool ReadBarcode; + public bool ReadBarcode { get; set; } - public bool ReadDVDRAM; - public bool ReadDVDR; - public bool ReadDVDROM; - public bool WriteDVDRAM; - public bool WriteDVDR; - public bool LeadInPW; - public bool SCC; - public ushort CMRSupported; + public bool ReadDVDRAM { get; set; } + public bool ReadDVDR { get; set; } + public bool ReadDVDROM { get; set; } + public bool WriteDVDRAM { get; set; } + public bool WriteDVDR { get; set; } + public bool LeadInPW { get; set; } + public bool SCC { get; set; } + public ushort CMRSupported { get; set; } - public bool BUF; - public byte RotationControlSelected; - public ushort CurrentWriteSpeedSelected; - public ModePage_2A_WriteDescriptor[] WriteSpeedPerformanceDescriptors; + public bool BUF { get; set; } + public byte RotationControlSelected { get; set; } + public ushort CurrentWriteSpeedSelected { get; set; } + + [JsonIgnore] + [Key] + public int Id { get; set; } } public struct ModePage_2A_WriteDescriptor @@ -189,7 +195,7 @@ namespace DiscImageChef.Decoders.SCSI 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; @@ -293,16 +299,14 @@ namespace DiscImageChef.Decoders.SCSI return decoded; } - public static string PrettifyModePage_2A(byte[] pageResponse) - { - return PrettifyModePage_2A(DecodeModePage_2A(pageResponse)); - } + public static string PrettifyModePage_2A(byte[] pageResponse) => + 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(); sb.AppendLine("SCSI CD-ROM capabilities page:"); diff --git a/DiscImageChef.DiscImages/BlindWrite5/Read.cs b/DiscImageChef.DiscImages/BlindWrite5/Read.cs index ce6e49d0e..8ec42c35c 100644 --- a/DiscImageChef.DiscImages/BlindWrite5/Read.cs +++ b/DiscImageChef.DiscImages/BlindWrite5/Read.cs @@ -125,8 +125,8 @@ namespace DiscImageChef.DiscImages { stream.Read(mode2A, 0, mode2A.Length); mode2A[1] -= 2; - Modes.ModePage_2A? decoded2A = Modes.DecodeModePage_2A(mode2A); - if(decoded2A.HasValue) + Modes.ModePage_2A decoded2A = Modes.DecodeModePage_2A(mode2A); + if(!(decoded2A is null)) DicConsole.DebugWriteLine("BlindWrite5 plugin", "mode page 2A: {0}", Modes.PrettifyModePage_2A(decoded2A)); else mode2A = null; @@ -1016,25 +1016,14 @@ namespace DiscImageChef.DiscImages } } - public byte[] ReadSector(ulong sectorAddress) - { - return ReadSectors(sectorAddress, 1); - } + public byte[] ReadSector(ulong sectorAddress) => ReadSectors(sectorAddress, 1); - public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) - { - return ReadSectorsTag(sectorAddress, 1, tag); - } + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) => ReadSectorsTag(sectorAddress, 1, tag); - public byte[] ReadSector(ulong sectorAddress, uint track) - { - return ReadSectors(sectorAddress, 1, track); - } + public byte[] ReadSector(ulong sectorAddress, uint track) => ReadSectors(sectorAddress, 1, track); - public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) - { - return ReadSectorsTag(sectorAddress, 1, track, tag); - } + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) => + ReadSectorsTag(sectorAddress, 1, track, tag); public byte[] ReadSectors(ulong sectorAddress, uint length) { @@ -1469,15 +1458,9 @@ namespace DiscImageChef.DiscImages return buffer; } - public byte[] ReadSectorLong(ulong sectorAddress) - { - return ReadSectorsLong(sectorAddress, 1); - } + public byte[] ReadSectorLong(ulong sectorAddress) => ReadSectorsLong(sectorAddress, 1); - public byte[] ReadSectorLong(ulong sectorAddress, uint track) - { - return ReadSectorsLong(sectorAddress, 1, track); - } + public byte[] ReadSectorLong(ulong sectorAddress, uint track) => ReadSectorsLong(sectorAddress, 1, track); public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { @@ -1672,9 +1655,6 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public bool? VerifyMediaImage() - { - return null; - } + public bool? VerifyMediaImage() => null; } } \ No newline at end of file diff --git a/DiscImageChef.EntityFramework.sln b/DiscImageChef.EntityFramework.sln new file mode 100644 index 000000000..a6d105fdd --- /dev/null +++ b/DiscImageChef.EntityFramework.sln @@ -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 .\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 diff --git a/DiscImageChef.EntityFramework/DiscImageChef.EntityFramework.csproj b/DiscImageChef.EntityFramework/DiscImageChef.EntityFramework.csproj new file mode 100644 index 000000000..45a8e5a5c --- /dev/null +++ b/DiscImageChef.EntityFramework/DiscImageChef.EntityFramework.csproj @@ -0,0 +1,16 @@ + + + + Exe + netcoreapp2.1 + + + + + + + + + + + diff --git a/DiscImageChef.EntityFramework/Program.cs b/DiscImageChef.EntityFramework/Program.cs new file mode 100644 index 000000000..98cd7dadc --- /dev/null +++ b/DiscImageChef.EntityFramework/Program.cs @@ -0,0 +1,7 @@ +namespace DiscImageChef.EntityFramework +{ + class Program + { + static void Main(string[] args) { } + } +} \ No newline at end of file diff --git a/DiscImageChef.XamMac.sln b/DiscImageChef.XamMac.sln index 13947f4be..888ba0852 100644 --- a/DiscImageChef.XamMac.sln +++ b/DiscImageChef.XamMac.sln @@ -43,6 +43,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Gui", "DiscIm EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Gui.XamMac", "DiscImageChef.Gui.XamMac\DiscImageChef.Gui.XamMac.csproj", "{9E4ACE1A-BA5A-4901-9DC0-71336EFA40DF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.EntityFramework", "DiscImageChef.EntityFramework\DiscImageChef.EntityFramework.csproj", "{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution 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|x86.ActiveCfg = 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 GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DiscImageChef.sln b/DiscImageChef.sln index dab88d6dd..2b3f22033 100644 --- a/DiscImageChef.sln +++ b/DiscImageChef.sln @@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Database", "D EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscImageChef.Gui", "DiscImageChef.Gui\DiscImageChef.Gui.csproj", "{CF61AD81-3F98-4E7B-8F00-9957A6CDE5FA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.EntityFramework", "DiscImageChef.EntityFramework\DiscImageChef.EntityFramework.csproj", "{F73EE2BD-6009-4590-9F5A-68198CA5C0DA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution 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|x86.ActiveCfg = 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 GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DiscImageChef/Commands/DeviceReport.cs b/DiscImageChef/Commands/DeviceReport.cs index 2924e7ba9..212754861 100644 --- a/DiscImageChef/Commands/DeviceReport.cs +++ b/DiscImageChef/Commands/DeviceReport.cs @@ -282,7 +282,7 @@ namespace DiscImageChef.Commands report.SCSI.EVPDPages = reporter.ReportEvpdPages(); - Modes.ModePage_2A? cdromMode = null; + Modes.ModePage_2A cdromMode = null; reporter.ReportScsiModes(ref report, ref cdromMode); @@ -301,15 +301,15 @@ namespace DiscImageChef.Commands ModeSense2A = cdromMode, Features = reporter.ReportMmcFeatures() }; - if(cdromMode.HasValue) + if(cdromMode != null) { mediaTypes.Add("CD-ROM"); mediaTypes.Add("Audio CD"); - if(cdromMode.Value.ReadCDR) mediaTypes.Add("CD-R"); - if(cdromMode.Value.ReadCDRW) mediaTypes.Add("CD-RW"); - if(cdromMode.Value.ReadDVDROM) mediaTypes.Add("DVD-ROM"); - if(cdromMode.Value.ReadDVDRAM) mediaTypes.Add("DVD-RAM"); - if(cdromMode.Value.ReadDVDR) mediaTypes.Add("DVD-R"); + if(cdromMode.ReadCDR) mediaTypes.Add("CD-R"); + if(cdromMode.ReadCDRW) mediaTypes.Add("CD-RW"); + if(cdromMode.ReadDVDROM) mediaTypes.Add("DVD-ROM"); + if(cdromMode.ReadDVDRAM) mediaTypes.Add("DVD-RAM"); + if(cdromMode.ReadDVDR) mediaTypes.Add("DVD-R"); } if(report.SCSI.MultiMediaDevice.Features != null)