<trclass="memdesc:abbcf276c3518b3e666885ab250fd374e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the logical CHS geometry from the AaruFormat image. <br/></td></tr>
<trclass="memdesc:a42f191c2ea4c70c9d7b373c19b59c812"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the embedded CICM XML metadata sidecar from the image. <br/></td></tr>
<trclass="memdesc:a01cf0abe0b137236d4be0b91a29d4818"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the embedded Aaru metadata JSON from the image. <br/></td></tr>
<trclass="memdesc:aa683ff7387ba3f505b1756da1b408f7e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the media sequence metadata for multi-volume image sets. <br/></td></tr>
<trclass="memdesc:a38d72be7e7854d6cb0bba89172e27b03"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the recorded creator (operator) name from the MetadataBlock. <br/></td></tr>
<trclass="memdesc:a9628bcfd2642649a6bcbf1f46d6b6705"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the user comments or notes stored in the MetadataBlock. <br/></td></tr>
<trclass="memdesc:af1ca27c052c6cde38a8d6d71e10936db"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the media title or label captured during image creation. <br/></td></tr>
<trclass="memdesc:a515c264f726f8b0a5104778b383ad1d4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the recorded media manufacturer name. <br/></td></tr>
<trclass="memdesc:a509892f76c9a03a030693740d043adfc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the media model or product designation metadata. <br/></td></tr>
<trclass="memdesc:a4cb7b7200e36efb4983cf2c5c5543313"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the media serial number recorded in the image metadata. <br/></td></tr>
<trclass="memdesc:a580c8bf133cf3481deca14779b8b5419"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the barcode assigned to the physical media or its packaging. <br/></td></tr>
<trclass="memdesc:a4cdfb46f5630fcf1fe6447b37ad18ae2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the media part number recorded in the MetadataBlock. <br/></td></tr>
<trclass="memdesc:a5d487a858c48838bcc9f3bba4b5944a1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the drive manufacturer metadata captured during imaging. <br/></td></tr>
<trclass="memdesc:a54d724659818ea4486f9981672f6d01e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the device model information for the imaging drive. <br/></td></tr>
<trclass="memdesc:a1892cc8395305d7e85d04544ded62131"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the imaging drive's serial number metadata. <br/></td></tr>
<trclass="memdesc:a3db92f6bebf60195d6ab327e17988cee"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the firmware revision metadata for the imaging drive. <br/></td></tr>
<trclass="memdesc:a7e63f10ff3ea353c8c3944cd836a85ee"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the total number of user-accessible sectors in the AaruFormat image. <br/></td></tr>
<trclass="memdesc:a381655339050570d969d2ddb60c9407b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the number of negative (pre-gap) sectors in the AaruFormat image. <br/></td></tr>
<trclass="memdesc:a108f816aba81cbb0f1401c2a9588660a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the number of overflow (post-gap) sectors in the AaruFormat image. <br/></td></tr>
<trclass="memdesc:a65c73217edb9661accbbe3de4f555b62"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves a deep copy of the <aclass="el"href="structImageInfo.html"title="High-level summary of an opened Aaru image containing metadata and media characteristics.">ImageInfo</a> structure from the AaruFormat image. <br/></td></tr>
<divclass="textblock"><p>Read-only metadata accessors for libaaruformat. </p>
<p>Contains all aaruf_get_* functions that retrieve metadata from an opened AaruFormat image context. Writer-side functions (aaruf_set_*, aaruf_clear_*) are in <aclass="el"href="metadata__write_8c.html"title="Write-path metadata mutators for libaaruformat.">metadata_write.c</a>.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="metadata__write_8c.html"title="Write-path metadata mutators for libaaruformat.">metadata_write.c</a></dd></dl>
<pclass="definition">Definition in file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the embedded Aaru metadata JSON from the image. </p>
<p>Aaru metadata JSON is a structured metadata format that provides machine-readable, comprehensive information about the image, media, imaging session details, hardware configuration, optical disc tracks and sessions, checksums, and preservation metadata. This function extracts the raw JSON payload that was embedded in the AaruFormat image during creation. The JSON data is preserved in its original form without parsing or interpretation by the library, allowing callers to process the structured metadata using standard JSON parsing libraries.</p>
<p>This function supports a two-call pattern for buffer size determination:</p><oltype="1">
<li>First call with a buffer that may be too small returns AARUF_ERROR_BUFFER_TOO_SMALL and sets *length to the required size</li>
<li>Second call with a properly sized buffer retrieves the actual data</li>
</ol>
<p>Alternatively, if the caller already knows the buffer is large enough, a single call will succeed and populate the buffer with the Aaru JSON data.</p>
<tr><tdclass="paramname">context</td><td>Pointer to the aaruformat context (must be a valid, opened image context). </td></tr>
<tr><tdclass="paramname">buffer</td><td>Pointer to a buffer that will receive the Aaru metadata JSON. Must be large enough to hold the entire JSON payload (at least *length bytes on input). The buffer will contain raw UTF-8 encoded JSON data on success. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to a size_t that serves dual purpose:<ul>
<li>On input: size of the provided buffer in bytes</li>
<li>On output: actual size of the Aaru metadata JSON in bytes If the function returns AARUF_ERROR_BUFFER_TOO_SMALL, this will be updated to contain the required buffer size for a subsequent successful call.</li>
<li>The context was not properly initialized by <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<dlclass="section warning"><dt>Warning</dt><dd>This function reads from the in-memory Aaru JSON block loaded during <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a>. It does not perform file I/O operations. The entire JSON is kept in memory for the lifetime of the context.</dd>
<dd>
The buffer parameter must be valid and large enough to hold the JSON data. Passing a buffer smaller than the required size will result in AARUF_ERROR_BUFFER_TOO_SMALL with no partial data copied.</dd>
<dd>
This function does not validate JSON syntax or schema. Corrupted JSON data will be retrieved successfully and errors will only be detected when attempting to parse.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="structAaruMetadataJsonBlockHeader.html"title="Header for an Aaru metadata JSON block (identifier == BlockType::AaruMetadataJsonBlock).">AaruMetadataJsonBlockHeader</a> for the on-disk structure definition. </dd>
<dd>
<aclass="el"href="#a42f191c2ea4c70c9d7b373c19b59c812"title="Retrieves the embedded CICM XML metadata sidecar from the image.">aaruf_get_cicm_metadata()</a> for retrieving CICM XML metadata. </dd>
<aclass="el"href="internal_8h.html#a84003ec881425a7b28ec24cb48d19f02"title="Processes an Aaru metadata JSON block from the image stream during image opening.">process_aaru_metadata_json_block()</a> for the loading process during image opening. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00399">399</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the embedded CICM XML metadata sidecar from the image. </p>
<p>CICM (Canary Islands Computer Museum) XML is a standardized metadata format used for documenting preservation and archival information about media and disk images. This function extracts the raw CICM XML payload that was embedded in the AaruFormat image during creation. The XML data is preserved in its original form without parsing, interpretation, or validation by the library. The metadata typically includes detailed information about the physical media, imaging process, checksums, device information, and preservation metadata following the CICM schema.</p>
<p>This function supports a two-call pattern for buffer size determination:</p><oltype="1">
<li>First call with a buffer that may be too small returns AARUF_ERROR_BUFFER_TOO_SMALL and sets *length to the required size</li>
<li>Second call with a properly sized buffer retrieves the actual data</li>
</ol>
<p>Alternatively, if the caller already knows the buffer is large enough, a single call will succeed and populate the buffer with the CICM XML data.</p>
<tr><tdclass="paramname">context</td><td>Pointer to the aaruformat context (must be a valid, opened image context). </td></tr>
<tr><tdclass="paramname">buffer</td><td>Pointer to a buffer that will receive the CICM XML metadata. Must be large enough to hold the entire XML payload (at least *length bytes on input). The buffer will contain raw UTF-8 encoded XML data on success. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to a size_t that serves dual purpose:<ul>
<li>On input: size of the provided buffer in bytes</li>
<li>On output: actual size of the CICM XML metadata in bytes If the function returns AARUF_ERROR_BUFFER_TOO_SMALL, this will be updated to contain the required buffer size for a subsequent successful call.</li>
<li>The context was not properly initialized by <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<dlclass="section warning"><dt>Warning</dt><dd>The XML data may contain sensitive information about the imaging environment, personnel, locations, or media content. Handle appropriately for your use case.</dd>
This function reads from the in-memory CICM block loaded during <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a>. It does not perform file I/O operations. The entire CICM XML is kept in memory for the lifetime of the context.</dd>
The buffer parameter must be valid and large enough to hold the XML data. Passing a buffer smaller than the required size will result in AARUF_ERROR_BUFFER_TOO_SMALL with no partial data copied.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="structCicmMetadataBlock.html"title="Header for a CICM XML metadata block (identifier == BlockType::CicmBlock).">CicmMetadataBlock</a> for the on-disk structure definition. </dd>
<dd>
aaruf_set_cicm_metadata() for embedding CICM XML during image creation. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00244">244</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the user comments or notes stored in the MetadataBlock. </p>
<p>Provides access to the UTF-16LE encoded comments associated with the image. Comments are often used for provenance notes, imaging details, or curator remarks. The function follows the same two-call buffer sizing pattern used by other metadata retrieval APIs: the caller may probe the required size before allocating memory.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context opened with <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a>. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Destination buffer that receives the comments data. May be NULL when probing size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t. On input it contains the size of <codeclass="param">buffer</code> in bytes; on output it is updated with the actual comments length.</td></tr>
<tr><tdclass="paramname">AARUF_STATUS_OK</td><td>(0) Comments were available and copied successfully. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context pointer is invalid or not a libaaruformat context. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_METADATA_NOT_PRESENT</td><td>(-30) No comments metadata exists in the image. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_BUFFER_TOO_SMALL</td><td>(-10) The supplied buffer was too small. *length is updated with the required size and no data is copied.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Comments are stored exactly as provided during image creation and may include multi-line text or other control characters. No validation or normalization is applied by the library. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00616">616</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the recorded creator (operator) name from the MetadataBlock. </p>
<p>Copies the UTF-16LE encoded creator string that identifies the person or operator who created the image. The function supports the common two-call pattern: the caller first determines the required buffer size by passing a buffer that may be NULL or too small, then allocates sufficient memory and calls again to obtain the actual data. On success the buffer contains an opaque UTF-16LE string of length *length bytes (not null-terminated).</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context opened for reading or writing. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Pointer to the destination buffer that will receive the creator string. May be NULL to query the required size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t that on input specifies the size of <codeclass="param">buffer</code> in bytes and on output receives the actual length of the creator metadata.</td></tr>
<tr><tdclass="paramname">AARUF_STATUS_OK</td><td>(0) The creator string was copied successfully. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context is NULL or not an aaruformat context. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_METADATA_NOT_PRESENT</td><td>(-30) Creator metadata has not been recorded in the image. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_BUFFER_TOO_SMALL</td><td>(-10) The provided buffer was insufficient; *length contains the required size and no data was copied.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>The returned data is UTF-16LE encoded and may contain embedded null characters. Callers should treat it as an opaque byte array unless they explicitly handle UTF-16LE strings.</dd>
The function does not allocate memory. Callers are responsible for ensuring <codeclass="param">buffer</code> is large enough before requesting the data. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00544">544</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the firmware revision metadata for the imaging drive. </p>
<p>Returns the UTF-16LE encoded firmware revision string that was captured when the image was created. Firmware information is critical for reproducing imaging environments and diagnosing drive-specific behavior or bugs.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Destination buffer for the firmware revision string. May be NULL when probing size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t that specifies the buffer capacity in bytes on input and is updated with the actual metadata length on output.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Firmware revision formats vary between manufacturers (e.g., numeric, alphanumeric, dot-separated). The library stores the data verbatim without attempting normalization. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01318">1318</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the drive manufacturer metadata captured during imaging. </p>
<p>Copies the UTF-16LE encoded manufacturer name of the device used to read or write the medium. This information documents the hardware involved in the imaging process, which is crucial for forensic reporting and reproducibility studies.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Destination buffer for the manufacturer string. May be NULL when querying required length. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t specifying the buffer size on input and receiving the actual metadata length on output.</td></tr>
<tr><tdclass="paramname">AARUF_STATUS_OK</td><td>(0) Drive manufacturer metadata was copied successfully. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context pointer is invalid. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_METADATA_NOT_PRESENT</td><td>(-30) The image lacks drive manufacturer metadata. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_BUFFER_TOO_SMALL</td><td>(-10) The provided buffer is too small; *length holds the required size for a subsequent call.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>The returned manufacturer string corresponds to the value recorded by <aclass="el"href="decls_8h.html#a3acb21067897f9cfc40e6288050a60c1"title="Sets the drive manufacturer information for the image.">aaruf_set_drive_manufacturer()</a> and may include branding or OEM designations. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01108">1108</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the device model information for the imaging drive. </p>
<p>Returns the UTF-16LE encoded model identifier for the drive used during acquisition. The model metadata provides finer granularity than the manufacturer name, enabling detailed documentation of imaging hardware capabilities and behavior.</p>
<dlclass="section note"><dt>Note</dt><dd>Model strings can include firmware suffixes, interface hints, or OEM variations. Consume the data verbatim to maintain accurate provenance records. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01178">1178</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the imaging drive's serial number metadata. </p>
<p>Copies the UTF-16LE encoded serial number reported for the drive used during the imaging session. This metadata enables correlation between images and specific hardware units for forensic chain of custody or quality assurance workflows.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Destination buffer for the serial number; may be NULL when querying size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t carrying the buffer size on input and receiving the actual serial number length on output.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Serial numbers are stored exactly as returned by the imaging hardware and may include leading zeros or spacing that should be preserved. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01248">1248</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the logical CHS geometry from the AaruFormat image. </p>
<p>Reads the Cylinder-Head-Sector (CHS) geometry information from the image's geometry block and returns the values through output parameters. The geometry block contains legacy-style logical addressing parameters that describe how the storage medium was originally organized in terms of cylinders, heads (tracks per cylinder), and sectors per track. This information is essential for software that requires CHS addressing or for accurately representing the original medium's logical structure.</p>
<li>The context magic number doesn't match AARU_MAGIC (invalid context type)</li>
<li>The context was not properly initialized by <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>All output parameters must be non-NULL valid pointers</li>
<li>The function does not validate the geometry values themselves</li>
<li>Geometry values of zero or unusually large values may indicate issues</li>
</ul>
</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>The output parameters are only modified on success (AARUF_STATUS_OK). On error, their values remain unchanged. Initialize them before calling if default values are needed on failure.</dd>
This function reads from the in-memory geometry block loaded during <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a>. It does not perform file I/O operations.</dd>
Geometry values may not accurately represent physical device geometry, especially for modern drives with zone-based recording or flash storage. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00104">104</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves a deep copy of the <aclass="el"href="structImageInfo.html"title="High-level summary of an opened Aaru image containing metadata and media characteristics.">ImageInfo</a> structure from the AaruFormat image. </p>
<p>Returns a complete copy of the high-level image information summary containing metadata such as image size, sector count, sector size, version information, creation timestamps, and media type. This function performs a deep copy of all fields including string buffers, ensuring the caller receives a complete, independent copy of the image information.</p>
<tr><tdclass="paramname">context</td><td>Pointer to the aaruformat context (must be a valid, opened image context). </td></tr>
<tr><tdclass="paramname">image_info</td><td>Pointer to an <aclass="el"href="structImageInfo.html"title="High-level summary of an opened Aaru image containing metadata and media characteristics.">ImageInfo</a> structure to receive the copied data. Must be a valid pointer to allocated memory.</td></tr>
<tr><tdclass="paramname">AARUF_STATUS_OK</td><td>(0) Successfully copied image info. The image_info parameter contains a complete copy of all fields including:<ul>
<li>LastModificationTime: Last modification timestamp (Windows FILETIME)</li>
<li><aclass="el"href="group__MediaTypes.html#ga1499e9f8a76cb81b43b7a4b0dbe7e44a"title="Enumerates every recognized media / cartridge / optical / tape / card / disk format.">MediaType</a>: Media type identifier</li>
<li>MetadataMediaType: Media type for sidecar generation</li>
<dlclass="section note"><dt>Note</dt><dd>The <aclass="el"href="structImageInfo.html"title="High-level summary of an opened Aaru image containing metadata and media characteristics.">ImageInfo</a> structure contains fixed-size character arrays that are properly NUL-terminated, making it safe to use as C strings.</dd>
The caller is responsible for allocating the <aclass="el"href="structImageInfo.html"title="High-level summary of an opened Aaru image containing metadata and media characteristics.">ImageInfo</a> structure before calling this function. The structure is not dynamically allocated by this function.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>The image_info parameter must point to valid, allocated memory of at least sizeof(ImageInfo) bytes. Passing NULL or invalid pointers will result in undefined behavior.</dd>
This function reads from the in-memory image_info loaded during <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or populated during <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a>. It does not perform file I/O operations. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01774">1774</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the barcode assigned to the physical media or its packaging. </p>
<p>Returns the UTF-16LE encoded barcode string that was captured when the image was created. Barcodes are commonly used in institutional workflows for inventory tracking and automated retrieval.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Buffer that receives the barcode string; may be NULL when probing size requirements. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t specifying the buffer size on input and receiving the actual barcode length on output.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Barcode values can be strict alphanumeric codes (e.g., LTO cartridge IDs) or full strings from custom labeling systems. Preserve the returned string exactly for catalog interoperability. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00965">965</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the recorded media manufacturer name. </p>
<p>Provides access to the UTF-16LE encoded manufacturer metadata that identifies the company which produced the physical medium. This information is taken from the MetadataBlock and mirrors the value previously stored via <aclass="el"href="decls_8h.html#a3d46262ff1f9d51d57d1e95648f4083b"title="Sets the media manufacturer information for the image.">aaruf_set_media_manufacturer()</a>.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Buffer that receives the manufacturer string. May be NULL when probing size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t specifying the buffer size on input and receiving the actual manufacturer string length on output.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Values may include trailing spaces or vendor-specific capitalization. Treat the returned data as authoritative and avoid trimming unless required by the consuming application. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00756">756</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the media model or product designation metadata. </p>
<p>Returns the UTF-16LE encoded model name that specifies the exact product variant of the physical medium. The function mirrors the set counterpart and is useful for accurately documenting media specifications during preservation workflows.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Destination buffer for the model string; may be NULL when querying required size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t that on input contains the buffer capacity in bytes and on output is updated with the actual metadata length.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Model strings often contain performance ratings (e.g., "16x", "LTO-7"). The data is opaque and should be handled without modification unless necessary. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00826">826</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the media part number recorded in the MetadataBlock. </p>
<p>Provides access to the UTF-16LE encoded part number identifying the precise catalog or ordering code for the physical medium. Part numbers help archivists procure exact replacements and document specific media variants used during acquisition.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Destination buffer for the part number string. May be NULL while querying size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t that supplies the buffer size on input and is updated with the actual part number length on output.</td></tr>
<tr><tdclass="paramname">AARUF_STATUS_OK</td><td>(0) Part number metadata was returned successfully. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context pointer is invalid. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_METADATA_NOT_PRESENT</td><td>(-30) No part number metadata exists. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_BUFFER_TOO_SMALL</td><td>(-10) The provided buffer was insufficient; *length contains the required size.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Part numbers may include manufacturer-specific formatting such as hyphens or suffix letters. The library stores and returns the data verbatim. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01036">1036</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the media sequence metadata for multi-volume image sets. </p>
<p>Reads the media sequence fields stored in the MetadataBlock header and returns the current media number together with the final media number for the complete set. This information indicates the position of the imaged medium within a multi-volume collection (for example, "disc 2 of 5"). The function operates entirely on in-memory structures populated during <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a>; no additional disk I/O is performed.</p>
<tr><tdclass="paramname">AARUF_STATUS_OK</td><td>(0) Metadata was present and the output parameters were populated. </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The provided context pointer is NULL or not an aaruformat context (magic mismatch). </td></tr>
<tr><tdclass="paramname">AARUF_ERROR_METADATA_NOT_PRESENT</td><td>(-30) The MetadataBlock was not present in the image, making sequence data unavailable.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>For standalone media, both sequence and last_sequence are commonly set to 1. Some creators may also set them to 0 to indicate the absence of sequence semantics; callers should handle either pattern gracefully.</dd>
<dd>
The function does not validate logical consistency (e.g., whether sequence <= last_sequence); it simply returns the values stored in the image header. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00477">477</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the media serial number recorded in the image metadata. </p>
<p>Copies the UTF-16LE encoded serial number identifying the specific physical medium. Serial numbers are particularly important for forensic tracking and archival provenance, enabling correlation between the physical item and its digital representation.</p>
<tr><tdclass="paramname">context</td><td>Pointer to a valid aaruformat context. </td></tr>
<tr><tdclass="paramname">buffer</td><td>Destination buffer for the serial number. May be NULL to determine required size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t that on input holds the buffer size and on output receives the actual serial number length.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Serial numbers may contain spaces, hyphens, or alphanumeric characters. The library does not normalize or validate these strings. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00896">896</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the media title or label captured during image creation. </p>
<p>Returns the UTF-16LE encoded media title string, representing markings or labels present on the original physical media. This function allows applications to present or archive the media title alongside the image, preserving contextual information from the physical artifact.</p>
<tr><tdclass="paramname">buffer</td><td>Destination buffer for the UTF-16LE title string. May be NULL when querying size. </td></tr>
<tr><tdclass="paramname">length</td><td>Pointer to an int32_t that on input holds the buffer capacity in bytes and on output receives the actual title length.</td></tr>
<dlclass="section note"><dt>Note</dt><dd>Titles may contain international characters, control codes, or mixed casing. The library does not attempt to sanitize or interpret the string. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l00686">686</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the number of negative (pre-gap) sectors in the AaruFormat image. </p>
<p>Returns the count of negative sectors that precede the standard user data area. Negative sectors are used to capture pre-gap data, lead-in areas, and other metadata that exists before the main user-accessible storage region. This is particularly important for optical media (CD, DVD, BD) where the lead-in contains the Table of Contents (TOC) and other essential disc structures, and for audio CDs where pre-gap sectors contain silence or hidden tracks. For most hard disk and floppy disk images, this value is typically zero.</p>
<li>The context was not properly initialized by <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>Negative sectors are addressed with the 'negative' flag set to true</li>
<li>Sector addresses range from 0 to (negative_sectors - 1)</li>
<li>When calling <aclass="el"href="decls_8h.html#a2297e89619ba11cb0a0779a985fc1c34"title="Reads a sector from the AaruFormat image.">aaruf_read_sector()</a> or <aclass="el"href="decls_8h.html#a4b8cd2bb5fd9e2c670a0a13695c6f9e3"title="Writes a sector to the AaruFormat image.">aaruf_write_sector()</a>:<ul>
<li>Use negative=true</li>
<li>Use sector_address in range [0, negative_sectors - 1]</li>
<li>The actual logical position is before the user data area</li>
<li><b>CD-ROM/CD-DA</b>: Negative sectors contain lead-in area with TOC (Table of Contents). The lead-in typically spans LBA -450000 to -1, though only a portion may be captured. Pre-gap sectors (usually 150 sectors/2 seconds before each track) may also be stored as negative sectors for the first track.</li>
<li><b>DVD</b>: May contain lead-in with disc structure information, copyright data, and region codes. The lead-in area varies by format (DVD-ROM, DVD-R, DVD+R, etc.).</li>
<li><b>Blu-ray</b>: Lead-in contains disc information, burst cutting area (BCA), and other metadata. The structure differs between BD-ROM, BD-R, and BD-RE.</li>
<li>Hard disk drives: Negative sectors are typically zero unless capturing special manufacturer reserved areas (HPA, DCO) that precede the standard user area.</li>
<li>Floppy disks: Negative sectors are typically zero as floppies have a simple linear sector layout without lead-in areas.</li>
<li>The value is retrieved from ctx->user_data_ddt_header.negative</li>
<li>The DDT (Deduplication and Data Table) header tracks all sector allocation</li>
<li>This field is populated during image creation with <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>The value is fixed for read-only images opened with <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a></li>
<li>Maximum representable value is 65,535 (uint16_t)</li>
<li>The negative_sectors value is specified when calling <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>It should be set based on the medium type and imaging requirements:<ul>
<li>Optical discs: Set to the number of lead-in sectors captured</li>
<li>Hard disks: Typically 0, unless capturing HPA/DCO areas</li>
<li>Floppy disks: Typically 0</li>
<li>Audio CDs: May be non-zero to capture pre-gap hidden tracks</li>
<dlclass="section warning"><dt>Warning</dt><dd>The sectors parameter is only modified on success (AARUF_STATUS_OK). On error, its value remains unchanged. Initialize it before calling if a default value is needed on failure.</dd>
This function reads from the in-memory DDT header loaded during <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or set during <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a>. It does not perform file I/O operations and executes quickly.</dd>
The maximum negative sector count is 65,535 due to the uint16_t storage type. If imaging optical media with larger lead-in areas, some data may not be representable. This limit is generally sufficient for most practical cases.</dd>
<dd>
Negative sector data may contain copy-protected or encrypted content (e.g., CSS on DVDs, AACS on Blu-rays). Handle this data according to applicable laws and licensing agreements. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01557">1557</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the number of overflow (post-gap) sectors in the AaruFormat image. </p>
<p>Returns the count of overflow sectors that follow the standard user data area. Overflow sectors are used to capture post-gap data, lead-out areas, and other metadata that exists after the main user-accessible storage region. This is particularly important for optical media (CD, DVD, BD) where the lead-out marks the physical end of the recorded data and contains disc finalization information, and for multi-session discs where gaps between sessions need to be preserved. For most hard disk and floppy disk images, this value is typically zero.</p>
<li>The context was not properly initialized by <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>Overflow sectors are addressed with the 'negative' flag set to false</li>
<li>Sector addresses range from user_sectors to (user_sectors + overflow_sectors - 1)</li>
<li>When calling <aclass="el"href="decls_8h.html#a2297e89619ba11cb0a0779a985fc1c34"title="Reads a sector from the AaruFormat image.">aaruf_read_sector()</a> or <aclass="el"href="decls_8h.html#a4b8cd2bb5fd9e2c670a0a13695c6f9e3"title="Writes a sector to the AaruFormat image.">aaruf_write_sector()</a>:<ul>
<li>Use negative=false</li>
<li>Use sector_address in range [user_sectors, user_sectors + overflow_sectors - 1]</li>
<li>The actual logical position is after the user data area</li>
</ul>
</li>
</ul>
</dd>
<dd>
Optical Media Context:<ul>
<li><b>CD-ROM/CD-DA</b>: Overflow sectors contain the lead-out area, which marks the physical end of the disc's recorded data. The lead-out consists of unreadable sectors filled with specific patterns.</li>
<li><b>DVD</b>: May contain lead-out with disc finalization data, middle area (for dual-layer), and outer zone. DVD+R/RW discs may have substantial lead-out areas.</li>
<li><b>Blu-ray</b>: Lead-out contains disc finalization markers and padding. For multi-layer discs, may include middle zones and outer areas.</li>
</ul>
</dd>
<dd>
Multi-Session and Track Context:<ul>
<li>Multi-session optical discs have gaps between sessions</li>
<li>Audio CDs with post-gap after the last track may use overflow sectors</li>
<li>Track post-gaps (silence after audio tracks) typically 2 seconds/150 sectors</li>
</ul>
</dd>
<dd>
Hard Disk and Floppy Context:<ul>
<li>Hard disk drives: Overflow sectors are typically zero unless capturing special manufacturer reserved areas (like DCO or HPA) that follow the standard user area.</li>
<li>Floppy disks: Overflow sectors are typically zero as floppies have a simple linear sector layout without lead-out areas. They may contain mastering information.</li>
<li>Some proprietary copy protection schemes may place data beyond the normal capacity, which could be captured as overflow sectors.</li>
</ul>
</dd>
<dd>
DDT Header Source:<ul>
<li>The value is retrieved from ctx->user_data_ddt_header.overflow</li>
<li>The DDT (Deduplication and Data Table) header tracks all sector allocation</li>
<li>This field is populated during image creation with <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>The value is fixed for read-only images opened with <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a></li>
<li>Maximum representable value is 65,535 (uint16_t)</li>
<li>The overflow_sectors value is specified when calling <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>It should be set based on the medium type and imaging requirements:<ul>
<li>Optical discs: Set to the number of lead-out sectors captured</li>
<li>Multi-session discs: May include inter-session gaps</li>
<li>Hard disks: Typically 0, unless capturing post-user reserved areas</li>
<li>Floppy disks: Typically 0</li>
<li>Copy-protected media: May be non-zero to capture protection schemes</li>
<dlclass="section warning"><dt>Warning</dt><dd>The sectors parameter is only modified on success (AARUF_STATUS_OK). On error, its value remains unchanged. Initialize it before calling if a default value is needed on failure.</dd>
<dd>
This function reads from the in-memory DDT header loaded during <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or set during <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a>. It does not perform file I/O operations and executes quickly.</dd>
<dd>
The maximum overflow sector count is 65,535 due to the uint16_t storage type. If imaging optical media with larger lead-out areas or extensive overburn regions, some data may not be representable. This limit is generally sufficient for most practical cases.</dd>
<dd>
Overflow sector data may be difficult or impossible to read on some drives, as it often resides in lead-out areas or beyond rated capacity. The presence of overflow sectors in an image indicates the imaging drive was capable of reading these extended areas, but other drives may not be able to access them. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01692">1692</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<p>Retrieves the total number of user-accessible sectors in the AaruFormat image. </p>
<p>Returns the count of standard user data sectors in the image, excluding any negative (pre-gap) or overflow (post-gap) sectors. This represents the primary addressable sector range that contains the main user data, typically corresponding to the logical capacity of the storage medium as it would be seen by an operating system or file system. For optical media, this excludes lead-in and lead-out areas. For hard disks, this represents the standard LBA-addressable range.</p>
<li>The context was not properly initialized by <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a> or <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>Negative sectors precede user sectors (pre-gap, lead-in)</li>
<li>Overflow sectors follow user sectors (post-gap, lead-out)</li>
<li>Use <aclass="el"href="#a381655339050570d969d2ddb60c9407b"title="Retrieves the number of negative (pre-gap) sectors in the AaruFormat image.">aaruf_get_negative_sectors()</a> to get the negative sector count</li>
<li>Use <aclass="el"href="#a108f816aba81cbb0f1401c2a9588660a"title="Retrieves the number of overflow (post-gap) sectors in the AaruFormat image.">aaruf_get_overflow_sectors()</a> to get the overflow sector count</li>
</ul>
</dd>
<dd>
Media Type Considerations:<ul>
<li><b>Optical Media (CD/DVD/BD)</b>: User sectors exclude lead-in and lead-out areas. Negative sectors may contain TOC and pre-gap data. Overflow sectors may contain post-gap and lead-out data.</li>
<li><b>Hard Disk Drives</b>: User sectors represent the full LBA range. Negative and overflow sectors are typically zero unless capturing special areas.</li>
<li><b>Floppy Disks</b>: User sectors represent the standard formatted capacity.</li>
<li><b>Tape Media</b>: User sectors may represent the total block count. Negative and overflow sectors are typically not used for tape.</li>
<li>The value is retrieved from ctx->user_data_ddt_header.blocks</li>
<li>The DDT (Deduplication and Data Table) header tracks sector allocation</li>
<li>This field is populated during image creation with <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>The value is fixed for read-only images opened with <aclass="el"href="decls_8h.html#a5cea94dcb9c08a646f7f7160ec8418de"title="Opens an existing AaruFormat image file.">aaruf_open()</a></li>
<li>For write-enabled images, this represents the allocated capacity</li>
<li>When reading/writing sectors with <aclass="el"href="decls_8h.html#a2297e89619ba11cb0a0779a985fc1c34"title="Reads a sector from the AaruFormat image.">aaruf_read_sector()</a> or <aclass="el"href="decls_8h.html#a4b8cd2bb5fd9e2c670a0a13695c6f9e3"title="Writes a sector to the AaruFormat image.">aaruf_write_sector()</a>:<ul>
<li>Set negative=false and use sector_address in range [0, user_sectors - 1]</li>
<li>For negative sectors: set negative=true, sector_address in [0, negative_sectors - 1]</li>
<li>For overflow sectors: set negative=false, sector_address in [user_sectors, user_sectors + overflow_sectors</li>
</ul>
</li>
</ul>
</dd></dl>
<ul>
<li>1]</li>
</ul>
<dlclass="section note"><dt>Note</dt><dd>Relationship to Image Creation:<ul>
<li>The user_sectors value is specified when calling <aclass="el"href="decls_8h.html#a7065a9fefcaabfecc4184528f01ef013"title="Creates a new AaruFormat image file.">aaruf_create()</a></li>
<li>It should match the logical capacity of the medium being imaged</li>
<li>For forensic images, ensure it matches the source medium exactly</li>
<li>For virtual disks, set it to the desired capacity </li>
<pclass="definition">Definition at line <aclass="el"href="metadata_8c_source.html#l01432">1432</a> of file <aclass="el"href="metadata_8c_source.html">metadata.c</a>.</p>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.18.0 </li>