rpm  4.12.90
rpmlegacy.h
Go to the documentation of this file.
1 #ifndef _RPMLEGACY_H
2 #define _RPMLEGACY_H
3 
9 #include <rpm/rpmtypes.h>
10 #include <rpm/rpmutil.h>
11 
12 /* ==================================================================== */
13 /* LEGACY INTERFACES AND TYPES, DO NOT USE IN NEW CODE! */
14 /* ==================================================================== */
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #ifdef _RPM_4_4_COMPAT
21 
22 /* mappings for legacy types */
23 typedef int32_t int_32 RPM_GNUC_DEPRECATED;
24 typedef int16_t int_16 RPM_GNUC_DEPRECATED;
25 typedef int8_t int_8 RPM_GNUC_DEPRECATED;
26 typedef uint32_t uint_32 RPM_GNUC_DEPRECATED;
27 typedef uint16_t uint_16 RPM_GNUC_DEPRECATED;
28 typedef uint8_t uint_8 RPM_GNUC_DEPRECATED;
29 
30 typedef rpm_tag_t * hTAG_t RPM_GNUC_DEPRECATED;
31 typedef rpm_tagtype_t * hTYP_t RPM_GNUC_DEPRECATED;
32 typedef const void * hPTR_t RPM_GNUC_DEPRECATED;
33 typedef rpm_count_t * hCNT_t RPM_GNUC_DEPRECATED;
34 
35 typedef rpmSpec Spec RPM_GNUC_DEPRECATED;
36 
37 /* legacy header interfaces */
38 
53 int headerGetEntry(Header h, rpm_tag_t tag,
54  rpm_tagtype_t * type,
55  rpm_data_t * p,
57 
71 int headerGetEntryMinMemory(Header h, rpm_tag_t tag,
72  rpm_tagtype_t * type,
73  rpm_data_t * p,
75 
90 int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
92 
107 int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
109 
119 int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
121 
134 int headerModifyEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
136 
147 int headerRemoveEntry(Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED;
148 
161 #define headerSprintf(_h, _fmt, _tbltags, _exts, _emsg) \
162  headerFormat((_h), (_fmt), (_emsg))
163 
175 int headerNextIterator(HeaderIterator hi,
176  rpm_tag_t * tag,
177  rpm_tagtype_t * type,
178  rpm_data_t * p,
180 
190 void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
191 
200 void * headerFreeData(rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
201 
206 typedef void * (*HFD_t) (rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
207 typedef int (*HGE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t * type,
209 typedef int (*HAE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type,
211 typedef int (*HME_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type,
213 typedef int (*HRE_t) (Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED;
216 /* other misc renamed / namespaced functions */
217 /* TODO: arrange deprecation warnings on these too... */
218 #define isCompressed rpmFileIsCompressed
219 #define makeTempFile rpmMkTempFile
220 #define whatis rpmfiWhatis
221 #define tagName rpmTagGetName
222 #define tagType rpmTagGetType
223 #define tagValue rpmTagGetValue
224 
225 #define xislower rislower
226 #define xisupper risupper
227 #define xisalpha risalpha
228 #define xisdigit risdigit
229 #define xisalnum risalnum
230 #define xisblank risblank
231 #define xisspace risspace
232 #define xtolower rtolower
233 #define xtoupper rtoupper
234 #define xstrcasecmp rstrcasecmp
235 #define xstrncasecmp rstrncasecmp
236 
237 #define rpmMessage rpmlog
238 #define rpmError rpmlog
239 
240 #endif /* _RPM_4_4_COMPAT */
241 
242 #ifdef __cplusplus
243 }
244 #endif
245 
246 #endif /* _RPMLEGACY_H */
uint32_t rpm_count_t
Definition: rpmtypes.h:29
uint32_t rpm_tagtype_t
Definition: rpmtypes.h:28
#define RPM_GNUC_DEPRECATED
Definition: rpmutil.h:81
int32_t rpm_tag_t
Definition: rpmtypes.h:27
void * rpm_data_t
Definition: rpmtypes.h:33
const void * rpm_constdata_t
Definition: rpmtypes.h:34
struct headerIterator_s * HeaderIterator
Definition: rpmtypes.h:25
struct rpmSpec_s * rpmSpec
Definition: rpmtypes.h:90
struct headerToken_s * Header
RPM header and data retrieval types.
Definition: rpmtypes.h:24