Add interface to pass dump hardware list and CICM XML metadata to/from images.

This commit is contained in:
2018-01-28 20:29:46 +00:00
parent db766ac76e
commit df5f062500
65 changed files with 3470 additions and 2727 deletions

View File

@@ -38,6 +38,7 @@ using System.Runtime.InteropServices;
using DiscImageChef.CommonTypes;
using DiscImageChef.Console;
using DiscImageChef.Filters;
using Schemas;
using SharpCompress.Compressors;
using SharpCompress.Compressors.Deflate;
@@ -306,12 +307,9 @@ namespace DiscImageChef.DiscImages
{
if((offset & QCOW_COMPRESSED) == QCOW_COMPRESSED)
{
ulong compSizeMask;
ulong offMask;
compSizeMask = (ulong)(1 << qHdr.cluster_bits) - 1;
compSizeMask <<= 63 - qHdr.cluster_bits;
offMask = ~compSizeMask ^ QCOW_COMPRESSED;
ulong compSizeMask = (ulong)(1 << qHdr.cluster_bits) - 1;
compSizeMask <<= 63 - qHdr.cluster_bits;
ulong offMask = ~compSizeMask ^ QCOW_COMPRESSED;
ulong realOff = offset & offMask;
ulong compSize = (offset & compSizeMask) >> (63 - qHdr.cluster_bits);
@@ -467,6 +465,9 @@ namespace DiscImageChef.DiscImages
return null;
}
public List<DumpHardwareType> DumpHardware => null;
public CICMMetadataType CicmMetadata => null;
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[] { };
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[] { };
public IEnumerable<MediaType> SupportedMediaTypes =>
@@ -749,6 +750,18 @@ namespace DiscImageChef.DiscImages
return false;
}
public bool SetDumpHardware(List<DumpHardwareType> dumpHardware)
{
// Not supported
return false;
}
public bool SetCicmMetadata(CICMMetadataType metadata)
{
// Not supported
return false;
}
/// <summary>
/// QCOW header, big-endian
/// </summary>