summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-02-21 13:50:34 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-02-21 13:50:34 +0200
commitb922b4392f0df9386feb730b4d9aea13cb397b19 (patch)
tree887cbbb63f61c93d4d0b8a5f600bd8dd9cb047d6
parent7a9a5505667c681044bacb21c9b84ac66c062fe7 (diff)
downloadlibrpm-tizen-b922b4392f0df9386feb730b4d9aea13cb397b19.tar.gz
librpm-tizen-b922b4392f0df9386feb730b4d9aea13cb397b19.tar.bz2
librpm-tizen-b922b4392f0df9386feb730b4d9aea13cb397b19.zip
Add getter for rpmtd flags
- While these are mostly of rpmtd-internal interest only, there are cases when caller might want to know...
-rw-r--r--lib/rpmtd.c5
-rw-r--r--lib/rpmtd.h7
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/rpmtd.c b/lib/rpmtd.c
index 95e953d1d..a42d39ffd 100644
--- a/lib/rpmtd.c
+++ b/lib/rpmtd.c
@@ -74,6 +74,11 @@ rpmTagClass rpmtdClass(rpmtd td)
return rpmTagTypeGetClass(td->type);
}
+rpmtdFlags rpmtdGetFlags(rpmtd td)
+{
+ return (td != NULL) ? td->flags : 0;
+}
+
int rpmtdGetIndex(rpmtd td)
{
assert(td != NULL);
diff --git a/lib/rpmtd.h b/lib/rpmtd.h
index 99c94baff..a8ccf2f35 100644
--- a/lib/rpmtd.h
+++ b/lib/rpmtd.h
@@ -87,6 +87,13 @@ rpmTagType rpmtdType(rpmtd td);
rpmTagClass rpmtdClass(rpmtd td);
/** \ingroup rpmtd
+ * Retrieve flags of the container (allocation details etc)
+ * @param td Tag data container
+ * @return Container flags
+ */
+rpmtdFlags rpmtdGetFlags(rpmtd td);
+
+/** \ingroup rpmtd
* Retrieve current iteration index of the container.
* @param td Tag data container
* @return Iteration index (or -1 if not iterating)