37 TRACE(
"Entering process_metadata_block(%p, %p)", ctx, entry);
39 size_t read_bytes = 0;
44 FATAL(
"Invalid context or image stream.");
45 TRACE(
"Exiting process_metadata_block()");
50 TRACE(
"Seeking to metadata block at position %" PRIu64, entry->
offset);
54 FATAL(
"Could not seek to %" PRIu64
" as indicated by index entry...", entry->
offset);
56 TRACE(
"Exiting process_metadata_block()");
61 TRACE(
"Reading metadata block header at position %" PRIu64, entry->
offset);
67 FATAL(
"Could not read metadata block header, continuing...");
69 TRACE(
"Exiting process_metadata_block()");
76 TRACE(
"Incorrect identifier for data block at position %" PRIu64
"", entry->
offset);
78 TRACE(
"Exiting process_metadata_block()");
89 FATAL(
"Could not allocate memory for metadata block, continuing...");
91 TRACE(
"Exiting process_metadata_block()");
103 FATAL(
"Could not read metadata block, continuing...");
235 TRACE(
"Exiting process_metadata_block()");
248 TRACE(
"Entering process_geometry_block(%p, %p)", ctx, entry);
249 size_t read_bytes = 0;
254 FATAL(
"Invalid context or image stream.");
256 TRACE(
"Exiting process_geometry_block()");
263 FATAL(
"Could not seek to %" PRIu64
" as indicated by index entry...", entry->
offset);
265 TRACE(
"Exiting process_geometry_block()");
269 TRACE(
"Reading geometry block header at position %" PRIu64, entry->
offset);
275 TRACE(
"Could not read geometry block header, continuing...");
282 TRACE(
"Incorrect identifier for geometry block at position %" PRIu64
"", entry->
offset);
295 TRACE(
"Exiting process_geometry_block()");
308 TRACE(
"Entering process_cicm_block(%p, %p)", ctx, entry);
310 size_t read_bytes = 0;
315 FATAL(
"Invalid context or image stream.");
317 TRACE(
"Exiting process_cicm_block()");
322 TRACE(
"Seeking to CICM XML metadata block at position %" PRIu64, entry->
offset);
326 FATAL(
"Could not seek to %" PRIu64
" as indicated by index entry...", entry->
offset);
328 TRACE(
"Exiting process_cicm_block()");
333 TRACE(
"Reading CICM XML metadata block header at position %" PRIu64, entry->
offset);
339 TRACE(
"Could not read CICM XML metadata header, continuing...");
346 TRACE(
"Incorrect identifier for data block at position %" PRIu64
"", entry->
offset);
356 TRACE(
"Could not allocate memory for CICM XML metadata block, continuing...");
358 TRACE(
"Exiting process_cicm_block()");
370 TRACE(
"Could not read CICM XML metadata block, continuing...");
373 TRACE(
"Found CICM XML metadata block %" PRIu64
".", entry->
offset);
375 TRACE(
"Exiting process_cicm_block()");
472 TRACE(
"Entering process_aaru_metadata_json_block(%p, %p)", ctx, entry);
474 size_t read_bytes = 0;
479 FATAL(
"Invalid context or image stream.");
481 TRACE(
"Exiting process_aaru_metadata_json_block()");
486 TRACE(
"Seeking to Aaru metadata JSON block at position %" PRIu64, entry->
offset);
490 FATAL(
"Could not seek to %" PRIu64
" as indicated by index entry...", entry->
offset);
492 TRACE(
"Exiting process_aaru_metadata_json_block()");
497 TRACE(
"Reading Aaru metadata JSON block header at position %" PRIu64, entry->
offset);
503 TRACE(
"Could not read Aaru metadata JSON header, continuing...");
510 TRACE(
"Incorrect identifier for data block at position %" PRIu64
"", entry->
offset);
520 TRACE(
"Could not allocate memory for Aaru metadata JSON block, continuing...");
522 TRACE(
"Exiting process_aaru_metadata_json_block()");
534 TRACE(
"Could not read Aaru metadata JSON block, continuing...");
537 TRACE(
"Found Aaru metadata JSON block %" PRIu64
".", entry->
offset);
539 TRACE(
"Exiting process_aaru_metadata_json_block()");
@ GeometryBlock
Block containing logical geometry.
@ AaruMetadataJsonBlock
Block containing JSON version of Aaru Metadata.
@ CicmBlock
Block containing CICM XML metadata.
uint64_t ImageSize
Size of the image payload in bytes (excludes headers/metadata)
Single index entry describing a block's type, (optional) data classification, and file offset.
uint32_t blockType
Block identifier of the referenced block (value from BlockType).
uint64_t offset
Absolute byte offset in the image where the referenced block header begins.
Master context representing an open or in‑creation Aaru image.
uint8_t * media_barcode
Barcode of the media represented by the image.
uint8_t * creator
Who (person) created the image?
uint8_t * cicm_block
CICM XML payload.
uint32_t cylinders
Cylinders of the media represented by the image.
uint8_t * drive_firmware_revision
Firmware revision of the drive used to read the media represented by the image.
uint8_t * media_serial_number
Serial number of the media represented by the image.
MetadataBlockHeader metadata_block_header
Metadata block header.
int32_t media_sequence
Number in sequence for the media represented by the image.
uint8_t * media_model
Model of the media represented by the image.
uint8_t * drive_serial_number
Serial number of the drive used to read the media represented by the image.
uint8_t * drive_manufacturer
Manufacturer of the drive used to read the media represented by the image.
CicmMetadataBlock cicm_block_header
CICM metadata header (if present).
uint8_t * drive_model
Model of the drive used to read the media represented by the image.
GeometryBlockHeader geometry_block
Logical geometry block (if present).
uint8_t * json_block
JSON metadata block payload (UTF-8).
uint8_t * media_part_number
Part number of the media represented by the image.
AaruMetadataJsonBlockHeader json_block_header
JSON metadata block header (if present).
uint32_t sectors_per_track
Sectors per track of the media represented by the image (for variable image, the smallest)
uint8_t * comments
Image comments.
uint32_t heads
Heads of the media represented by the image.
FILE * imageStream
Underlying FILE* stream (binary mode).
ImageInfo image_info
Exposed high-level image info summary.
uint8_t * metadata_block
Raw metadata UTF-16LE concatenated strings.
uint8_t * media_title
Title of the media represented by the image.
int32_t last_media_sequence
Last media of the sequence the media represented by the image corresponds to.
uint8_t * media_manufacturer
Manufacturer of the media represented by the image.