- returns the value (as opposed to pointer to, like the rpmtdGetUint32()
and the like do) of any numeric type as uint64_t (largest supported
integer type so everything can be converted to it)
- handy when you don't really care what the internal presentation is
- there's no rpmtdGetNextNumber() as there's no meaningful way to return
end-of-iteration here
- rpm tag data can be either numeric, strings or binary data, each with
their own "subclasses" (different sized integers etc), add new
enumeration for these
- add rpmTagGetClass(), rpmtdClass() public functions for retrieving the
base class of tag and container
- useful for getting a basic idea how to handle tag/container data
- rpmtdFromString(), rpmtdFromStringArray() and rpmtdFromUint32() permit
populating tag containers of compatible datatypes that can be used for
headerPut() with some extra type-safety and sanity checks on the types
- permit change on non-empty container to compatible type to allow things like
headerGet(h, RPMTAG_FILENAMES, td, HEADERGET_EXT);
rpmtdSetTag(td, RPMTAG_OLDFILENAMES);
headerPut(h, td, HEADERPUT_DEFAULT);
- empty container can be set to any valid type
- just uint32 and string iterators for now, those are the most common ones
- allows somewhat more convenient code constructs when type is known,
eg no need to separately check for non-null inside loops
- headerGet() returns even array data in a single allocation block, but
regular (string) arrays need to have the pointers in array freed too
- set immutable flag on header data
- formatPrefix already contains the padding, just use rasprintf() on that
to get properly allocated buffer without messing with it manually
- xml format doesn't honor padding anyway so don't bother with it
- rpmtdGetUint() for 16 and 32 bit integer types, similar to
rpmtdGetString() (equally usable with scalar types and arrays)
- rpmtdToString() which converts "any" header data into string presentation