* @param tag tag value
* @return tag name, "(unknown)" on not found
*/
-const char * rpmTagGetName(rpmTag tag);
+const char * rpmTagGetName(rpmTagVal tag);
/** \ingroup rpmtag
* Return tag data type from value.
* @param tag tag value
* @return tag data type + return type, RPM_NULL_TYPE on not found.
*/
-rpmTagType rpmTagGetType(rpmTag tag);
+rpmTagType rpmTagGetType(rpmTagVal tag);
/** \ingroup rpmtag
* Return tag data type from value.
* @param tag tag value
* @return tag data type, RPM_NULL_TYPE on not found.
*/
-rpmTagType rpmTagGetTagType(rpmTag tag);
+rpmTagType rpmTagGetTagType(rpmTagVal tag);
/** \ingroup rpmtag
* Return tag data type from value.
* @param tag tag value
* @return tag data return type, RPM_NULL_TYPE on not found.
*/
-rpmTagReturnType rpmTagGetReturnType(rpmTag tag);
+rpmTagReturnType rpmTagGetReturnType(rpmTagVal 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);
+rpmTagClass rpmTagGetClass(rpmTagVal tag);
/** \ingroup rpmtag
* Return tag value from name.
* @param tagstr name of tag
* @return tag value, -1 on not found
*/
-rpmTag rpmTagGetValue(const char * tagstr);
+rpmTagVal rpmTagGetValue(const char * tagstr);
/** \ingroup rpmtag
* Return data class of type
struct headerTagTableEntry_s {
const char * name; /*!< Tag name. */
const char * shortname; /*!< "Human readable" short name. */
- rpmTag val; /*!< Tag numeric value. */
+ rpmTagVal val; /*!< Tag numeric value. */
rpmTagType type; /*!< Tag type. */
rpmTagReturnType retype; /*!< Tag return type. */
int extension; /*!< Extension or "real" tag */
headerTagTableEntry * byName; /*!< header tags sorted by name. */
int byNameSize; /*!< no. of entries. */
int (*byNameCmp) (const void * avp, const void * bvp); /*!< compare entries by name. */
- rpmTag (*tagValue) (const char * name); /* return value from name. */
+ rpmTagVal (*tagValue) (const char * name); /* return value from name. */
headerTagTableEntry * byValue; /*!< header tags sorted by value. */
int byValueSize; /*!< no. of entries. */
int (*byValueCmp) (const void * avp, const void * bvp); /*!< compare entries by value. */
- const char * (*tagName) (rpmTag value); /* Return name from value. */
- rpmTagType (*tagType) (rpmTag value); /* Return type from value. */
+ const char * (*tagName) (rpmTagVal value); /* Return name from value. */
+ rpmTagType (*tagType) (rpmTagVal value); /* Return type from value. */
};
/**
/* forward refs */
-static const char * _tagName(rpmTag tag);
-static rpmTagType _tagType(rpmTag tag);
-static rpmTag _tagValue(const char * tagstr);
+static const char * _tagName(rpmTagVal tag);
+static rpmTagType _tagType(rpmTagVal tag);
+static rpmTagVal _tagValue(const char * tagstr);
static struct headerTagIndices_s _rpmTags = {
tagLoadIndex,
static headerTagIndices const rpmTags = &_rpmTags;
-static const char * _tagName(rpmTag tag)
+static const char * _tagName(rpmTagVal tag)
{
const char *name = "(unknown)";
const struct headerTagTableEntry_s *t;
return name;
}
-static rpmTagType _tagType(rpmTag tag)
+static rpmTagType _tagType(rpmTagVal tag)
{
const struct headerTagTableEntry_s *t;
int comparison, i, l, u;
return RPM_NULL_TYPE;
}
-static rpmTag _tagValue(const char * tagstr)
+static rpmTagVal _tagValue(const char * tagstr)
{
const struct headerTagTableEntry_s *t;
int comparison, i, l, u;
return RPMTAG_NOT_FOUND;
}
-const char * rpmTagGetName(rpmTag tag)
+const char * rpmTagGetName(rpmTagVal tag)
{
return ((*rpmTags->tagName)(tag));
}
-rpmTagType rpmTagGetType(rpmTag tag)
+rpmTagType rpmTagGetType(rpmTagVal tag)
{
return ((*rpmTags->tagType)(tag));
}
-rpmTagType rpmTagGetTagType(rpmTag tag)
+rpmTagType rpmTagGetTagType(rpmTagVal tag)
{
return (rpmTagType)((*rpmTags->tagType)(tag) & RPM_MASK_TYPE);
}
-rpmTagReturnType rpmTagGetReturnType(rpmTag tag)
+rpmTagReturnType rpmTagGetReturnType(rpmTagVal tag)
{
return ((*rpmTags->tagType)(tag) & RPM_MASK_RETURN_TYPE);
}
return tclass;
}
-rpmTagClass rpmTagGetClass(rpmTag tag)
+rpmTagClass rpmTagGetClass(rpmTagVal tag)
{
return rpmTagTypeGetClass(rpmTagGetTagType(tag));
}
-rpmTag rpmTagGetValue(const char * tagstr)
+rpmTagVal rpmTagGetValue(const char * tagstr)
{
return ((*rpmTags->tagValue)(tagstr));
}