summaryrefslogtreecommitdiff
path: root/lib/header.h
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-05-13 11:38:38 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-05-13 11:38:38 +0300
commit8cd92950bda4658c8d376c5c381237301013edfb (patch)
tree0ccddafd54cb1cf4e7574c1c1e803dd6dcc083c8 /lib/header.h
parent752343c2b7798b1fa225abc9ade94529a6175ad7 (diff)
downloadrpm-8cd92950bda4658c8d376c5c381237301013edfb.tar.gz
rpm-8cd92950bda4658c8d376c5c381237301013edfb.tar.bz2
rpm-8cd92950bda4658c8d376c5c381237301013edfb.zip
Convert headerGetEntry() internals to use rpmtd for data
- new public API function headerGet() that returns data in rpmtd, with flags to control operation (just minmem or no for now) - headerGet() is nice and short name, lifted from rpm5.org but our API differs as this takes a separate arg for the tag to get instead of (ab)using the container to pass data back and forth - internal compatibility wrapper to keep headerGetEntry() and -MinMem version working
Diffstat (limited to 'lib/header.h')
-rw-r--r--lib/header.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/header.h b/lib/header.h
index 68a27d532..f8eda86b3 100644
--- a/lib/header.h
+++ b/lib/header.h
@@ -266,6 +266,21 @@ int headerWrite(FD_t fd, Header h, enum hMagic magicp);
*/
int headerIsEntry(Header h, rpmTag tag);
+enum headerGetFlags_e {
+ HEADERGET_DEFAULT = 0,
+ HEADERGET_MINMEM = (1 << 0),
+};
+
+/** \ingroup header
+ * Retrieve tag value.
+ * @param h header
+ * @param tag tag
+ * @retval td tag data container
+ * @param flags retrieval modifier flags
+ * @return 1 on success, 0 on failure
+ */
+int headerGet(Header h, rpmTag tag, rpmtd td, int flags);
+
/** \ingroup header
* Free data allocated when retrieved from header.
* @param h header