Updated dependencies.

This commit is contained in:
2017-12-29 19:31:26 +00:00
parent 4c41634f47
commit 7694b9e60d
17 changed files with 326 additions and 280 deletions

View File

@@ -39,15 +39,15 @@ namespace osrepodbmgr.Core
class Checksum
{
Adler32Context adler32ctx;
CRC16Context crc16ctx;
CRC32Context crc32ctx;
CRC64Context crc64ctx;
MD5Context md5ctx;
RIPEMD160Context ripemd160ctx;
SHA1Context sha1ctx;
SHA256Context sha256ctx;
SHA384Context sha384ctx;
SHA512Context sha512ctx;
Crc16Context crc16ctx;
Crc32Context crc32ctx;
Crc64Context crc64ctx;
Md5Context md5ctx;
Ripemd160Context ripemd160ctx;
Sha1Context sha1ctx;
Sha256Context sha256ctx;
Sha384Context sha384ctx;
Sha512Context sha512ctx;
SpamSumContext ssctx;
Thread adlerThread;
@@ -77,15 +77,15 @@ namespace osrepodbmgr.Core
internal Checksum()
{
adler32ctx = new Adler32Context();
crc16ctx = new CRC16Context();
crc32ctx = new CRC32Context();
crc64ctx = new CRC64Context();
md5ctx = new MD5Context();
ripemd160ctx = new RIPEMD160Context();
sha1ctx = new SHA1Context();
sha256ctx = new SHA256Context();
sha384ctx = new SHA384Context();
sha512ctx = new SHA512Context();
crc16ctx = new Crc16Context();
crc32ctx = new Crc32Context();
crc64ctx = new Crc64Context();
md5ctx = new Md5Context();
ripemd160ctx = new Ripemd160Context();
sha1ctx = new Sha1Context();
sha256ctx = new Sha256Context();
sha384ctx = new Sha384Context();
sha512ctx = new Sha512Context();
ssctx = new SpamSumContext();
adlerThread = new Thread(updateAdler);
@@ -248,15 +248,15 @@ namespace osrepodbmgr.Core
internal static List<ChecksumType> GetChecksums(byte[] data)
{
Adler32Context adler32ctxData = new Adler32Context();
CRC16Context crc16ctxData = new CRC16Context();
CRC32Context crc32ctxData = new CRC32Context();
CRC64Context crc64ctxData = new CRC64Context();
MD5Context md5ctxData = new MD5Context();
RIPEMD160Context ripemd160ctxData = new RIPEMD160Context();
SHA1Context sha1ctxData = new SHA1Context();
SHA256Context sha256ctxData = new SHA256Context();
SHA384Context sha384ctxData = new SHA384Context();
SHA512Context sha512ctxData = new SHA512Context();
Crc16Context crc16ctxData = new Crc16Context();
Crc32Context crc32ctxData = new Crc32Context();
Crc64Context crc64ctxData = new Crc64Context();
Md5Context md5ctxData = new Md5Context();
Ripemd160Context ripemd160ctxData = new Ripemd160Context();
Sha1Context sha1ctxData = new Sha1Context();
Sha256Context sha256ctxData = new Sha256Context();
Sha384Context sha384ctxData = new Sha384Context();
Sha512Context sha512ctxData = new Sha512Context();
SpamSumContext ssctxData = new SpamSumContext();
Thread adlerThreadData = new Thread(updateAdler);
@@ -409,55 +409,55 @@ namespace osrepodbmgr.Core
struct crc16Packet
{
public CRC16Context context;
public Crc16Context context;
public byte[] data;
}
struct crc32Packet
{
public CRC32Context context;
public Crc32Context context;
public byte[] data;
}
struct crc64Packet
{
public CRC64Context context;
public Crc64Context context;
public byte[] data;
}
struct md5Packet
{
public MD5Context context;
public Md5Context context;
public byte[] data;
}
struct ripemd160Packet
{
public RIPEMD160Context context;
public Ripemd160Context context;
public byte[] data;
}
struct sha1Packet
{
public SHA1Context context;
public Sha1Context context;
public byte[] data;
}
struct sha256Packet
{
public SHA256Context context;
public Sha256Context context;
public byte[] data;
}
struct sha384Packet
{
public SHA384Context context;
public Sha384Context context;
public byte[] data;
}
struct sha512Packet
{
public SHA512Context context;
public Sha512Context context;
public byte[] data;
}

View File

@@ -30,31 +30,30 @@
// Copyright © 2011-2016 Natalia Portillo
// ****************************************************************************/
using System;
using DiscImageChef.DiscImages;
using DiscImageChef.Filters;
using DiscImageChef.ImagePlugins;
namespace osrepodbmgr.Core
{
public static class ImageFormat
{
public static ImagePlugin Detect(Filter imageFilter)
public static IMediaImage Detect(IFilter imageFilter)
{
try
{
ImagePlugin _imageFormat;
IMediaImage _imageFormat;
PluginBase plugins = new PluginBase();
plugins.RegisterAllPlugins();
_imageFormat = null;
// Check all but RAW plugin
foreach(ImagePlugin _imageplugin in plugins.ImagePluginsList.Values)
foreach(IMediaImage _imageplugin in plugins.ImagePluginsList.Values)
{
if(_imageplugin.PluginUUID != new Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
if(_imageplugin.Id != new Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
{
try
{
if(_imageplugin.IdentifyImage(imageFilter))
if(_imageplugin.Identify(imageFilter))
{
_imageFormat = _imageplugin;
break;
@@ -71,13 +70,13 @@ namespace osrepodbmgr.Core
// Check only RAW plugin
if(_imageFormat == null)
{
foreach(ImagePlugin _imageplugin in plugins.ImagePluginsList.Values)
foreach(IMediaImage _imageplugin in plugins.ImagePluginsList.Values)
{
if(_imageplugin.PluginUUID == new Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
if(_imageplugin.Id == new Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
{
try
{
if(_imageplugin.IdentifyImage(imageFilter))
if(_imageplugin.Identify(imageFilter))
{
_imageFormat = _imageplugin;
break;

View File

@@ -2,14 +2,14 @@
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Plugins.cs
// Filename : PluginBase.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Plugins
// Component : Core algorithms.
//
// --[ Description ] ----------------------------------------------------------
//
// Base methods for plugins.
// Class to hold all installed plugins.
//
// --[ License ] --------------------------------------------------------------
//
@@ -27,111 +27,140 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2016 Natalia Portillo
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using DiscImageChef.DiscImages;
using DiscImageChef.Filesystems;
using DiscImageChef.ImagePlugins;
using DiscImageChef.PartPlugins;
using DiscImageChef.Partitions;
namespace osrepodbmgr.Core
{
/// <summary>
/// Contain all plugins (filesystem, partition and image)
/// </summary>
public class PluginBase
{
public SortedDictionary<string, Filesystem> PluginsList;
public SortedDictionary<string, PartPlugin> PartPluginsList;
public SortedDictionary<string, ImagePlugin> ImagePluginsList;
/// <summary>
/// List of all media image plugins
/// </summary>
public readonly SortedDictionary<string, IMediaImage> ImagePluginsList;
/// <summary>
/// List of all partition plugins
/// </summary>
public readonly SortedDictionary<string, IPartition> PartPluginsList;
/// <summary>
/// List of all filesystem plugins
/// </summary>
public readonly SortedDictionary<string, IFilesystem> PluginsList;
/// <summary>
/// List of read-only filesystem plugins
/// </summary>
public readonly SortedDictionary<string, IReadOnlyFilesystem> ReadOnlyFilesystems;
/// <summary>
/// List of writable media image plugins
/// </summary>
public readonly SortedDictionary<string, IWritableImage> WritableImages;
/// <summary>
/// Initializes the plugins lists
/// </summary>
public PluginBase()
{
PluginsList = new SortedDictionary<string, Filesystem>();
PartPluginsList = new SortedDictionary<string, PartPlugin>();
ImagePluginsList = new SortedDictionary<string, ImagePlugin>();
}
PluginsList = new SortedDictionary<string, IFilesystem>();
ReadOnlyFilesystems = new SortedDictionary<string, IReadOnlyFilesystem>();
PartPluginsList = new SortedDictionary<string, IPartition>();
ImagePluginsList = new SortedDictionary<string, IMediaImage>();
WritableImages = new SortedDictionary<string, IWritableImage>();
public void RegisterAllPlugins()
{
Assembly assembly;
Assembly assembly = Assembly.GetAssembly(typeof(IMediaImage));
assembly = Assembly.GetAssembly(typeof(ImagePlugin));
foreach(Type type in assembly.GetTypes())
{
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IMediaImage)))
.Where(t => t.IsClass))
try
{
if(type.IsSubclassOf(typeof(ImagePlugin)))
{
ImagePlugin plugin = (ImagePlugin)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
IMediaImage plugin = (IMediaImage)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
RegisterImagePlugin(plugin);
}
}
catch(Exception exception)
{
Console.WriteLine("Exception {0}", exception);
}
}
catch(Exception exception) { Console.WriteLine("Exception {0}", exception); }
assembly = Assembly.GetAssembly(typeof(PartPlugin));
assembly = Assembly.GetAssembly(typeof(IPartition));
foreach(Type type in assembly.GetTypes())
{
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IPartition)))
.Where(t => t.IsClass))
try
{
if(type.IsSubclassOf(typeof(PartPlugin)))
{
PartPlugin plugin = (PartPlugin)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
IPartition plugin = (IPartition)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
RegisterPartPlugin(plugin);
}
}
catch(Exception exception)
{
Console.WriteLine("Exception {0}", exception);
}
}
catch(Exception exception) { Console.WriteLine("Exception {0}", exception); }
assembly = Assembly.GetAssembly(typeof(Filesystem));
assembly = Assembly.GetAssembly(typeof(IFilesystem));
foreach(Type type in assembly.GetTypes())
{
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IFilesystem)))
.Where(t => t.IsClass))
try
{
if(type.IsSubclassOf(typeof(Filesystem)))
{
Filesystem plugin = (Filesystem)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
IFilesystem plugin = (IFilesystem)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
RegisterPlugin(plugin);
}
}
catch(Exception exception)
catch(Exception exception) { Console.WriteLine("Exception {0}", exception); }
assembly = Assembly.GetAssembly(typeof(IReadOnlyFilesystem));
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IReadOnlyFilesystem)))
.Where(t => t.IsClass))
try
{
Console.WriteLine("Exception {0}", exception);
IReadOnlyFilesystem plugin =
(IReadOnlyFilesystem)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
RegisterReadOnlyFilesystem(plugin);
}
catch(Exception exception) { Console.WriteLine("Exception {0}", exception); }
assembly = Assembly.GetAssembly(typeof(IWritableImage));
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IWritableImage)))
.Where(t => t.IsClass))
try
{
IWritableImage plugin =
(IWritableImage)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
RegisterWritableMedia(plugin);
}
catch(Exception exception) { Console.WriteLine("Exception {0}", exception); }
}
void RegisterImagePlugin(ImagePlugin plugin)
void RegisterImagePlugin(IMediaImage plugin)
{
if(!ImagePluginsList.ContainsKey(plugin.Name.ToLower()))
{
ImagePluginsList.Add(plugin.Name.ToLower(), plugin);
}
void RegisterPlugin(IFilesystem plugin)
{
if(!PluginsList.ContainsKey(plugin.Name.ToLower())) PluginsList.Add(plugin.Name.ToLower(), plugin);
}
void RegisterPlugin(Filesystem plugin)
void RegisterReadOnlyFilesystem(IReadOnlyFilesystem plugin)
{
if(!PluginsList.ContainsKey(plugin.Name.ToLower()))
{
PluginsList.Add(plugin.Name.ToLower(), plugin);
}
if(!ReadOnlyFilesystems.ContainsKey(plugin.Name.ToLower()))
ReadOnlyFilesystems.Add(plugin.Name.ToLower(), plugin);
}
void RegisterPartPlugin(PartPlugin partplugin)
void RegisterWritableMedia(IWritableImage plugin)
{
if(!WritableImages.ContainsKey(plugin.Name.ToLower())) WritableImages.Add(plugin.Name.ToLower(), plugin);
}
void RegisterPartPlugin(IPartition partplugin)
{
if(!PartPluginsList.ContainsKey(partplugin.Name.ToLower()))
{
PartPluginsList.Add(partplugin.Name.ToLower(), partplugin);
}
}
}
}

View File

@@ -136,7 +136,7 @@ namespace osrepodbmgr.Core
string destination = Path.Combine(destinationFolder, destinationFile) + ".zip";
MD5Context md5 = new MD5Context();
Md5Context md5 = new Md5Context();
md5.Init();
byte[] tmp;
string mdid = md5.Data(Encoding.UTF8.GetBytes(destination), out tmp);

View File

@@ -32,8 +32,8 @@ using DiscImageChef.CommonTypes;
using DiscImageChef.Decoders.PCMCIA;
using DiscImageChef.Filesystems;
using DiscImageChef.Filters;
using DiscImageChef.ImagePlugins;
using DiscImageChef.PartPlugins;
using DiscImageChef.DiscImages;
using DiscImageChef.Partitions;
using Schemas;
namespace osrepodbmgr.Core
@@ -67,8 +67,7 @@ namespace osrepodbmgr.Core
CICMMetadataType sidecar = new CICMMetadataType();
PluginBase plugins = new PluginBase();
plugins.RegisterAllPlugins();
ImagePlugin _imageFormat;
IMediaImage _imageFormat;
long maxProgress = 4;
long currentProgress = 0;
@@ -78,7 +77,7 @@ namespace osrepodbmgr.Core
if(UpdateProgress != null)
UpdateProgress(null, "Detecting image filter", 1, maxProgress);
Filter inputFilter = filtersList.GetFilter(selectedFile);
IFilter inputFilter = filtersList.GetFilter(selectedFile);
if(inputFilter == null)
@@ -110,7 +109,7 @@ namespace osrepodbmgr.Core
try
{
if(!_imageFormat.OpenImage(inputFilter))
if(!_imageFormat.Open(inputFilter))
{
if(Failed != null)
Failed("Unable to open image format\n" +
@@ -174,11 +173,11 @@ namespace osrepodbmgr.Core
if(UpdateProgress2 != null)
UpdateProgress2(null, null, 0, 0);
switch(_imageFormat.ImageInfo.xmlMediaType)
switch(_imageFormat.Info.XmlMediaType)
{
case XmlMediaType.OpticalDisc:
{
maxProgress = 4 + _imageFormat.ImageInfo.readableMediaTags.Count + _imageFormat.GetTracks().Count;
maxProgress = 4 + _imageFormat.Info.ReadableMediaTags.Count + _imageFormat.Tracks.Count;
if(UpdateProgress != null)
UpdateProgress(null, "Hashing image file", 3, maxProgress);
@@ -187,32 +186,32 @@ namespace osrepodbmgr.Core
sidecar.OpticalDisc[0] = new OpticalDiscType();
sidecar.OpticalDisc[0].Checksums = imgChecksums.ToArray();
sidecar.OpticalDisc[0].Image = new ImageType();
sidecar.OpticalDisc[0].Image.format = _imageFormat.GetImageFormat();
sidecar.OpticalDisc[0].Image.format = _imageFormat.Format;
sidecar.OpticalDisc[0].Image.offset = 0;
sidecar.OpticalDisc[0].Image.offsetSpecified = true;
sidecar.OpticalDisc[0].Image.Value = Path.GetFileName(selectedFile);
sidecar.OpticalDisc[0].Size = fi.Length;
sidecar.OpticalDisc[0].Sequence = new SequenceType();
if(_imageFormat.GetMediaSequence() != 0 && _imageFormat.GetLastDiskSequence() != 0)
if(_imageFormat.Info.MediaSequence != 0 && _imageFormat.Info.LastMediaSequence != 0)
{
sidecar.OpticalDisc[0].Sequence.MediaSequence = _imageFormat.GetMediaSequence();
sidecar.OpticalDisc[0].Sequence.TotalMedia = _imageFormat.GetMediaSequence();
sidecar.OpticalDisc[0].Sequence.MediaSequence = _imageFormat.Info.MediaSequence;
sidecar.OpticalDisc[0].Sequence.TotalMedia = _imageFormat.Info.LastMediaSequence;
}
else
{
sidecar.OpticalDisc[0].Sequence.MediaSequence = 1;
sidecar.OpticalDisc[0].Sequence.TotalMedia = 1;
}
sidecar.OpticalDisc[0].Sequence.MediaTitle = _imageFormat.GetImageName();
sidecar.OpticalDisc[0].Sequence.MediaTitle = _imageFormat.Info.MediaTitle;
MediaType dskType = _imageFormat.ImageInfo.mediaType;
MediaType dskType = _imageFormat.Info.MediaType;
currentProgress = 3;
#if DEBUG
stopwatch.Restart();
#endif
foreach(MediaTagType tagType in _imageFormat.ImageInfo.readableMediaTags)
foreach(MediaTagType tagType in _imageFormat.Info.ReadableMediaTags)
{
currentProgress++;
if(UpdateProgress != null)
@@ -369,7 +368,7 @@ namespace osrepodbmgr.Core
try
{
List<Session> sessions = _imageFormat.GetSessions();
List<Session> sessions = _imageFormat.Sessions;
sidecar.OpticalDisc[0].Sessions = sessions != null ? sessions.Count : 1;
}
catch
@@ -377,7 +376,7 @@ namespace osrepodbmgr.Core
sidecar.OpticalDisc[0].Sessions = 1;
}
List<Track> tracks = _imageFormat.GetTracks();
List<Track> tracks = _imageFormat.Tracks;
List<Schemas.TrackType> trksLst = null;
if(tracks != null)
{
@@ -393,22 +392,22 @@ namespace osrepodbmgr.Core
Schemas.TrackType xmlTrk = new Schemas.TrackType();
switch(trk.TrackType)
{
case DiscImageChef.ImagePlugins.TrackType.Audio:
case DiscImageChef.DiscImages.TrackType.Audio:
xmlTrk.TrackType1 = TrackTypeTrackType.audio;
break;
case DiscImageChef.ImagePlugins.TrackType.CDMode2Form2:
case DiscImageChef.DiscImages.TrackType.CdMode2Form2:
xmlTrk.TrackType1 = TrackTypeTrackType.m2f2;
break;
case DiscImageChef.ImagePlugins.TrackType.CDMode2Formless:
case DiscImageChef.DiscImages.TrackType.CdMode2Formless:
xmlTrk.TrackType1 = TrackTypeTrackType.mode2;
break;
case DiscImageChef.ImagePlugins.TrackType.CDMode2Form1:
case DiscImageChef.DiscImages.TrackType.CdMode2Form1:
xmlTrk.TrackType1 = TrackTypeTrackType.m2f1;
break;
case DiscImageChef.ImagePlugins.TrackType.CDMode1:
case DiscImageChef.DiscImages.TrackType.CdMode1:
xmlTrk.TrackType1 = TrackTypeTrackType.mode1;
break;
case DiscImageChef.ImagePlugins.TrackType.Data:
case DiscImageChef.DiscImages.TrackType.Data:
switch(sidecar.OpticalDisc[0].DiscType)
{
case "BD":
@@ -471,7 +470,7 @@ namespace osrepodbmgr.Core
ulong doneSectors = 0;
// If there is only one track, and it's the same as the image file (e.g. ".iso" files), don't re-checksum.
if(_imageFormat.PluginUUID == new Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
if(_imageFormat.Id == new Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
{
xmlTrk.Checksums = sidecar.OpticalDisc[0].Checksums;
}
@@ -566,14 +565,14 @@ namespace osrepodbmgr.Core
if((sectors - doneSectors) >= sectorsToRead)
{
sector = _imageFormat.ReadSectorsTag(doneSectors, sectorsToRead, (uint)xmlTrk.Sequence.TrackNumber, SectorTagType.CDSectorSubchannel);
sector = _imageFormat.ReadSectorsTag(doneSectors, sectorsToRead, (uint)xmlTrk.Sequence.TrackNumber, SectorTagType.CdSectorSubchannel);
if(UpdateProgress2 != null)
UpdateProgress2(null, string.Format("Sector {0} of {1}", doneSectors, sectors), position, fi.Length);
doneSectors += sectorsToRead;
}
else
{
sector = _imageFormat.ReadSectorsTag(doneSectors, (uint)(sectors - doneSectors), (uint)xmlTrk.Sequence.TrackNumber, SectorTagType.CDSectorSubchannel);
sector = _imageFormat.ReadSectorsTag(doneSectors, (uint)(sectors - doneSectors), (uint)xmlTrk.Sequence.TrackNumber, SectorTagType.CdSectorSubchannel);
if(UpdateProgress2 != null)
UpdateProgress2(null, string.Format("Sector {0} of {1}", doneSectors, sectors), position, fi.Length);
doneSectors += (sectors - doneSectors);
@@ -602,11 +601,11 @@ namespace osrepodbmgr.Core
#endif
List<Partition> partitions = new List<Partition>();
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
foreach(IPartition _partplugin in plugins.PartPluginsList.Values)
{
List<Partition> _partitions;
if(_partplugin.GetInformation(_imageFormat, out _partitions))
if(_partplugin.GetInformation(_imageFormat, out _partitions, 0)) // TODO: Subpartitions
partitions.AddRange(_partitions);
}
@@ -617,32 +616,32 @@ namespace osrepodbmgr.Core
for(int i = 0; i < partitions.Count; i++)
{
xmlTrk.FileSystemInformation[i] = new PartitionType();
xmlTrk.FileSystemInformation[i].Description = partitions[i].PartitionDescription;
xmlTrk.FileSystemInformation[i].EndSector = (int)(partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1);
xmlTrk.FileSystemInformation[i].Name = partitions[i].PartitionName;
xmlTrk.FileSystemInformation[i].Sequence = (int)partitions[i].PartitionSequence;
xmlTrk.FileSystemInformation[i].StartSector = (int)partitions[i].PartitionStartSector;
xmlTrk.FileSystemInformation[i].Type = partitions[i].PartitionType;
xmlTrk.FileSystemInformation[i].Description = partitions[i].Description;
xmlTrk.FileSystemInformation[i].EndSector = (int)(partitions[i].End);
xmlTrk.FileSystemInformation[i].Name = partitions[i].Name;
xmlTrk.FileSystemInformation[i].Sequence = (int)partitions[i].Sequence;
xmlTrk.FileSystemInformation[i].StartSector = (int)partitions[i].Start;
xmlTrk.FileSystemInformation[i].Type = partitions[i].Type;
List<FileSystemType> lstFs = new List<FileSystemType>();
foreach(Filesystem _plugin in plugins.PluginsList.Values)
foreach(IFilesystem _plugin in plugins.PluginsList.Values)
{
try
{
if(_plugin.Identify(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1))
if(_plugin.Identify(_imageFormat, partitions[i]))
{
string foo;
_plugin.GetInformation(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1, out foo);
lstFs.Add(_plugin.XmlFSType);
_plugin.GetInformation(_imageFormat, partitions[i], out foo, null);
lstFs.Add(_plugin.XmlFsType);
if(_plugin.XmlFSType.Type == "Opera")
if(_plugin.XmlFsType.Type == "Opera")
dskType = MediaType.ThreeDO;
if(_plugin.XmlFSType.Type == "PC Engine filesystem")
if(_plugin.XmlFsType.Type == "PC Engine filesystem")
dskType = MediaType.SuperCDROM2;
if(_plugin.XmlFSType.Type == "Nintendo Wii filesystem")
if(_plugin.XmlFsType.Type == "Nintendo Wii filesystem")
dskType = MediaType.WOD;
if(_plugin.XmlFSType.Type == "Nintendo Gamecube filesystem")
if(_plugin.XmlFsType.Type == "Nintendo Gamecube filesystem")
dskType = MediaType.GOD;
}
}
@@ -664,25 +663,31 @@ namespace osrepodbmgr.Core
xmlTrk.FileSystemInformation[0].EndSector = (int)xmlTrk.EndSector;
xmlTrk.FileSystemInformation[0].StartSector = (int)xmlTrk.StartSector;
Partition xmlPart = new Partition
{
Start = (ulong)xmlTrk.StartSector,
Length = (ulong)((xmlTrk.EndSector - xmlTrk.StartSector) + 1)
};
List<FileSystemType> lstFs = new List<FileSystemType>();
foreach(Filesystem _plugin in plugins.PluginsList.Values)
foreach(IFilesystem _plugin in plugins.PluginsList.Values)
{
try
{
if(_plugin.Identify(_imageFormat, (ulong)xmlTrk.StartSector, (ulong)xmlTrk.EndSector))
if(_plugin.Identify(_imageFormat, xmlPart))
{
string foo;
_plugin.GetInformation(_imageFormat, (ulong)xmlTrk.StartSector, (ulong)xmlTrk.EndSector, out foo);
lstFs.Add(_plugin.XmlFSType);
_plugin.GetInformation(_imageFormat, xmlPart, out foo, null);
lstFs.Add(_plugin.XmlFsType);
if(_plugin.XmlFSType.Type == "Opera")
if(_plugin.XmlFsType.Type == "Opera")
dskType = MediaType.ThreeDO;
if(_plugin.XmlFSType.Type == "PC Engine filesystem")
if(_plugin.XmlFsType.Type == "PC Engine filesystem")
dskType = MediaType.SuperCDROM2;
if(_plugin.XmlFSType.Type == "Nintendo Wii filesystem")
if(_plugin.XmlFsType.Type == "Nintendo Wii filesystem")
dskType = MediaType.WOD;
if(_plugin.XmlFSType.Type == "Nintendo Gamecube filesystem")
if(_plugin.XmlFsType.Type == "Nintendo Gamecube filesystem")
dskType = MediaType.GOD;
}
}
@@ -716,22 +721,22 @@ namespace osrepodbmgr.Core
sidecar.OpticalDisc[0].DiscType = dscType;
sidecar.OpticalDisc[0].DiscSubType = dscSubType;
if(!string.IsNullOrEmpty(_imageFormat.ImageInfo.driveManufacturer) ||
!string.IsNullOrEmpty(_imageFormat.ImageInfo.driveModel) ||
!string.IsNullOrEmpty(_imageFormat.ImageInfo.driveFirmwareRevision) ||
!string.IsNullOrEmpty(_imageFormat.ImageInfo.driveSerialNumber))
if(!string.IsNullOrEmpty(_imageFormat.Info.DriveManufacturer) ||
!string.IsNullOrEmpty(_imageFormat.Info.DriveModel) ||
!string.IsNullOrEmpty(_imageFormat.Info.DriveFirmwareRevision) ||
!string.IsNullOrEmpty(_imageFormat.Info.DriveSerialNumber))
{
sidecar.OpticalDisc[0].DumpHardwareArray = new DumpHardwareType[1];
sidecar.OpticalDisc[0].DumpHardwareArray[0].Extents = new ExtentType[0];
sidecar.OpticalDisc[0].DumpHardwareArray[0].Extents[0].Start = 0;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Extents[0].End = _imageFormat.ImageInfo.sectors;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Manufacturer = _imageFormat.ImageInfo.driveManufacturer;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Model = _imageFormat.ImageInfo.driveModel;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Firmware = _imageFormat.ImageInfo.driveFirmwareRevision;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Serial = _imageFormat.ImageInfo.driveSerialNumber;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Extents[0].End = _imageFormat.Info.Sectors;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Manufacturer = _imageFormat.Info.DriveManufacturer;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Model = _imageFormat.Info.DriveModel;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Firmware = _imageFormat.Info.DriveFirmwareRevision;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Serial = _imageFormat.Info.DriveSerialNumber;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Software = new SoftwareType();
sidecar.OpticalDisc[0].DumpHardwareArray[0].Software.Name = _imageFormat.GetImageApplication();
sidecar.OpticalDisc[0].DumpHardwareArray[0].Software.Version = _imageFormat.GetImageApplicationVersion();
sidecar.OpticalDisc[0].DumpHardwareArray[0].Software.Name = _imageFormat.Info.Application;
sidecar.OpticalDisc[0].DumpHardwareArray[0].Software.Version = _imageFormat.Info.ApplicationVersion;
}
Context.workingDisc = sidecar.OpticalDisc[0];
@@ -741,7 +746,7 @@ namespace osrepodbmgr.Core
}
case XmlMediaType.BlockMedia:
{
maxProgress = 3 + _imageFormat.ImageInfo.readableMediaTags.Count;
maxProgress = 3 + _imageFormat.Info.ReadableMediaTags.Count;
if(UpdateProgress != null)
UpdateProgress(null, "Hashing image file", 3, maxProgress);
@@ -749,30 +754,30 @@ namespace osrepodbmgr.Core
sidecar.BlockMedia[0] = new BlockMediaType();
sidecar.BlockMedia[0].Checksums = imgChecksums.ToArray();
sidecar.BlockMedia[0].Image = new ImageType();
sidecar.BlockMedia[0].Image.format = _imageFormat.GetImageFormat();
sidecar.BlockMedia[0].Image.format = _imageFormat.Format;
sidecar.BlockMedia[0].Image.offset = 0;
sidecar.BlockMedia[0].Image.offsetSpecified = true;
sidecar.BlockMedia[0].Image.Value = Path.GetFileName(selectedFile);
sidecar.BlockMedia[0].Size = fi.Length;
sidecar.BlockMedia[0].Sequence = new SequenceType();
if(_imageFormat.GetMediaSequence() != 0 && _imageFormat.GetLastDiskSequence() != 0)
if(_imageFormat.Info.MediaSequence != 0 && _imageFormat.Info.LastMediaSequence != 0)
{
sidecar.BlockMedia[0].Sequence.MediaSequence = _imageFormat.GetMediaSequence();
sidecar.BlockMedia[0].Sequence.TotalMedia = _imageFormat.GetMediaSequence();
sidecar.BlockMedia[0].Sequence.MediaSequence = _imageFormat.Info.MediaSequence;
sidecar.BlockMedia[0].Sequence.TotalMedia = _imageFormat.Info.LastMediaSequence;
}
else
{
sidecar.BlockMedia[0].Sequence.MediaSequence = 1;
sidecar.BlockMedia[0].Sequence.TotalMedia = 1;
}
sidecar.BlockMedia[0].Sequence.MediaTitle = _imageFormat.GetImageName();
sidecar.BlockMedia[0].Sequence.MediaTitle = _imageFormat.Info.MediaTitle;
currentProgress = 3;
#if DEBUG
stopwatch.Restart();
#endif
foreach(MediaTagType tagType in _imageFormat.ImageInfo.readableMediaTags)
foreach(MediaTagType tagType in _imageFormat.Info.ReadableMediaTags)
{
currentProgress++;
if(UpdateProgress != null)
@@ -850,12 +855,12 @@ namespace osrepodbmgr.Core
sidecar.BlockMedia[0].SecureDigital.CSD.Checksums = Checksum.GetChecksums(_imageFormat.ReadDiskTag(MediaTagType.SD_CSD)).ToArray();
sidecar.BlockMedia[0].SecureDigital.CSD.Size = _imageFormat.ReadDiskTag(MediaTagType.SD_CSD).Length;
break;
case MediaTagType.SD_ExtendedCSD:
case MediaTagType.MMC_ExtendedCSD:
if(sidecar.BlockMedia[0].SecureDigital == null)
sidecar.BlockMedia[0].SecureDigital = new SecureDigitalType();
sidecar.BlockMedia[0].SecureDigital.ExtendedCSD = new DumpType();
sidecar.BlockMedia[0].SecureDigital.ExtendedCSD.Checksums = Checksum.GetChecksums(_imageFormat.ReadDiskTag(MediaTagType.SD_ExtendedCSD)).ToArray();
sidecar.BlockMedia[0].SecureDigital.ExtendedCSD.Size = _imageFormat.ReadDiskTag(MediaTagType.SD_ExtendedCSD).Length;
sidecar.BlockMedia[0].MultiMediaCard.ExtendedCSD = new DumpType();
sidecar.BlockMedia[0].MultiMediaCard.ExtendedCSD.Checksums = Checksum.GetChecksums(_imageFormat.ReadDiskTag(MediaTagType.MMC_ExtendedCSD)).ToArray();
sidecar.BlockMedia[0].MultiMediaCard.ExtendedCSD.Size = _imageFormat.ReadDiskTag(MediaTagType.MMC_ExtendedCSD).Length;
break;
}
}
@@ -865,7 +870,7 @@ namespace osrepodbmgr.Core
#endif
// If there is only one track, and it's the same as the image file (e.g. ".iso" files), don't re-checksum.
if(_imageFormat.PluginUUID == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
if(_imageFormat.Id == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
{
sidecar.BlockMedia[0].ContentChecksums = sidecar.BlockMedia[0].Checksums;
}
@@ -874,7 +879,7 @@ namespace osrepodbmgr.Core
Checksum contentChkWorker = new Checksum();
uint sectorsToRead = 512;
ulong sectors = _imageFormat.GetSectors();
ulong sectors = _imageFormat.Info.Sectors;
ulong doneSectors = 0;
if(UpdateProgress != null)
@@ -917,16 +922,16 @@ namespace osrepodbmgr.Core
}
string dskType, dskSubType;
DiscImageChef.Metadata.MediaType.MediaTypeToString(_imageFormat.ImageInfo.mediaType, out dskType, out dskSubType);
DiscImageChef.Metadata.MediaType.MediaTypeToString(_imageFormat.Info.MediaType, out dskType, out dskSubType);
sidecar.BlockMedia[0].DiskType = dskType;
sidecar.BlockMedia[0].DiskSubType = dskSubType;
sidecar.BlockMedia[0].Dimensions = DiscImageChef.Metadata.Dimensions.DimensionsFromMediaType(_imageFormat.ImageInfo.mediaType);
sidecar.BlockMedia[0].Dimensions = DiscImageChef.Metadata.Dimensions.DimensionsFromMediaType(_imageFormat.Info.MediaType);
sidecar.BlockMedia[0].LogicalBlocks = (long)_imageFormat.GetSectors();
sidecar.BlockMedia[0].LogicalBlockSize = (int)_imageFormat.GetSectorSize();
sidecar.BlockMedia[0].LogicalBlocks = (long)_imageFormat.Info.Sectors;
sidecar.BlockMedia[0].LogicalBlockSize = (int)_imageFormat.Info.SectorSize;
// TODO: Detect it
sidecar.BlockMedia[0].PhysicalBlockSize = (int)_imageFormat.GetSectorSize();
sidecar.BlockMedia[0].PhysicalBlockSize = (int)_imageFormat.Info.SectorSize;
if(UpdateProgress != null)
UpdateProgress(null, "Checking filesystems", maxProgress - 1, maxProgress);
@@ -936,11 +941,11 @@ namespace osrepodbmgr.Core
#endif
List<Partition> partitions = new List<Partition>();
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
foreach(IPartition _partplugin in plugins.PartPluginsList.Values)
{
List<Partition> _partitions;
if(_partplugin.GetInformation(_imageFormat, out _partitions))
if(_partplugin.GetInformation(_imageFormat, out _partitions, 0))
{
partitions = _partitions;
break;
@@ -954,24 +959,24 @@ namespace osrepodbmgr.Core
for(int i = 0; i < partitions.Count; i++)
{
sidecar.BlockMedia[0].FileSystemInformation[i] = new PartitionType();
sidecar.BlockMedia[0].FileSystemInformation[i].Description = partitions[i].PartitionDescription;
sidecar.BlockMedia[0].FileSystemInformation[i].EndSector = (int)(partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1);
sidecar.BlockMedia[0].FileSystemInformation[i].Name = partitions[i].PartitionName;
sidecar.BlockMedia[0].FileSystemInformation[i].Sequence = (int)partitions[i].PartitionSequence;
sidecar.BlockMedia[0].FileSystemInformation[i].StartSector = (int)partitions[i].PartitionStartSector;
sidecar.BlockMedia[0].FileSystemInformation[i].Type = partitions[i].PartitionType;
sidecar.BlockMedia[0].FileSystemInformation[i].Description = partitions[i].Description;
sidecar.BlockMedia[0].FileSystemInformation[i].EndSector = (int)(partitions[i].End);
sidecar.BlockMedia[0].FileSystemInformation[i].Name = partitions[i].Name;
sidecar.BlockMedia[0].FileSystemInformation[i].Sequence = (int)partitions[i].Sequence;
sidecar.BlockMedia[0].FileSystemInformation[i].StartSector = (int)partitions[i].Start;
sidecar.BlockMedia[0].FileSystemInformation[i].Type = partitions[i].Type;
List<FileSystemType> lstFs = new List<FileSystemType>();
foreach(Filesystem _plugin in plugins.PluginsList.Values)
foreach(IFilesystem _plugin in plugins.PluginsList.Values)
{
try
{
if(_plugin.Identify(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1))
if(_plugin.Identify(_imageFormat, partitions[i]))
{
string foo;
_plugin.GetInformation(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1, out foo);
lstFs.Add(_plugin.XmlFSType);
_plugin.GetInformation(_imageFormat, partitions[i], out foo, null);
lstFs.Add(_plugin.XmlFsType);
}
}
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
@@ -990,19 +995,25 @@ namespace osrepodbmgr.Core
{
sidecar.BlockMedia[0].FileSystemInformation[0] = new PartitionType();
sidecar.BlockMedia[0].FileSystemInformation[0].StartSector = 0;
sidecar.BlockMedia[0].FileSystemInformation[0].EndSector = (int)(_imageFormat.GetSectors() - 1);
sidecar.BlockMedia[0].FileSystemInformation[0].EndSector = (int)(_imageFormat.Info.Sectors - 1);
Partition wholePart = new Partition
{
Start = 0,
Length = _imageFormat.Info.Sectors
};
List<FileSystemType> lstFs = new List<FileSystemType>();
foreach(Filesystem _plugin in plugins.PluginsList.Values)
foreach(IFilesystem _plugin in plugins.PluginsList.Values)
{
try
{
if(_plugin.Identify(_imageFormat, 0, _imageFormat.GetSectors() - 1))
if(_plugin.Identify(_imageFormat, wholePart))
{
string foo;
_plugin.GetInformation(_imageFormat, 0, _imageFormat.GetSectors() - 1, out foo);
lstFs.Add(_plugin.XmlFSType);
_plugin.GetInformation(_imageFormat, wholePart, out foo, null);
lstFs.Add(_plugin.XmlFsType);
}
}
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body

View File

@@ -421,7 +421,7 @@ namespace osrepodbmgr.Core
FileStream fileStream = new FileStream(file, FileMode.Open, FileAccess.Read);
byte[] dataBuffer = new byte[bufferSize];
SHA256Context sha256Context = new SHA256Context();
Sha256Context sha256Context = new Sha256Context();
sha256Context.Init();
if(fileStream.Length > bufferSize)

View File

@@ -53,7 +53,7 @@ namespace osrepodbmgr.Core
Task.Run(async () =>
{
vt = new VirusTotal(key);
report = await vt.GetFileReport("b82758fc5f737a58078d3c60e2798a70d895443a86aa39adf52dec70e98c2bed");
report = await vt.GetFileReportAsync("b82758fc5f737a58078d3c60e2798a70d895443a86aa39adf52dec70e98c2bed");
}).Wait();
}
catch(Exception ex)
@@ -76,7 +76,7 @@ namespace osrepodbmgr.Core
Task.Run(async () =>
{
vt = new VirusTotal(key);
report = await vt.GetFileReport("b82758fc5f737a58078d3c60e2798a70d895443a86aa39adf52dec70e98c2bed");
report = await vt.GetFileReportAsync("b82758fc5f737a58078d3c60e2798a70d895443a86aa39adf52dec70e98c2bed");
}).Wait();
}
catch(Exception ex)
@@ -122,23 +122,23 @@ namespace osrepodbmgr.Core
#endif
Task.Run(async () =>
{
fResult = await vTotal.GetFileReport(file.Sha256);
fResult = await vTotal.GetFileReportAsync(file.Sha256);
}).Wait();
#if DEBUG
stopwatch.Stop();
Console.WriteLine("Core.VirusTotalFileFromRepo({0}): VirusTotal took {1} seconds to answer for SHA256 request", file, stopwatch.Elapsed.TotalSeconds);
#endif
if(fResult.ResponseCode == VirusTotalNET.ResponseCodes.ReportResponseCode.Error)
if(fResult.ResponseCode == VirusTotalNET.ResponseCodes.FileReportResponseCode.NotPresent)
{
if(Failed != null)
Failed(fResult.VerboseMsg);
return;
}
if(fResult.ResponseCode != VirusTotalNET.ResponseCodes.ReportResponseCode.StillQueued)
if(fResult.ResponseCode != VirusTotalNET.ResponseCodes.FileReportResponseCode.Queued)
{
if(fResult.ResponseCode == VirusTotalNET.ResponseCodes.ReportResponseCode.Present)
if(fResult.ResponseCode == VirusTotalNET.ResponseCodes.FileReportResponseCode.Present)
{
if(fResult.Positives > 0)
{
@@ -281,7 +281,7 @@ namespace osrepodbmgr.Core
#endif
Task.Run(async () =>
{
sResult = await vTotal.ScanFile(outFs, file.Sha256); // Keep filename private, sorry!
sResult = await vTotal.ScanFileAsync(outFs, file.Sha256); // Keep filename private, sorry!
}).Wait();
#if DEBUG
stopwatch.Stop();
@@ -291,7 +291,7 @@ namespace osrepodbmgr.Core
File.Delete(tmpFile);
if(sResult == null || sResult.ResponseCode == VirusTotalNET.ResponseCodes.ScanResponseCode.Error)
if(sResult == null || sResult.ResponseCode == VirusTotalNET.ResponseCodes.ScanFileResponseCode.Error)
{
if(sResult == null)
{
@@ -309,7 +309,7 @@ namespace osrepodbmgr.Core
Task.Run(async () =>
{
fResult = await vTotal.GetFileReport(file.Sha256);
fResult = await vTotal.GetFileReportAsync(file.Sha256);
}).Wait();
}
@@ -320,7 +320,7 @@ namespace osrepodbmgr.Core
stopwatch.Restart();
#endif
int counter = 0;
while(fResult.ResponseCode == VirusTotalNET.ResponseCodes.ReportResponseCode.StillQueued)
while(fResult.ResponseCode == VirusTotalNET.ResponseCodes.FileReportResponseCode.Queued)
{
// Timeout...
if(counter == 10)
@@ -331,7 +331,7 @@ namespace osrepodbmgr.Core
Task.Run(async () =>
{
fResult = await vTotal.GetFileReport(file.Sha256);
fResult = await vTotal.GetFileReportAsync(file.Sha256);
}).Wait();
counter++;
@@ -341,7 +341,7 @@ namespace osrepodbmgr.Core
Console.WriteLine("Core.VirusTotalFileFromRepo({0}): VirusTotal took {1} seconds to do the analysis", file, stopwatch.Elapsed.TotalSeconds);
#endif
if(fResult.ResponseCode != VirusTotalNET.ResponseCodes.ReportResponseCode.Present)
if(fResult.ResponseCode != VirusTotalNET.ResponseCodes.FileReportResponseCode.Present)
{
if(Failed != null)
Failed(fResult.VerboseMsg);

View File

@@ -26,15 +26,21 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="nClam, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\nClam.4.0.0\lib\net45\nClam.dll</HintPath>
</Reference>
<Reference Include="SharpCompress, Version=0.19.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96">
<HintPath>..\packages\SharpCompress.0.19.2\lib\net45\SharpCompress.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="DotNetZip">
<HintPath>..\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Data" />
<Reference Include="nClam">
<HintPath>..\packages\nClam.3.0.0\lib\net45\nClam.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="plist-cil">
@@ -43,14 +49,8 @@
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.105.2\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="VirusTotal.NET">
<HintPath>..\packages\VirusTotal.NET.1.5.4\lib\net45\VirusTotal.NET.dll</HintPath>
</Reference>
<Reference Include="SharpCompress">
<HintPath>..\packages\SharpCompress.0.17.1\lib\net45\SharpCompress.dll</HintPath>
<Reference Include="VirusTotal.NET, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\VirusTotal.NET.1.6.0\lib\net45\VirusTotal.NET.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -87,7 +87,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DiscImageChef\DiscImageChef.Checksums\DiscImageChef.Checksums.csproj">
<Project>{CC48B324-A532-4A45-87A6-6F91F7141E8D}</Project>
<Project>{cc48b324-a532-4a45-87a6-6f91f7141e8d}</Project>
<Name>DiscImageChef.Checksums</Name>
</ProjectReference>
<ProjectReference Include="..\DiscImageChef\DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj">
@@ -133,4 +133,5 @@
</MonoDevelop>
</ProjectExtensions>
<Import Project="..\packages\System.Data.SQLite.Core.1.0.105.2\build\net45\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.105.2\build\net45\System.Data.SQLite.Core.targets')" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net45\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net45\System.Data.SQLite.Core.targets')" />
</Project>

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.10.1" targetFramework="net45" />
<package id="nClam" version="3.0.0" targetFramework="net45" />
<package id="nClam" version="4.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
<package id="plist-cil" version="1.16.0" targetFramework="net45" />
<package id="SharpCompress" version="0.17.1" targetFramework="net45" />
<package id="System.Data.SQLite.Core" version="1.0.105.2" targetFramework="net45" />
<package id="SharpCompress" version="0.19.2" targetFramework="net45" />
<package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net45" />
<package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="net45" />
<package id="System.Net.Http" version="4.3.2" targetFramework="net45" />
<package id="VirusTotal.NET" version="1.5.4" targetFramework="net45" />
<package id="System.Net.Http" version="4.3.3" targetFramework="net45" />
<package id="VirusTotal.NET" version="1.6.0" targetFramework="net45" />
</packages>

View File

@@ -765,11 +765,11 @@ namespace osrepodbmgr.Eto
lstCSD.Add(Metadata.SecureDigital.CSD);
}
if(Metadata.SecureDigital.ExtendedCSD != null)
if(Metadata.MultiMediaCard.ExtendedCSD != null)
{
chkECSD.Checked = true;
treeECSD.Visible = true;
lstECSD.Add(Metadata.SecureDigital.ExtendedCSD);
lstECSD.Add(Metadata.MultiMediaCard.ExtendedCSD);
}
}
if(Metadata.SCSI != null && Metadata.SCSI.Inquiry != null)
@@ -1578,7 +1578,7 @@ namespace osrepodbmgr.Eto
if(lstCSD.Count == 1)
Metadata.SecureDigital.CSD = lstCSD[0];
if(lstECSD.Count == 1)
Metadata.SecureDigital.ExtendedCSD = lstECSD[0];
Metadata.MultiMediaCard.ExtendedCSD = lstECSD[0];
}
if(chkSCSI.Checked.Value)

View File

@@ -478,8 +478,8 @@ namespace osrepodbmgr.Eto
files.Add(disk.SecureDigital.CID.Image);
if(disk.SecureDigital.CSD != null)
files.Add(disk.SecureDigital.CSD.Image);
if(disk.SecureDigital.ExtendedCSD != null)
files.Add(disk.SecureDigital.ExtendedCSD.Image);
if(disk.MultiMediaCard.ExtendedCSD != null)
files.Add(disk.MultiMediaCard.ExtendedCSD.Image);
}
if(disk.TapeInformation != null)
{
@@ -1066,8 +1066,8 @@ namespace osrepodbmgr.Eto
files.Add(disk.SecureDigital.CID.Image);
if(disk.SecureDigital.CSD != null)
files.Add(disk.SecureDigital.CSD.Image);
if(disk.SecureDigital.ExtendedCSD != null)
files.Add(disk.SecureDigital.ExtendedCSD.Image);
if(disk.MultiMediaCard.ExtendedCSD != null)
files.Add(disk.MultiMediaCard.ExtendedCSD.Image);
}
if(disk.TapeInformation != null)
{

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -56,12 +56,12 @@
<Reference Include="Eto">
<HintPath>..\packages\Eto.Forms.2.3.0\lib\net45\Eto.dll</HintPath>
</Reference>
<Reference Include="Portable.Xaml">
<HintPath>..\packages\Portable.Xaml.0.14.0\lib\dotnet\Portable.Xaml.dll</HintPath>
</Reference>
<Reference Include="Eto.Serialization.Xaml">
<HintPath>..\packages\Eto.Serialization.Xaml.2.3.0\lib\net45\Eto.Serialization.Xaml.dll</HintPath>
</Reference>
<Reference Include="Portable.Xaml, Version=0.15.6458.140, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Portable.Xaml.0.17.0\lib\portable-net45+win8+wpa81+wp8\Portable.Xaml.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">

View File

@@ -3,5 +3,5 @@
<package id="Eto.Forms" version="2.3.0" targetFramework="net45" />
<package id="Eto.Serialization.Xaml" version="2.3.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
<package id="Portable.Xaml" version="0.14.0" targetFramework="net45" />
<package id="Portable.Xaml" version="0.17.0" targetFramework="net45" />
</packages>

View File

@@ -1,4 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osrepodbmgr.Gtk", "osrepodbmgr\osrepodbmgr.Gtk.csproj", "{19FB7436-031F-42B3-87F6-8508F63EDADA}"
@@ -31,6 +31,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osrepodbmgr.Eto.Desktop", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osrepodbmgr.Eto.XamMac2", "osrepodbmgr.Eto.XamMac2\osrepodbmgr.Eto.XamMac2.csproj", "{FE0C10AD-1C0D-490F-B1BF-9702A5B01074}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Interop", "DiscImageChef\DiscImageChef.Interop\DiscImageChef.Interop.csproj", "{9183F2E0-A879-4F23-9EE3-C6908F1332B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
@@ -97,6 +99,10 @@ Global
{FE0C10AD-1C0D-490F-B1BF-9702A5B01074}.Debug|x86.Build.0 = Debug|x86
{FE0C10AD-1C0D-490F-B1BF-9702A5B01074}.Release|x86.ActiveCfg = Release|x86
{FE0C10AD-1C0D-490F-B1BF-9702A5B01074}.Release|x86.Build.0 = Release|x86
{9183F2E0-A879-4F23-9EE3-C6908F1332B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{9183F2E0-A879-4F23-9EE3-C6908F1332B2}.Debug|x86.Build.0 = Debug|Any CPU
{9183F2E0-A879-4F23-9EE3-C6908F1332B2}.Release|x86.ActiveCfg = Release|Any CPU
{9183F2E0-A879-4F23-9EE3-C6908F1332B2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0

View File

@@ -468,11 +468,11 @@ namespace osrepodbmgr
lstCSD.AppendValues(Metadata.SecureDigital.CSD.Image, Metadata.SecureDigital.CSD.Size, Metadata.SecureDigital.CSD.Checksums);
}
if(Metadata.SecureDigital.ExtendedCSD != null)
if(Metadata.MultiMediaCard.ExtendedCSD != null)
{
chkECSD.Active = true;
treeECSD.Visible = true;
lstECSD.AppendValues(Metadata.SecureDigital.ExtendedCSD.Image, Metadata.SecureDigital.ExtendedCSD.Size, Metadata.SecureDigital.ExtendedCSD.Checksums);
lstECSD.AppendValues(Metadata.MultiMediaCard.ExtendedCSD.Image, Metadata.MultiMediaCard.ExtendedCSD.Size, Metadata.MultiMediaCard.ExtendedCSD.Checksums);
}
}
if(Metadata.SCSI != null && Metadata.SCSI.Inquiry != null)
@@ -1511,10 +1511,10 @@ namespace osrepodbmgr
}
if(lstECSD.GetIterFirst(out outIter))
{
Metadata.SecureDigital.ExtendedCSD = new DumpType();
Metadata.SecureDigital.ExtendedCSD.Image = (string)lstECSD.GetValue(outIter, 0);
Metadata.SecureDigital.ExtendedCSD.Size = (int)lstECSD.GetValue(outIter, 1);
Metadata.SecureDigital.ExtendedCSD.Checksums = (ChecksumType[])lstECSD.GetValue(outIter, 2);
Metadata.MultiMediaCard.ExtendedCSD = new DumpType();
Metadata.MultiMediaCard.ExtendedCSD.Image = (string)lstECSD.GetValue(outIter, 0);
Metadata.MultiMediaCard.ExtendedCSD.Size = (int)lstECSD.GetValue(outIter, 1);
Metadata.MultiMediaCard.ExtendedCSD.Checksums = (ChecksumType[])lstECSD.GetValue(outIter, 2);
}
}

View File

@@ -508,8 +508,8 @@ namespace osrepodbmgr
files.Add(disk.SecureDigital.CID.Image);
if(disk.SecureDigital.CSD != null)
files.Add(disk.SecureDigital.CSD.Image);
if(disk.SecureDigital.ExtendedCSD != null)
files.Add(disk.SecureDigital.ExtendedCSD.Image);
if(disk.MultiMediaCard.ExtendedCSD != null)
files.Add(disk.MultiMediaCard.ExtendedCSD.Image);
}
if(disk.TapeInformation != null)
{
@@ -1094,8 +1094,8 @@ namespace osrepodbmgr
files.Add(disk.SecureDigital.CID.Image);
if(disk.SecureDigital.CSD != null)
files.Add(disk.SecureDigital.CSD.Image);
if(disk.SecureDigital.ExtendedCSD != null)
files.Add(disk.SecureDigital.ExtendedCSD.Image);
if(disk.MultiMediaCard.ExtendedCSD != null)
files.Add(disk.MultiMediaCard.ExtendedCSD.Image);
}
if(disk.TapeInformation != null)
{