diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-09-30 14:48:19 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-09-30 14:48:19 +0300 |
commit | 3d5455d42d48740ff23899f00a903f49b73eff00 (patch) | |
tree | 5fa0fa998f5b8e483d2a1f0dd6543f294a803770 /lib/header.h | |
parent | d59e715c1b8e28206bfed45b6f4cf3c00322f95c (diff) | |
download | rpm-3d5455d42d48740ff23899f00a903f49b73eff00.tar.gz rpm-3d5455d42d48740ff23899f00a903f49b73eff00.tar.bz2 rpm-3d5455d42d48740ff23899f00a903f49b73eff00.zip |
Add alternative header iterator method
- we dont always want the actual contents of the tag to be copied
on iteration, so add an interface that returns the next tag in the
header
- this lets callers to decide what to do with the tag and how to
retrieve it
Diffstat (limited to 'lib/header.h')
-rw-r--r-- | lib/header.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/header.h b/lib/header.h index e39b7a73c..dff0b48e9 100644 --- a/lib/header.h +++ b/lib/header.h @@ -309,7 +309,7 @@ HeaderIterator headerFreeIterator(HeaderIterator hi); HeaderIterator headerInitIterator(Header h); /** \ingroup header - * Return next tag from header. + * Return next tag contents from header. * @param hi header tag iterator * @retval td tag data container * @return 1 on success, 0 on failure @@ -317,6 +317,13 @@ HeaderIterator headerInitIterator(Header h); int headerNext(HeaderIterator hi, rpmtd td); /** \ingroup header + * Return next tag number from header. + * @param hi header tag iterator + * @return next tag, RPMTAG_NOT_FOUND to stop iteration + */ +rpmTag headerNextTag(HeaderIterator hi); + +/** \ingroup header * Return name, version, release strings from header. * @param h header * @retval *np name pointer (or NULL) |