/*************************************************************************** FileSystem identifier and checker ---------------------------------------------------------------------------- Filename : ImagePlugin.cs Version : 1.0 Author(s) : Natalia Portillo Component : Disc image plugins Revision : $Revision$ Last change by : $Author$ Date : $Date$ --[ Description ] ---------------------------------------------------------- Defines functions to be used by disc image plugins and several constants. --[ License ] -------------------------------------------------------------- This program is free software: you can redistribute it and/or modify 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. You should have received a copy of the GNU General Public License along with this program. If not, see . ---------------------------------------------------------------------------- Copyright (C) 2011-2014 Claunia.com ****************************************************************************/ //$Id$ using System; using System.Collections.Generic; namespace FileSystemIDandChk.ImagePlugins { /// /// Abstract class to implement disk image reading plugins. /// public abstract class ImagePlugin { /// Plugin name. public string Name; /// Plugin UUID. public Guid PluginUUID; protected ImagePlugin() { } // Basic image handling functions /// /// Identifies the image. /// /// true, if image was identified, false otherwise. /// Image path. public abstract bool IdentifyImage(string imagePath); /// /// Opens the image. /// /// true, if image was opened, false otherwise. /// Image path. public abstract bool OpenImage(string imagePath); /// /// Asks the disk image plugin if the image contains partitions /// /// true, if the image contains partitions, false otherwise. public abstract bool ImageHasPartitions(); // Image size functions /// /// Gets the size of the image, without headers. /// /// The image size. public abstract UInt64 GetImageSize(); /// /// Gets the number of sectors in the image. /// /// Sectors in image. public abstract UInt64 GetSectors(); /// /// Returns the size of the biggest sector, counting user data only. /// /// Biggest sector size (user data only). public abstract UInt32 GetSectorSize(); // Image reading functions /// /// Reads a disk tag. /// /// Disk tag /// Tag type to read. public abstract byte[] ReadDiskTag(DiskTagType tag); // Gets a disk tag /// /// Reads a sector's user data. /// /// The sector's user data. /// Sector address (LBA). public abstract byte[] ReadSector(UInt64 sectorAddress); /// /// Reads a sector's tag. /// /// The sector's tag. /// Sector address (LBA). /// Tag type. public abstract byte[] ReadSectorTag(UInt64 sectorAddress, SectorTagType tag); /// /// Reads a sector's user data, relative to track. /// /// The sector's user data. /// Sector address (relative LBA). /// Track. public abstract byte[] ReadSector(UInt64 sectorAddress, UInt32 track); /// /// Reads a sector's tag, relative to track. /// /// The sector's tag. /// Sector address (relative LBA). /// Track. /// Tag type. public abstract byte[] ReadSectorTag(UInt64 sectorAddress, UInt32 track, SectorTagType tag); /// /// Reads user data from several sectors. /// /// The sectors user data. /// Starting sector address (LBA). /// How many sectors to read. public abstract byte[] ReadSectors(UInt64 sectorAddress, UInt32 length); /// /// Reads tag from several sectors. /// /// The sectors tag. /// Starting sector address (LBA). /// How many sectors to read. /// Tag type. public abstract byte[] ReadSectorsTag(UInt64 sectorAddress, UInt32 length, SectorTagType tag); /// /// Reads user data from several sectors, relative to track. /// /// The sectors user data. /// Starting sector address (relative LBA). /// How many sectors to read. /// Track. public abstract byte[] ReadSectors(UInt64 sectorAddress, UInt32 length, UInt32 track); /// /// Reads tag from several sectors, relative to track. /// /// The sectors tag. /// Starting sector address (relative LBA). /// How many sectors to read. /// Track. /// Tag type. public abstract byte[] ReadSectorsTag(UInt64 sectorAddress, UInt32 length, UInt32 track, SectorTagType tag); /// /// Reads a complete sector (user data + all tags). /// /// The complete sector. Format depends on disk type. /// Sector address (LBA). public abstract byte[] ReadSectorLong(UInt64 sectorAddress); /// /// Reads a complete sector (user data + all tags), relative to track. /// /// The complete sector. Format depends on disk type. /// Sector address (relative LBA). /// Track. public abstract byte[] ReadSectorLong(UInt64 sectorAddress, UInt32 track); /// /// Reads several complete sector (user data + all tags). /// /// The complete sectors. Format depends on disk type. /// Starting sector address (LBA). /// How many sectors to read. public abstract byte[] ReadSectorsLong(UInt64 sectorAddress, UInt32 length); /// /// Reads several complete sector (user data + all tags), relative to track. /// /// The complete sectors. Format depends on disk type. /// Starting sector address (relative LBA). /// How many sectors to read. /// Track. public abstract byte[] ReadSectorsLong(UInt64 sectorAddress, UInt32 length, UInt32 track); // Image information functions /// /// Gets the image format. /// /// The image format. public abstract string GetImageFormat(); /// /// Gets the image version. /// /// The image version. public abstract string GetImageVersion(); /// /// Gets the application that created the image. /// /// The application that created the image. public abstract string GetImageApplication(); /// /// Gets the version of the application that created the image. /// /// The version of the application that created the image. public abstract string GetImageApplicationVersion(); /// /// Gets the image creator. /// /// Who created the image. public abstract string GetImageCreator(); /// /// Gets the image creation time. /// /// The image creation time. public abstract DateTime GetImageCreationTime(); /// /// Gets the image last modification time. /// /// The image last modification time. public abstract DateTime GetImageLastModificationTime(); /// /// Gets the name of the image. /// /// The image name. public abstract string GetImageName(); /// /// Gets the image comments. /// /// The image comments. public abstract string GetImageComments(); // Functions to get information from disk represented by image /// /// Gets the disk manufacturer. /// /// The disk manufacturer. public abstract string GetDiskManufacturer(); /// /// Gets the disk model. /// /// The disk model. public abstract string GetDiskModel(); /// /// Gets the disk serial number. /// /// The disk serial number. public abstract string GetDiskSerialNumber(); /// /// Gets the disk (or product) barcode. /// /// The disk barcode. public abstract string GetDiskBarcode(); /// /// Gets the disk part number. /// /// The disk part number. public abstract string GetDiskPartNumber(); /// /// Gets the type of the disk. /// /// The disk type. public abstract DiskType GetDiskType(); /// /// Gets the disk sequence. /// /// The disk sequence, starting at 1. public abstract int GetDiskSequence(); /// /// Gets the last disk in the sequence. /// /// The last disk in the sequence. public abstract int GetLastDiskSequence(); // Functions to get information from drive used to create image /// /// Gets the manufacturer of the drive used to create the image. /// /// The drive manufacturer. public abstract string GetDriveManufacturer(); /// /// Gets the model of the drive used to create the image. /// /// The drive model. public abstract string GetDriveModel(); /// /// Gets the serial number of the drive used to create the image. /// /// The drive serial number. public abstract string GetDriveSerialNumber(); // Partitioning functions /// /// Gets an array partitions. Typically only useful for optical disc /// images where each track and index means a different partition, as /// reads can be relative to them. /// /// The partitions. public abstract List GetPartitions(); /// /// Gets the disc track extents (start, length). /// /// The track extents. public abstract List GetTracks(); /// /// Gets the disc track extents for a specified session. /// /// The track exents for that session. /// Session. public abstract List GetSessionTracks(Session session); /// /// Gets the disc track extents for a specified session. /// /// The track exents for that session. /// Session. public abstract List GetSessionTracks(UInt16 session); /// /// Gets the sessions (optical discs only). /// /// The sessions. public abstract List GetSessions(); // Returns disc sessions // CD flags bitmask /// Track is quadraphonic. public const byte CDFlagsFourChannel = 0x20; /// Track is non-audio (data). public const byte CDFlagsDataTrack = 0x10; /// Track is copy protected. public const byte CDFlagsCopyPrevent = 0x08; /// Track has pre-emphasis. public const byte CDFlagsPreEmphasis = 0x04; } // Disk types public enum DiskType { /// Unknown disk type Unknown, // Somewhat standard Compact Disc formats /// CD Digital Audio (Red Book) CDDA, /// CD+G (Red Book) CDG, /// CD+EG (Red Book) CDEG, /// CD-i (Green Book) CDI, /// CD-ROM (Yellow Book) CDROM, /// CD-ROM XA (Yellow Book) CDROMXA, /// CD+ (Blue Book) CDPLUS, /// CD-MO (Orange Book) CDMO, /// CD-Recordable (Orange Book) CDR, /// CD-ReWritable (Orange Book) CDRW, /// Mount-Rainier CD-RW CDMRW, /// Video CD (White Book) VCD, /// Super Video CD (White Book) SVCD, /// Photo CD (Beige Book) PCD, /// Super Audio CD (Scarlet Book) SACD, /// Double-Density CD-ROM (Purple Book) DDCD, /// DD CD-R (Purple Book) DDCDR, /// DD CD-RW (Purple Book) DDCDRW, /// DTS audio CD (non-standard) DTSCD, /// CD-MIDI (Red Book) CDMIDI, /// Any unknown or standard violating CD CD, // Standard DVD formats /// DVD-ROM (applies to DVD Video and DVD Audio) DVDROM, /// DVD-R DVDR, /// DVD-RW DVDRW, /// DVD+R DVDPR, /// DVD+RW DVDPRW, /// DVD+RW DL DVDPRWDL, /// DVD-R DL DVDRDL, /// DVD+R DL DVDPRDL, /// DVD-RAM DVDRAM, // Standard HD-DVD formats /// HD DVD-ROM (applies to HD DVD Video) HDDVDROM, /// HD DVD-RAM HDDVDRAM, /// HD DVD-R HDDVDR, /// HD DVD-RW HDDVDRW, // Standard Blu-ray formats /// BD-ROM (and BD Video) BDROM, /// BD-R BDR, /// BD-RE BDRE, /// BD-R XL BDRXL, /// BD-RE XL BDREXL, // Rare or uncommon standards /// Enhanced Versatile Disc EVD, /// Forward Versatile Disc FVD, /// Holographic Versatile Disc HVD, /// China Blue High Definition CBHD, /// High Definition Versatile Multilayer Disc HDVMD, /// Versatile Compact Disc High Density VCDHD, /// Pioneer LaserDisc LD, /// Pioneer LaserDisc data LDROM, /// Sony MiniDisc MD, /// Sony Hi-MD HiMD, /// Ultra Density Optical UDO, /// Stacked Volumetric Optical Disc SVOD, /// Five Dimensional disc FDDVD, // Propietary game discs /// Sony PlayStation game CD PS1CD, /// Sony PlayStation 2 game CD PS2CD, /// Sony PlayStation 2 game DVD PS2DVD, /// Sony PlayStation 3 game DVD PS3DVD, /// Sony PlayStation 3 game Blu-ray PS3BD, /// Sony PlayStation 4 game Blu-ray PS4BD, /// Sony PlayStation Portable Universal Media Disc (ECMA-365) UMD, /// Nintendo GameCube Optical Disc GOD, /// Nintendo Wii Optical Disc WOD, /// Nintendo Wii U Optical Disc WUOD, /// Microsoft X-box Game Disc XGD, /// Microsoft X-box 360 Game Disc XGD2, /// Microsoft X-box 360 Game Disc XGD3, /// Microsoft X-box One Game Disc XGD4, /// Sega MegaCD MEGACD, /// Sega Saturn disc SATURNCD, /// Sega/Yamaha Gigabyte Disc GDROM, /// Sega/Yamaha recordable Gigabyte Disc}} GDR, // Apple standard floppy format /// 5.25", SS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR Apple32SS, /// 5.25", DS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR Apple32DS, /// 5.25", SS, DD, 35 tracks, 16 spt, 256 bytes/sector, GCR Apple33SS, /// 5.25", DS, DD, 35 tracks, 16 spt, 256 bytes/sector, GCR Apple33DS, /// 3.5", SS, DD, 80 tracks, 8 to 12 spt, 512 bytes/sector, GCR AppleSonySS, /// 3.5", DS, DD, 80 tracks, 8 to 12 spt, 512 bytes/sector, GCR AppleSonyDS, /// 5.25", DS, ?D, ?? tracks, ?? spt, 512 bytes/sector, GCR, opposite side heads, aka Twiggy AppleFileWare, // IBM/Microsoft PC standard floppy formats /// 5.25", SS, DD, 40 tracks, 8 spt, 512 bytes/sector, MFM DOS_525_SS_DD_8, /// 5.25", SS, DD, 40 tracks, 9 spt, 512 bytes/sector, MFM DOS_525_SS_DD_9, /// 5.25", DS, DD, 40 tracks, 8 spt, 512 bytes/sector, MFM DOS_525_DS_DD_8, /// 5.25", DS, DD, 40 tracks, 9 spt, 512 bytes/sector, MFM DOS_525_DS_DD_9, /// 5.25", DS, HD, 80 tracks, 15 spt, 512 bytes/sector, MFM DOS_525_HD, /// 3.5", SS, DD, 80 tracks, 8 spt, 512 bytes/sector, MFM DOS_35_SS_DD_8, /// 3.5", SS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM DOS_35_SS_DD_9, /// 3.5", DS, DD, 80 tracks, 8 spt, 512 bytes/sector, MFM DOS_35_DS_DD_8, /// 3.5", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM DOS_35_DS_DD_9, /// 3.5", DS, HD, 80 tracks, 18 spt, 512 bytes/sector, MFM DOS_35_HD, /// 3.5", DS, ED, 80 tracks, 36 spt, 512 bytes/sector, MFM DOS_35_ED, // Microsoft non standard floppy formats /// 3.5", DS, DD, 80 tracks, 21 spt, 512 bytes/sector, MFM DMF, /// 3.5", DS, DD, 82 tracks, 21 spt, 512 bytes/sector, MFM DMF_82, // IBM non standard floppy formats XDF_525, XDF_35, // IBM standard floppy formats /// 8", SS, SD, 32 tracks, 8 spt, 319 bytes/sector, FM IBM23FD, /// 8", SS, SD, 73 tracks, 26 spt, 128 bytes/sector, FM IBM33FD_128, /// 8", SS, SD, 74 tracks, 15 spt, 256 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector IBM33FD_256, /// 8", SS, SD, 74 tracks, 8 spt, 512 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector IBM33FD_512, /// 8", DS, SD, 74 tracks, 26 spt, 128 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector IBM43FD_128, /// 8", DS, SD, 74 tracks, 26 spt, 256 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector IBM43FD_256, /// 8", DS, DD, 74 tracks, 26 spt, 256 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector IBM53FD_256, /// 8", DS, DD, 74 tracks, 15 spt, 512 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector IBM53FD_512, /// 8", DS, DD, 74 tracks, 8 spt, 1024 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector IBM53FD_1024, // DEC standard floppy formats /// 8", SS, DD, 77 tracks, 26 spt, 128 bytes/sector, FM RX01, /// 8", SS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM/MFM RX02, // Acorn standard floppy formats /// 5,25", SS, SD, 40 tracks, 10 spt, 256 bytes/sector, FM ACORN_525_SS_SD_40, /// 5,25", SS, SD, 80 tracks, 10 spt, 256 bytes/sector, FM ACORN_525_SS_SD_80, /// 5,25", SS, DD, 40 tracks, 16 spt, 256 bytes/sector, MFM ACORN_525_SS_DD_40, /// 5,25", SS, DD, 80 tracks, 16 spt, 256 bytes/sector, MFM ACORN_525_SS_DD_80, /// 5,25", DS, DD, 80 tracks, 16 spt, 256 bytes/sector, MFM ACORN_525_DS_DD, // Atari standard floppy formats /// 5,25", SS, SD, 40 tracks, 18 spt, 128 bytes/sector, FM ATARI_525_SD, /// 5,25", SS, ED, 40 tracks, 26 spt, 128 bytes/sector, MFM ATARI_525_ED, /// 5,25", SS, DD, 40 tracks, 18 spt, 256 bytes/sector, MFM ATARI_525_DD, // Commodore standard floppy formats /// 3,5", DS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM CBM_35_DD, /// 3,5", DS, DD, 80 tracks, 11 spt, 512 bytes/sector, MFM (Amiga) CBM_AMIGA_35_DD, /// 3,5", DS, HD, 80 tracks, 22 spt, 512 bytes/sector, MFM (Amiga) CBM_AMIGA_35_HD, // NEC standard floppy formats /// 8", SS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM NEC_8_SD, /// 8", DS, DD, 77 tracks, 8 spt, 1024 bytes/sector, MFM NEC_8_DD, /// 5,25", DS, HD, 80 tracks, 8 spt, 1024 bytes/sector, MFM NEC_525_HD, /// 3,5", DS, HD, 80 tracks, 8 spt, 1024 bytes/sector, MFM NEC_35_HD_8, /// 3,5", DS, HD, 80 tracks, 15 spt, 512 bytes/sector, MFM NEC_35_HD_15, // SHARP standard floppy formats /// 5,25", DS, DD, 77 tracks, 8 spt, 1024 bytes/sector, FM SHARP_525, /// 3,5", DS, DD, 77 tracks, 8 spt, 1024 bytes/sector, FM SHARP_35, // ECMA standards /// 5,25", DS, DD, 80 tracks, 8 spt, 1024 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector ECMA_99_8, /// 5,25", DS, DD, 77 tracks, 15 spt, 512 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector ECMA_99_15, /// 5,25", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector ECMA_99_26, /// 3,5", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM ECMA_100, /// 3,5", DS, HD, 80 tracks, 18 spt, 512 bytes/sector, MFM ECMA_125, /// 3,5", DS, ED, 80 tracks, 36 spt, 512 bytes/sector, MFM ECMA_147, /// 8", SS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM ECMA_54, /// 8", DS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM ECMA_59, /// 5,25", SS, DD, 35 tracks, 9 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector ECMA_66, /// 8", DS, DD, 77 tracks, 8 spt, 1024 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector ECMA_69_8, /// 8", DS, DD, 77 tracks, 15 spt, 512 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector ECMA_69_15, /// 8", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector ECMA_69_26, /// 5,25", DS, DD, 40 tracks, 16 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector, track 0 side 1 = 16 sectors, 256 bytes/sector ECMA_70, /// 5,25", DS, DD, 80 tracks, 16 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector, track 0 side 1 = 16 sectors, 256 bytes/sector ECMA_78, /// 5,25", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, FM ECMA_78_2, /// 3,5", M.O., 250000 sectors, 512 bytes/sector ECMA_154, /// 5,25", M.O., 940470 sectors, 512 bytes/sector ECMA_183_512, /// 5,25", M.O., 520902 sectors, 1024 bytes/sector ECMA_183_1024, /// 5,25", M.O., 1165600 sectors, 512 bytes/sector ECMA_184_512, /// 5,25", M.O., 639200 sectors, 1024 bytes/sector ECMA_184_1024, /// 3,5", M.O., 448500 sectors, 512 bytes/sector ECMA_201, // FDFORMAT, non-standard floppy formats /// 5,25", DS, DD, 82 tracks, 10 spt, 512 bytes/sector, MFM FDFORMAT_525_DD, /// 5,25", DS, HD, 82 tracks, 17 spt, 512 bytes/sector, MFM FDFORMAT_525_HD, /// 5,25", DS, DD, 82 tracks, 10 spt, 512 bytes/sector, MFM FDFORMAT_35_DD, /// 5,25", DS, HD, 82 tracks, 21 spt, 512 bytes/sector, MFM FDFORMAT_35_HD, // Generic hard disks GENERIC_HDD }; /// /// Track (as partitioning element) types. /// public enum TrackType { /// Audio track Audio, /// Data track (not any of the below defined ones) Data, /// Data track, compact disc mode 1 CDMode1, /// Data track, compact disc mode 2, formless CDMode2Formless, /// Data track, compact disc mode 2, form 1 CDMode2Form1, /// Data track, compact disc mode 2, form 2 CDMode2Form2 }; /// /// Track defining structure. /// public struct Track { /// Track number, 1-started public UInt32 TrackSequence; /// Partition type public TrackType TrackType; /// Track starting sector public UInt64 TrackStartSector; /// Track ending sector public UInt64 TrackEndSector; /// Track pre-gap public UInt64 TrackPregap; /// Session this track belongs to public UInt16 TrackSession; /// Information that does not find space in this struct public string TrackDescription; /// Indexes, 00 to 99 and sector offset public Dictionary Indexes; } /// /// Session defining structure. /// public struct Session { /// Session number, 1-started public UInt16 SessionSequence; /// First track present on this session public UInt32 StartTrack; /// Last track present on this session public UInt32 EndTrack; /// First sector present on this session public UInt64 StartSector; /// Last sector present on this session public UInt64 EndSector; } /// /// Metadata present for each sector (aka, "tag"). /// public enum SectorTagType { /// Apple's GCR sector tags, 12 bytes AppleSectorTag, /// Sync frame from CD sector, 12 bytes CDSectorSync, /// CD sector header, 4 bytes CDSectorHeader, /// CD mode 2 sector subheader CDSectorSubHeader, /// CD sector EDC, 4 bytes CDSectorEDC, /// CD sector ECC P, 172 bytes CDSectorECC_P, /// CD sector ECC Q, 104 bytes CDSectorECC_Q, /// CD sector ECC (P and Q), 276 bytes CDSectorECC, /// CD sector subchannel, 96 bytes CDSectorSubchannel, /// CD track ISRC, string, 12 bytes CDTrackISRC, /// CD track text, string, 13 bytes CDTrackText, /// CD track flags, 1 byte CDTrackFlags, /// DVD sector copyright information DVD_CMI }; /// /// Metadata present for each disk. /// public enum DiskTagType { /// CD PMA CD_PMA, /// CD Adress-Time-In-Pregroove CD_ATIP, /// CD-Text CD_TEXT, /// CD Media Catalogue Number CD_MCN, /// DVD Burst Cutting Area DVD_BCA, /// DVD Physical Format Information DVD_PFI, /// DVD Copyright Management Information DVD_CMI, /// DVD Disc Manufacturer Information DVD_DMI }; /// /// Feature is supported by image but not implemented yet. /// [Serializable] public class FeatureSupportedButNotImplementedImageException : Exception { public FeatureSupportedButNotImplementedImageException(string message, Exception inner) : base(message, inner) { } public FeatureSupportedButNotImplementedImageException(string message) : base(message) { } protected FeatureSupportedButNotImplementedImageException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); } } /// /// Feature is not supported by image. /// [Serializable] public class FeatureUnsupportedImageException : Exception { public FeatureUnsupportedImageException(string message, Exception inner) : base(message, inner) { } public FeatureUnsupportedImageException(string message) : base(message) { } protected FeatureUnsupportedImageException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); } } /// /// Feature is supported by image but not present on it. /// [Serializable] public class FeatureNotPresentImageException : Exception { public FeatureNotPresentImageException(string message, Exception inner) : base(message, inner) { } public FeatureNotPresentImageException(string message) : base(message) { } protected FeatureNotPresentImageException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); } } /// /// Feature is supported by image but not by the disc it represents. /// [Serializable] public class FeaturedNotSupportedByDiscImageException : Exception { public FeaturedNotSupportedByDiscImageException(string message, Exception inner) : base(message, inner) { } public FeaturedNotSupportedByDiscImageException(string message) : base(message) { } protected FeaturedNotSupportedByDiscImageException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); } } /// /// Corrupt, incorrect or unhandled feature found on image /// [Serializable] public class ImageNotSupportedException : Exception { public ImageNotSupportedException(string message, Exception inner) : base(message, inner) { } public ImageNotSupportedException(string message) : base(message) { } protected ImageNotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); } } }