mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Remove deprecated old XML Device Report code.
This commit is contained in:
Submodule Aaru.CommonTypes updated: 4194929a5f...c6d2cf38bb
@@ -47,7 +47,7 @@ public sealed partial class DeviceReport
|
|||||||
{
|
{
|
||||||
/// <summary>Tries and checks reading a GD-ROM disc using the swap disc trick and adds the result to a device report</summary>
|
/// <summary>Tries and checks reading a GD-ROM disc using the swap disc trick and adds the result to a device report</summary>
|
||||||
/// <param name="report">Device report</param>
|
/// <param name="report">Device report</param>
|
||||||
public void ReportGdRomSwapTrick(ref DeviceReportV2 report)
|
public void ReportGdRomSwapTrick(ref CommonTypes.Metadata.DeviceReport report)
|
||||||
{
|
{
|
||||||
report.GdRomSwapDiscCapabilities = new GdRomSwapDiscCapabilities();
|
report.GdRomSwapDiscCapabilities = new GdRomSwapDiscCapabilities();
|
||||||
|
|
||||||
|
|||||||
@@ -215,14 +215,15 @@ public sealed partial class DeviceReport
|
|||||||
/// <param name="report">Device report</param>
|
/// <param name="report">Device report</param>
|
||||||
/// <param name="cdromMode">Returns raw MODE SENSE page 2Ah, aka CD-ROM page</param>
|
/// <param name="cdromMode">Returns raw MODE SENSE page 2Ah, aka CD-ROM page</param>
|
||||||
/// <param name="mediumType">Returns decoded list of supported media types response</param>
|
/// <param name="mediumType">Returns decoded list of supported media types response</param>
|
||||||
public void ReportScsiModes(ref DeviceReportV2 report, out byte[] cdromMode, out MediumTypes mediumType)
|
public void ReportScsiModes(ref CommonTypes.Metadata.DeviceReport report, out byte[] cdromMode,
|
||||||
|
out MediumTypes mediumType)
|
||||||
{
|
{
|
||||||
Modes.DecodedMode? decMode = null;
|
Modes.DecodedMode? decMode = null;
|
||||||
PeripheralDeviceTypes devType = _dev.ScsiType;
|
PeripheralDeviceTypes devType = _dev.ScsiType;
|
||||||
bool sense;
|
bool sense;
|
||||||
mediumType = 0;
|
mediumType = 0;
|
||||||
|
|
||||||
DeviceReportV2 v2 = report;
|
CommonTypes.Metadata.DeviceReport v2 = report;
|
||||||
|
|
||||||
Spectre.ProgressSingleSpinner(ctx =>
|
Spectre.ProgressSingleSpinner(ctx =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public static class Remote
|
|||||||
{
|
{
|
||||||
/// <summary>Submits a device report</summary>
|
/// <summary>Submits a device report</summary>
|
||||||
/// <param name="report">Device report</param>
|
/// <param name="report">Device report</param>
|
||||||
public static void SubmitReport(DeviceReportV2 report)
|
public static void SubmitReport(DeviceReport report)
|
||||||
{
|
{
|
||||||
var submitThread = new Thread(() =>
|
var submitThread = new Thread(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
namespace Aaru.Database.Models;
|
namespace Aaru.Database.Models;
|
||||||
|
|
||||||
/// <summary>Known device</summary>
|
/// <summary>Known device</summary>
|
||||||
public class Device : DeviceReportV2
|
public class Device : DeviceReport
|
||||||
{
|
{
|
||||||
/// <summary>Builds an empty device</summary>
|
/// <summary>Builds an empty device</summary>
|
||||||
public Device() => LastSynchronized = DateTime.UtcNow;
|
public Device() => LastSynchronized = DateTime.UtcNow;
|
||||||
@@ -46,7 +46,7 @@ public class Device : DeviceReportV2
|
|||||||
/// <summary>Builds a device from a device report</summary>
|
/// <summary>Builds a device from a device report</summary>
|
||||||
/// <param name="report">Device report</param>
|
/// <param name="report">Device report</param>
|
||||||
[SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
|
[SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
|
||||||
public Device(DeviceReportV2 report)
|
public Device(DeviceReport report)
|
||||||
{
|
{
|
||||||
ATA = report.ATA;
|
ATA = report.ATA;
|
||||||
ATAPI = report.ATAPI;
|
ATAPI = report.ATAPI;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
namespace Aaru.Database.Models;
|
namespace Aaru.Database.Models;
|
||||||
|
|
||||||
/// <summary>Device report</summary>
|
/// <summary>Device report</summary>
|
||||||
public class Report : DeviceReportV2
|
public class Report : DeviceReport
|
||||||
{
|
{
|
||||||
/// <summary>Builds an empty device report</summary>
|
/// <summary>Builds an empty device report</summary>
|
||||||
public Report()
|
public Report()
|
||||||
@@ -49,7 +49,7 @@ public class Report : DeviceReportV2
|
|||||||
/// <summary>Builds a device report model from a device report</summary>
|
/// <summary>Builds a device report model from a device report</summary>
|
||||||
/// <param name="report">Device report</param>
|
/// <param name="report">Device report</param>
|
||||||
[SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
|
[SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
|
||||||
public Report(DeviceReportV2 report)
|
public Report(DeviceReport report)
|
||||||
{
|
{
|
||||||
ATA = report.ATA;
|
ATA = report.ATA;
|
||||||
ATAPI = report.ATAPI;
|
ATAPI = report.ATAPI;
|
||||||
|
|||||||
2
Aaru.Dto
2
Aaru.Dto
Submodule Aaru.Dto updated: 699fa9a8ad...ba056b3414
@@ -53,7 +53,6 @@ using Aaru.Localization;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
using Command = System.CommandLine.Command;
|
using Command = System.CommandLine.Command;
|
||||||
using DeviceReport = Aaru.Core.Devices.Report.DeviceReport;
|
|
||||||
using Profile = Aaru.Decoders.SCSI.MMC.Profile;
|
using Profile = Aaru.Decoders.SCSI.MMC.Profile;
|
||||||
|
|
||||||
namespace Aaru.Commands.Device;
|
namespace Aaru.Commands.Device;
|
||||||
@@ -154,7 +153,7 @@ sealed class DeviceReportCommand : Command
|
|||||||
return (int)ErrorNumber.NotPermitted;
|
return (int)ErrorNumber.NotPermitted;
|
||||||
}
|
}
|
||||||
|
|
||||||
var report = new DeviceReportV2
|
var report = new DeviceReport
|
||||||
{
|
{
|
||||||
Manufacturer = dev.Manufacturer,
|
Manufacturer = dev.Manufacturer,
|
||||||
Model = dev.Model,
|
Model = dev.Model,
|
||||||
@@ -195,7 +194,7 @@ sealed class DeviceReportCommand : Command
|
|||||||
return (int)ErrorNumber.InvalidArgument;
|
return (int)ErrorNumber.InvalidArgument;
|
||||||
}
|
}
|
||||||
|
|
||||||
var reporter = new DeviceReport(dev);
|
var reporter = new Core.Devices.Report.DeviceReport(dev);
|
||||||
|
|
||||||
if(dev.IsUsb)
|
if(dev.IsUsb)
|
||||||
if(AnsiConsole.Confirm($"[italic]{UI.Is_the_device_natively_USB}[/]"))
|
if(AnsiConsole.Confirm($"[italic]{UI.Is_the_device_natively_USB}[/]"))
|
||||||
@@ -251,7 +250,7 @@ sealed class DeviceReportCommand : Command
|
|||||||
|
|
||||||
report.ATA = new Ata
|
report.ATA = new Ata
|
||||||
{
|
{
|
||||||
Identify = DeviceReport.ClearIdentify(buffer)
|
Identify = Core.Devices.Report.DeviceReport.ClearIdentify(buffer)
|
||||||
};
|
};
|
||||||
|
|
||||||
if(report.ATA.IdentifyDevice == null)
|
if(report.ATA.IdentifyDevice == null)
|
||||||
@@ -279,7 +278,7 @@ sealed class DeviceReportCommand : Command
|
|||||||
dev.AtaIdentify(out buffer, out _, dev.Timeout, out _);
|
dev.AtaIdentify(out buffer, out _, dev.Timeout, out _);
|
||||||
});
|
});
|
||||||
|
|
||||||
report.ATA.Identify = DeviceReport.ClearIdentify(buffer);
|
report.ATA.Identify = Core.Devices.Report.DeviceReport.ClearIdentify(buffer);
|
||||||
List<TestedMedia> mediaTests = new();
|
List<TestedMedia> mediaTests = new();
|
||||||
|
|
||||||
while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]"))
|
while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]"))
|
||||||
@@ -326,7 +325,7 @@ sealed class DeviceReportCommand : Command
|
|||||||
if(Identify.Decode(buffer).HasValue)
|
if(Identify.Decode(buffer).HasValue)
|
||||||
report.ATAPI = new Ata
|
report.ATAPI = new Ata
|
||||||
{
|
{
|
||||||
Identify = DeviceReport.ClearIdentify(buffer)
|
Identify = Core.Devices.Report.DeviceReport.ClearIdentify(buffer)
|
||||||
};
|
};
|
||||||
|
|
||||||
goto case DeviceType.SCSI;
|
goto case DeviceType.SCSI;
|
||||||
|
|||||||
Reference in New Issue
Block a user