Move image and sector verification methods to new interfaces.

This commit is contained in:
2019-01-20 22:24:15 +00:00
parent 640c57b87a
commit 6b1aeb6cbb
96 changed files with 1756 additions and 1602 deletions

View File

@@ -37,7 +37,7 @@ using DiscImageChef.CommonTypes.Structs;
namespace DiscImageChef.DiscImages
{
public partial class DiscFerret : IMediaImage
public partial class DiscFerret : IMediaImage, IVerifiableSectorsImage
{
ImageInfo imageInfo;
// TODO: These variables have been made public so create-sidecar can access to this information until I define an API >4.0

View File

@@ -132,12 +132,5 @@ namespace DiscImageChef.DiscImages
public byte[] ReadSectorsLong(ulong sectorAddress, uint length) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
public bool? VerifySector(ulong sectorAddress) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
public bool? VerifySectors(ulong sectorAddress, uint length, out List<ulong> failingLbas,
out List<ulong> unknownLbas) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
}
}

View File

@@ -1,15 +1,15 @@
// /***************************************************************************
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Unsupported.cs
// Filename : Verify.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Disk image plugins.
//
// --[ Description ] ----------------------------------------------------------
//
// Contains features unsupported by DiscFerret flux images.
// Verifies DiscFerret disk images.
//
// --[ License ] --------------------------------------------------------------
//
@@ -30,13 +30,18 @@
// Copyright © 2011-2019 Natalia Portillo
// ****************************************************************************/
using DiscImageChef.CommonTypes.Exceptions;
using System;
using System.Collections.Generic;
namespace DiscImageChef.DiscImages
{
public partial class DiscFerret
{
public bool? VerifyMediaImage() =>
throw new FeatureUnsupportedImageException("Feature not supported by image format");
public bool? VerifySector(ulong sectorAddress) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
public bool? VerifySectors(ulong sectorAddress, uint length, out List<ulong> failingLbas,
out List<ulong> unknownLbas) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
}
}