// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : IMediaImage.cs // Author(s) : Natalia Portillo // // Component : Disc image plugins. // // --[ Description ] ---------------------------------------------------------- // // Defines structures to be used by disc image plugins. // // --[ License ] -------------------------------------------------------------- // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // ---------------------------------------------------------------------------- // Copyright © 2011-2019 Natalia Portillo // ****************************************************************************/ using System; using System.Collections.Generic; using DiscImageChef.CommonTypes.Enums; using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.CommonTypes.Structs { /// /// Contains information about a dump image and its contents /// public struct ImageInfo { /// Image contains partitions (or tracks for optical media) public bool HasPartitions; /// Image contains sessions (optical media only) public bool HasSessions; /// Size of the image without headers public ulong ImageSize; /// Sectors contained in the image public ulong Sectors; /// Size of sectors contained in the image public uint SectorSize; /// Media tags contained by the image public List ReadableMediaTags; /// Sector tags contained by the image public List ReadableSectorTags; /// Image version public string Version; /// Application that created the image public string Application; /// Version of the application that created the image public string ApplicationVersion; /// Who (person) created the image? public string Creator; /// Image creation time public DateTime CreationTime; /// Image last modification time public DateTime LastModificationTime; /// Title of the media represented by the image public string MediaTitle; /// Image comments public string Comments; /// Manufacturer of the media represented by the image public string MediaManufacturer; /// Model of the media represented by the image public string MediaModel; /// Serial number of the media represented by the image public string MediaSerialNumber; /// Barcode of the media represented by the image public string MediaBarcode; /// Part number of the media represented by the image public string MediaPartNumber; /// Media type represented by the image public MediaType MediaType; /// Number in sequence for the media represented by the image public int MediaSequence; /// Last media of the sequence the media represented by the image corresponds to public int LastMediaSequence; /// Manufacturer of the drive used to read the media represented by the image public string DriveManufacturer; /// Model of the drive used to read the media represented by the image public string DriveModel; /// Serial number of the drive used to read the media represented by the image public string DriveSerialNumber; /// Firmware revision of the drive used to read the media represented by the image public string DriveFirmwareRevision; /// Type of the media represented by the image to use in XML sidecars public XmlMediaType XmlMediaType; // CHS geometry... /// Cylinders of the media represented by the image public uint Cylinders; /// Heads of the media represented by the image public uint Heads; /// Sectors per track of the media represented by the image (for variable image, the smallest) public uint SectorsPerTrack; } /// /// Session defining structure. /// public struct Session { /// Session number, 1-started public ushort SessionSequence; /// First track present on this session public uint StartTrack; /// Last track present on this session public uint EndTrack; /// First sector present on this session public ulong StartSector; /// Last sector present on this session public ulong EndSector; } /// /// Track defining structure. /// public struct Track { /// Track number, 1-started public uint TrackSequence; /// Partition type public TrackType TrackType; /// Track starting sector public ulong TrackStartSector; /// Track ending sector public ulong TrackEndSector; /// Track pre-gap public ulong TrackPregap; /// Session this track belongs to public ushort TrackSession; /// Information that does not find space in this struct public string TrackDescription; /// Indexes, 00 to 99 and sector offset public Dictionary Indexes; /// Which filter stores this track public IFilter TrackFilter; /// Which file stores this track public string TrackFile; /// Starting at which byte is this track stored public ulong TrackFileOffset; /// What kind of file is storing this track public string TrackFileType; /// How many main channel / user data bytes are per sector in this track public int TrackBytesPerSector; /// How many main channel bytes per sector are in the file with this track public int TrackRawBytesPerSector; /// Which filter stores this track's subchannel public IFilter TrackSubchannelFilter; /// Which file stores this track's subchannel public string TrackSubchannelFile; /// Starting at which byte are this track's subchannel stored public ulong TrackSubchannelOffset; /// Type of subchannel stored for this track public TrackSubchannelType TrackSubchannelType; } /// /// Floppy physical characteristics structure. /// public struct FloppyInfo { /// Physical floppy type. public FloppyTypes Type; /// Bitrate in bits per second used to write the floppy, 0 if unknown or track-variable. public uint Bitrate; /// Physical magnetic density (coercitivity) of floppy medium. public FloppyDensities Coercitivity; /// How many physical tracks are actually written in the floppy image. public ushort Tracks; /// How many physical heads are actually written in the floppy image. public byte Heads; /// How many tracks per inch are actually written in the floppy image. public ushort TrackDensity; } }