From ed5306b0be4b8b0df205b066d2646b4e1dd93545 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 17 Nov 2008 11:31:00 +0200 Subject: 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 --- lib/rpmtag.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/rpmtag.h') 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 @@ -373,6 +383,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 -- cgit v1.2.3