diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-11-17 11:31:00 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-11-17 11:31:00 +0200 |
commit | ed5306b0be4b8b0df205b066d2646b4e1dd93545 (patch) | |
tree | 55ad70d82dd1d66cbd601ec9aceed2fbcafb68be /lib/rpmtag.h | |
parent | 4fa662abd1d1f5b5f155a734d0e87aa7e7894ae3 (diff) | |
download | librpm-tizen-ed5306b0be4b8b0df205b066d2646b4e1dd93545.tar.gz librpm-tizen-ed5306b0be4b8b0df205b066d2646b4e1dd93545.tar.bz2 librpm-tizen-ed5306b0be4b8b0df205b066d2646b4e1dd93545.zip |
Introduce rpm tag "classes"
- 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
Diffstat (limited to 'lib/rpmtag.h')
-rw-r--r-- | lib/rpmtag.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/rpmtag.h b/lib/rpmtag.h index efcbd0088..335d413da 100644 --- a/lib/rpmtag.h +++ b/lib/rpmtag.h @@ -330,6 +330,16 @@ typedef enum rpmTagType_e { #define RPM_MASK_TYPE 0x0000ffff } rpmTagType; +/** \ingroup rpmtag + * The classes of data in tags from headers. + */ +typedef enum rpmTagClass_e { + RPM_NULL_CLASS = 0, + RPM_NUMERIC_CLASS = 1, + RPM_STRING_CLASS = 2, + RPM_BINARY_CLASS = 3, +} rpmTagClass; + /** \ingroup header * New rpm data types under consideration/development. * These data types may (or may not) be added to rpm at some point. In order @@ -374,6 +384,13 @@ const char * rpmTagGetName(rpmTag tag); rpmTagType rpmTagGetType(rpmTag tag); /** \ingroup rpmtag + * Return tag data class from value. + * @param tag tag value + * @return tag data class, RPM_NULL_CLASS on not found. + */ +rpmTagClass rpmTagGetClass(rpmTag tag); + +/** \ingroup rpmtag * Return tag value from name. * @param tagstr name of tag * @return tag value, -1 on not found |