diff --git a/DiscImageChef.Core/Checksum.cs b/DiscImageChef.Core/Checksum.cs index d1c94dfc5..b79f22ef0 100644 --- a/DiscImageChef.Core/Checksum.cs +++ b/DiscImageChef.Core/Checksum.cs @@ -381,7 +381,7 @@ namespace DiscImageChef.Core return chks; } - public static List GetChecksums(byte[] data, EnableChecksum enabled = EnableChecksum.All) + internal static List GetChecksums(byte[] data, EnableChecksum enabled = EnableChecksum.All) { Adler32Context adler32ctxData = null; CRC16Context crc16ctxData = null; diff --git a/DiscImageChef.Core/DataFile.cs b/DiscImageChef.Core/DataFile.cs index 94a9b7723..70ac12a0b 100644 --- a/DiscImageChef.Core/DataFile.cs +++ b/DiscImageChef.Core/DataFile.cs @@ -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 . // // ---------------------------------------------------------------------------- diff --git a/DiscImageChef.Core/Devices/Dumping/Alcohol120.cs b/DiscImageChef.Core/Devices/Dumping/Alcohol120.cs index ed436810d..5a0341935 100644 --- a/DiscImageChef.Core/Devices/Dumping/Alcohol120.cs +++ b/DiscImageChef.Core/Devices/Dumping/Alcohol120.cs @@ -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 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(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(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; } diff --git a/DiscImageChef.Core/Devices/Dumping/ResumeSupport.cs b/DiscImageChef.Core/Devices/Dumping/ResumeSupport.cs index e0aa91200..e14c13222 100644 --- a/DiscImageChef.Core/Devices/Dumping/ResumeSupport.cs +++ b/DiscImageChef.Core/Devices/Dumping/ResumeSupport.cs @@ -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) { diff --git a/DiscImageChef.Core/Devices/Reader.cs b/DiscImageChef.Core/Devices/Reader.cs index c25817e0e..87fdf0374 100644 --- a/DiscImageChef.Core/Devices/Reader.cs +++ b/DiscImageChef.Core/Devices/Reader.cs @@ -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) { diff --git a/DiscImageChef.Core/Devices/ReaderATA.cs b/DiscImageChef.Core/Devices/ReaderATA.cs index 1589b4c5a..b7fec3504 100644 --- a/DiscImageChef.Core/Devices/ReaderATA.cs +++ b/DiscImageChef.Core/Devices/ReaderATA.cs @@ -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); diff --git a/DiscImageChef.Core/Devices/ReaderSCSI.cs b/DiscImageChef.Core/Devices/ReaderSCSI.cs index 9899608a9..016aa67c0 100644 --- a/DiscImageChef.Core/Devices/ReaderSCSI.cs +++ b/DiscImageChef.Core/Devices/ReaderSCSI.cs @@ -35,7 +35,7 @@ using DiscImageChef.Console; namespace DiscImageChef.Core.Devices { - public partial class Reader + partial class Reader { // TODO: Raw reading bool read6; diff --git a/DiscImageChef.Core/Devices/Report/ATAPI.cs b/DiscImageChef.Core/Devices/Report/ATAPI.cs index 6de6d2c75..31485aec0 100644 --- a/DiscImageChef.Core/Devices/Report/ATAPI.cs +++ b/DiscImageChef.Core/Devices/Report/ATAPI.cs @@ -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; diff --git a/DiscImageChef.Core/Devices/Report/FireWire.cs b/DiscImageChef.Core/Devices/Report/FireWire.cs index aff3e5e36..468c048fe 100644 --- a/DiscImageChef.Core/Devices/Report/FireWire.cs +++ b/DiscImageChef.Core/Devices/Report/FireWire.cs @@ -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; diff --git a/DiscImageChef.Core/Devices/Report/PCMCIA.cs b/DiscImageChef.Core/Devices/Report/PCMCIA.cs index 0fa675da6..f3b84ee49 100644 --- a/DiscImageChef.Core/Devices/Report/PCMCIA.cs +++ b/DiscImageChef.Core/Devices/Report/PCMCIA.cs @@ -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; diff --git a/DiscImageChef.Core/Devices/Report/USB.cs b/DiscImageChef.Core/Devices/Report/USB.cs index ef7ceee25..841e04db8 100644 --- a/DiscImageChef.Core/Devices/Report/USB.cs +++ b/DiscImageChef.Core/Devices/Report/USB.cs @@ -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; diff --git a/DiscImageChef.Core/Logging/IBGLog.cs b/DiscImageChef.Core/Logging/IBGLog.cs index 69bb0217a..ed7e1364c 100644 --- a/DiscImageChef.Core/Logging/IBGLog.cs +++ b/DiscImageChef.Core/Logging/IBGLog.cs @@ -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) diff --git a/DiscImageChef.Core/Logging/MHDDLog.cs b/DiscImageChef.Core/Logging/MHDDLog.cs index f1a0e6653..ff48867d1 100644 --- a/DiscImageChef.Core/Logging/MHDDLog.cs +++ b/DiscImageChef.Core/Logging/MHDDLog.cs @@ -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(); } diff --git a/DiscImageChef.Core/Version.cs b/DiscImageChef.Core/Version.cs index 2895b424d..a4fcba499 100644 --- a/DiscImageChef.Core/Version.cs +++ b/DiscImageChef.Core/Version.cs @@ -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 . // // ---------------------------------------------------------------------------- @@ -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(); } diff --git a/DiscImageChef.Devices/Command.cs b/DiscImageChef.Devices/Command.cs index 3d894bf6d..d556326ad 100644 --- a/DiscImageChef.Devices/Command.cs +++ b/DiscImageChef.Devices/Command.cs @@ -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 . @@ -37,7 +37,7 @@ using Microsoft.Win32.SafeHandles; namespace DiscImageChef.Devices { - public static class Command + static class Command { /// /// Sends a SCSI command @@ -51,7 +51,7 @@ namespace DiscImageChef.Devices /// SCSI command transfer direction /// Time it took to execute the command in milliseconds /// True if SCSI error returned non-OK status and contains SCSI sense - 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 /// SCSI command transfer direction /// Time it took to execute the command in milliseconds /// True if SCSI error returned non-OK status and contains SCSI sense - 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) diff --git a/DiscImageChef.Devices/Linux/ListDevices.cs b/DiscImageChef.Devices/Linux/ListDevices.cs index 1fb1e0c55..d0e14c7eb 100644 --- a/DiscImageChef.Devices/Linux/ListDevices.cs +++ b/DiscImageChef.Devices/Linux/ListDevices.cs @@ -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]; diff --git a/DiscImageChef.Devices/Windows/Enums.cs b/DiscImageChef.Devices/Windows/Enums.cs index da0099be4..232534434 100644 --- a/DiscImageChef.Devices/Windows/Enums.cs +++ b/DiscImageChef.Devices/Windows/Enums.cs @@ -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, diff --git a/DiscImageChef.Devices/Windows/ListDevices.cs b/DiscImageChef.Devices/Windows/ListDevices.cs index ee3d0b8d5..e7ad8fe4b 100644 --- a/DiscImageChef.Devices/Windows/ListDevices.cs +++ b/DiscImageChef.Devices/Windows/ListDevices.cs @@ -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 DeviceIDs = new List(); diff --git a/DiscImageChef.Devices/Windows/Usb.cs b/DiscImageChef.Devices/Windows/Usb.cs index c6386c595..4bc10bff6 100644 --- a/DiscImageChef.Devices/Windows/Usb.cs +++ b/DiscImageChef.Devices/Windows/Usb.cs @@ -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 . @@ -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 GetHostControllers() + static internal System.Collections.ObjectModel.ReadOnlyCollection GetHostControllers() { List HostList = new List(); 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 GetPorts() + internal System.Collections.ObjectModel.ReadOnlyCollection GetPorts() { List PortList = new List(); @@ -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; } } diff --git a/DiscImageChef.Devices/Windows/UsbFunctions.cs b/DiscImageChef.Devices/Windows/UsbFunctions.cs index 690ac462b..188d54756 100644 --- a/DiscImageChef.Devices/Windows/UsbFunctions.cs +++ b/DiscImageChef.Devices/Windows/UsbFunctions.cs @@ -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 . @@ -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 GetConnectedDevices() + static internal List GetConnectedDevices() { List DevList = new List(); @@ -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 = ""; diff --git a/DiscImageChef.DiscImages/DiscFerret.cs b/DiscImageChef.DiscImages/DiscFerret.cs index 0cde8b643..1c7f5d9a4 100644 --- a/DiscImageChef.DiscImages/DiscFerret.cs +++ b/DiscImageChef.DiscImages/DiscFerret.cs @@ -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; diff --git a/DiscImageChef.DiscImages/KryoFlux.cs b/DiscImageChef.DiscImages/KryoFlux.cs index fdf239095..c5c17d99a 100644 --- a/DiscImageChef.DiscImages/KryoFlux.cs +++ b/DiscImageChef.DiscImages/KryoFlux.cs @@ -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; diff --git a/DiscImageChef.DiscImages/SuperCardPro.cs b/DiscImageChef.DiscImages/SuperCardPro.cs index 44bc4d142..337d9aeb5 100644 --- a/DiscImageChef.DiscImages/SuperCardPro.cs +++ b/DiscImageChef.DiscImages/SuperCardPro.cs @@ -78,7 +78,7 @@ namespace DiscImageChef.ImagePlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ScpFooter + struct ScpFooter { public uint manufacturerOffset; public uint modelOffset; diff --git a/DiscImageChef.Filesystems/CPM/Definitions.cs b/DiscImageChef.Filesystems/CPM/Definitions.cs index 9de9d31e3..2ab842e82 100644 --- a/DiscImageChef.Filesystems/CPM/Definitions.cs +++ b/DiscImageChef.Filesystems/CPM/Definitions.cs @@ -44,7 +44,7 @@ namespace DiscImageChef.Filesystems.CPM /// Loads all the known CP/M disk definitions from an XML stored as an embedded resource. /// /// The definitions. - public bool LoadDefinitions() + bool LoadDefinitions() { try { @@ -83,7 +83,7 @@ namespace DiscImageChef.Filesystems.CPM /// /// CP/M disk definitions /// - public class CpmDefinitions + class CpmDefinitions { /// /// List of all CP/M disk definitions @@ -98,7 +98,7 @@ namespace DiscImageChef.Filesystems.CPM /// /// CP/M disk definition /// - public class CpmDefinition + class CpmDefinition { /// /// Comment and description @@ -197,7 +197,7 @@ namespace DiscImageChef.Filesystems.CPM /// /// Side descriptions /// - public class Side + class Side { /// /// Side ID as found in each sector address mark diff --git a/DiscImageChef.Filesystems/FAT.cs b/DiscImageChef.Filesystems/FAT.cs index 095b3a96b..1f2001d34 100644 --- a/DiscImageChef.Filesystems/FAT.cs +++ b/DiscImageChef.Filesystems/FAT.cs @@ -1403,7 +1403,7 @@ namespace DiscImageChef.Filesystems /// BIOS Parameter Block as used by Atari ST GEMDOS on FAT12 volumes. /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct AtariParameterBlock + struct AtariParameterBlock { /// 68000 BRA.S jump or x86 loop [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] jump; @@ -1463,7 +1463,7 @@ namespace DiscImageChef.Filesystems /// BIOS Parameter Block as used by MSX-DOS 2. /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct MSXParameterBlock + struct MSXParameterBlock { /// x86 loop [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1511,7 +1511,7 @@ namespace DiscImageChef.Filesystems /// DOS 2.0 BIOS Parameter Block. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct BIOSParameterBlock2 + struct BIOSParameterBlock2 { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1541,7 +1541,7 @@ namespace DiscImageChef.Filesystems /// DOS 3.0 BIOS Parameter Block. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct BIOSParameterBlock30 + struct BIOSParameterBlock30 { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1577,7 +1577,7 @@ namespace DiscImageChef.Filesystems /// DOS 3.2 BIOS Parameter Block. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct BIOSParameterBlock32 + struct BIOSParameterBlock32 { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1615,7 +1615,7 @@ namespace DiscImageChef.Filesystems /// DOS 3.31 BIOS Parameter Block. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct BIOSParameterBlock33 + struct BIOSParameterBlock33 { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1653,7 +1653,7 @@ namespace DiscImageChef.Filesystems /// DOS 3.4 BIOS Parameter Block. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct BIOSParameterBlockShortEBPB + struct BIOSParameterBlockShortEBPB { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1699,7 +1699,7 @@ namespace DiscImageChef.Filesystems /// DOS 4.0 or higher BIOS Parameter Block. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct BIOSParameterBlockEBPB + struct BIOSParameterBlockEBPB { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1749,7 +1749,7 @@ namespace DiscImageChef.Filesystems /// FAT32 Parameter Block [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct FAT32ParameterBlockShort + struct FAT32ParameterBlockShort { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1813,7 +1813,7 @@ namespace DiscImageChef.Filesystems /// FAT32 Parameter Block [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct FAT32ParameterBlock + struct FAT32ParameterBlock { /// x86 jump [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] jump; @@ -1877,7 +1877,7 @@ namespace DiscImageChef.Filesystems /// Apricot Label. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ApricotLabel + struct ApricotLabel { /// Version of format which created disk [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 { /// Bytes per sector 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; /// FAT32 FS Information Sector [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct FSInfoSector + struct FSInfoSector { /// Signature must be 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; diff --git a/DiscImageChef.Filesystems/MinixFS.cs b/DiscImageChef.Filesystems/MinixFS.cs index cbcd9a9b9..4335f034a 100644 --- a/DiscImageChef.Filesystems/MinixFS.cs +++ b/DiscImageChef.Filesystems/MinixFS.cs @@ -321,7 +321,7 @@ namespace DiscImageChef.Filesystems /// Superblock for Minix v1 and V2 filesystems /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct MinixSuperBlock + struct MinixSuperBlock { /// 0x00, inodes on volume public ushort s_ninodes; @@ -349,7 +349,7 @@ namespace DiscImageChef.Filesystems /// Superblock for Minix v3 filesystems /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct Minix3SuperBlock + struct Minix3SuperBlock { /// 0x00, inodes on volume public uint s_ninodes; diff --git a/DiscImageChef.Filesystems/SolarFS.cs b/DiscImageChef.Filesystems/SolarFS.cs index d62746bb5..e110db0bb 100644 --- a/DiscImageChef.Filesystems/SolarFS.cs +++ b/DiscImageChef.Filesystems/SolarFS.cs @@ -178,7 +178,7 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public struct SolarOSParameterBlock + struct SolarOSParameterBlock { /// 0x00, x86 jump (3 bytes), jumps to 0x60 public byte[] x86_jump; diff --git a/DiscImageChef.Filesystems/ext2FS.cs b/DiscImageChef.Filesystems/ext2FS.cs index 22c17c655..9ef316b5a 100644 --- a/DiscImageChef.Filesystems/ext2FS.cs +++ b/DiscImageChef.Filesystems/ext2FS.cs @@ -539,15 +539,15 @@ namespace DiscImageChef.Filesystems /// /// Same magic for ext2, ext3 and ext4 /// - public const ushort ext2FSMagic = 0xEF53; + const ushort ext2FSMagic = 0xEF53; - public const ushort ext2OldFSMagic = 0xEF51; + const ushort ext2OldFSMagic = 0xEF51; /// /// ext2/3/4 superblock /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ext2FSSuperBlock + struct ext2FSSuperBlock { /// 0x000, inodes on volume public uint inodes; @@ -765,112 +765,112 @@ namespace DiscImageChef.Filesystems // ext? filesystem states /// Cleanly-unmounted volume - public const ushort EXT2_VALID_FS = 0x0001; + const ushort EXT2_VALID_FS = 0x0001; /// Dirty volume - public const ushort EXT2_ERROR_FS = 0x0002; + const ushort EXT2_ERROR_FS = 0x0002; /// Recovering orphan files - public const ushort EXT3_ORPHAN_FS = 0x0004; + const ushort EXT3_ORPHAN_FS = 0x0004; // ext? default mount flags /// Enable debugging messages - public const uint EXT2_DEFM_DEBUG = 0x000001; + const uint EXT2_DEFM_DEBUG = 0x000001; /// Emulates BSD behaviour on new file creation - public const uint EXT2_DEFM_BSDGROUPS = 0x000002; + const uint EXT2_DEFM_BSDGROUPS = 0x000002; /// Enable user xattrs - public const uint EXT2_DEFM_XATTR_USER = 0x000004; + const uint EXT2_DEFM_XATTR_USER = 0x000004; /// Enable POSIX ACLs - public const uint EXT2_DEFM_ACL = 0x000008; + const uint EXT2_DEFM_ACL = 0x000008; /// Use 16bit UIDs - public const uint EXT2_DEFM_UID16 = 0x000010; + const uint EXT2_DEFM_UID16 = 0x000010; /// Journal data mode - public const uint EXT3_DEFM_JMODE_DATA = 0x000040; + const uint EXT3_DEFM_JMODE_DATA = 0x000040; /// Journal ordered mode - public const uint EXT3_DEFM_JMODE_ORDERED = 0x000080; + const uint EXT3_DEFM_JMODE_ORDERED = 0x000080; /// Journal writeback mode - public const uint EXT3_DEFM_JMODE_WBACK = 0x000100; + const uint EXT3_DEFM_JMODE_WBACK = 0x000100; // Behaviour on errors /// Continue execution - public const ushort EXT2_ERRORS_CONTINUE = 1; + const ushort EXT2_ERRORS_CONTINUE = 1; /// Remount fs read-only - public const ushort EXT2_ERRORS_RO = 2; + const ushort EXT2_ERRORS_RO = 2; /// Panic - 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 /// The good old (original) format - public const uint EXT2_GOOD_OLD_REV = 0; + const uint EXT2_GOOD_OLD_REV = 0; /// V2 format w/ dynamic inode sizes - public const uint EXT2_DYNAMIC_REV = 1; + const uint EXT2_DYNAMIC_REV = 1; // Compatible features /// Pre-allocate directories - public const uint EXT2_FEATURE_COMPAT_DIR_PREALLOC = 0x00000001; + const uint EXT2_FEATURE_COMPAT_DIR_PREALLOC = 0x00000001; /// imagic inodes ? - public const uint EXT2_FEATURE_COMPAT_IMAGIC_INODES = 0x00000002; + const uint EXT2_FEATURE_COMPAT_IMAGIC_INODES = 0x00000002; /// Has journal (it's ext3) - public const uint EXT3_FEATURE_COMPAT_HAS_JOURNAL = 0x00000004; + const uint EXT3_FEATURE_COMPAT_HAS_JOURNAL = 0x00000004; /// EA blocks - public const uint EXT2_FEATURE_COMPAT_EXT_ATTR = 0x00000008; + const uint EXT2_FEATURE_COMPAT_EXT_ATTR = 0x00000008; /// Online filesystem resize reservations - public const uint EXT2_FEATURE_COMPAT_RESIZE_INO = 0x00000010; + const uint EXT2_FEATURE_COMPAT_RESIZE_INO = 0x00000010; /// Can use hashed indexes on directories - public const uint EXT2_FEATURE_COMPAT_DIR_INDEX = 0x00000020; + const uint EXT2_FEATURE_COMPAT_DIR_INDEX = 0x00000020; // Read-only compatible features /// Reduced number of superblocks - public const uint EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER = 0x00000001; + const uint EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER = 0x00000001; /// Can have files bigger than 2GiB - public const uint EXT2_FEATURE_RO_COMPAT_LARGE_FILE = 0x00000002; + const uint EXT2_FEATURE_RO_COMPAT_LARGE_FILE = 0x00000002; /// Use B-Tree for directories - public const uint EXT2_FEATURE_RO_COMPAT_BTREE_DIR = 0x00000004; + const uint EXT2_FEATURE_RO_COMPAT_BTREE_DIR = 0x00000004; /// Can have files bigger than 2TiB *ext4* - public const uint EXT4_FEATURE_RO_COMPAT_HUGE_FILE = 0x00000008; + const uint EXT4_FEATURE_RO_COMPAT_HUGE_FILE = 0x00000008; /// Group descriptor checksums and sparse inode table *ext4* - public const uint EXT4_FEATURE_RO_COMPAT_GDT_CSUM = 0x00000010; + const uint EXT4_FEATURE_RO_COMPAT_GDT_CSUM = 0x00000010; /// More than 32000 directory entries *ext4* - public const uint EXT4_FEATURE_RO_COMPAT_DIR_NLINK = 0x00000020; + const uint EXT4_FEATURE_RO_COMPAT_DIR_NLINK = 0x00000020; /// Nanosecond timestamps and creation time *ext4* - public const uint EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE = 0x00000040; + const uint EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE = 0x00000040; // Incompatible features /// Uses compression - public const uint EXT2_FEATURE_INCOMPAT_COMPRESSION = 0x00000001; + const uint EXT2_FEATURE_INCOMPAT_COMPRESSION = 0x00000001; /// Filetype in directory entries - public const uint EXT2_FEATURE_INCOMPAT_FILETYPE = 0x00000002; + const uint EXT2_FEATURE_INCOMPAT_FILETYPE = 0x00000002; /// Journal needs recovery *ext3* - public const uint EXT3_FEATURE_INCOMPAT_RECOVER = 0x00000004; + const uint EXT3_FEATURE_INCOMPAT_RECOVER = 0x00000004; /// Has journal on another device *ext3* - public const uint EXT3_FEATURE_INCOMPAT_JOURNAL_DEV = 0x00000008; + const uint EXT3_FEATURE_INCOMPAT_JOURNAL_DEV = 0x00000008; /// Reduced block group backups - public const uint EXT2_FEATURE_INCOMPAT_META_BG = 0x00000010; + const uint EXT2_FEATURE_INCOMPAT_META_BG = 0x00000010; /// Volume use extents *ext4* - public const uint EXT4_FEATURE_INCOMPAT_EXTENTS = 0x00000040; + const uint EXT4_FEATURE_INCOMPAT_EXTENTS = 0x00000040; /// Supports volumes bigger than 2^32 blocks *ext4* - public const uint EXT4_FEATURE_INCOMPAT_64BIT = 0x00000080; + const uint EXT4_FEATURE_INCOMPAT_64BIT = 0x00000080; /// Multi-mount protection *ext4* - public const uint EXT4_FEATURE_INCOMPAT_MMP = 0x00000100; + const uint EXT4_FEATURE_INCOMPAT_MMP = 0x00000100; /// Flexible block group metadata location *ext4* - public const uint EXT4_FEATURE_INCOMPAT_FLEX_BG = 0x00000200; + const uint EXT4_FEATURE_INCOMPAT_FLEX_BG = 0x00000200; /// EA in inode *ext4* - public const uint EXT4_FEATURE_INCOMPAT_EA_INODE = 0x00000400; + const uint EXT4_FEATURE_INCOMPAT_EA_INODE = 0x00000400; /// Data can reside in directory entry *ext4* - public const uint EXT4_FEATURE_INCOMPAT_DIRDATA = 0x00001000; + const uint EXT4_FEATURE_INCOMPAT_DIRDATA = 0x00001000; // Miscellaneous filesystem flags /// Signed dirhash in use - public const uint EXT2_FLAGS_SIGNED_HASH = 0x00000001; + const uint EXT2_FLAGS_SIGNED_HASH = 0x00000001; /// Unsigned dirhash in use - public const uint EXT2_FLAGS_UNSIGNED_HASH = 0x00000002; + const uint EXT2_FLAGS_UNSIGNED_HASH = 0x00000002; /// Testing development code - public const uint EXT2_FLAGS_TEST_FILESYS = 0x00000004; + const uint EXT2_FLAGS_TEST_FILESYS = 0x00000004; public override Errno Mount() { diff --git a/DiscImageChef.Filesystems/extFS.cs b/DiscImageChef.Filesystems/extFS.cs index 82241416b..aca38e9ea 100644 --- a/DiscImageChef.Filesystems/extFS.cs +++ b/DiscImageChef.Filesystems/extFS.cs @@ -137,12 +137,12 @@ namespace DiscImageChef.Filesystems /// /// ext superblock magic /// - public const ushort extFSMagic = 0x137D; + const ushort extFSMagic = 0x137D; /// /// ext superblock /// - public struct extFSSuperBlock + struct extFSSuperBlock { /// 0x000, inodes on volume public uint inodes; diff --git a/DiscImageChef.Partitions/AppleMap.cs b/DiscImageChef.Partitions/AppleMap.cs index 87b31b541..5f87ef4d1 100644 --- a/DiscImageChef.Partitions/AppleMap.cs +++ b/DiscImageChef.Partitions/AppleMap.cs @@ -348,7 +348,7 @@ namespace DiscImageChef.PartPlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct AppleDriverDescriptorMap + struct AppleDriverDescriptorMap { /// Signature public ushort sbSig; @@ -369,7 +369,7 @@ namespace DiscImageChef.PartPlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct AppleDriverEntry + struct AppleDriverEntry { /// First sector of the driver public uint ddBlock; @@ -380,7 +380,7 @@ namespace DiscImageChef.PartPlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct AppleOldDevicePartitionMap + struct AppleOldDevicePartitionMap { /// Signature public ushort pdSig; @@ -389,7 +389,7 @@ namespace DiscImageChef.PartPlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct AppleMapOldPartitionEntry + struct AppleMapOldPartitionEntry { /// First sector of the partition public uint pdStart; @@ -400,7 +400,7 @@ namespace DiscImageChef.PartPlugins } [Flags] - public enum AppleMapFlags : uint + enum AppleMapFlags : uint { /// Partition is valid Valid = 0x01, @@ -429,7 +429,7 @@ namespace DiscImageChef.PartPlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct AppleMapPartitionEntry + struct AppleMapPartitionEntry { /// Signature public ushort signature; diff --git a/DiscImageChef.Partitions/Apricot.cs b/DiscImageChef.Partitions/Apricot.cs index 6055bdda6..d07a344b1 100644 --- a/DiscImageChef.Partitions/Apricot.cs +++ b/DiscImageChef.Partitions/Apricot.cs @@ -266,7 +266,7 @@ namespace DiscImageChef.PartPlugins /// Apricot Label. [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ApricotLabel + struct ApricotLabel { /// Version of format which created disk [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 { /// Bytes per sector public ushort bps; diff --git a/DiscImageChef.Partitions/BSD.cs b/DiscImageChef.Partitions/BSD.cs index 346ce8a6d..86aea78c3 100644 --- a/DiscImageChef.Partitions/BSD.cs +++ b/DiscImageChef.Partitions/BSD.cs @@ -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; /// Known sector locations for BSD disklabel readonly ulong[] labelLocations = {0, 1, 2, 9}; /// Known byte offsets for BSD disklabel @@ -172,7 +172,7 @@ namespace DiscImageChef.PartPlugins } /// Drive type - public enum dType : ushort + enum dType : ushort { /// SMD, XSMD SMD = 1, @@ -221,7 +221,7 @@ namespace DiscImageChef.PartPlugins } /// Filesystem type - public enum fsType : byte + internal enum fsType : byte { /// Unused entry Unused = 0, @@ -303,7 +303,7 @@ namespace DiscImageChef.PartPlugins /// Drive flags /// [Flags] - public enum dFlags : uint + enum dFlags : uint { /// Removable media Removable = 0x01, @@ -320,7 +320,7 @@ namespace DiscImageChef.PartPlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct DiskLabel + struct DiskLabel { /// public uint d_magic; @@ -385,7 +385,7 @@ namespace DiscImageChef.PartPlugins } [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct BSDPartition + struct BSDPartition { /// Sectors in partition 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]); diff --git a/DiscImageChef.Partitions/GPT.cs b/DiscImageChef.Partitions/GPT.cs index 3fa02eb9a..06a419549 100644 --- a/DiscImageChef.Partitions/GPT.cs +++ b/DiscImageChef.Partitions/GPT.cs @@ -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; diff --git a/DiscImageChef.Partitions/MBR.cs b/DiscImageChef.Partitions/MBR.cs index 529a92bee..aea4b6ac1 100644 --- a/DiscImageChef.Partitions/MBR.cs +++ b/DiscImageChef.Partitions/MBR.cs @@ -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 { /// Boot code [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 { /// Boot code, almost always unused [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 { /// Boot code [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 { /// Boot code [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 { /// Boot code [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 { /// Boot code [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 { /// Boot code [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 { /// Partition status, 0x80 or 0x00, else invalid public byte status; diff --git a/DiscImageChef.Partitions/NeXT.cs b/DiscImageChef.Partitions/NeXT.cs index ec8fdcdf6..20940d0c0 100644 --- a/DiscImageChef.Partitions/NeXT.cs +++ b/DiscImageChef.Partitions/NeXT.cs @@ -221,7 +221,7 @@ namespace DiscImageChef.PartPlugins /// NeXT v3 disklabel, 544 bytes /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct NeXTLabel + struct NeXTLabel { /// Signature public uint dl_version; @@ -245,7 +245,7 @@ namespace DiscImageChef.PartPlugins /// NeXT v1 and v2 disklabel, 7224 bytes /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct NeXTLabelOld + struct NeXTLabelOld { /// Signature public uint dl_version; @@ -271,7 +271,7 @@ namespace DiscImageChef.PartPlugins /// NeXT disktab and partitions, 498 bytes /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct NeXTDiskTab + struct NeXTDiskTab { /// Drive name [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)] public byte[] d_name; @@ -317,7 +317,7 @@ namespace DiscImageChef.PartPlugins /// Partition entries, 44 bytes each /// [StructLayout(LayoutKind.Sequential, Pack = 2)] - public struct NeXTEntry + struct NeXTEntry { /// Sector of start, counting from front porch public int p_base; diff --git a/DiscImageChef.Partitions/VTOC.cs b/DiscImageChef.Partitions/VTOC.cs index 50225cfc0..c00e06508 100644 --- a/DiscImageChef.Partitions/VTOC.cs +++ b/DiscImageChef.Partitions/VTOC.cs @@ -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 { /// empty 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) { diff --git a/DiscImageChef.Server/App_Start/ScsiInquiry.cs b/DiscImageChef.Server/App_Start/ScsiInquiry.cs index 13967c6d2..15ea06bcd 100644 --- a/DiscImageChef.Server/App_Start/ScsiInquiry.cs +++ b/DiscImageChef.Server/App_Start/ScsiInquiry.cs @@ -36,9 +36,9 @@ using DiscImageChef.Metadata; namespace DiscImageChef.Server.App_Start { - public static class ScsiInquiry + static class ScsiInquiry { - public static List Report(scsiInquiryType inquiry) + internal static List Report(scsiInquiryType inquiry) { List scsiOneValue = new List(); diff --git a/DiscImageChef.Tests.Devices/ATA/Ata28.cs b/DiscImageChef.Tests.Devices/ATA/Ata28.cs index ea189e36d..0a1edcc16 100644 --- a/DiscImageChef.Tests.Devices/ATA/Ata28.cs +++ b/DiscImageChef.Tests.Devices/ATA/Ata28.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/ATA/Ata48.cs b/DiscImageChef.Tests.Devices/ATA/Ata48.cs index 873088a96..b00cd1257 100644 --- a/DiscImageChef.Tests.Devices/ATA/Ata48.cs +++ b/DiscImageChef.Tests.Devices/ATA/Ata48.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/ATA/AtaCHS.cs b/DiscImageChef.Tests.Devices/ATA/AtaCHS.cs index d45100c3a..3d6874a03 100644 --- a/DiscImageChef.Tests.Devices/ATA/AtaCHS.cs +++ b/DiscImageChef.Tests.Devices/ATA/AtaCHS.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/ATA/Atapi.cs b/DiscImageChef.Tests.Devices/ATA/Atapi.cs index 0b046f057..e6812fb40 100644 --- a/DiscImageChef.Tests.Devices/ATA/Atapi.cs +++ b/DiscImageChef.Tests.Devices/ATA/Atapi.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/ATA/Cfa.cs b/DiscImageChef.Tests.Devices/ATA/Cfa.cs index a1f44744d..100f15a51 100644 --- a/DiscImageChef.Tests.Devices/ATA/Cfa.cs +++ b/DiscImageChef.Tests.Devices/ATA/Cfa.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/ATA/MCPT.cs b/DiscImageChef.Tests.Devices/ATA/MCPT.cs index 3e9a89c57..73c17e541 100644 --- a/DiscImageChef.Tests.Devices/ATA/MCPT.cs +++ b/DiscImageChef.Tests.Devices/ATA/MCPT.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/ATA/Smart.cs b/DiscImageChef.Tests.Devices/ATA/Smart.cs index b3b5ead28..8decf78d9 100644 --- a/DiscImageChef.Tests.Devices/ATA/Smart.cs +++ b/DiscImageChef.Tests.Devices/ATA/Smart.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/Adaptec.cs b/DiscImageChef.Tests.Devices/SCSI/Adaptec.cs index 006cb6a7a..b2f271502 100644 --- a/DiscImageChef.Tests.Devices/SCSI/Adaptec.cs +++ b/DiscImageChef.Tests.Devices/SCSI/Adaptec.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/ArchiveCorp.cs b/DiscImageChef.Tests.Devices/SCSI/ArchiveCorp.cs index aea941a0d..9638099f5 100644 --- a/DiscImageChef.Tests.Devices/SCSI/ArchiveCorp.cs +++ b/DiscImageChef.Tests.Devices/SCSI/ArchiveCorp.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/Certance.cs b/DiscImageChef.Tests.Devices/SCSI/Certance.cs index 84233e108..c26e1207e 100644 --- a/DiscImageChef.Tests.Devices/SCSI/Certance.cs +++ b/DiscImageChef.Tests.Devices/SCSI/Certance.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/Fujitsu.cs b/DiscImageChef.Tests.Devices/SCSI/Fujitsu.cs index 24b4c9858..c6ffaeb41 100644 --- a/DiscImageChef.Tests.Devices/SCSI/Fujitsu.cs +++ b/DiscImageChef.Tests.Devices/SCSI/Fujitsu.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/HL-DT-ST.cs b/DiscImageChef.Tests.Devices/SCSI/HL-DT-ST.cs index cb27466b1..65f2dc63d 100644 --- a/DiscImageChef.Tests.Devices/SCSI/HL-DT-ST.cs +++ b/DiscImageChef.Tests.Devices/SCSI/HL-DT-ST.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/HP.cs b/DiscImageChef.Tests.Devices/SCSI/HP.cs index 5e7cb604d..c466b3f33 100644 --- a/DiscImageChef.Tests.Devices/SCSI/HP.cs +++ b/DiscImageChef.Tests.Devices/SCSI/HP.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/Kreon.cs b/DiscImageChef.Tests.Devices/SCSI/Kreon.cs index 544e62158..15439fcfb 100644 --- a/DiscImageChef.Tests.Devices/SCSI/Kreon.cs +++ b/DiscImageChef.Tests.Devices/SCSI/Kreon.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/MMC.cs b/DiscImageChef.Tests.Devices/SCSI/MMC.cs index 1daf283f7..f746ffd1b 100644 --- a/DiscImageChef.Tests.Devices/SCSI/MMC.cs +++ b/DiscImageChef.Tests.Devices/SCSI/MMC.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/NEC.cs b/DiscImageChef.Tests.Devices/SCSI/NEC.cs index 138925e85..7e80d96f7 100644 --- a/DiscImageChef.Tests.Devices/SCSI/NEC.cs +++ b/DiscImageChef.Tests.Devices/SCSI/NEC.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/Pioneer.cs b/DiscImageChef.Tests.Devices/SCSI/Pioneer.cs index 97ea144d0..78ce252bf 100644 --- a/DiscImageChef.Tests.Devices/SCSI/Pioneer.cs +++ b/DiscImageChef.Tests.Devices/SCSI/Pioneer.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/Plasmon.cs b/DiscImageChef.Tests.Devices/SCSI/Plasmon.cs index 9a8653a16..d880154eb 100644 --- a/DiscImageChef.Tests.Devices/SCSI/Plasmon.cs +++ b/DiscImageChef.Tests.Devices/SCSI/Plasmon.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/Plextor.cs b/DiscImageChef.Tests.Devices/SCSI/Plextor.cs index 1699967b9..65742dc4b 100644 --- a/DiscImageChef.Tests.Devices/SCSI/Plextor.cs +++ b/DiscImageChef.Tests.Devices/SCSI/Plextor.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/SBC.cs b/DiscImageChef.Tests.Devices/SCSI/SBC.cs index e2f88735f..2e73bd07a 100644 --- a/DiscImageChef.Tests.Devices/SCSI/SBC.cs +++ b/DiscImageChef.Tests.Devices/SCSI/SBC.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/SMC.cs b/DiscImageChef.Tests.Devices/SCSI/SMC.cs index c88bc5d00..e485b4164 100644 --- a/DiscImageChef.Tests.Devices/SCSI/SMC.cs +++ b/DiscImageChef.Tests.Devices/SCSI/SMC.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/SPC.cs b/DiscImageChef.Tests.Devices/SCSI/SPC.cs index 88f2fb631..4f1a3a6a1 100644 --- a/DiscImageChef.Tests.Devices/SCSI/SPC.cs +++ b/DiscImageChef.Tests.Devices/SCSI/SPC.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/SSC.cs b/DiscImageChef.Tests.Devices/SCSI/SSC.cs index c1e087d28..afedd149d 100644 --- a/DiscImageChef.Tests.Devices/SCSI/SSC.cs +++ b/DiscImageChef.Tests.Devices/SCSI/SSC.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SCSI/SyQuest.cs b/DiscImageChef.Tests.Devices/SCSI/SyQuest.cs index 82a24d896..d9d7b0da8 100644 --- a/DiscImageChef.Tests.Devices/SCSI/SyQuest.cs +++ b/DiscImageChef.Tests.Devices/SCSI/SyQuest.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SecureDigital/MultiMediaCard.cs b/DiscImageChef.Tests.Devices/SecureDigital/MultiMediaCard.cs index 740c9cbf7..f80ccf890 100644 --- a/DiscImageChef.Tests.Devices/SecureDigital/MultiMediaCard.cs +++ b/DiscImageChef.Tests.Devices/SecureDigital/MultiMediaCard.cs @@ -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) { diff --git a/DiscImageChef.Tests.Devices/SecureDigital/SecureDigital.cs b/DiscImageChef.Tests.Devices/SecureDigital/SecureDigital.cs index f2626822f..e7cec5007 100644 --- a/DiscImageChef.Tests.Devices/SecureDigital/SecureDigital.cs +++ b/DiscImageChef.Tests.Devices/SecureDigital/SecureDigital.cs @@ -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) { diff --git a/DiscImageChef.Tests/Consts.cs b/DiscImageChef.Tests/Consts.cs index 7a233e148..dccc9ab11 100644 --- a/DiscImageChef.Tests/Consts.cs +++ b/DiscImageChef.Tests/Consts.cs @@ -28,7 +28,7 @@ namespace DiscImageChef.Tests { - public static class Consts + static class Consts { public const string TestFilesRoot = "/mnt/DiscImageChef/tests"; } diff --git a/DiscImageChef/Commands/Analyze.cs b/DiscImageChef/Commands/Analyze.cs index 63ac68030..2d26fdc7a 100644 --- a/DiscImageChef/Commands/Analyze.cs +++ b/DiscImageChef/Commands/Analyze.cs @@ -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); diff --git a/DiscImageChef/Commands/Benchmark.cs b/DiscImageChef/Commands/Benchmark.cs index fc557cfa0..4638bcd73 100644 --- a/DiscImageChef/Commands/Benchmark.cs +++ b/DiscImageChef/Commands/Benchmark.cs @@ -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 checksumTimes = new Dictionary(); Core.Benchmark.InitProgressEvent += Progress.InitProgress; diff --git a/DiscImageChef/Commands/Checksum.cs b/DiscImageChef/Commands/Checksum.cs index 5ce2cc16b..5dde7c20c 100644 --- a/DiscImageChef/Commands/Checksum.cs +++ b/DiscImageChef/Commands/Checksum.cs @@ -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); diff --git a/DiscImageChef/Commands/Compare.cs b/DiscImageChef/Commands/Compare.cs index f5c21680d..adb020b0a 100644 --- a/DiscImageChef/Commands/Compare.cs +++ b/DiscImageChef/Commands/Compare.cs @@ -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); diff --git a/DiscImageChef/Commands/Configure.cs b/DiscImageChef/Commands/Configure.cs index ac0141ed9..585efa360 100644 --- a/DiscImageChef/Commands/Configure.cs +++ b/DiscImageChef/Commands/Configure.cs @@ -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(); diff --git a/DiscImageChef/Commands/CreateSidecar.cs b/DiscImageChef/Commands/CreateSidecar.cs index 7a9e4c257..4e6a33a78 100644 --- a/DiscImageChef/Commands/CreateSidecar.cs +++ b/DiscImageChef/Commands/CreateSidecar.cs @@ -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; diff --git a/DiscImageChef/Commands/Decode.cs b/DiscImageChef/Commands/Decode.cs index b5d909622..9d1c6d122 100644 --- a/DiscImageChef/Commands/Decode.cs +++ b/DiscImageChef/Commands/Decode.cs @@ -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); diff --git a/DiscImageChef/Commands/DeviceInfo.cs b/DiscImageChef/Commands/DeviceInfo.cs index 87305e904..34723cff4 100644 --- a/DiscImageChef/Commands/DeviceInfo.cs +++ b/DiscImageChef/Commands/DeviceInfo.cs @@ -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); diff --git a/DiscImageChef/Commands/DeviceReport.cs b/DiscImageChef/Commands/DeviceReport.cs index 29c6e4cc7..3ff4a6b2c 100644 --- a/DiscImageChef/Commands/DeviceReport.cs +++ b/DiscImageChef/Commands/DeviceReport.cs @@ -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); diff --git a/DiscImageChef/Commands/DumpMedia.cs b/DiscImageChef/Commands/DumpMedia.cs index 779cb48d8..7ebc6d424 100644 --- a/DiscImageChef/Commands/DumpMedia.cs +++ b/DiscImageChef/Commands/DumpMedia.cs @@ -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); diff --git a/DiscImageChef/Commands/Entropy.cs b/DiscImageChef/Commands/Entropy.cs index 6504dbec1..ee8d5c418 100644 --- a/DiscImageChef/Commands/Entropy.cs +++ b/DiscImageChef/Commands/Entropy.cs @@ -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); diff --git a/DiscImageChef/Commands/ExtractFiles.cs b/DiscImageChef/Commands/ExtractFiles.cs index 0dbde8ead..8ad19b024 100644 --- a/DiscImageChef/Commands/ExtractFiles.cs +++ b/DiscImageChef/Commands/ExtractFiles.cs @@ -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); diff --git a/DiscImageChef/Commands/Formats.cs b/DiscImageChef/Commands/Formats.cs index f3bbcd6ab..feb658e55 100644 --- a/DiscImageChef/Commands/Formats.cs +++ b/DiscImageChef/Commands/Formats.cs @@ -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(); diff --git a/DiscImageChef/Commands/ListDevices.cs b/DiscImageChef/Commands/ListDevices.cs index 7fa42ebb1..5c88dfa16 100644 --- a/DiscImageChef/Commands/ListDevices.cs +++ b/DiscImageChef/Commands/ListDevices.cs @@ -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); diff --git a/DiscImageChef/Commands/ListEncodings.cs b/DiscImageChef/Commands/ListEncodings.cs index 670ffa0b7..fd62e4341 100644 --- a/DiscImageChef/Commands/ListEncodings.cs +++ b/DiscImageChef/Commands/ListEncodings.cs @@ -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 encodings = new List(); diff --git a/DiscImageChef/Commands/Ls.cs b/DiscImageChef/Commands/Ls.cs index eabb61b13..f346837ff 100644 --- a/DiscImageChef/Commands/Ls.cs +++ b/DiscImageChef/Commands/Ls.cs @@ -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); diff --git a/DiscImageChef/Commands/MediaInfo.cs b/DiscImageChef/Commands/MediaInfo.cs index c79de91cd..e9ea27025 100644 --- a/DiscImageChef/Commands/MediaInfo.cs +++ b/DiscImageChef/Commands/MediaInfo.cs @@ -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); diff --git a/DiscImageChef/Commands/MediaScan.cs b/DiscImageChef/Commands/MediaScan.cs index 41e41162d..1b4f200f6 100644 --- a/DiscImageChef/Commands/MediaScan.cs +++ b/DiscImageChef/Commands/MediaScan.cs @@ -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); diff --git a/DiscImageChef/Commands/PrintHex.cs b/DiscImageChef/Commands/PrintHex.cs index a351d2a8e..2ed2aa352 100644 --- a/DiscImageChef/Commands/PrintHex.cs +++ b/DiscImageChef/Commands/PrintHex.cs @@ -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); diff --git a/DiscImageChef/Commands/Statistics.cs b/DiscImageChef/Commands/Statistics.cs index 625939ccf..231484778 100644 --- a/DiscImageChef/Commands/Statistics.cs +++ b/DiscImageChef/Commands/Statistics.cs @@ -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) { diff --git a/DiscImageChef/Commands/Verify.cs b/DiscImageChef/Commands/Verify.cs index d4e974363..6fa68e51b 100644 --- a/DiscImageChef/Commands/Verify.cs +++ b/DiscImageChef/Commands/Verify.cs @@ -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); diff --git a/DiscImageChef/Options.cs b/DiscImageChef/Options.cs index c195b1d22..3456b0f07 100644 --- a/DiscImageChef/Options.cs +++ b/DiscImageChef/Options.cs @@ -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 . // // ---------------------------------------------------------------------------- @@ -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 { } } \ No newline at end of file diff --git a/DiscImageChef/Progress.cs b/DiscImageChef/Progress.cs index e2e00bbb3..df08727ed 100644 --- a/DiscImageChef/Progress.cs +++ b/DiscImageChef/Progress.cs @@ -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); }