REFACTOR: Member or type can be made internal.

This commit is contained in:
2017-12-20 02:08:37 +00:00
parent b53b80c998
commit ef49fdfd45
87 changed files with 544 additions and 544 deletions

View File

@@ -381,7 +381,7 @@ namespace DiscImageChef.Core
return chks;
}
public static List<ChecksumType> GetChecksums(byte[] data, EnableChecksum enabled = EnableChecksum.All)
internal static List<ChecksumType> GetChecksums(byte[] data, EnableChecksum enabled = EnableChecksum.All)
{
Adler32Context adler32ctxData = null;
CRC16Context crc16ctxData = null;

View File

@@ -14,16 +14,16 @@
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// it under the terms of the GNU General public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program 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 General Public License for more details.
// GNU General public License for more details.
//
// You should have received a copy of the GNU General Public License
// You should have received a copy of the GNU General public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------

View File

@@ -41,7 +41,7 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Core.Devices.Dumping
{
// TODO: For >4.0, this class must disappear
public class Alcohol120
class Alcohol120
{
#region Internal Structures
[StructLayout(LayoutKind.Sequential, Pack = 1)]
@@ -158,7 +158,7 @@ namespace DiscImageChef.Core.Devices.Dumping
Dictionary<byte, uint> trackLengths;
AlcoholFooter footer;
public Alcohol120(string outputPrefix)
internal Alcohol120(string outputPrefix)
{
this.outputPrefix = outputPrefix;
header = new AlcoholHeader
@@ -178,7 +178,7 @@ namespace DiscImageChef.Core.Devices.Dumping
footer = new AlcoholFooter {widechar = 1};
}
public void Close()
internal void Close()
{
if(sessions.Count == 0 || tracks.Count == 0) return;
@@ -317,7 +317,7 @@ namespace DiscImageChef.Core.Devices.Dumping
descriptorFile.Dispose();
}
public void SetMediaType(MediaType type)
internal void SetMediaType(MediaType type)
{
switch(type)
{
@@ -376,7 +376,7 @@ namespace DiscImageChef.Core.Devices.Dumping
}
}
public void AddSessions(Session[] cdSessions)
internal void AddSessions(Session[] cdSessions)
{
foreach(Session cdSession in cdSessions)
{
@@ -390,7 +390,7 @@ namespace DiscImageChef.Core.Devices.Dumping
}
}
public void SetTrackTypes(byte point, TrackType mode, TrackSubchannelType subMode)
internal void SetTrackTypes(byte point, TrackType mode, TrackSubchannelType subMode)
{
AlcoholTrack[] trkArray = tracks.ToArray();
@@ -443,7 +443,7 @@ namespace DiscImageChef.Core.Devices.Dumping
}
}
public void SetTrackSizes(byte point, int sectorSize, long startLba, long startOffset, long length)
internal void SetTrackSizes(byte point, int sectorSize, long startLba, long startOffset, long length)
{
AlcoholTrack[] trkArray = tracks.ToArray();
@@ -474,7 +474,7 @@ namespace DiscImageChef.Core.Devices.Dumping
sessions = new List<AlcoholSession>(sess);
}
public void AddTrack(byte adrCtl, byte tno, byte point, byte min, byte sec, byte frame, byte zero, byte pmin,
internal void AddTrack(byte adrCtl, byte tno, byte point, byte min, byte sec, byte frame, byte zero, byte pmin,
byte psec, byte pframe, byte session)
{
AlcoholTrack trk = new AlcoholTrack
@@ -507,12 +507,12 @@ namespace DiscImageChef.Core.Devices.Dumping
sessions = new List<AlcoholSession>(sess);
}
public void AddBCA(byte[] bca)
internal void AddBCA(byte[] bca)
{
this.bca = bca;
}
public void AddPFI(byte[] pfi)
internal void AddPFI(byte[] pfi)
{
if(pfi.Length == 2052)
{
@@ -522,7 +522,7 @@ namespace DiscImageChef.Core.Devices.Dumping
else this.pfi = pfi;
}
public void AddDMI(byte[] dmi)
internal void AddDMI(byte[] dmi)
{
if(dmi.Length == 2052)
{
@@ -532,7 +532,7 @@ namespace DiscImageChef.Core.Devices.Dumping
else this.dmi = dmi;
}
public void SetExtension(string extension)
internal void SetExtension(string extension)
{
this.extension = extension;
}

View File

@@ -38,9 +38,9 @@ using Schemas;
namespace DiscImageChef.Core.Devices.Dumping
{
public static class ResumeSupport
static class ResumeSupport
{
public static void Process(bool isLba, bool removable, ulong blocks, string Manufacturer, string Model,
internal static void Process(bool isLba, bool removable, ulong blocks, string Manufacturer, string Model,
string Serial, Interop.PlatformID platform, ref Resume resume,
ref DumpHardwareType currentTry, ref ExtentsULong extents)
{

View File

@@ -36,7 +36,7 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Core.Devices
{
public partial class Reader
partial class Reader
{
Device dev;
uint timeout;
@@ -48,44 +48,44 @@ namespace DiscImageChef.Core.Devices
uint physicalsectorsize;
uint longBlockSize;
public string ErrorMessage
internal string ErrorMessage
{
get { return errorMessage; }
}
public ulong Blocks
internal ulong Blocks
{
get { return blocks; }
}
public uint BlocksToRead
internal uint BlocksToRead
{
get { return blocksToRead; }
}
public uint LogicalBlockSize
internal uint LogicalBlockSize
{
get { return blockSize; }
}
public uint PhysicalBlockSize
internal uint PhysicalBlockSize
{
get { return physicalsectorsize; }
}
public uint LongBlockSize
internal uint LongBlockSize
{
get { return longBlockSize; }
}
public bool CanReadRaw
internal bool CanReadRaw
{
get { return readRaw; }
}
public bool CanSeek
internal bool CanSeek
{
get { return ataSeek || seek6 || seek10; }
}
public bool CanSeekLBA
internal bool CanSeekLBA
{
get { return ataSeekLba || seek6 || seek10; }
}
public Reader(Device dev, uint timeout, byte[] identification, bool raw = false)
internal Reader(Device dev, uint timeout, byte[] identification, bool raw = false)
{
this.dev = dev;
this.timeout = timeout;
@@ -101,7 +101,7 @@ namespace DiscImageChef.Core.Devices
}
}
public ulong GetDeviceBlocks()
internal ulong GetDeviceBlocks()
{
switch(dev.Type)
{
@@ -114,7 +114,7 @@ namespace DiscImageChef.Core.Devices
}
}
public bool FindReadCommand()
internal bool FindReadCommand()
{
switch(dev.Type)
{
@@ -127,7 +127,7 @@ namespace DiscImageChef.Core.Devices
}
}
public bool GetBlockSize()
internal bool GetBlockSize()
{
switch(dev.Type)
{
@@ -140,7 +140,7 @@ namespace DiscImageChef.Core.Devices
}
}
public bool GetBlocksToRead(uint startWithBlocks = 64)
internal bool GetBlocksToRead(uint startWithBlocks = 64)
{
switch(dev.Type)
{
@@ -153,17 +153,17 @@ namespace DiscImageChef.Core.Devices
}
}
public bool ReadBlock(out byte[] buffer, ulong block, out double duration)
internal bool ReadBlock(out byte[] buffer, ulong block, out double duration)
{
return ReadBlocks(out buffer, block, 1, out duration);
}
public bool ReadBlocks(out byte[] buffer, ulong block, out double duration)
internal bool ReadBlocks(out byte[] buffer, ulong block, out double duration)
{
return ReadBlocks(out buffer, block, blocksToRead, out duration);
}
public bool ReadBlocks(out byte[] buffer, ulong block, uint count, out double duration)
internal bool ReadBlocks(out byte[] buffer, ulong block, uint count, out double duration)
{
switch(dev.Type)
{
@@ -177,7 +177,7 @@ namespace DiscImageChef.Core.Devices
}
}
public bool ReadCHS(out byte[] buffer, ushort cylinder, byte head, byte sector, out double duration)
internal bool ReadCHS(out byte[] buffer, ushort cylinder, byte head, byte sector, out double duration)
{
switch(dev.Type)
{
@@ -189,7 +189,7 @@ namespace DiscImageChef.Core.Devices
}
}
public bool Seek(ulong block, out double duration)
internal bool Seek(ulong block, out double duration)
{
switch(dev.Type)
{
@@ -202,7 +202,7 @@ namespace DiscImageChef.Core.Devices
}
}
public bool SeekCHS(ushort cylinder, byte head, byte sector, out double duration)
internal bool SeekCHS(ushort cylinder, byte head, byte sector, out double duration)
{
switch(dev.Type)
{

View File

@@ -37,7 +37,7 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Core.Devices
{
public partial class Reader
partial class Reader
{
bool ataReadLba;
bool ataReadRetryLba;
@@ -57,24 +57,24 @@ namespace DiscImageChef.Core.Devices
Identify.IdentifyDevice ataId;
public bool IsLBA
internal bool IsLBA
{
get { return lbaMode; }
}
public ushort Cylinders
internal ushort Cylinders
{
get { return cylinders; }
}
public byte Heads
internal byte Heads
{
get { return heads; }
}
public byte Sectors
internal byte Sectors
{
get { return sectors; }
}
public (uint, byte, byte) GetDeviceCHS()
(uint, byte, byte) GetDeviceCHS()
{
if(dev.Type != DeviceType.ATA) return (0, 0, 0);

View File

@@ -35,7 +35,7 @@ using DiscImageChef.Console;
namespace DiscImageChef.Core.Devices
{
public partial class Reader
partial class Reader
{
// TODO: Raw reading
bool read6;

View File

@@ -36,9 +36,9 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
public static class ATAPI
static class ATAPI
{
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
internal static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
if(report == null) return;

View File

@@ -37,9 +37,9 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
public static class FireWire
static class FireWire
{
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
internal static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
if(report == null) return;

View File

@@ -36,9 +36,9 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
public static class PCMCIA
static class PCMCIA
{
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
internal static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
report.PCMCIA = new pcmciaType();
report.PCMCIA.CIS = dev.CIS;

View File

@@ -37,9 +37,9 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
public static class USB
static class USB
{
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
internal static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
if(report == null) return;

View File

@@ -38,7 +38,7 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Core.Logging
{
public class IBGLog
class IBGLog
{
static FileStream ibgFs;
static StringBuilder ibgSb;
@@ -54,7 +54,7 @@ namespace DiscImageChef.Core.Logging
static ulong ibgIntSector;
static int ibgSampleRate;
public IBGLog(string outputFile, ushort currentProfile)
internal IBGLog(string outputFile, ushort currentProfile)
{
if(!string.IsNullOrEmpty(outputFile))
{
@@ -193,7 +193,7 @@ namespace DiscImageChef.Core.Logging
}
}
public void Write(ulong sector, double currentSpeed)
internal void Write(ulong sector, double currentSpeed)
{
if(ibgFs != null)
{
@@ -222,7 +222,7 @@ namespace DiscImageChef.Core.Logging
}
}
public void Close(Device dev, ulong blocks, ulong blockSize, double totalSeconds, double currentSpeed,
internal void Close(Device dev, ulong blocks, ulong blockSize, double totalSeconds, double currentSpeed,
double averageSpeed, string devicePath)
{
if(ibgFs != null)

View File

@@ -37,11 +37,11 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Core.Logging
{
public class MHDDLog
class MHDDLog
{
static FileStream mhddFs;
FileStream mhddFs;
public MHDDLog(string outputFile, Device dev, ulong blocks, ulong blockSize, ulong blocksToRead)
internal MHDDLog(string outputFile, Device dev, ulong blocks, ulong blockSize, ulong blocksToRead)
{
if(dev != null && !string.IsNullOrEmpty(outputFile))
{
@@ -128,7 +128,7 @@ namespace DiscImageChef.Core.Logging
}
}
public void Write(ulong sector, double duration)
internal void Write(ulong sector, double duration)
{
if(mhddFs != null)
{
@@ -140,7 +140,7 @@ namespace DiscImageChef.Core.Logging
}
}
public void Close()
internal void Close()
{
if(mhddFs != null) mhddFs.Close();
}

View File

@@ -14,16 +14,16 @@
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// it under the terms of the GNU General internal License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program 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 General Public License for more details.
// GNU General internal License for more details.
//
// You should have received a copy of the GNU General Public License
// You should have received a copy of the GNU General internal License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
@@ -35,9 +35,9 @@ using Schemas;
namespace DiscImageChef.Core
{
public static class Version
static class Version
{
public static SoftwareType GetSoftwareType(PlatformID platform)
internal static SoftwareType GetSoftwareType(PlatformID platform)
{
return new SoftwareType
{
@@ -47,7 +47,7 @@ namespace DiscImageChef.Core
};
}
public static string GetVersion()
internal static string GetVersion()
{
return typeof(Version).Assembly.GetName().Version.ToString();
}

View File

@@ -14,14 +14,14 @@
// --[ 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
// it under the terms of the GNU Lesser General internal 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.
// Lesser General internal License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
@@ -37,7 +37,7 @@ using Microsoft.Win32.SafeHandles;
namespace DiscImageChef.Devices
{
public static class Command
static class Command
{
/// <summary>
/// Sends a SCSI command
@@ -51,7 +51,7 @@ namespace DiscImageChef.Devices
/// <param name="direction">SCSI command transfer direction</param>
/// <param name="duration">Time it took to execute the command in milliseconds</param>
/// <param name="sense"><c>True</c> if SCSI error returned non-OK status and <paramref name="senseBuffer"/> contains SCSI sense</param>
public static int SendScsiCommand(object fd, byte[] cdb, ref byte[] buffer, out byte[] senseBuffer,
internal static int SendScsiCommand(object fd, byte[] cdb, ref byte[] buffer, out byte[] senseBuffer,
uint timeout, ScsiDirection direction, out double duration, out bool sense)
{
Interop.PlatformID ptID = DetectOS.GetRealPlatformID();
@@ -73,7 +73,7 @@ namespace DiscImageChef.Devices
/// <param name="direction">SCSI command transfer direction</param>
/// <param name="duration">Time it took to execute the command in milliseconds</param>
/// <param name="sense"><c>True</c> if SCSI error returned non-OK status and <paramref name="senseBuffer"/> contains SCSI sense</param>
public static int SendScsiCommand(Interop.PlatformID ptID, object fd, byte[] cdb, ref byte[] buffer,
internal static int SendScsiCommand(Interop.PlatformID ptID, object fd, byte[] cdb, ref byte[] buffer,
out byte[] senseBuffer, uint timeout, ScsiDirection direction,
out double duration, out bool sense)
{
@@ -155,7 +155,7 @@ namespace DiscImageChef.Devices
}
}
public static int SendAtaCommand(object fd, AtaRegistersCHS registers, out AtaErrorRegistersCHS errorRegisters,
internal static int SendAtaCommand(object fd, AtaRegistersCHS registers, out AtaErrorRegistersCHS errorRegisters,
AtaProtocol protocol, AtaTransferRegister transferRegister, ref byte[] buffer,
uint timeout, bool transferBlocks, out double duration, out bool sense)
{
@@ -165,7 +165,7 @@ namespace DiscImageChef.Devices
timeout, transferBlocks, out duration, out sense);
}
public static int SendAtaCommand(Interop.PlatformID ptID, object fd, AtaRegistersCHS registers,
internal static int SendAtaCommand(Interop.PlatformID ptID, object fd, AtaRegistersCHS registers,
out AtaErrorRegistersCHS errorRegisters, AtaProtocol protocol,
AtaTransferRegister transferRegister, ref byte[] buffer, uint timeout,
bool transferBlocks, out double duration, out bool sense)
@@ -204,7 +204,7 @@ namespace DiscImageChef.Devices
}
}
public static int SendAtaCommand(object fd, AtaRegistersLBA28 registers,
internal static int SendAtaCommand(object fd, AtaRegistersLBA28 registers,
out AtaErrorRegistersLBA28 errorRegisters, AtaProtocol protocol,
AtaTransferRegister transferRegister, ref byte[] buffer, uint timeout,
bool transferBlocks, out double duration, out bool sense)
@@ -215,7 +215,7 @@ namespace DiscImageChef.Devices
timeout, transferBlocks, out duration, out sense);
}
public static int SendAtaCommand(Interop.PlatformID ptID, object fd, AtaRegistersLBA28 registers,
internal static int SendAtaCommand(Interop.PlatformID ptID, object fd, AtaRegistersLBA28 registers,
out AtaErrorRegistersLBA28 errorRegisters, AtaProtocol protocol,
AtaTransferRegister transferRegister, ref byte[] buffer, uint timeout,
bool transferBlocks, out double duration, out bool sense)
@@ -254,7 +254,7 @@ namespace DiscImageChef.Devices
}
}
public static int SendAtaCommand(object fd, AtaRegistersLBA48 registers,
internal static int SendAtaCommand(object fd, AtaRegistersLBA48 registers,
out AtaErrorRegistersLBA48 errorRegisters, AtaProtocol protocol,
AtaTransferRegister transferRegister, ref byte[] buffer, uint timeout,
bool transferBlocks, out double duration, out bool sense)
@@ -265,7 +265,7 @@ namespace DiscImageChef.Devices
timeout, transferBlocks, out duration, out sense);
}
public static int SendAtaCommand(Interop.PlatformID ptID, object fd, AtaRegistersLBA48 registers,
internal static int SendAtaCommand(Interop.PlatformID ptID, object fd, AtaRegistersLBA48 registers,
out AtaErrorRegistersLBA48 errorRegisters, AtaProtocol protocol,
AtaTransferRegister transferRegister, ref byte[] buffer, uint timeout,
bool transferBlocks, out double duration, out bool sense)
@@ -293,7 +293,7 @@ namespace DiscImageChef.Devices
}
}
public static int SendMmcCommand(object fd, MmcCommands command, bool write, bool isApplication, MmcFlags flags,
internal static int SendMmcCommand(object fd, MmcCommands command, bool write, bool isApplication, MmcFlags flags,
uint argument, uint blockSize, uint blocks, ref byte[] buffer,
out uint[] response, out double duration, out bool sense, uint timeout = 0)
{
@@ -303,7 +303,7 @@ namespace DiscImageChef.Devices
ref buffer, out response, out duration, out sense, timeout);
}
public static int SendMmcCommand(Interop.PlatformID ptID, object fd, MmcCommands command, bool write,
internal static int SendMmcCommand(Interop.PlatformID ptID, object fd, MmcCommands command, bool write,
bool isApplication, MmcFlags flags, uint argument, uint blockSize, uint blocks,
ref byte[] buffer, out uint[] response, out double duration, out bool sense,
uint timeout = 0)

View File

@@ -36,11 +36,11 @@ using System.Text;
namespace DiscImageChef.Devices.Linux
{
public static class ListDevices
static class ListDevices
{
const string PATH_SYS_DEVBLOCK = "/sys/block/";
public static DeviceInfo[] GetList()
internal static DeviceInfo[] GetList()
{
string[] sysdevs = Directory.GetFileSystemEntries(PATH_SYS_DEVBLOCK, "*", SearchOption.TopDirectoryOnly);
DeviceInfo[] devices = new DeviceInfo[sysdevs.Length];

View File

@@ -449,20 +449,20 @@ namespace DiscImageChef.Devices.Windows
DeviceInterface = 0x10,
}
public enum SdCommandClass : uint
enum SdCommandClass : uint
{
Standard,
AppCmd
}
public enum SdTransferDirection : uint
enum SdTransferDirection : uint
{
Unspecified,
Read,
Write
}
public enum SdTransferType : uint
enum SdTransferType : uint
{
Unspecified,
CmdOnly,
@@ -471,7 +471,7 @@ namespace DiscImageChef.Devices.Windows
MultiBlockNoCmd12
}
public enum SdResponseType : uint
enum SdResponseType : uint
{
Unspecified,
None,
@@ -485,7 +485,7 @@ namespace DiscImageChef.Devices.Windows
R6
}
public enum SffdiskDcmd : uint
enum SffdiskDcmd : uint
{
GetVersion,
LockChannel,

View File

@@ -39,9 +39,9 @@ using Microsoft.Win32.SafeHandles;
namespace DiscImageChef.Devices.Windows
{
public static class ListDevices
static class ListDevices
{
public static DeviceInfo[] GetList()
internal static DeviceInfo[] GetList()
{
List<string> DeviceIDs = new List<string>();

View File

@@ -14,14 +14,14 @@
// --[ 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
// it under the terms of the GNU Lesser General internal 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.
// Lesser General internal License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
@@ -35,10 +35,10 @@ using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
// Copyright "Fort Hood TX", public domain, 2007
// Copyright "Fort Hood TX", internal domain, 2007
namespace DiscImageChef.Devices.Windows
{
public partial class Usb
partial class Usb
{
#region "API Region"
// ********************** Constants ************************
@@ -132,10 +132,10 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential)]
struct SP_DEVINFO_DATA
{
public int cbSize;
public Guid ClassGuid;
public IntPtr DevInst;
public IntPtr Reserved;
internal int cbSize;
internal Guid ClassGuid;
internal IntPtr DevInst;
internal IntPtr Reserved;
}
//typedef struct _SP_DEVICE_INTERFACE_DATA {
@@ -147,10 +147,10 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential)]
struct SP_DEVICE_INTERFACE_DATA
{
public int cbSize;
public Guid InterfaceClassGuid;
public int Flags;
public IntPtr Reserved;
internal int cbSize;
internal Guid InterfaceClassGuid;
internal int Flags;
internal IntPtr Reserved;
}
//typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA {
@@ -160,8 +160,8 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
struct SP_DEVICE_INTERFACE_DETAIL_DATA
{
public int cbSize;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] public string DevicePath;
internal int cbSize;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] internal string DevicePath;
}
//typedef struct _USB_HCD_DRIVERKEY_NAME {
@@ -171,8 +171,8 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
struct USB_HCD_DRIVERKEY_NAME
{
public int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] public string DriverKeyName;
internal int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] internal string DriverKeyName;
}
//typedef struct _USB_ROOT_HUB_NAME {
@@ -182,8 +182,8 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
struct USB_ROOT_HUB_NAME
{
public int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] public string RootHubName;
internal int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] internal string RootHubName;
}
//typedef struct _USB_HUB_DESCRIPTOR {
@@ -198,13 +198,13 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct USB_HUB_DESCRIPTOR
{
public byte bDescriptorLength;
public byte bDescriptorType;
public byte bNumberOfPorts;
public short wHubCharacteristics;
public byte bPowerOnToPowerGood;
public byte bHubControlCurrent;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] bRemoveAndPowerMask;
internal byte bDescriptorLength;
internal byte bDescriptorType;
internal byte bNumberOfPorts;
internal short wHubCharacteristics;
internal byte bPowerOnToPowerGood;
internal byte bHubControlCurrent;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] internal byte[] bRemoveAndPowerMask;
}
//typedef struct _USB_HUB_INFORMATION {
@@ -214,8 +214,8 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential)]
struct USB_HUB_INFORMATION
{
public USB_HUB_DESCRIPTOR HubDescriptor;
public byte HubIsBusPowered;
internal USB_HUB_DESCRIPTOR HubDescriptor;
internal byte HubIsBusPowered;
}
//typedef struct _USB_NODE_INFORMATION {
@@ -228,8 +228,8 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential)]
struct USB_NODE_INFORMATION
{
public int NodeType;
public USB_HUB_INFORMATION HubInformation; // Yeah, I'm assuming we'll just use the first form
internal int NodeType;
internal USB_HUB_INFORMATION HubInformation; // Yeah, I'm assuming we'll just use the first form
}
//typedef struct _USB_NODE_CONNECTION_INFORMATION_EX {
@@ -246,16 +246,16 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct USB_NODE_CONNECTION_INFORMATION_EX
{
public int ConnectionIndex;
public USB_DEVICE_DESCRIPTOR DeviceDescriptor;
public byte CurrentConfigurationValue;
public byte Speed;
public byte DeviceIsHub;
public short DeviceAddress;
public int NumberOfOpenPipes;
internal int ConnectionIndex;
internal USB_DEVICE_DESCRIPTOR DeviceDescriptor;
internal byte CurrentConfigurationValue;
internal byte Speed;
internal byte DeviceIsHub;
internal short DeviceAddress;
internal int NumberOfOpenPipes;
public int ConnectionStatus;
//public IntPtr PipeList;
internal int ConnectionStatus;
//internal IntPtr PipeList;
}
//typedef struct _USB_DEVICE_DESCRIPTOR {
@@ -277,20 +277,20 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct USB_DEVICE_DESCRIPTOR
{
public byte bLength;
public byte bDescriptorType;
public short bcdUSB;
public byte bDeviceClass;
public byte bDeviceSubClass;
public byte bDeviceProtocol;
public byte bMaxPacketSize0;
public short idVendor;
public short idProduct;
public short bcdDevice;
public byte iManufacturer;
public byte iProduct;
public byte iSerialNumber;
public byte bNumConfigurations;
internal byte bLength;
internal byte bDescriptorType;
internal short bcdUSB;
internal byte bDeviceClass;
internal byte bDeviceSubClass;
internal byte bDeviceProtocol;
internal byte bMaxPacketSize0;
internal short idVendor;
internal short idProduct;
internal short bcdDevice;
internal byte iManufacturer;
internal byte iProduct;
internal byte iSerialNumber;
internal byte bNumConfigurations;
}
//typedef struct _USB_STRING_DESCRIPTOR {
@@ -301,9 +301,9 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
struct USB_STRING_DESCRIPTOR
{
public byte bLength;
public byte bDescriptorType;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXIMUM_USB_STRING_LENGTH)] public string bString;
internal byte bLength;
internal byte bDescriptorType;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXIMUM_USB_STRING_LENGTH)] internal string bString;
}
//typedef struct _USB_DESCRIPTOR_REQUEST {
@@ -320,20 +320,20 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential)]
struct USB_SETUP_PACKET
{
public byte bmRequest;
public byte bRequest;
public short wValue;
public short wIndex;
public short wLength;
internal byte bmRequest;
internal byte bRequest;
internal short wValue;
internal short wIndex;
internal short wLength;
}
[StructLayout(LayoutKind.Sequential)]
struct USB_DESCRIPTOR_REQUEST
{
public int ConnectionIndex;
internal int ConnectionIndex;
public USB_SETUP_PACKET SetupPacket;
//public byte[] Data;
internal USB_SETUP_PACKET SetupPacket;
//internal byte[] Data;
}
//typedef struct _USB_NODE_CONNECTION_NAME {
@@ -344,9 +344,9 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
struct USB_NODE_CONNECTION_NAME
{
public int ConnectionIndex;
public int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] public string NodeName;
internal int ConnectionIndex;
internal int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] internal string NodeName;
}
//typedef struct _USB_NODE_CONNECTION_DRIVERKEY_NAME {
@@ -357,9 +357,9 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
struct USB_NODE_CONNECTION_DRIVERKEY_NAME // Yes, this is the same as the structure above...
{
public int ConnectionIndex;
public int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] public string DriverKeyName;
internal int ConnectionIndex;
internal int ActualLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = BUFFER_SIZE)] internal string DriverKeyName;
}
// ********************** API Definitions ************************
@@ -486,7 +486,7 @@ namespace DiscImageChef.Devices.Windows
//
// Return a list of USB Host Controllers
//
static public System.Collections.ObjectModel.ReadOnlyCollection<USBController> GetHostControllers()
static internal System.Collections.ObjectModel.ReadOnlyCollection<USBController> GetHostControllers()
{
List<USBController> HostList = new List<USBController>();
Guid HostGUID = new Guid(GUID_DEVINTERFACE_HUBCONTROLLER);
@@ -559,13 +559,13 @@ namespace DiscImageChef.Devices.Windows
//
// The USB Host Controller Class
//
public class USBController
internal class USBController
{
internal int ControllerIndex;
internal string ControllerDriverKeyName, ControllerDevicePath, ControllerDeviceDesc;
// A simple default constructor
public USBController()
internal USBController()
{
ControllerIndex = 0;
ControllerDevicePath = "";
@@ -574,31 +574,31 @@ namespace DiscImageChef.Devices.Windows
}
// Return the index of the instance
public int Index
internal int Index
{
get { return ControllerIndex; }
}
// Return the Device Path, such as "\\?\pci#ven_10de&dev_005a&subsys_815a1043&rev_a2#3&267a616a&0&58#{3abf6f2d-71c4-462a-8a92-1e6861e6af27}"
public string DevicePath
internal string DevicePath
{
get { return ControllerDevicePath; }
}
// The DriverKeyName may be useful as a search key
public string DriverKeyName
internal string DriverKeyName
{
get { return ControllerDriverKeyName; }
}
// Return the Friendly Name, such as "VIA USB Enhanced Host Controller"
public string Name
internal string Name
{
get { return ControllerDeviceDesc; }
}
// Return Root Hub for this Controller
public USBHub GetRootHub()
internal USBHub GetRootHub()
{
IntPtr h, h2;
USBHub Root = new USBHub();
@@ -659,7 +659,7 @@ namespace DiscImageChef.Devices.Windows
//
// The Hub class
//
public class USBHub
internal class USBHub
{
internal int HubPortCount;
internal string HubDriverKey, HubDevicePath, HubDeviceDesc;
@@ -667,7 +667,7 @@ namespace DiscImageChef.Devices.Windows
internal bool HubIsBusPowered, HubIsRootHub;
// a simple default constructor
public USBHub()
internal USBHub()
{
HubPortCount = 0;
HubDevicePath = "";
@@ -682,64 +682,64 @@ namespace DiscImageChef.Devices.Windows
}
// return Port Count
public int PortCount
internal int PortCount
{
get { return HubPortCount; }
}
// return the Device Path, such as "\\?\pci#ven_10de&dev_005a&subsys_815a1043&rev_a2#3&267a616a&0&58#{3abf6f2d-71c4-462a-8a92-1e6861e6af27}"
public string DevicePath
internal string DevicePath
{
get { return HubDevicePath; }
}
// The DriverKey may be useful as a search key
public string DriverKey
internal string DriverKey
{
get { return HubDriverKey; }
}
// return the Friendly Name, such as "VIA USB Enhanced Host Controller"
public string Name
internal string Name
{
get { return HubDeviceDesc; }
}
// the device path of this device
public string InstanceID
internal string InstanceID
{
get { return HubInstanceID; }
}
// is is this a self-powered hub?
public bool IsBusPowered
internal bool IsBusPowered
{
get { return HubIsBusPowered; }
}
// is this a root hub?
public bool IsRootHub
internal bool IsRootHub
{
get { return HubIsRootHub; }
}
public string Manufacturer
internal string Manufacturer
{
get { return HubManufacturer; }
}
public string Product
internal string Product
{
get { return HubProduct; }
}
public string SerialNumber
internal string SerialNumber
{
get { return HubSerialNumber; }
}
// return a list of the down stream ports
public System.Collections.ObjectModel.ReadOnlyCollection<USBPort> GetPorts()
internal System.Collections.ObjectModel.ReadOnlyCollection<USBPort> GetPorts()
{
List<USBPort> PortList = new List<USBPort>();
@@ -798,7 +798,7 @@ namespace DiscImageChef.Devices.Windows
//
// The Port Class
//
public class USBPort
internal class USBPort
{
internal int PortPortNumber;
internal string PortStatus, PortHubDevicePath, PortSpeed;
@@ -806,7 +806,7 @@ namespace DiscImageChef.Devices.Windows
internal USB_DEVICE_DESCRIPTOR PortDeviceDescriptor;
// a simple default constructor
public USBPort()
internal USBPort()
{
PortPortNumber = 0;
PortStatus = "";
@@ -817,43 +817,43 @@ namespace DiscImageChef.Devices.Windows
}
// return Port Index of the Hub
public int PortNumber
internal int PortNumber
{
get { return PortPortNumber; }
}
// return the Device Path of the Hub
public string HubDevicePath
internal string HubDevicePath
{
get { return PortHubDevicePath; }
}
// the status (see USB_CONNECTION_STATUS above)
public string Status
internal string Status
{
get { return PortStatus; }
}
// the speed of the connection (see USB_DEVICE_SPEED above)
public string Speed
internal string Speed
{
get { return PortSpeed; }
}
// is this a downstream external hub?
public bool IsHub
internal bool IsHub
{
get { return PortIsHub; }
}
// is anybody home?
public bool IsDeviceConnected
internal bool IsDeviceConnected
{
get { return PortIsDeviceConnected; }
}
// return a down stream external hub
public USBDevice GetDevice()
internal USBDevice GetDevice()
{
if(!PortIsDeviceConnected) { return null; }
@@ -1009,7 +1009,7 @@ namespace DiscImageChef.Devices.Windows
}
// return a down stream external hub
public USBHub GetHub()
internal USBHub GetHub()
{
if(!PortIsHub) { return null; }
@@ -1083,7 +1083,7 @@ namespace DiscImageChef.Devices.Windows
//
// The USB Device Class
//
public class USBDevice
internal class USBDevice
{
internal int DevicePortNumber;
internal string DeviceDriverKey, DeviceHubDevicePath, DeviceInstanceID, DeviceName;
@@ -1092,7 +1092,7 @@ namespace DiscImageChef.Devices.Windows
internal byte[] BinaryDeviceDescriptors;
// a simple default constructor
public USBDevice()
internal USBDevice()
{
DevicePortNumber = 0;
DeviceHubDevicePath = "";
@@ -1106,51 +1106,51 @@ namespace DiscImageChef.Devices.Windows
}
// return Port Index of the Hub
public int PortNumber
internal int PortNumber
{
get { return DevicePortNumber; }
}
// return the Device Path of the Hub (the parent device)
public string HubDevicePath
internal string HubDevicePath
{
get { return DeviceHubDevicePath; }
}
// useful as a search key
public string DriverKey
internal string DriverKey
{
get { return DeviceDriverKey; }
}
// the device path of this device
public string InstanceID
internal string InstanceID
{
get { return DeviceInstanceID; }
}
// the friendly name
public string Name
internal string Name
{
get { return DeviceName; }
}
public string Manufacturer
internal string Manufacturer
{
get { return DeviceManufacturer; }
}
public string Product
internal string Product
{
get { return DeviceProduct; }
}
public string SerialNumber
internal string SerialNumber
{
get { return DeviceSerialNumber; }
}
public byte[] BinaryDescriptors
internal byte[] BinaryDescriptors
{
get { return BinaryDeviceDescriptors; }
}

View File

@@ -14,14 +14,14 @@
// --[ 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
// it under the terms of the GNU Lesser General internal 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.
// Lesser General internal License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
@@ -34,19 +34,19 @@ using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
// Copyright "Fort Hood TX", public domain, 2007
// Copyright "Fort Hood TX", internal domain, 2007
namespace DiscImageChef.Devices.Windows
{
//
// A place for "higher level" related functions
// You might not want to keep these in the USB class... your choice
//
public partial class Usb
partial class Usb
{
//
// Get a list of all connected devices
//
static public List<USBDevice> GetConnectedDevices()
static internal List<USBDevice> GetConnectedDevices()
{
List<USBDevice> DevList = new List<USBDevice>();
@@ -72,7 +72,7 @@ namespace DiscImageChef.Devices.Windows
//
// Find a device based upon it's DriverKeyName
//
static public USBDevice FindDeviceByDriverKeyName(string DriverKeyName)
static internal USBDevice FindDeviceByDriverKeyName(string DriverKeyName)
{
USBDevice FoundDevice = null;
@@ -113,7 +113,7 @@ namespace DiscImageChef.Devices.Windows
//
// Find a device based upon it's Instance ID
//
static public USBDevice FindDeviceByInstanceID(string InstanceID)
static internal USBDevice FindDeviceByInstanceID(string InstanceID)
{
USBDevice FoundDevice = null;
@@ -152,9 +152,9 @@ namespace DiscImageChef.Devices.Windows
}
const int IOCTL_STORAGE_GET_DEVICE_NUMBER = 0x2D1080;
public const string GUID_DEVINTERFACE_DISK = "53f56307-b6bf-11d0-94f2-00a0c91efb8b";
public const string GUID_DEVINTERFACE_CDROM = "53f56308-b6bf-11d0-94f2-00a0c91efb8b";
public const string GUID_DEVINTERFACE_FLOPPY = "53f56311-b6bf-11d0-94f2-00a0c91efb8b";
internal const string GUID_DEVINTERFACE_DISK = "53f56307-b6bf-11d0-94f2-00a0c91efb8b";
internal const string GUID_DEVINTERFACE_CDROM = "53f56308-b6bf-11d0-94f2-00a0c91efb8b";
internal const string GUID_DEVINTERFACE_FLOPPY = "53f56311-b6bf-11d0-94f2-00a0c91efb8b";
//typedef struct _STORAGE_DEVICE_NUMBER {
// DEVICE_TYPE DeviceType;
@@ -164,9 +164,9 @@ namespace DiscImageChef.Devices.Windows
[StructLayout(LayoutKind.Sequential)]
struct STORAGE_DEVICE_NUMBER
{
public int DeviceType;
public int DeviceNumber;
public int PartitionNumber;
internal int DeviceType;
internal int DeviceNumber;
internal int PartitionNumber;
}
//CMAPI CONFIGRET WINAPI CM_Get_Parent(
@@ -189,7 +189,7 @@ namespace DiscImageChef.Devices.Windows
//
// Find a device based upon a Drive Letter
//
static public USBDevice FindDriveLetter(string DriveLetter, string deviceGuid)
static internal USBDevice FindDriveLetter(string DriveLetter, string deviceGuid)
{
USBDevice FoundDevice = null;
string InstanceID = "";
@@ -203,7 +203,7 @@ namespace DiscImageChef.Devices.Windows
return FindDeviceNumber(DevNum, deviceGuid);
}
static public USBDevice FindDrivePath(string DrivePath, string deviceGuid)
static internal USBDevice FindDrivePath(string DrivePath, string deviceGuid)
{
USBDevice FoundDevice = null;
string InstanceID = "";
@@ -220,7 +220,7 @@ namespace DiscImageChef.Devices.Windows
//
// Find a device based upon a Drive Letter
//
static public USBDevice FindDeviceNumber(int DevNum, string deviceGuid)
static internal USBDevice FindDeviceNumber(int DevNum, string deviceGuid)
{
USBDevice FoundDevice = null;
string InstanceID = "";

View File

@@ -44,7 +44,7 @@ namespace DiscImageChef.ImagePlugins
{
#region Internal Structures
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct DfiBlockHeader
struct DfiBlockHeader
{
public ushort cylinder;
public ushort head;

View File

@@ -45,7 +45,7 @@ namespace DiscImageChef.ImagePlugins
{
#region Internal Structures
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct OobBlock
struct OobBlock
{
public BlockIds blockId;
public OobTypes blockType;

View File

@@ -78,7 +78,7 @@ namespace DiscImageChef.ImagePlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ScpFooter
struct ScpFooter
{
public uint manufacturerOffset;
public uint modelOffset;

View File

@@ -44,7 +44,7 @@ namespace DiscImageChef.Filesystems.CPM
/// Loads all the known CP/M disk definitions from an XML stored as an embedded resource.
/// </summary>
/// <returns>The definitions.</returns>
public bool LoadDefinitions()
bool LoadDefinitions()
{
try
{
@@ -83,7 +83,7 @@ namespace DiscImageChef.Filesystems.CPM
/// <summary>
/// CP/M disk definitions
/// </summary>
public class CpmDefinitions
class CpmDefinitions
{
/// <summary>
/// List of all CP/M disk definitions
@@ -98,7 +98,7 @@ namespace DiscImageChef.Filesystems.CPM
/// <summary>
/// CP/M disk definition
/// </summary>
public class CpmDefinition
class CpmDefinition
{
/// <summary>
/// Comment and description
@@ -197,7 +197,7 @@ namespace DiscImageChef.Filesystems.CPM
/// <summary>
/// Side descriptions
/// </summary>
public class Side
class Side
{
/// <summary>
/// Side ID as found in each sector address mark

View File

@@ -1403,7 +1403,7 @@ namespace DiscImageChef.Filesystems
/// BIOS Parameter Block as used by Atari ST GEMDOS on FAT12 volumes.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct AtariParameterBlock
struct AtariParameterBlock
{
/// <summary>68000 BRA.S jump or x86 loop</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] jump;
@@ -1463,7 +1463,7 @@ namespace DiscImageChef.Filesystems
/// BIOS Parameter Block as used by MSX-DOS 2.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MSXParameterBlock
struct MSXParameterBlock
{
/// <summary>x86 loop</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1511,7 +1511,7 @@ namespace DiscImageChef.Filesystems
/// <summary>DOS 2.0 BIOS Parameter Block.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BIOSParameterBlock2
struct BIOSParameterBlock2
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1541,7 +1541,7 @@ namespace DiscImageChef.Filesystems
/// <summary>DOS 3.0 BIOS Parameter Block.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BIOSParameterBlock30
struct BIOSParameterBlock30
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1577,7 +1577,7 @@ namespace DiscImageChef.Filesystems
/// <summary>DOS 3.2 BIOS Parameter Block.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BIOSParameterBlock32
struct BIOSParameterBlock32
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1615,7 +1615,7 @@ namespace DiscImageChef.Filesystems
/// <summary>DOS 3.31 BIOS Parameter Block.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BIOSParameterBlock33
struct BIOSParameterBlock33
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1653,7 +1653,7 @@ namespace DiscImageChef.Filesystems
/// <summary>DOS 3.4 BIOS Parameter Block.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BIOSParameterBlockShortEBPB
struct BIOSParameterBlockShortEBPB
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1699,7 +1699,7 @@ namespace DiscImageChef.Filesystems
/// <summary>DOS 4.0 or higher BIOS Parameter Block.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BIOSParameterBlockEBPB
struct BIOSParameterBlockEBPB
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1749,7 +1749,7 @@ namespace DiscImageChef.Filesystems
/// <summary>FAT32 Parameter Block</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FAT32ParameterBlockShort
struct FAT32ParameterBlockShort
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1813,7 +1813,7 @@ namespace DiscImageChef.Filesystems
/// <summary>FAT32 Parameter Block</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FAT32ParameterBlock
struct FAT32ParameterBlock
{
/// <summary>x86 jump</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump;
@@ -1877,7 +1877,7 @@ namespace DiscImageChef.Filesystems
/// <summary>Apricot Label.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ApricotLabel
struct ApricotLabel
{
/// <summary>Version of format which created disk</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] version;
@@ -2050,7 +2050,7 @@ namespace DiscImageChef.Filesystems
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ApricotParameterBlock
struct ApricotParameterBlock
{
/// <summary>Bytes per sector</summary>
public ushort bps;
@@ -2074,13 +2074,13 @@ namespace DiscImageChef.Filesystems
public ushort startSector;
}
public const uint fsinfo_signature1 = 0x41615252;
public const uint fsinfo_signature2 = 0x61417272;
public const uint fsinfo_signature3 = 0xAA550000;
const uint fsinfo_signature1 = 0x41615252;
const uint fsinfo_signature2 = 0x61417272;
const uint fsinfo_signature3 = 0xAA550000;
/// <summary>FAT32 FS Information Sector</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FSInfoSector
struct FSInfoSector
{
/// <summary>Signature must be <see cref="fsinfo_signature1"/></summary>
public uint signature1;
@@ -2099,7 +2099,7 @@ namespace DiscImageChef.Filesystems
}
[Flags]
public enum FatAttributes : byte
enum FatAttributes : byte
{
ReadOnly = 0x01,
Hidden = 0x02,
@@ -2113,7 +2113,7 @@ namespace DiscImageChef.Filesystems
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct DirectoryEntry
struct DirectoryEntry
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] filename;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] extension;

View File

@@ -321,7 +321,7 @@ namespace DiscImageChef.Filesystems
/// Superblock for Minix v1 and V2 filesystems
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MinixSuperBlock
struct MinixSuperBlock
{
/// <summary>0x00, inodes on volume</summary>
public ushort s_ninodes;
@@ -349,7 +349,7 @@ namespace DiscImageChef.Filesystems
/// Superblock for Minix v3 filesystems
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Minix3SuperBlock
struct Minix3SuperBlock
{
/// <summary>0x00, inodes on volume</summary>
public uint s_ninodes;

View File

@@ -178,7 +178,7 @@ namespace DiscImageChef.Filesystems
information = sb.ToString();
}
public struct SolarOSParameterBlock
struct SolarOSParameterBlock
{
/// <summary>0x00, x86 jump (3 bytes), jumps to 0x60</summary>
public byte[] x86_jump;

View File

@@ -539,15 +539,15 @@ namespace DiscImageChef.Filesystems
/// <summary>
/// Same magic for ext2, ext3 and ext4
/// </summary>
public const ushort ext2FSMagic = 0xEF53;
const ushort ext2FSMagic = 0xEF53;
public const ushort ext2OldFSMagic = 0xEF51;
const ushort ext2OldFSMagic = 0xEF51;
/// <summary>
/// ext2/3/4 superblock
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ext2FSSuperBlock
struct ext2FSSuperBlock
{
/// <summary>0x000, inodes on volume</summary>
public uint inodes;
@@ -765,112 +765,112 @@ namespace DiscImageChef.Filesystems
// ext? filesystem states
/// <summary>Cleanly-unmounted volume</summary>
public const ushort EXT2_VALID_FS = 0x0001;
const ushort EXT2_VALID_FS = 0x0001;
/// <summary>Dirty volume</summary>
public const ushort EXT2_ERROR_FS = 0x0002;
const ushort EXT2_ERROR_FS = 0x0002;
/// <summary>Recovering orphan files</summary>
public const ushort EXT3_ORPHAN_FS = 0x0004;
const ushort EXT3_ORPHAN_FS = 0x0004;
// ext? default mount flags
/// <summary>Enable debugging messages</summary>
public const uint EXT2_DEFM_DEBUG = 0x000001;
const uint EXT2_DEFM_DEBUG = 0x000001;
/// <summary>Emulates BSD behaviour on new file creation</summary>
public const uint EXT2_DEFM_BSDGROUPS = 0x000002;
const uint EXT2_DEFM_BSDGROUPS = 0x000002;
/// <summary>Enable user xattrs</summary>
public const uint EXT2_DEFM_XATTR_USER = 0x000004;
const uint EXT2_DEFM_XATTR_USER = 0x000004;
/// <summary>Enable POSIX ACLs</summary>
public const uint EXT2_DEFM_ACL = 0x000008;
const uint EXT2_DEFM_ACL = 0x000008;
/// <summary>Use 16bit UIDs</summary>
public const uint EXT2_DEFM_UID16 = 0x000010;
const uint EXT2_DEFM_UID16 = 0x000010;
/// <summary>Journal data mode</summary>
public const uint EXT3_DEFM_JMODE_DATA = 0x000040;
const uint EXT3_DEFM_JMODE_DATA = 0x000040;
/// <summary>Journal ordered mode</summary>
public const uint EXT3_DEFM_JMODE_ORDERED = 0x000080;
const uint EXT3_DEFM_JMODE_ORDERED = 0x000080;
/// <summary>Journal writeback mode</summary>
public const uint EXT3_DEFM_JMODE_WBACK = 0x000100;
const uint EXT3_DEFM_JMODE_WBACK = 0x000100;
// Behaviour on errors
/// <summary>Continue execution</summary>
public const ushort EXT2_ERRORS_CONTINUE = 1;
const ushort EXT2_ERRORS_CONTINUE = 1;
/// <summary>Remount fs read-only</summary>
public const ushort EXT2_ERRORS_RO = 2;
const ushort EXT2_ERRORS_RO = 2;
/// <summary>Panic</summary>
public const ushort EXT2_ERRORS_PANIC = 3;
const ushort EXT2_ERRORS_PANIC = 3;
// OS codes
public const uint EXT2_OS_LINUX = 0;
public const uint EXT2_OS_HURD = 1;
public const uint EXT2_OS_MASIX = 2;
public const uint EXT2_OS_FREEBSD = 3;
public const uint EXT2_OS_LITES = 4;
const uint EXT2_OS_LINUX = 0;
const uint EXT2_OS_HURD = 1;
const uint EXT2_OS_MASIX = 2;
const uint EXT2_OS_FREEBSD = 3;
const uint EXT2_OS_LITES = 4;
// Revision levels
/// <summary>The good old (original) format</summary>
public const uint EXT2_GOOD_OLD_REV = 0;
const uint EXT2_GOOD_OLD_REV = 0;
/// <summary>V2 format w/ dynamic inode sizes</summary>
public const uint EXT2_DYNAMIC_REV = 1;
const uint EXT2_DYNAMIC_REV = 1;
// Compatible features
/// <summary>Pre-allocate directories</summary>
public const uint EXT2_FEATURE_COMPAT_DIR_PREALLOC = 0x00000001;
const uint EXT2_FEATURE_COMPAT_DIR_PREALLOC = 0x00000001;
/// <summary>imagic inodes ?</summary>
public const uint EXT2_FEATURE_COMPAT_IMAGIC_INODES = 0x00000002;
const uint EXT2_FEATURE_COMPAT_IMAGIC_INODES = 0x00000002;
/// <summary>Has journal (it's ext3)</summary>
public const uint EXT3_FEATURE_COMPAT_HAS_JOURNAL = 0x00000004;
const uint EXT3_FEATURE_COMPAT_HAS_JOURNAL = 0x00000004;
/// <summary>EA blocks</summary>
public const uint EXT2_FEATURE_COMPAT_EXT_ATTR = 0x00000008;
const uint EXT2_FEATURE_COMPAT_EXT_ATTR = 0x00000008;
/// <summary>Online filesystem resize reservations</summary>
public const uint EXT2_FEATURE_COMPAT_RESIZE_INO = 0x00000010;
const uint EXT2_FEATURE_COMPAT_RESIZE_INO = 0x00000010;
/// <summary>Can use hashed indexes on directories</summary>
public const uint EXT2_FEATURE_COMPAT_DIR_INDEX = 0x00000020;
const uint EXT2_FEATURE_COMPAT_DIR_INDEX = 0x00000020;
// Read-only compatible features
/// <summary>Reduced number of superblocks</summary>
public const uint EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER = 0x00000001;
const uint EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER = 0x00000001;
/// <summary>Can have files bigger than 2GiB</summary>
public const uint EXT2_FEATURE_RO_COMPAT_LARGE_FILE = 0x00000002;
const uint EXT2_FEATURE_RO_COMPAT_LARGE_FILE = 0x00000002;
/// <summary>Use B-Tree for directories</summary>
public const uint EXT2_FEATURE_RO_COMPAT_BTREE_DIR = 0x00000004;
const uint EXT2_FEATURE_RO_COMPAT_BTREE_DIR = 0x00000004;
/// <summary>Can have files bigger than 2TiB *ext4*</summary>
public const uint EXT4_FEATURE_RO_COMPAT_HUGE_FILE = 0x00000008;
const uint EXT4_FEATURE_RO_COMPAT_HUGE_FILE = 0x00000008;
/// <summary>Group descriptor checksums and sparse inode table *ext4*</summary>
public const uint EXT4_FEATURE_RO_COMPAT_GDT_CSUM = 0x00000010;
const uint EXT4_FEATURE_RO_COMPAT_GDT_CSUM = 0x00000010;
/// <summary>More than 32000 directory entries *ext4*</summary>
public const uint EXT4_FEATURE_RO_COMPAT_DIR_NLINK = 0x00000020;
const uint EXT4_FEATURE_RO_COMPAT_DIR_NLINK = 0x00000020;
/// <summary>Nanosecond timestamps and creation time *ext4*</summary>
public const uint EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE = 0x00000040;
const uint EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE = 0x00000040;
// Incompatible features
/// <summary>Uses compression</summary>
public const uint EXT2_FEATURE_INCOMPAT_COMPRESSION = 0x00000001;
const uint EXT2_FEATURE_INCOMPAT_COMPRESSION = 0x00000001;
/// <summary>Filetype in directory entries</summary>
public const uint EXT2_FEATURE_INCOMPAT_FILETYPE = 0x00000002;
const uint EXT2_FEATURE_INCOMPAT_FILETYPE = 0x00000002;
/// <summary>Journal needs recovery *ext3*</summary>
public const uint EXT3_FEATURE_INCOMPAT_RECOVER = 0x00000004;
const uint EXT3_FEATURE_INCOMPAT_RECOVER = 0x00000004;
/// <summary>Has journal on another device *ext3*</summary>
public const uint EXT3_FEATURE_INCOMPAT_JOURNAL_DEV = 0x00000008;
const uint EXT3_FEATURE_INCOMPAT_JOURNAL_DEV = 0x00000008;
/// <summary>Reduced block group backups</summary>
public const uint EXT2_FEATURE_INCOMPAT_META_BG = 0x00000010;
const uint EXT2_FEATURE_INCOMPAT_META_BG = 0x00000010;
/// <summary>Volume use extents *ext4*</summary>
public const uint EXT4_FEATURE_INCOMPAT_EXTENTS = 0x00000040;
const uint EXT4_FEATURE_INCOMPAT_EXTENTS = 0x00000040;
/// <summary>Supports volumes bigger than 2^32 blocks *ext4*</summary>
public const uint EXT4_FEATURE_INCOMPAT_64BIT = 0x00000080;
const uint EXT4_FEATURE_INCOMPAT_64BIT = 0x00000080;
/// <summary>Multi-mount protection *ext4*</summary>
public const uint EXT4_FEATURE_INCOMPAT_MMP = 0x00000100;
const uint EXT4_FEATURE_INCOMPAT_MMP = 0x00000100;
/// <summary>Flexible block group metadata location *ext4*</summary>
public const uint EXT4_FEATURE_INCOMPAT_FLEX_BG = 0x00000200;
const uint EXT4_FEATURE_INCOMPAT_FLEX_BG = 0x00000200;
/// <summary>EA in inode *ext4*</summary>
public const uint EXT4_FEATURE_INCOMPAT_EA_INODE = 0x00000400;
const uint EXT4_FEATURE_INCOMPAT_EA_INODE = 0x00000400;
/// <summary>Data can reside in directory entry *ext4*</summary>
public const uint EXT4_FEATURE_INCOMPAT_DIRDATA = 0x00001000;
const uint EXT4_FEATURE_INCOMPAT_DIRDATA = 0x00001000;
// Miscellaneous filesystem flags
/// <summary>Signed dirhash in use</summary>
public const uint EXT2_FLAGS_SIGNED_HASH = 0x00000001;
const uint EXT2_FLAGS_SIGNED_HASH = 0x00000001;
/// <summary>Unsigned dirhash in use</summary>
public const uint EXT2_FLAGS_UNSIGNED_HASH = 0x00000002;
const uint EXT2_FLAGS_UNSIGNED_HASH = 0x00000002;
/// <summary>Testing development code</summary>
public const uint EXT2_FLAGS_TEST_FILESYS = 0x00000004;
const uint EXT2_FLAGS_TEST_FILESYS = 0x00000004;
public override Errno Mount()
{

View File

@@ -137,12 +137,12 @@ namespace DiscImageChef.Filesystems
/// <summary>
/// ext superblock magic
/// </summary>
public const ushort extFSMagic = 0x137D;
const ushort extFSMagic = 0x137D;
/// <summary>
/// ext superblock
/// </summary>
public struct extFSSuperBlock
struct extFSSuperBlock
{
/// <summary>0x000, inodes on volume</summary>
public uint inodes;

View File

@@ -348,7 +348,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct AppleDriverDescriptorMap
struct AppleDriverDescriptorMap
{
/// <summary>Signature <see cref="DDM_MAGIC"/></summary>
public ushort sbSig;
@@ -369,7 +369,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct AppleDriverEntry
struct AppleDriverEntry
{
/// <summary>First sector of the driver</summary>
public uint ddBlock;
@@ -380,7 +380,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct AppleOldDevicePartitionMap
struct AppleOldDevicePartitionMap
{
/// <summary>Signature <see cref="APM_MAGIC_OLD"/></summary>
public ushort pdSig;
@@ -389,7 +389,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct AppleMapOldPartitionEntry
struct AppleMapOldPartitionEntry
{
/// <summary>First sector of the partition</summary>
public uint pdStart;
@@ -400,7 +400,7 @@ namespace DiscImageChef.PartPlugins
}
[Flags]
public enum AppleMapFlags : uint
enum AppleMapFlags : uint
{
/// <summary>Partition is valid</summary>
Valid = 0x01,
@@ -429,7 +429,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct AppleMapPartitionEntry
struct AppleMapPartitionEntry
{
/// <summary>Signature <see cref="APM_MAGIC"/></summary>
public ushort signature;

View File

@@ -266,7 +266,7 @@ namespace DiscImageChef.PartPlugins
/// <summary>Apricot Label.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ApricotLabel
struct ApricotLabel
{
/// <summary>Version of format which created disk</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] version;
@@ -439,7 +439,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ApricotParameterBlock
struct ApricotParameterBlock
{
/// <summary>Bytes per sector</summary>
public ushort bps;

View File

@@ -42,8 +42,8 @@ namespace DiscImageChef.PartPlugins
{
public class BSD : PartPlugin
{
public const uint DISKMAGIC = 0x82564557;
public const uint DISKCIGAM = 0x57455682;
const uint DISKMAGIC = 0x82564557;
const uint DISKCIGAM = 0x57455682;
/// <summary>Known sector locations for BSD disklabel</summary>
readonly ulong[] labelLocations = {0, 1, 2, 9};
/// <summary>Known byte offsets for BSD disklabel</summary>
@@ -172,7 +172,7 @@ namespace DiscImageChef.PartPlugins
}
/// <summary>Drive type</summary>
public enum dType : ushort
enum dType : ushort
{
/// <summary>SMD, XSMD</summary>
SMD = 1,
@@ -221,7 +221,7 @@ namespace DiscImageChef.PartPlugins
}
/// <summary>Filesystem type</summary>
public enum fsType : byte
internal enum fsType : byte
{
/// <summary>Unused entry</summary>
Unused = 0,
@@ -303,7 +303,7 @@ namespace DiscImageChef.PartPlugins
/// Drive flags
/// </summary>
[Flags]
public enum dFlags : uint
enum dFlags : uint
{
/// <summary>Removable media</summary>
Removable = 0x01,
@@ -320,7 +320,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct DiskLabel
struct DiskLabel
{
/// <summary><see cref="DISKMAGIC"/></summary>
public uint d_magic;
@@ -385,7 +385,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BSDPartition
struct BSDPartition
{
/// <summary>Sectors in partition</summary>
public uint p_size;
@@ -401,7 +401,7 @@ namespace DiscImageChef.PartPlugins
public ushort p_cpg;
}
public static string fsTypeToString(fsType typ)
internal static string fsTypeToString(fsType typ)
{
switch(typ)
{
@@ -438,7 +438,7 @@ namespace DiscImageChef.PartPlugins
}
}
public static DiskLabel GetDiskLabel(byte[] disklabel)
static DiskLabel GetDiskLabel(byte[] disklabel)
{
GCHandle handle = GCHandle.Alloc(disklabel, GCHandleType.Pinned);
DiskLabel dl = (DiskLabel)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(DiskLabel));
@@ -446,7 +446,7 @@ namespace DiscImageChef.PartPlugins
return dl;
}
public static DiskLabel SwapDiskLabel(DiskLabel disklabel)
static DiskLabel SwapDiskLabel(DiskLabel disklabel)
{
DiskLabel dl = BigEndianMarshal.SwapStructureMembersEndian(disklabel);
for(int i = 0; i < dl.d_drivedata.Length; i++) dl.d_drivedata[i] = Swapping.Swap(dl.d_drivedata[i]);

View File

@@ -295,7 +295,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential)]
public struct GptHeader
struct GptHeader
{
public ulong signature;
public uint revision;
@@ -314,7 +314,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct GptEntry
struct GptEntry
{
public Guid partitionType;
public Guid partitionId;

View File

@@ -583,12 +583,12 @@ namespace DiscImageChef.PartPlugins
return MBRTypes[type];
}
public const ushort MBR_Magic = 0xAA55;
public const ushort NEC_Magic = 0xA55A;
public const ushort DM_Magic = 0x55AA;
const ushort MBR_Magic = 0xAA55;
const ushort NEC_Magic = 0xA55A;
const ushort DM_Magic = 0x55AA;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MasterBootRecord
struct MasterBootRecord
{
/// <summary>Boot code</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 446)] public byte[] boot_code;
@@ -600,7 +600,7 @@ namespace DiscImageChef.PartPlugins
// TODO: IBM Boot Manager
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ExtendedBootRecord
struct ExtendedBootRecord
{
/// <summary>Boot code, almost always unused</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 446)] public byte[] boot_code;
@@ -611,7 +611,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TimedMasterBootRecord
struct TimedMasterBootRecord
{
/// <summary>Boot code</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 218)] public byte[] boot_code;
@@ -634,7 +634,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SerializedMasterBootRecord
struct SerializedMasterBootRecord
{
/// <summary>Boot code</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 440)] public byte[] boot_code;
@@ -649,7 +649,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ModernMasterBootRecord
struct ModernMasterBootRecord
{
/// <summary>Boot code</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 218)] public byte[] boot_code;
@@ -676,7 +676,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NecMasterBootRecord
struct NecMasterBootRecord
{
/// <summary>Boot code</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 380)] public byte[] boot_code;
@@ -689,7 +689,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct DiskManagerMasterBootRecord
struct DiskManagerMasterBootRecord
{
/// <summary>Boot code</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 252)] public byte[] boot_code;
@@ -702,7 +702,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MBRPartitionEntry
struct MBRPartitionEntry
{
/// <summary>Partition status, 0x80 or 0x00, else invalid</summary>
public byte status;

View File

@@ -221,7 +221,7 @@ namespace DiscImageChef.PartPlugins
/// NeXT v3 disklabel, 544 bytes
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NeXTLabel
struct NeXTLabel
{
/// <summary>Signature</summary>
public uint dl_version;
@@ -245,7 +245,7 @@ namespace DiscImageChef.PartPlugins
/// NeXT v1 and v2 disklabel, 7224 bytes
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NeXTLabelOld
struct NeXTLabelOld
{
/// <summary>Signature</summary>
public uint dl_version;
@@ -271,7 +271,7 @@ namespace DiscImageChef.PartPlugins
/// NeXT disktab and partitions, 498 bytes
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NeXTDiskTab
struct NeXTDiskTab
{
/// <summary>Drive name</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)] public byte[] d_name;
@@ -317,7 +317,7 @@ namespace DiscImageChef.PartPlugins
/// Partition entries, 44 bytes each
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 2)]
public struct NeXTEntry
struct NeXTEntry
{
/// <summary>Sector of start, counting from front porch</summary>
public int p_base;

View File

@@ -372,7 +372,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PDInfo
struct PDInfo
{
public uint driveid; /*identifies the device type*/
public uint sanity; /*verifies device sanity*/
@@ -412,7 +412,7 @@ namespace DiscImageChef.PartPlugins
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PDInfoOld
struct PDInfoOld
{
public uint driveid; /*identifies the device type*/
public uint sanity; /*verifies device sanity*/
@@ -473,7 +473,7 @@ namespace DiscImageChef.PartPlugins
public int p_size; /*# of blocks in partition*/
};
public enum pTag : ushort
enum pTag : ushort
{
/// <summary>empty</summary>
V_UNUSED = 0x0000,
@@ -533,7 +533,7 @@ namespace DiscImageChef.PartPlugins
V_VOMASK = 0x300 /* mask for open and valid */
}
public static string decodeUNIXTAG(pTag type, bool isNew)
static string decodeUNIXTAG(pTag type, bool isNew)
{
switch(type)
{

View File

@@ -36,9 +36,9 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Server.App_Start
{
public static class ScsiInquiry
static class ScsiInquiry
{
public static List<string> Report(scsiInquiryType inquiry)
internal static List<string> Report(scsiInquiryType inquiry)
{
List<string> scsiOneValue = new List<string>();

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.ATA
{
public static class Ata28
static class Ata28
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.ATA
{
public static class Ata48
static class Ata48
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.ATA
{
public static class AtaCHS
static class AtaCHS
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.ATA
{
public static class Atapi
static class Atapi
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.ATA
{
public static class Cfa
static class Cfa
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.ATA
{
public static class MCPT
static class MCPT
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.ATA
{
public static class Smart
static class Smart
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class Adaptec
static class Adaptec
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class ArchiveCorp
static class ArchiveCorp
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class Certance
static class Certance
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class Fujitsu
static class Fujitsu
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class HL_DT_ST
static class HL_DT_ST
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class HP
static class HP
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class Kreon
static class Kreon
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class MMC
static class MMC
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class NEC
static class NEC
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class Pioneer
static class Pioneer
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class Plasmon
static class Plasmon
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class Plextor
static class Plextor
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class SBC
static class SBC
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class SMC
static class SMC
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -32,9 +32,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class SPC
static class SPC
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class SSC
static class SSC
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SCSI
{
public static class SyQuest
static class SyQuest
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SecureDigital
{
public static class MultiMediaCard
static class MultiMediaCard
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -31,9 +31,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Tests.Devices.SecureDigital
{
public static class SecureDigital
static class SecureDigital
{
public static void Menu(string devPath, Device dev)
internal static void Menu(string devPath, Device dev)
{
while(true)
{

View File

@@ -28,7 +28,7 @@
namespace DiscImageChef.Tests
{
public static class Consts
static class Consts
{
public const string TestFilesRoot = "/mnt/DiscImageChef/tests";
}

View File

@@ -42,9 +42,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
public static class Analyze
static class Analyze
{
public static void doAnalyze(AnalyzeOptions options)
internal static void doAnalyze(AnalyzeOptions options)
{
DicConsole.DebugWriteLine("Analyze command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Analyze command", "--verbose={0}", options.Verbose);

View File

@@ -36,9 +36,9 @@ using DiscImageChef.Core;
namespace DiscImageChef.Commands
{
public static class Benchmark
static class Benchmark
{
public static void doBenchmark(BenchmarkOptions options)
internal static void doBenchmark(BenchmarkOptions options)
{
Dictionary<string, double> checksumTimes = new Dictionary<string, double>();
Core.Benchmark.InitProgressEvent += Progress.InitProgress;

View File

@@ -40,12 +40,12 @@ using Schemas;
namespace DiscImageChef.Commands
{
public static class Checksum
static class Checksum
{
// How many sectors to read at once
const uint sectorsToRead = 256;
public static void doChecksum(ChecksumOptions options)
internal static void doChecksum(ChecksumOptions options)
{
DicConsole.DebugWriteLine("Checksum command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Checksum command", "--verbose={0}", options.Verbose);

View File

@@ -40,9 +40,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
public static class Compare
static class Compare
{
public static void doCompare(CompareOptions options)
internal static void doCompare(CompareOptions options)
{
DicConsole.DebugWriteLine("Compare command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Compare command", "--verbose={0}", options.Verbose);

View File

@@ -36,9 +36,9 @@ using DiscImageChef.Settings;
namespace DiscImageChef.Commands
{
public static class Configure
static class Configure
{
public static void doConfigure()
internal static void doConfigure()
{
ConsoleKeyInfo pressedKey = new ConsoleKeyInfo();

View File

@@ -42,9 +42,9 @@ using Schemas;
namespace DiscImageChef.Commands
{
public static class CreateSidecar
static class CreateSidecar
{
public static void doSidecar(CreateSidecarOptions options)
internal static void doSidecar(CreateSidecarOptions options)
{
Sidecar.InitProgressEvent += Progress.InitProgress;
Sidecar.UpdateProgressEvent += Progress.UpdateProgress;

View File

@@ -37,9 +37,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
public static class Decode
static class Decode
{
public static void doDecode(DecodeOptions options)
internal static void doDecode(DecodeOptions options)
{
DicConsole.DebugWriteLine("Decode command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Decode command", "--verbose={0}", options.Verbose);

View File

@@ -38,9 +38,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Commands
{
public static class DeviceInfo
static class DeviceInfo
{
public static void doDeviceInfo(DeviceInfoOptions options)
internal static void doDeviceInfo(DeviceInfoOptions options)
{
DicConsole.DebugWriteLine("Device-Info command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Device-Info command", "--verbose={0}", options.Verbose);

View File

@@ -38,9 +38,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Commands
{
public static class DeviceReport
static class DeviceReport
{
public static void doDeviceReport(DeviceReportOptions options)
internal static void doDeviceReport(DeviceReportOptions options)
{
DicConsole.DebugWriteLine("Device-Report command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Device-Report command", "--verbose={0}", options.Verbose);

View File

@@ -42,9 +42,9 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Commands
{
public static class DumpMedia
static class DumpMedia
{
public static void doDumpMedia(DumpMediaOptions options)
internal static void doDumpMedia(DumpMediaOptions options)
{
DicConsole.DebugWriteLine("Dump-Media command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Dump-Media command", "--verbose={0}", options.Verbose);

View File

@@ -40,9 +40,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
public static class Entropy
static class Entropy
{
public static void doEntropy(EntropyOptions options)
internal static void doEntropy(EntropyOptions options)
{
DicConsole.DebugWriteLine("Entropy command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Entropy command", "--verbose={0}", options.Verbose);

View File

@@ -44,9 +44,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
// TODO: Rewrite this, has an insane amount of repeating code ;)
public static class ExtractFiles
static class ExtractFiles
{
public static void doExtractFiles(ExtractFilesOptions options)
internal static void doExtractFiles(ExtractFilesOptions options)
{
DicConsole.DebugWriteLine("Extract-Files command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Extract-Files command", "--verbose={0}", options.Verbose);

View File

@@ -40,9 +40,9 @@ using DiscImageChef.PartPlugins;
namespace DiscImageChef.Commands
{
public static class Formats
static class Formats
{
public static void ListFormats(FormatsOptions FormatsOptions)
internal static void ListFormats(FormatsOptions FormatsOptions)
{
PluginBase plugins = new PluginBase();
plugins.RegisterAllPlugins();

View File

@@ -36,9 +36,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Commands
{
public static class ListDevices
static class ListDevices
{
public static void doListDevices(ListDevicesOptions options)
internal static void doListDevices(ListDevicesOptions options)
{
DicConsole.DebugWriteLine("Media-Info command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Media-Info command", "--verbose={0}", options.Verbose);

View File

@@ -36,7 +36,7 @@ using DiscImageChef.Console;
namespace DiscImageChef.Commands
{
public static class ListEncodings
static class ListEncodings
{
struct CommonEncodingInfo
{
@@ -44,7 +44,7 @@ namespace DiscImageChef.Commands
public string DisplayName;
}
public static void DoList(ListEncodingsOptions EncodingOptions)
internal static void DoList(ListEncodingsOptions EncodingOptions)
{
List<CommonEncodingInfo> encodings = new List<CommonEncodingInfo>();

View File

@@ -42,9 +42,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
public static class Ls
static class Ls
{
public static void doLs(LsOptions options)
internal static void doLs(LsOptions options)
{
DicConsole.DebugWriteLine("Ls command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Ls command", "--verbose={0}", options.Verbose);

View File

@@ -39,9 +39,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Commands
{
public static class MediaInfo
static class MediaInfo
{
public static void doMediaInfo(MediaInfoOptions options)
internal static void doMediaInfo(MediaInfoOptions options)
{
DicConsole.DebugWriteLine("Media-Info command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Media-Info command", "--verbose={0}", options.Verbose);

View File

@@ -37,9 +37,9 @@ using DiscImageChef.Devices;
namespace DiscImageChef.Commands
{
public static class MediaScan
static class MediaScan
{
public static void doMediaScan(MediaScanOptions options)
internal static void doMediaScan(MediaScanOptions options)
{
DicConsole.DebugWriteLine("Media-Scan command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Media-Scan command", "--verbose={0}", options.Verbose);

View File

@@ -37,9 +37,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
public static class PrintHex
static class PrintHex
{
public static void doPrintHex(PrintHexOptions options)
internal static void doPrintHex(PrintHexOptions options)
{
DicConsole.DebugWriteLine("PrintHex command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("PrintHex command", "--verbose={0}", options.Verbose);

View File

@@ -35,9 +35,9 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Commands
{
public static class Statistics
static class Statistics
{
public static void showStats()
internal static void showStats()
{
if(Core.Statistics.AllStats == null)
{

View File

@@ -39,9 +39,9 @@ using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Commands
{
public static class Verify
static class Verify
{
public static void doVerify(VerifyOptions options)
internal static void doVerify(VerifyOptions options)
{
DicConsole.DebugWriteLine("Verify command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Verify command", "--verbose={0}", options.Verbose);

View File

@@ -14,16 +14,16 @@
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// it under the terms of the GNU General internal License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program 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 General Public License for more details.
// GNU General internal License for more details.
//
// You should have received a copy of the GNU General Public License
// You should have received a copy of the GNU General internal License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
@@ -34,316 +34,316 @@ using CommandLine;
namespace DiscImageChef
{
public abstract class CommonOptions
internal abstract class CommonOptions
{
[Option('v', "verbose", Default = false, HelpText = "Shows verbose output")]
public bool Verbose { get; set; }
internal bool Verbose { get; set; }
[Option('d', "debug", Default = false, HelpText = "Shows debug output from plugins")]
public bool Debug { get; set; }
internal bool Debug { get; set; }
}
[Verb("analyze", HelpText = "Analyzes a disc image and searches for partitions and/or filesystems.")]
public class AnalyzeOptions : CommonOptions
class AnalyzeOptions : CommonOptions
{
[Option('p', "partitions", Default = true, HelpText = "Searches and interprets partitions.")]
public bool SearchForPartitions { get; set; }
internal bool SearchForPartitions { get; set; }
[Option('f', "filesystems", Default = true, HelpText = "Searches and interprets partitions.")]
public bool SearchForFilesystems { get; set; }
internal bool SearchForFilesystems { get; set; }
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
[Option('e', "encoding", Default = null, HelpText = "Name of character encoding to use.")]
public string EncodingName { get; set; }
internal string EncodingName { get; set; }
}
[Verb("compare", HelpText = "Compares two disc images.")]
public class CompareOptions : CommonOptions
class CompareOptions : CommonOptions
{
[Option("input1", Required = true, HelpText = "First disc image.")]
public string InputFile1 { get; set; }
internal string InputFile1 { get; set; }
[Option("input2", Required = true, HelpText = "Second disc image.")]
public string InputFile2 { get; set; }
internal string InputFile2 { get; set; }
}
[Verb("checksum", HelpText = "Checksums an image.")]
public class ChecksumOptions : CommonOptions
class ChecksumOptions : CommonOptions
{
[Option('t', "separated-tracks", Default = true, HelpText = "Checksums each track separately.")]
public bool SeparatedTracks { get; set; }
internal bool SeparatedTracks { get; set; }
[Option('w', "whole-disc", Default = true, HelpText = "Checksums the whole disc.")]
public bool WholeDisc { get; set; }
internal bool WholeDisc { get; set; }
[Option('a', "adler32", Default = true, HelpText = "Calculates Adler-32.")]
public bool DoAdler32 { get; set; }
internal bool DoAdler32 { get; set; }
[Option("crc16", Default = true, HelpText = "Calculates CRC16.")]
public bool DoCRC16 { get; set; }
internal bool DoCRC16 { get; set; }
[Option('c', "crc32", Default = true, HelpText = "Calculates CRC32.")]
public bool DoCRC32 { get; set; }
internal bool DoCRC32 { get; set; }
[Option("crc64", Default = false, HelpText = "Calculates CRC64 (ECMA).")]
public bool DoCRC64 { get; set; }
internal bool DoCRC64 { get; set; }
/*[Option("fletcher16", Default = false,
HelpText = "Calculates Fletcher-16.")]
public bool DoFletcher16 { get; set; }
internal bool DoFletcher16 { get; set; }
[Option("fletcher32", Default = false,
HelpText = "Calculates Fletcher-32.")]
public bool DoFletcher32 { get; set; }*/
internal bool DoFletcher32 { get; set; }*/
[Option('m', "md5", Default = true, HelpText = "Calculates MD5.")]
public bool DoMD5 { get; set; }
internal bool DoMD5 { get; set; }
[Option("ripemd160", Default = false, HelpText = "Calculates RIPEMD160.")]
public bool DoRIPEMD160 { get; set; }
internal bool DoRIPEMD160 { get; set; }
[Option('s', "sha1", Default = true, HelpText = "Calculates SHA1.")]
public bool DoSHA1 { get; set; }
internal bool DoSHA1 { get; set; }
[Option("sha256", Default = false, HelpText = "Calculates SHA256.")]
public bool DoSHA256 { get; set; }
internal bool DoSHA256 { get; set; }
[Option("sha384", Default = false, HelpText = "Calculates SHA384.")]
public bool DoSHA384 { get; set; }
internal bool DoSHA384 { get; set; }
[Option("sha512", Default = false, HelpText = "Calculates SHA512.")]
public bool DoSHA512 { get; set; }
internal bool DoSHA512 { get; set; }
[Option('f', "spamsum", Default = true, HelpText = "Calculates SpamSum fuzzy hash.")]
public bool DoSpamSum { get; set; }
internal bool DoSpamSum { get; set; }
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
}
[Verb("entropy", HelpText = "Calculates entropy and/or duplicated sectors of an image.")]
public class EntropyOptions : CommonOptions
class EntropyOptions : CommonOptions
{
[Option('p', "duplicated-sectors", Default = true,
HelpText = "Calculates how many sectors are duplicated (have same exact data in user area).")]
public bool DuplicatedSectors { get; set; }
internal bool DuplicatedSectors { get; set; }
[Option('t', "separated-tracks", Default = true, HelpText = "Calculates entropy for each track separately.")]
public bool SeparatedTracks { get; set; }
internal bool SeparatedTracks { get; set; }
[Option('w', "whole-disc", Default = true, HelpText = "Calculates entropy for the whole disc.")]
public bool WholeDisc { get; set; }
internal bool WholeDisc { get; set; }
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
}
[Verb("verify", HelpText = "Verifies a disc image integrity, and if supported, sector integrity.")]
public class VerifyOptions : CommonOptions
class VerifyOptions : CommonOptions
{
[Option('w', "verify-disc", Default = true, HelpText = "Verify disc image if supported.")]
public bool VerifyDisc { get; set; }
internal bool VerifyDisc { get; set; }
[Option('s', "verify-sectors", Default = true, HelpText = "Verify all sectors if supported.")]
public bool VerifySectors { get; set; }
internal bool VerifySectors { get; set; }
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
}
[Verb("printhex", HelpText = "Prints a sector, in hexadecimal values, to the console.")]
public class PrintHexOptions : CommonOptions
class PrintHexOptions : CommonOptions
{
[Option('s', "start", Required = true, HelpText = "Start sector.")]
public ulong StartSector { get; set; }
internal ulong StartSector { get; set; }
[Option('l', "length", Default = (ulong)1, HelpText = "How many sectors to print.")]
public ulong Length { get; set; }
internal ulong Length { get; set; }
[Option('r', "long-sectors", Default = false, HelpText = "Print sectors with tags included.")]
public bool LongSectors { get; set; }
internal bool LongSectors { get; set; }
[Option('w', "width", Default = (ushort)32, HelpText = "How many bytes to print per line.")]
public ushort WidthBytes { get; set; }
internal ushort WidthBytes { get; set; }
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
}
[Verb("decode", HelpText = "Decodes and pretty prints disk and/or sector tags.")]
public class DecodeOptions : CommonOptions
class DecodeOptions : CommonOptions
{
[Option('s', "start", Default = (ulong)0, HelpText = "Start sector.")]
public ulong StartSector { get; set; }
internal ulong StartSector { get; set; }
[Option('l', "length", Default = "all", HelpText = "How many sectors to decode, or \"all\".")]
public string Length { get; set; }
internal string Length { get; set; }
[Option('k', "disk-tags", Default = true, HelpText = "Decode disk tags.")]
public bool DiskTags { get; set; }
internal bool DiskTags { get; set; }
[Option('t', "sector-tags", Default = true, HelpText = "Decode sector tags.")]
public bool SectorTags { get; set; }
internal bool SectorTags { get; set; }
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
}
[Verb("device-info", HelpText = "Gets information about a device.")]
public class DeviceInfoOptions : CommonOptions
class DeviceInfoOptions : CommonOptions
{
[Option('i', "device", Required = true, HelpText = "Device path.")]
public string DevicePath { get; set; }
internal string DevicePath { get; set; }
[Option('w', "output-prefix", Required = false, Default = "",
HelpText = "Write binary responses from device with that prefix.")]
public string OutputPrefix { get; set; }
internal string OutputPrefix { get; set; }
}
[Verb("media-info", HelpText = "Gets information about the media inserted on a device.")]
public class MediaInfoOptions : CommonOptions
class MediaInfoOptions : CommonOptions
{
[Option('i', "device", Required = true, HelpText = "Device path.")]
public string DevicePath { get; set; }
internal string DevicePath { get; set; }
[Option('w', "output-prefix", Required = false, Default = "",
HelpText = "Write binary responses from device with that prefix.")]
public string OutputPrefix { get; set; }
internal string OutputPrefix { get; set; }
}
[Verb("media-scan", HelpText = "Scans the media inserted on a device.")]
public class MediaScanOptions : CommonOptions
class MediaScanOptions : CommonOptions
{
[Option('i', "device", Required = true, HelpText = "Device path.")]
public string DevicePath { get; set; }
internal string DevicePath { get; set; }
[Option('m', "mhdd-log", Required = false, Default = "",
HelpText = "Write a log of the scan in the format used by MHDD.")]
public string MHDDLogPath { get; set; }
internal string MHDDLogPath { get; set; }
[Option('b', "ibg-log", Required = false, Default = "",
HelpText = "Write a log of the scan in the format used by ImgBurn.")]
public string IBGLogPath { get; set; }
internal string IBGLogPath { get; set; }
}
[Verb("formats", HelpText = "Lists all supported disc images, partition schemes and file systems.")]
public class FormatsOptions : CommonOptions { }
class FormatsOptions : CommonOptions { }
[Verb("benchmark", HelpText = "Benchmarks hashing and entropy calculation.")]
public class BenchmarkOptions : CommonOptions
class BenchmarkOptions : CommonOptions
{
[Option('b', "block-size", Required = false, Default = 512, HelpText = "Block size.")]
public int BlockSize { get; set; }
internal int BlockSize { get; set; }
[Option('s', "buffer-size", Required = false, Default = 128, HelpText = "Buffer size in mebibytes.")]
public int BufferSize { get; set; }
internal int BufferSize { get; set; }
}
[Verb("create-sidecar", HelpText = "Creates CICM Metadata XML sidecar.")]
public class CreateSidecarOptions : CommonOptions
class CreateSidecarOptions : CommonOptions
{
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
[Option('t', "tape", Required = false, Default = false,
HelpText =
"When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device).")]
public bool Tape { get; set; }
internal bool Tape { get; set; }
[Option('b', "block-size", Required = false, Default = 512,
HelpText =
"Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.")]
public int BlockSize { get; set; }
internal int BlockSize { get; set; }
[Option('e', "encoding", Default = null, HelpText = "Name of character encoding to use.")]
public string EncodingName { get; set; }
internal string EncodingName { get; set; }
}
[Verb("dump-media", HelpText = "Dumps the media inserted on a device to a media image.")]
public class DumpMediaOptions : CommonOptions
class DumpMediaOptions : CommonOptions
{
[Option('i', "device", Required = true, HelpText = "Device path.")]
public string DevicePath { get; set; }
internal string DevicePath { get; set; }
[Option('w', "output-prefix", Required = true, HelpText = "Prefix for media dump.")]
public string OutputPrefix { get; set; }
internal string OutputPrefix { get; set; }
[Option('r', "raw", Default = false,
HelpText = "Dump sectors with tags included. For optical media, dump scrambled sectors")]
public bool Raw { get; set; }
internal bool Raw { get; set; }
[Option('s', "stop-on-error", Default = false, HelpText = "Stop media dump on first error.")]
public bool StopOnError { get; set; }
internal bool StopOnError { get; set; }
[Option('f', "force", Default = false, HelpText = "Continue dump whatever happens.")]
public bool Force { get; set; }
internal bool Force { get; set; }
[Option('p', "retry-passes", Default = (ushort)5, HelpText = "How many retry passes to do.")]
public ushort RetryPasses { get; set; }
internal ushort RetryPasses { get; set; }
[Option("persistent", Default = false, HelpText = "Try to recover partial or incorrect data.")]
public bool Persistent { get; set; }
internal bool Persistent { get; set; }
[Option("separate-subchannel", Default = false,
HelpText = "Save subchannel in a separate file. Only applicable to CD/DDCD/GD.")]
public bool SeparateSubchannel { get; set; }
internal bool SeparateSubchannel { get; set; }
[Option('m', "resume", Default = true, HelpText = "Create/use resume mapfile.")]
public bool Resume { get; set; }
internal bool Resume { get; set; }
[Option("lead-in", Default = false, HelpText = "Try to read lead-in. Only applicable to CD/DDCD/GD.")]
public bool LeadIn { get; set; }
internal bool LeadIn { get; set; }
[Option('e', "encoding", Default = null, HelpText = "Name of character encoding to use.")]
public string EncodingName { get; set; }
internal string EncodingName { get; set; }
}
[Verb("device-report", HelpText = "Tests the device capabilities and creates an XML report of them.")]
public class DeviceReportOptions : CommonOptions
class DeviceReportOptions : CommonOptions
{
[Option('i', "device", Required = true, HelpText = "Device path.")]
public string DevicePath { get; set; }
internal string DevicePath { get; set; }
}
[Verb("configure", HelpText = "Configures user settings and statistics.")]
public class ConfigureOptions { }
class ConfigureOptions { }
[Verb("stats", HelpText = "Shows statistics.")]
public class StatsOptions { }
class StatsOptions { }
[Verb("ls", HelpText = "Lists files in disc image.")]
public class LsOptions : CommonOptions
class LsOptions : CommonOptions
{
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
[Option('l', "long", Default = false, HelpText = "Uses long format.")]
public bool Long { get; set; }
internal bool Long { get; set; }
[Option('e', "encoding", Default = null, HelpText = "Name of character encoding to use.")]
public string EncodingName { get; set; }
internal string EncodingName { get; set; }
}
[Verb("extract-files", HelpText = "Extracts all files in disc image.")]
public class ExtractFilesOptions : CommonOptions
class ExtractFilesOptions : CommonOptions
{
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
internal string InputFile { get; set; }
[Option('o', "output", Required = true,
HelpText = "Directory where extracted files will be created. Will abort if it exists.")]
public string OutputDir { get; set; }
internal string OutputDir { get; set; }
[Option('x', "xattrs", Default = false, HelpText = "Extract extended attributes if present.")]
public bool Xattrs { get; set; }
internal bool Xattrs { get; set; }
[Option('e', "encoding", Default = null, HelpText = "Name of character encoding to use.")]
public string EncodingName { get; set; }
internal string EncodingName { get; set; }
}
[Verb("list-devices", HelpText = "Lists all connected devices.")]
public class ListDevicesOptions : CommonOptions { }
class ListDevicesOptions : CommonOptions { }
[Verb("list-encodings", HelpText = "Lists all supported text encodings and code pages.")]
public class ListEncodingsOptions : CommonOptions { }
class ListEncodingsOptions : CommonOptions { }
}

View File

@@ -34,46 +34,46 @@ using DiscImageChef.Console;
namespace DiscImageChef
{
public static class Progress
static class Progress
{
public static void InitProgress() { }
internal static void InitProgress() { }
public static void EndProgress()
internal static void EndProgress()
{
DicConsole.WriteLine();
}
public static void UpdateProgress(string text, long current, long maximum)
internal static void UpdateProgress(string text, long current, long maximum)
{
DicConsole.Write("\r" + text);
}
public static void InitProgress2() { }
internal static void InitProgress2() { }
public static void EndProgress2()
internal static void EndProgress2()
{
DicConsole.WriteLine();
}
public static void UpdateProgress2(string text, long current, long maximum)
internal static void UpdateProgress2(string text, long current, long maximum)
{
DicConsole.Write("\r" + text);
}
public static void InitTwoProgress() { }
internal static void InitTwoProgress() { }
public static void EndTwoProgress()
internal static void EndTwoProgress()
{
DicConsole.WriteLine();
}
public static void UpdateTwoProgress(string text, long current, long maximum, string text2, long current2,
internal static void UpdateTwoProgress(string text, long current, long maximum, string text2, long current2,
long maximum2)
{
DicConsole.Write("\r" + text + ": " + text2);
}
public static void UpdateStatus(string text)
internal static void UpdateStatus(string text)
{
DicConsole.WriteLine(text);
}