mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2026-02-03 21:23:35 +00:00
Add Floppy Write-Protect status to media tag and data type enums
This commit is contained in:
@@ -398,27 +398,27 @@ typedef enum
|
||||
// Advanced Intelligent Tape, types 320 to 339
|
||||
|
||||
// Iomega, types 340 to 359
|
||||
Bernoulli = 340,
|
||||
Bernoulli2 = 341,
|
||||
Ditto = 342,
|
||||
DittoMax = 343,
|
||||
Jaz = 344,
|
||||
Jaz2 = 345,
|
||||
PocketZip = 346,
|
||||
REV120 = 347,
|
||||
REV35 = 348,
|
||||
REV70 = 349,
|
||||
ZIP100 = 350,
|
||||
ZIP250 = 351,
|
||||
ZIP750 = 352,
|
||||
Bernoulli35 = 353,///< 5⅓" Bernoulli Box II disk with 35Mb capacity
|
||||
Bernoulli44 = 354,///< 5⅓" Bernoulli Box II disk with 44Mb capacity
|
||||
Bernoulli65 = 355,///< 5⅓" Bernoulli Box II disk with 65Mb capacity
|
||||
Bernoulli90 = 356,///< 5⅓" Bernoulli Box II disk with 90Mb capacity
|
||||
Bernoulli105 = 357,///< 5⅓" Bernoulli Box II disk with 105Mb capacity
|
||||
Bernoulli150 = 358,///< 5⅓" Bernoulli Box II disk with 150Mb capacity
|
||||
Bernoulli230 = 359,///< 5⅓" Bernoulli Box II disk with 230Mb capacity
|
||||
// Iomega, types 340 to 359
|
||||
Bernoulli = 340,
|
||||
Bernoulli2 = 341,
|
||||
Ditto = 342,
|
||||
DittoMax = 343,
|
||||
Jaz = 344,
|
||||
Jaz2 = 345,
|
||||
PocketZip = 346,
|
||||
REV120 = 347,
|
||||
REV35 = 348,
|
||||
REV70 = 349,
|
||||
ZIP100 = 350,
|
||||
ZIP250 = 351,
|
||||
ZIP750 = 352,
|
||||
Bernoulli35 = 353, ///< 5⅓" Bernoulli Box II disk with 35Mb capacity
|
||||
Bernoulli44 = 354, ///< 5⅓" Bernoulli Box II disk with 44Mb capacity
|
||||
Bernoulli65 = 355, ///< 5⅓" Bernoulli Box II disk with 65Mb capacity
|
||||
Bernoulli90 = 356, ///< 5⅓" Bernoulli Box II disk with 90Mb capacity
|
||||
Bernoulli105 = 357, ///< 5⅓" Bernoulli Box II disk with 105Mb capacity
|
||||
Bernoulli150 = 358, ///< 5⅓" Bernoulli Box II disk with 150Mb capacity
|
||||
Bernoulli230 = 359, ///< 5⅓" Bernoulli Box II disk with 230Mb capacity
|
||||
// Iomega, types 340 to 359
|
||||
|
||||
// Audio or video media, types 360 to 369
|
||||
CompactCassette = 360,
|
||||
@@ -1071,7 +1071,8 @@ typedef enum
|
||||
MiniDiscDTOC = 72, ///< Not entirely clear kind of TOC that only appears on MD-DATA discs
|
||||
DVD_DiscKey_Decrypted = 73, ///< Decrypted DVD disc key,
|
||||
DVD_PFI_2ndLayer = 74, ///< DVD Physical Format Information for the second layer
|
||||
MaxMediaTag = DVD_PFI_2ndLayer
|
||||
Floppy_WriteProtect = 75, ///< Write protection status of the floppy disk
|
||||
MaxMediaTag = Floppy_WriteProtect
|
||||
} MediaTagType;
|
||||
|
||||
/** @} */ /* end of MediaTags group */
|
||||
|
||||
@@ -132,7 +132,8 @@ typedef enum
|
||||
DvdEccBlockPo = 87, ///< DVD Error Correction Code (ECC) Parity of Outer Code (PO)
|
||||
DvdPfi2ndLayer = 88, ///< DVD Physical Format Information for the second layer
|
||||
FluxData = 89, ///< Flux data.
|
||||
BitstreamData = 90 ///< Bitstream data.
|
||||
BitstreamData = 90, ///< Bitstream data.
|
||||
FloppyWriteProtectStatus = 91 ///< Floppy write-protect status.
|
||||
} DataType;
|
||||
|
||||
/**
|
||||
@@ -162,7 +163,8 @@ typedef enum
|
||||
TapePartitionBlock = 0x54425054, ///< Block containing list of partitions for a tape image.
|
||||
AaruMetadataJsonBlock = 0x444D534A, ///< Block containing JSON version of Aaru Metadata
|
||||
FluxDataBlock = 0x58554C46, ///< Block containing flux data metadata.
|
||||
DataStreamPayloadBlock = 0x4C505344 ///< Block containing compressed data stream payload (e.g., flux data, bitstreams).
|
||||
DataStreamPayloadBlock =
|
||||
0x4C505344 ///< Block containing compressed data stream payload (e.g., flux data, bitstreams).
|
||||
} BlockType;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <windows.h>
|
||||
#include <wincrypt.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <aaru.h>
|
||||
@@ -182,6 +182,8 @@ AARU_LOCAL int32_t AARU_CALL aaruf_get_media_tag_type_for_datatype(const int32_t
|
||||
return CD_LeadIn;
|
||||
case DvdDiscKeyDecrypted:
|
||||
return DVD_DiscKey_Decrypted;
|
||||
case FloppyWriteProtectStatus:
|
||||
return Floppy_WriteProtect;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
@@ -342,6 +344,8 @@ AARU_LOCAL int32_t AARU_CALL aaruf_get_datatype_for_media_tag_type(const int32_t
|
||||
return CompactDiscLeadIn;
|
||||
case DVD_DiscKey_Decrypted:
|
||||
return DvdDiscKeyDecrypted;
|
||||
case Floppy_WriteProtect:
|
||||
return FloppyWriteProtectStatus;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -204,6 +204,8 @@ const char *media_tag_type_to_string(int32_t type)
|
||||
return "DVD Disc Key (decrypted)";
|
||||
case DVD_PFI_2ndLayer:
|
||||
return "DVD Physical Format Information (2nd layer)";
|
||||
case Floppy_WriteProtect:
|
||||
return "Floppy Write-Protect Status";
|
||||
default:
|
||||
return "Unknown Media Tag";
|
||||
}
|
||||
@@ -387,6 +389,8 @@ const char *data_type_to_string(uint16_t type)
|
||||
return "DVD ECC Block Parity Outer";
|
||||
case DvdPfi2ndLayer:
|
||||
return "DVD Physical Format Info (2nd layer)";
|
||||
case FloppyWriteProtectStatus:
|
||||
return "Floppy Write-Protect Status";
|
||||
default:
|
||||
return "Unknown Data Type";
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ static const MediaTagTypeMapping media_tag_mappings[] = {
|
||||
{"MiniDiscDTOC", MiniDiscDTOC},
|
||||
{"DVD_DiscKey_Decrypted", DVD_DiscKey_Decrypted},
|
||||
{"DVD_PFI_2ndLayer", DVD_PFI_2ndLayer},
|
||||
{"Floppy_WriteProtect", Floppy_WriteProtect},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -278,6 +279,8 @@ static int32_t get_datatype_for_media_tag_type(MediaTagType tag_type)
|
||||
return CompactDiscLeadIn;
|
||||
case DVD_DiscKey_Decrypted:
|
||||
return DvdDiscKeyDecrypted;
|
||||
case Floppy_WriteProtect:
|
||||
return FloppyWriteProtectStatus;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user