summaryrefslogtreecommitdiff
path: root/lib/header.h
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-01 17:10:18 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-02 10:48:54 +0300
commite2239d295e6163d4d067bc3a9391997fa0e27367 (patch)
tree5f1abd7bcdaa98d83e98feb187501a535e631764 /lib/header.h
parent0fd95da2e7105f014475843f25f7e7270f4012d6 (diff)
downloadrpm-e2239d295e6163d4d067bc3a9391997fa0e27367.tar.gz
rpm-e2239d295e6163d4d067bc3a9391997fa0e27367.tar.bz2
rpm-e2239d295e6163d4d067bc3a9391997fa0e27367.zip
Add two new convenience functions for header string data
- headerGetString() for retrieving const strings directly from header memory - headerGetAsString() for converting any non-array tag to string
Diffstat (limited to 'lib/header.h')
-rw-r--r--lib/header.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/header.h b/lib/header.h
index 801ecdfff..d4f88fe29 100644
--- a/lib/header.h
+++ b/lib/header.h
@@ -371,6 +371,22 @@ char * headerGetNEVRA(Header h, const char ** np );
char * headerGetEVR(Header h, const char **np);
/** \ingroup header
+ * Return any non-array tag from header, converted to string
+ * @param h header
+ * @param tag tag to retrieve
+ * @return string pointer (malloced) or NULL on failure
+ */
+char * headerGetAsString(Header h, rpmTag tag);
+
+/** \ingroup header
+ * Return a simple string tag from header
+ * @param h header
+ * @param tag tag to retrieve
+ * @return string pointer (to header memory) or NULL on failure
+ */
+const char * headerGetString(Header h, rpmTag tag);
+
+/** \ingroup header
* Return header color.
* @param h header
* @return header color