Files
libaaruformat/include/aaruformat/enums.h

293 lines
8.9 KiB
C
Raw Normal View History

2022-05-28 12:57:21 +01:00
/*
* This file is part of the Aaru Data Preservation Suite.
* Copyright (c) 2019-2022 Natalia Portillo.
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public 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.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
2022-06-21 21:12:25 +01:00
#ifndef _MSC_VER
#pragma clang diagnostic push
2020-03-01 19:53:05 +00:00
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
2022-06-21 21:12:25 +01:00
#endif
2020-03-01 19:53:05 +00:00
#ifndef LIBAARUFORMAT_ENUMS_H
#define LIBAARUFORMAT_ENUMS_H
2019-03-16 18:04:41 +00:00
/** List of known compression types */
typedef enum
{
/** Not compressed */
2019-03-31 20:52:06 +01:00
None = 0, /** LZMA */
Lzma = 1, /** FLAC */
Flac = 2, /** LZMA in Claunia Subchannel Transform processed data */
LzmaClauniaSubchannelTransform = 3
2019-03-16 18:04:41 +00:00
} CompressionType;
/** List of known data types */
typedef enum
{
/** No data */
2019-03-31 20:52:06 +01:00
NoData = 0,
2019-03-16 18:04:41 +00:00
/** User data */
2019-03-31 20:52:06 +01:00
UserData = 1,
2019-03-16 18:04:41 +00:00
/** CompactDisc partial Table of Contents */
2019-03-31 20:52:06 +01:00
CompactDiscPartialToc = 2,
2019-03-16 18:04:41 +00:00
/** CompactDisc session information */
2019-03-31 20:52:06 +01:00
CompactDiscSessionInfo = 3,
2019-03-16 18:04:41 +00:00
/** CompactDisc Table of Contents */
2019-03-31 20:52:06 +01:00
CompactDiscToc = 4,
2019-03-16 18:04:41 +00:00
/** CompactDisc Power Management Area */
2019-03-31 20:52:06 +01:00
CompactDiscPma = 5,
2019-03-16 18:04:41 +00:00
/** CompactDisc Absolute Time In Pregroove */
2019-03-31 20:52:06 +01:00
CompactDiscAtip = 6,
2019-03-16 18:04:41 +00:00
/** CompactDisc Lead-in's CD-Text */
2019-03-31 20:52:06 +01:00
CompactDiscLeadInCdText = 7,
2019-03-16 18:04:41 +00:00
/** DVD Physical Format Information */
2019-03-31 20:52:06 +01:00
DvdPfi = 8,
2019-03-16 18:04:41 +00:00
/** DVD Lead-in's Copyright Management Information */
2019-03-31 20:52:06 +01:00
DvdLeadInCmi = 9,
2019-03-16 18:04:41 +00:00
/** DVD Disc Key */
2019-03-31 20:52:06 +01:00
DvdDiscKey = 10,
2019-03-16 18:04:41 +00:00
/** DVD Burst Cutting Area */
2019-03-31 20:52:06 +01:00
DvdBca = 11,
2019-03-16 18:04:41 +00:00
/** DVD DMI */
2019-03-31 20:52:06 +01:00
DvdDmi = 12,
2019-03-16 18:04:41 +00:00
/** DVD Media Identifier */
2019-03-31 20:52:06 +01:00
DvdMediaIdentifier = 13,
2019-03-16 18:04:41 +00:00
/** DVD Media Key Block */
2019-03-31 20:52:06 +01:00
DvdMediaKeyBlock = 14,
2019-03-16 18:04:41 +00:00
/** DVD-RAM Disc Definition Structure */
2019-03-31 20:52:06 +01:00
DvdRamDds = 15,
2019-03-16 18:04:41 +00:00
/** DVD-RAM Medium Status */
2019-03-31 20:52:06 +01:00
DvdRamMediumStatus = 16,
2019-03-16 18:04:41 +00:00
/** DVD-RAM Spare Area Information */
2019-03-31 20:52:06 +01:00
DvdRamSpareArea = 17,
2019-03-16 18:04:41 +00:00
/** DVD-R RMD */
2019-03-31 20:52:06 +01:00
DvdRRmd = 18,
2019-03-16 18:04:41 +00:00
/** DVD-R Pre-recorded Information */
2019-03-31 20:52:06 +01:00
DvdRPrerecordedInfo = 19,
2019-03-16 18:04:41 +00:00
/** DVD-R Media Identifier */
2019-03-31 20:52:06 +01:00
DvdRMediaIdentifier = 20,
2019-03-16 18:04:41 +00:00
/** DVD-R Physical Format Information */
2019-03-31 20:52:06 +01:00
DvdRPfi = 21,
2019-03-16 18:04:41 +00:00
/** DVD ADress In Pregroove */
2019-03-31 20:52:06 +01:00
DvdAdip = 22,
2019-03-16 18:04:41 +00:00
/** HD DVD Copy Protection Information */
2019-03-31 20:52:06 +01:00
HdDvdCpi = 23,
2019-03-16 18:04:41 +00:00
/** HD DVD Medium Status */
2019-03-31 20:52:06 +01:00
HdDvdMediumStatus = 24,
2019-03-16 18:04:41 +00:00
/** DVD DL Layer Capacity */
2019-03-31 20:52:06 +01:00
DvdDlLayerCapacity = 25,
2019-03-16 18:04:41 +00:00
/** DVD DL Middle Zone Address */
2019-03-31 20:52:06 +01:00
DvdDlMiddleZoneAddress = 26,
2019-03-16 18:04:41 +00:00
/** DVD DL Jump Interval Size */
2019-03-31 20:52:06 +01:00
DvdDlJumpIntervalSize = 27,
2019-03-16 18:04:41 +00:00
/** DVD DL Manual Layer Jump LBA */
2019-03-31 20:52:06 +01:00
DvdDlManualLayerJumpLba = 28,
2019-03-16 18:04:41 +00:00
/** Bluray Disc Information */
2019-03-31 20:52:06 +01:00
BlurayDi = 29,
2019-03-16 18:04:41 +00:00
/** Bluray Burst Cutting Area */
2019-03-31 20:52:06 +01:00
BlurayBca = 30,
2019-03-16 18:04:41 +00:00
/** Bluray Disc Definition Structure */
2019-03-31 20:52:06 +01:00
BlurayDds = 31,
2019-03-16 18:04:41 +00:00
/** Bluray Cartridge Status */
2019-03-31 20:52:06 +01:00
BlurayCartridgeStatus = 32,
2019-03-16 18:04:41 +00:00
/** Bluray Spare Area Information */
2019-03-31 20:52:06 +01:00
BluraySpareArea = 33,
2019-03-16 18:04:41 +00:00
/** AACS Volume Identifier */
2019-03-31 20:52:06 +01:00
AacsVolumeIdentifier = 34,
2019-03-16 18:04:41 +00:00
/** AACS Serial Number */
2019-03-31 20:52:06 +01:00
AacsSerialNumber = 35,
2019-03-16 18:04:41 +00:00
/** AACS Media Identifier */
2019-03-31 20:52:06 +01:00
AacsMediaIdentifier = 36,
2019-03-16 18:04:41 +00:00
/** AACS Media Key Block */
2019-03-31 20:52:06 +01:00
AacsMediaKeyBlock = 37,
2019-03-16 18:04:41 +00:00
/** AACS Data Keys */
2019-03-31 20:52:06 +01:00
AacsDataKeys = 38,
2019-03-16 18:04:41 +00:00
/** AACS LBA Extents */
2019-03-31 20:52:06 +01:00
AacsLbaExtents = 39,
2019-03-16 18:04:41 +00:00
/** CPRM Media Key Block */
2019-03-31 20:52:06 +01:00
CprmMediaKeyBlock = 40,
2019-03-16 18:04:41 +00:00
/** Recognized Layers */
2019-03-31 20:52:06 +01:00
HybridRecognizedLayers = 41,
2019-03-16 18:04:41 +00:00
/** MMC Write Protection */
2019-03-31 20:52:06 +01:00
ScsiMmcWriteProtection = 42,
2019-03-16 18:04:41 +00:00
/** MMC Disc Information */
2019-03-31 20:52:06 +01:00
ScsiMmcDiscInformation = 43,
2019-03-16 18:04:41 +00:00
/** MMC Track Resources Information */
2019-03-31 20:52:06 +01:00
ScsiMmcTrackResourcesInformation = 44,
2019-03-16 18:04:41 +00:00
/** MMC POW Resources Information */
2019-03-31 20:52:06 +01:00
ScsiMmcPowResourcesInformation = 45,
2019-03-16 18:04:41 +00:00
/** SCSI INQUIRY RESPONSE */
2019-03-31 20:52:06 +01:00
ScsiInquiry = 46,
2019-03-16 18:04:41 +00:00
/** SCSI MODE PAGE 2Ah */
2019-03-31 20:52:06 +01:00
ScsiModePage2A = 47,
2019-03-16 18:04:41 +00:00
/** ATA IDENTIFY response */
2019-03-31 20:52:06 +01:00
AtaIdentify = 48,
2019-03-16 18:04:41 +00:00
/** ATAPI IDENTIFY response */
2019-03-31 20:52:06 +01:00
AtapiIdentify = 49,
2019-03-16 18:04:41 +00:00
/** PCMCIA CIS */
2019-03-31 20:52:06 +01:00
PcmciaCis = 50,
2019-03-16 18:04:41 +00:00
/** SecureDigital CID */
2019-03-31 20:52:06 +01:00
SecureDigitalCid = 51,
2019-03-16 18:04:41 +00:00
/** SecureDigital CSD */
2019-03-31 20:52:06 +01:00
SecureDigitalCsd = 52,
2019-03-16 18:04:41 +00:00
/** SecureDigital SCR */
2019-03-31 20:52:06 +01:00
SecureDigitalScr = 53,
2019-03-16 18:04:41 +00:00
/** SecureDigital OCR */
2019-03-31 20:52:06 +01:00
SecureDigitalOcr = 54,
2019-03-16 18:04:41 +00:00
/** MultiMediaCard CID */
2019-03-31 20:52:06 +01:00
MultiMediaCardCid = 55,
2019-03-16 18:04:41 +00:00
/** MultiMediaCard CSD */
2019-03-31 20:52:06 +01:00
MultiMediaCardCsd = 56,
2019-03-16 18:04:41 +00:00
/** MultiMediaCard OCR */
2019-03-31 20:52:06 +01:00
MultiMediaCardOcr = 57,
2019-03-16 18:04:41 +00:00
/** MultiMediaCard Extended CSD */
2019-03-31 20:52:06 +01:00
MultiMediaCardExtendedCsd = 58,
2019-03-16 18:04:41 +00:00
/** Xbox Security Sector */
2019-03-31 20:52:06 +01:00
XboxSecuritySector = 59,
2019-03-16 18:04:41 +00:00
/** Floppy Lead-out */
2019-03-31 20:52:06 +01:00
FloppyLeadOut = 60,
2019-03-16 18:04:41 +00:00
/** Dvd Disc Control Block */
2019-03-31 20:52:06 +01:00
DvdDiscControlBlock = 61,
2019-03-16 18:04:41 +00:00
/** CompactDisc First track pregap */
2019-03-31 20:52:06 +01:00
CompactDiscFirstTrackPregap = 62,
2019-03-16 18:04:41 +00:00
/** CompactDisc Lead-out */
2019-03-31 20:52:06 +01:00
CompactDiscLeadOut = 63,
2019-03-16 18:04:41 +00:00
/** SCSI MODE SENSE (6) response */
2019-03-31 20:52:06 +01:00
ScsiModeSense6 = 64,
2019-03-16 18:04:41 +00:00
/** SCSI MODE SENSE (10) response */
2019-03-31 20:52:06 +01:00
ScsiModeSense10 = 65,
2019-03-16 18:04:41 +00:00
/** USB descriptors */
2019-03-31 20:52:06 +01:00
UsbDescriptors = 66,
2019-03-16 18:04:41 +00:00
/** Xbox DMI */
2019-03-31 20:52:06 +01:00
XboxDmi = 67,
2019-03-16 18:04:41 +00:00
/** Xbox Physical Format Information */
2019-03-31 20:52:06 +01:00
XboxPfi = 68,
2019-03-16 18:04:41 +00:00
/** CompactDisc sector prefix (sync, header */
2019-03-31 20:52:06 +01:00
CdSectorPrefix = 69,
2019-03-16 18:04:41 +00:00
/** CompactDisc sector suffix (edc, ecc p, ecc q) */
2019-03-31 20:52:06 +01:00
CdSectorSuffix = 70,
2019-03-16 18:04:41 +00:00
/** CompactDisc subchannel */
2019-03-31 20:52:06 +01:00
CdSectorSubchannel = 71,
2019-03-16 18:04:41 +00:00
/** Apple Profile (20 byte) tag */
2019-03-31 20:52:06 +01:00
AppleProfileTag = 72,
2019-03-16 18:04:41 +00:00
/** Apple Sony (12 byte) tag */
2019-03-31 20:52:06 +01:00
AppleSonyTag = 73,
2019-03-16 18:04:41 +00:00
/** Priam Data Tower (24 byte) tag */
2019-03-31 20:52:06 +01:00
PriamDataTowerTag = 74,
2019-03-16 18:04:41 +00:00
/** CompactDisc Media Catalogue Number (as in Lead-in), 13 bytes, ASCII */
2019-03-31 20:52:06 +01:00
CompactDiscMediaCatalogueNumber = 75,
2019-03-16 18:04:41 +00:00
/** CompactDisc sector prefix (sync, header), only incorrect stored */
2019-03-31 20:52:06 +01:00
CdSectorPrefixCorrected = 76,
2019-03-16 18:04:41 +00:00
/** CompactDisc sector suffix (edc, ecc p, ecc q), only incorrect stored */
2019-03-31 20:52:06 +01:00
CdSectorSuffixCorrected = 77,
2019-03-16 18:04:41 +00:00
/** CompactDisc MODE 2 subheader */
2019-03-31 20:52:06 +01:00
CompactDiscMode2Subheader = 78,
2019-03-16 18:04:41 +00:00
/** CompactDisc Lead-in */
2019-03-31 20:52:06 +01:00
CompactDiscLeadIn = 79
2019-03-16 18:04:41 +00:00
} DataType;
/** List of known blocks types */
typedef enum
{
/** Block containing data */
2019-03-31 20:52:06 +01:00
DataBlock = 0x4B4C4244,
2019-03-16 18:04:41 +00:00
/** Block containing a deduplication table */
2019-03-31 20:52:06 +01:00
DeDuplicationTable = 0X2A544444,
2019-03-16 18:04:41 +00:00
/** Block containing the index */
2019-03-31 20:52:06 +01:00
IndexBlock = 0X58444E49,
2019-03-16 18:04:41 +00:00
/** Block containing logical geometry */
2019-03-31 20:52:06 +01:00
GeometryBlock = 0x4D4F4547,
2019-03-16 18:04:41 +00:00
/** Block containing metadata */
2019-03-31 20:52:06 +01:00
MetadataBlock = 0x4154454D,
2019-03-16 18:04:41 +00:00
/** Block containing optical disc tracks */
2019-03-31 20:52:06 +01:00
TracksBlock = 0x534B5254,
2019-03-16 18:04:41 +00:00
/** Block containing CICM XML metadata */
2019-03-31 20:52:06 +01:00
CicmBlock = 0x4D434943,
2019-03-16 18:04:41 +00:00
/** Block containing contents checksums */
2019-03-31 20:52:06 +01:00
ChecksumBlock = 0x4D534B43,
2019-03-16 18:04:41 +00:00
/** TODO: Block containing data position measurements */
2019-03-31 20:52:06 +01:00
DataPositionMeasurementBlock = 0x2A4D5044,
2019-03-16 18:04:41 +00:00
/** TODO: Block containing a snapshot index */
2019-03-31 20:52:06 +01:00
SnapshotBlock = 0x50414E53,
2019-03-16 18:04:41 +00:00
/** TODO: Block containing how to locate the parent image */
2019-03-31 20:52:06 +01:00
ParentBlock = 0x50524E54,
2019-03-16 18:04:41 +00:00
/** Block containing an array of hardware used to create the image */
2019-03-31 20:52:06 +01:00
DumpHardwareBlock = 0x2A504D44,
2019-03-16 18:04:41 +00:00
/** TODO: Block containing list of files for a tape image */
2019-03-31 20:52:06 +01:00
TapeFileBlock = 0x454C4654
2019-03-16 18:04:41 +00:00
} BlockType;
typedef enum
{
2019-03-31 20:52:06 +01:00
Invalid = 0,
Md5 = 1,
Sha1 = 2,
Sha256 = 3,
SpamSum = 4
2019-03-16 18:04:41 +00:00
} ChecksumAlgorithm;
typedef enum
{
NotDumped = 0x10000000,
Correct = 0x20000000,
Mode2Form1Ok = 0x30000000,
Mode2Form2Ok = 0x40000000,
Mode2Form2NoCrc = 0x50000000
} CdFixFlags;
2019-03-16 19:15:07 +00:00
/** Track (as partitioning element) types. */
typedef enum
{
/** Audio track */
2019-03-31 20:52:06 +01:00
Audio = 0, /** Data track (not any of the below defined ones) */
Data = 1, /** Data track, compact disc mode 1 */
CdMode1 = 2, /** Data track, compact disc mode 2, formless */
CdMode2Formless = 3, /** Data track, compact disc mode 2, form 1 */
CdMode2Form1 = 4, /** Data track, compact disc mode 2, form 2 */
CdMode2Form2 = 5
2019-03-16 19:15:07 +00:00
} TrackType;
2019-03-22 21:22:36 +00:00
typedef enum
{
2020-03-01 19:53:05 +00:00
AARUF_STATUS_INVALID_CONTEXT = -1,
2020-03-01 19:55:22 +00:00
} AaruformatStatus;
2019-03-16 18:04:41 +00:00
2019-03-23 23:31:04 +00:00
/**
* Enumeration of media types defined in CICM metadata
*/
typedef enum
{
/**
* Purely optical discs
*/
2019-03-31 20:52:06 +01:00
OpticalDisc = 0, /**
* Media that is physically block-based or abstracted like that
2019-03-23 23:31:04 +00:00
2019-03-31 20:52:06 +01:00
*/
BlockMedia = 1, /**
* Media that can be accessed by-byte or by-bit, like chips
*/
LinearMedia = 2, /**
* Media that can only store data when it is modulated to audio
*/
AudioMedia = 3
2019-03-23 23:31:04 +00:00
} XmlMediaType;
2020-03-01 19:53:05 +00:00
#endif // LIBAARUFORMAT_ENUMS_H
2022-06-21 21:12:25 +01:00
#ifndef _MSC_VER
#pragma clang diagnostic pop
#endif