libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
metadata.h
Go to the documentation of this file.
1/*
2 * This file is part of the Aaru Data Preservation Suite.
3 * Copyright (c) 2019-2025 Natalia Portillo.
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef LIBAARUFORMAT_METADATA_H
20#define LIBAARUFORMAT_METADATA_H
21
22#pragma pack(push, 1)
23
60
68 typedef struct MetadataBlockHeader
69{
70 uint32_t identifier;
71 uint32_t blockSize;
72 int32_t mediaSequence;
74 int32_t lastMediaSequence;
75 uint32_t creatorOffset;
76 uint32_t creatorLength;
77 uint32_t commentsOffset;
78 uint32_t commentsLength;
79 uint32_t mediaTitleOffset;
80 uint32_t mediaTitleLength;
81 uint32_t mediaManufacturerOffset;
82 uint32_t mediaManufacturerLength;
83 uint32_t mediaModelOffset;
84 uint32_t mediaModelLength;
85 uint32_t mediaSerialNumberOffset;
86 uint32_t mediaSerialNumberLength;
87 uint32_t mediaBarcodeOffset;
88 uint32_t mediaBarcodeLength;
89 uint32_t mediaPartNumberOffset;
90 uint32_t mediaPartNumberLength;
91 uint32_t driveManufacturerOffset;
92 uint32_t driveManufacturerLength;
93 uint32_t driveModelOffset;
94 uint32_t driveModelLength;
95 uint32_t driveSerialNumberOffset;
96 uint32_t driveSerialNumberLength;
97 uint32_t driveFirmwareRevisionOffset;
98 uint32_t driveFirmwareRevisionLength;
99} MetadataBlockHeader;
100
107 typedef struct CicmMetadataBlock
108{
109 uint32_t identifier;
110 uint32_t length;
111} CicmMetadataBlock;
112
119 typedef struct AaruMetadataJsonBlockHeader
120{
121 uint32_t identifier;
122 uint32_t length;
123} AaruMetadataJsonBlockHeader;
124
125#pragma pack(pop)
126
127#endif // LIBAARUFORMAT_METADATA_H
AaruMetadataJsonBlockHeader
Header for an Aaru metadata JSON block (identifier == BlockType::AaruMetadataJsonBlock).
Definition metadata.h:120
AaruMetadataJsonBlockHeader::identifier
uint32_t identifier
Block identifier, must be BlockType::AaruMetadataJsonBlock.
Definition metadata.h:121
AaruMetadataJsonBlockHeader::length
uint32_t length
Length in bytes of the Aaru metadata JSON payload that follows.
Definition metadata.h:122
CicmMetadataBlock
Header for a CICM XML metadata block (identifier == BlockType::CicmBlock).
Definition metadata.h:108
CicmMetadataBlock::length
uint32_t length
Length in bytes of the CICM metadata payload that follows.
Definition metadata.h:110
CicmMetadataBlock::identifier
uint32_t identifier
Block identifier, must be BlockType::CicmBlock.
Definition metadata.h:109
MetadataBlockHeader
Header for a metadata block containing offsets and lengths to UTF-16LE descriptive strings.
Definition metadata.h:69
MetadataBlockHeader::commentsLength
uint32_t commentsLength
Length in bytes (including null) of comments string.
Definition metadata.h:78
MetadataBlockHeader::mediaSequence
int32_t mediaSequence
Sequence number within a multi-disc / multi-volume set (0-based or 1-based as producer defines).
Definition metadata.h:72
MetadataBlockHeader::identifier
uint32_t identifier
Block identifier, must be BlockType::MetadataBlock.
Definition metadata.h:70
MetadataBlockHeader::mediaTitleOffset
uint32_t mediaTitleOffset
Offset to UTF-16LE media title string.
Definition metadata.h:79
MetadataBlockHeader::driveModelLength
uint32_t driveModelLength
Length in bytes (including null) of drive model string.
Definition metadata.h:94
MetadataBlockHeader::driveManufacturerLength
uint32_t driveManufacturerLength
Length in bytes (including null) of drive manufacturer string.
Definition metadata.h:92
MetadataBlockHeader::blockSize
uint32_t blockSize
Total size in bytes of the entire metadata block (header + strings).
Definition metadata.h:71
MetadataBlockHeader::driveModelOffset
uint32_t driveModelOffset
Offset to UTF-16LE drive model string.
Definition metadata.h:93
MetadataBlockHeader::mediaModelOffset
uint32_t mediaModelOffset
Offset to UTF-16LE media model string.
Definition metadata.h:83
MetadataBlockHeader::creatorOffset
uint32_t creatorOffset
Offset to UTF-16LE creator string (or undefined if creatorLength==0).
Definition metadata.h:75
MetadataBlockHeader::mediaTitleLength
uint32_t mediaTitleLength
Length in bytes (including null) of media title string.
Definition metadata.h:80
MetadataBlockHeader::mediaManufacturerOffset
uint32_t mediaManufacturerOffset
Offset to UTF-16LE media manufacturer string.
Definition metadata.h:81
MetadataBlockHeader::driveSerialNumberLength
uint32_t driveSerialNumberLength
Length in bytes (including null) of drive serial number string.
Definition metadata.h:96
MetadataBlockHeader::driveSerialNumberOffset
uint32_t driveSerialNumberOffset
Offset to UTF-16LE drive serial number string.
Definition metadata.h:95
MetadataBlockHeader::mediaManufacturerLength
uint32_t mediaManufacturerLength
Length in bytes (including null) of media manufacturer string.
Definition metadata.h:82
MetadataBlockHeader::mediaModelLength
uint32_t mediaModelLength
Length in bytes (including null) of media model string.
Definition metadata.h:84
MetadataBlockHeader::driveFirmwareRevisionOffset
uint32_t driveFirmwareRevisionOffset
Offset to UTF-16LE drive firmware revision string.
Definition metadata.h:97
MetadataBlockHeader::lastMediaSequence
int32_t lastMediaSequence
Total number of media in the set; 0 or 1 if single item.
Definition metadata.h:74
MetadataBlockHeader::commentsOffset
uint32_t commentsOffset
Offset to UTF-16LE comments string.
Definition metadata.h:77
MetadataBlockHeader::driveManufacturerOffset
uint32_t driveManufacturerOffset
Offset to UTF-16LE drive manufacturer string.
Definition metadata.h:91
MetadataBlockHeader::mediaSerialNumberOffset
uint32_t mediaSerialNumberOffset
Offset to UTF-16LE media serial number string.
Definition metadata.h:85
MetadataBlockHeader::mediaSerialNumberLength
uint32_t mediaSerialNumberLength
Length in bytes (including null) of media serial number string.
Definition metadata.h:86
MetadataBlockHeader::mediaPartNumberOffset
uint32_t mediaPartNumberOffset
Offset to UTF-16LE media part number string.
Definition metadata.h:89
MetadataBlockHeader::mediaPartNumberLength
uint32_t mediaPartNumberLength
Length in bytes (including null) of media part number string.
Definition metadata.h:90
MetadataBlockHeader::mediaBarcodeLength
uint32_t mediaBarcodeLength
Length in bytes (including null) of media barcode string.
Definition metadata.h:88
MetadataBlockHeader::creatorLength
uint32_t creatorLength
Length in bytes (including null) of creator string (0 if absent).
Definition metadata.h:76
MetadataBlockHeader::driveFirmwareRevisionLength
uint32_t driveFirmwareRevisionLength
Length in bytes (including null) of drive firmware revision string.
Definition metadata.h:98
MetadataBlockHeader::mediaBarcodeOffset
uint32_t mediaBarcodeOffset
Offset to UTF-16LE media barcode string.
Definition metadata.h:87