- 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 typedef rpmalKey        alKey RPM_GNUC_DEPRECATED;
    00032
    00033 /* legacy header interfaces */
    00034
    00049 int headerGetEntry(Header h, rpmTag tag,
    00050                         rpmTagType * type,
    00051                         rpm_data_t * p,
    00052                         rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00053
    00067 int headerGetEntryMinMemory(Header h, rpmTag tag,
    00068                         rpmTagType * type,
    00069                         rpm_data_t * p,
    00070                         rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00071
    00086 int headerAddEntry(Header h, rpmTag tag, rpmTagType type,
    00087                    rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00088
    00103 int headerAppendEntry(Header h, rpmTag tag, rpmTagType type,
    00104                 rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00105
    00115 int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type,
    00116                 rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00117
    00130 int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
    00131                         rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00132
    00143 int headerRemoveEntry(Header h, rpmTag tag) RPM_GNUC_DEPRECATED;
    00144
    00157 #define headerSprintf(_h, _fmt, _tbltags, _exts, _emsg) \
    00158         headerFormat((_h), (_fmt), (_emsg))
    00159
    00171 int headerNextIterator(HeaderIterator hi,
    00172                 rpmTag * tag,
    00173                 rpmTagType * type,
    00174                 rpm_data_t * p,
    00175                 rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00176
    00186 void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECATED;
    00187
    00196 void * headerFreeData(rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECATED;
    00197
    00202 typedef void * (*HFD_t) (rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECATED;
    00203 typedef int (*HGE_t) (Header h, rpmTag tag, rpmTagType * type,
    00204                         rpm_data_t * p, rpm_count_t * c) RPM_GNUC_DEPRECATED;
    00205 typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
    00206                         rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00207 typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
    00208                         rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
    00209 typedef int (*HRE_t) (Header h, rpmTag tag) RPM_GNUC_DEPRECATED;
    00212 /* other misc renamed / namespaced functions */
    00213 /* TODO: arrange deprecation warnings on these too... */
    00214 #define isCompressed    rpmFileIsCompressed
    00215 #define makeTempFile    rpmMkTempFile
    00216 #define whatis          rpmfiWhatis
    00217 #define freeFilesystems rpmFreeFilesystems
    00218 #define tagName         rpmTagGetName
    00219 #define tagType         rpmTagGetType
    00220 #define tagValue        rpmTagGetValue
    00221
    00222 #define xislower        rislower
    00223 #define xisupper        risupper
    00224 #define xisalpha        risalpha
    00225 #define xisdigit        risdigit
    00226 #define xisalnum        risalnum
    00227 #define xisblank        risblank
    00228 #define xisspace        risspace
    00229 #define xtolower        rtolower
    00230 #define xtoupper        rtoupper
    00231 #define xstrcasecmp     rstrcasecmp
    00232 #define xstrncasecmp    rstrncasecmp
    00233
    00234 #define rpmMessage      rpmlog
    00235 #define rpmError        rpmlog
    00236
    00237 #endif /* _RPM_4_4_COMPAT */
    00238
    00239 #ifdef __cplusplus
    00240 }
    00241 #endif
    00242
    00243 #endif /* _RPMLEGACY_H */