- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# rpmlegacy.h

Go to the documentation of this file.

    00001 #ifndef _RPMLEGACY_H
    00002 #define _RPMLEGACY_H
    00003
    00004 #include <rpm/rpmtypes.h>
    00005 #include <rpm/rpmutil.h>
    00006
    00007 /* ==================================================================== */
    00008 /*         LEGACY INTERFACES AND TYPES, DO NOT USE IN NEW CODE!         */
    00009 /* ==================================================================== */
    00010
    00011 #ifdef __cplusplus
    00012 extern "C" {
    00013 #endif
    00014
    00015 #ifdef _RPM_4_4_COMPAT
    00016
    00017 /* mappings for legacy types */
    00018 typedef int32_t         int_32 RPM_GNUC_DEPRECATED;
    00019 typedef int16_t         int_16 RPM_GNUC_DEPRECATED;
    00020 typedef int8_t          int_8 RPM_GNUC_DEPRECATED;
    00021 typedef uint32_t        uint_32 RPM_GNUC_DEPRECATED;
    00022 typedef uint16_t        uint_16 RPM_GNUC_DEPRECATED;
    00023 typedef uint8_t         uint_8 RPM_GNUC_DEPRECATED;
    00024
    00025 typedef rpmTag *        hTAG_t RPM_GNUC_DEPRECATED;
    00026 typedef rpmTagType *    hTYP_t RPM_GNUC_DEPRECATED;
    00027 typedef const void *    hPTR_t RPM_GNUC_DEPRECATED;
    00028 typedef rpm_count_t *   hCNT_t RPM_GNUC_DEPRECATED;
    00029
    00030 typedef rpmSpec         Spec RPM_GNUC_DEPRECATED;
    00031
    00032 /* legacy header interfaces */
    00033
    00048 int headerGetEntry(Header h, rpmTag tag,
    00049                         rpmTagType * type,
    00050                         rpm_data_t * p,
    00051                         rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00052
    00066 int headerGetEntryMinMemory(Header h, rpmTag tag,
    00067                         rpmTagType * type,
    00068                         rpm_data_t * p,
    00069                         rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00070
    00085 int headerAddEntry(Header h, rpmTag tag, rpmTagType type,
    00086                    rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00087
    00102 int headerAppendEntry(Header h, rpmTag tag, rpmTagType type,
    00103                 rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00104
    00114 int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type,
    00115                 rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00116
    00129 int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
    00130                         rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00131
    00142 int headerRemoveEntry(Header h, rpmTag tag) RPM_GNUC_DEPRECATED;
    00143
    00156 #define headerSprintf(_h, _fmt, _tbltags, _exts, _emsg) \
    00157         headerFormat((_h), (_fmt), (_emsg))
    00158
    00170 int headerNextIterator(HeaderIterator hi,
    00171                 rpmTag * tag,
    00172                 rpmTagType * type,
    00173                 rpm_data_t * p,
    00174                 rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00175
    00185 void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECATED;
    00186
    00195 void * headerFreeData(rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECATED;
    00196
    00201 typedef void * (*HFD_t) (rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECATED;
    00202 typedef int (*HGE_t) (Header h, rpmTag tag, rpmTagType * type,
    00203                         rpm_data_t * p, rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00204 typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
    00205                         rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00206 typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
    00207                         rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00208 typedef int (*HRE_t) (Header h, rpmTag tag) RPM_GNUC_DEPRECATED;
    00211 /* other misc renamed / namespaced functions */
    00212 /* TODO: arrange deprecation warnings on these too... */
    00213 #define isCompressed    rpmFileIsCompressed
    00214 #define makeTempFile    rpmMkTempFile
    00215 #define whatis          rpmfiWhatis
    00216 #define freeFilesystems rpmFreeFilesystems
    00217 #define tagName         rpmTagGetName
    00218 #define tagType         rpmTagGetType
    00219 #define tagValue        rpmTagGetValue
    00220
    00221 #define xislower        rislower
    00222 #define xisupper        risupper
    00223 #define xisalpha        risalpha
    00224 #define xisdigit        risdigit
    00225 #define xisalnum        risalnum
    00226 #define xisblank        risblank
    00227 #define xisspace        risspace
    00228 #define xtolower        rtolower
    00229 #define xtoupper        rtoupper
    00230 #define xstrcasecmp     rstrcasecmp
    00231 #define xstrncasecmp    rstrncasecmp
    00232
    00233 #define rpmMessage      rpmlog
    00234 #define rpmError        rpmlog
    00235
    00236 #endif /* _RPM_4_4_COMPAT */
    00237
    00238 #ifdef __cplusplus
    00239 }
    00240 #endif
    00241
    00242 #endif /* _RPMLEGACY_H */