diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-16 16:26:19 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-16 16:26:19 +0300 |
commit | eef5417deabb40304cc225ded2ebc7bf48dc2c46 (patch) | |
tree | 68b757154d608ef9810998f02b7406036caaf967 /lib/header.h | |
parent | 696184533aa34b7ae29c5567e1255f00505d884f (diff) | |
download | rpm-eef5417deabb40304cc225ded2ebc7bf48dc2c46.tar.gz rpm-eef5417deabb40304cc225ded2ebc7bf48dc2c46.tar.bz2 rpm-eef5417deabb40304cc225ded2ebc7bf48dc2c46.zip |
Make extension formatter functions opaque
- tag extensions are only needed by headerGet(), formats only by headerFormat()
Diffstat (limited to 'lib/header.h')
-rw-r--r-- | lib/header.h | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/lib/header.h b/lib/header.h index e74566c07..237d36ff1 100644 --- a/lib/header.h +++ b/lib/header.h @@ -38,42 +38,12 @@ struct headerTagTableEntry_s { typedef struct headerTagIndices_s * headerTagIndices; /** \ingroup header - * HEADER_EXT_FORMAT format function prototype. - * This will only ever be passed RPM_INT32_TYPE or RPM_STRING_TYPE to - * help keep things simple. - * - * @param type tag type - * @param data tag value - * @param formatPrefix - * @param padding - * @param element RPM_BIN_TYPE: no. bytes of data - * @return formatted string - */ -typedef char * (*headerTagFormatFunction)(rpmTagType type, - rpm_constdata_t data, char * formatPrefix, - size_t padding, rpm_count_t element); - -/** \ingroup header - * HEADER_EXT_TAG format function prototype. - * This is allowed to fail, which indicates the tag doesn't exist. - * - * @param h header - * @retval td tag data container - * @return 0 on success - */ -typedef int (*headerTagTagFunction) (Header h, rpmtd td); - -/** \ingroup header * Define header tag output formats. */ typedef const struct headerSprintfExtension_s * headerSprintfExtension; struct headerSprintfExtension_s { - const char * name; /*!< Name of extension. */ - union { - void * generic; /*!< Private extension. */ - headerTagFormatFunction formatFunction; /*!< HEADER_EXT_TAG extension. */ - headerTagTagFunction tagFunction; /*!< HEADER_EXT_FORMAT extension. */ - } u; + const char *name; /*!< Name of extension. */ + void *func; /*!< Pointer to formatter function. */ }; /** \ingroup rpmtag |