rpmlegacy.h
Go to the documentation of this file.
#ifndef _RPMLEGACY_H
#define _RPMLEGACY_H
#include <rpm/rpmtypes.h>
#include <rpm/rpmutil.h>
/* ==================================================================== */
/* LEGACY INTERFACES AND TYPES, DO NOT USE IN NEW CODE! */
/* ==================================================================== */
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _RPM_4_4_COMPAT
/* mappings for legacy types */
typedef int32_t int_32 RPM_GNUC_DEPRECATED;
typedef int16_t int_16 RPM_GNUC_DEPRECATED;
typedef int8_t int_8 RPM_GNUC_DEPRECATED;
typedef uint32_t uint_32 RPM_GNUC_DEPRECATED;
typedef uint16_t uint_16 RPM_GNUC_DEPRECATED;
typedef uint8_t uint_8 RPM_GNUC_DEPRECATED;
typedef rpm_tag_t * hTAG_t RPM_GNUC_DEPRECATED;
typedef rpm_tagtype_t * hTYP_t RPM_GNUC_DEPRECATED;
typedef const void * hPTR_t RPM_GNUC_DEPRECATED;
typedef rpm_count_t * hCNT_t RPM_GNUC_DEPRECATED;
typedef rpmSpec Spec RPM_GNUC_DEPRECATED;
/* legacy header interfaces */
int headerGetEntry(Header h, rpm_tag_t tag,
rpm_tagtype_t * type,
rpm_data_t * p,
rpm_count_t * c) RPM_GNUC_DEPRECATED;
int headerGetEntryMinMemory(Header h, rpm_tag_t tag,
rpm_tagtype_t * type,
rpm_data_t * p,
rpm_count_t * c) RPM_GNUC_DEPRECATED;
int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
int headerModifyEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
int headerRemoveEntry(Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED;
#define headerSprintf(_h, _fmt, _tbltags, _exts, _emsg) \
headerFormat((_h), (_fmt), (_emsg))
int headerNextIterator(HeaderIterator hi,
rpm_tag_t * tag,
rpm_tagtype_t * type,
rpm_data_t * p,
rpm_count_t * c) RPM_GNUC_DEPRECATED;
void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
void * headerFreeData(rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
typedef void * (*HFD_t) (rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
typedef int (*HGE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t * type,
rpm_data_t * p, rpm_count_t * c) RPM_GNUC_DEPRECATED;
typedef int (*HAE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
typedef int (*HME_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
typedef int (*HRE_t) (Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED;
/* other misc renamed / namespaced functions */
/* TODO: arrange deprecation warnings on these too... */
#define isCompressed rpmFileIsCompressed
#define makeTempFile rpmMkTempFile
#define whatis rpmfiWhatis
#define tagName rpmTagGetName
#define tagType rpmTagGetType
#define tagValue rpmTagGetValue
#define xislower rislower
#define xisupper risupper
#define xisalpha risalpha
#define xisdigit risdigit
#define xisalnum risalnum
#define xisblank risblank
#define xisspace risspace
#define xtolower rtolower
#define xtoupper rtoupper
#define xstrcasecmp rstrcasecmp
#define xstrncasecmp rstrncasecmp
#define rpmMessage rpmlog
#define rpmError rpmlog
#endif /* _RPM_4_4_COMPAT */
#ifdef __cplusplus
}
#endif
#endif /* _RPMLEGACY_H */