Metadata header atom ('mhdr')
An atom that holds the integer value for the next unique item identifier to assign.
Overview
The metadata format optionally assigns unique identifiers to metadata items for such purposes as defining stable identifiers for external references into the set of metadata items. This is accomplished by including an item information atom in added metadata item atoms contained by the metadata item list atom. Such unique identifiers must be guaranteed to be unique.
To make the assignment of unique item identifiers more efficient, the metadata atom may contain a metadata header atom holding the integer value for the next unique item identifier to assign stored in the nextItemID field. In general it holds a value one greater than the largest identifier used so far.
Upon assigning the identifier to a metadata item, if the value of the nextItemID field is less than 0xFFFFFFFF, it should be incremented to the next unused value. If the value of nextItemID is equal to 0xFFFFFFFF, it should not be changed: in that case, a search for an unused item identifier value in the range from 0 to 0xFFFFFFFF is needed for all additions.
The metadata header atom is a full atom with an atom type of ‘mhdr’.