rpm  4.11.1-rc1
rpmlegacy.h
Go to the documentation of this file.
1 #ifndef _RPMLEGACY_H
2 #define _RPMLEGACY_H
3 
4 #include <rpm/rpmtypes.h>
5 #include <rpm/rpmutil.h>
6 
7 /* ==================================================================== */
8 /* LEGACY INTERFACES AND TYPES, DO NOT USE IN NEW CODE! */
9 /* ==================================================================== */
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #ifdef _RPM_4_4_COMPAT
16 
17 /* mappings for legacy types */
18 typedef int32_t int_32 RPM_GNUC_DEPRECATED;
19 typedef int16_t int_16 RPM_GNUC_DEPRECATED;
20 typedef int8_t int_8 RPM_GNUC_DEPRECATED;
21 typedef uint32_t uint_32 RPM_GNUC_DEPRECATED;
22 typedef uint16_t uint_16 RPM_GNUC_DEPRECATED;
23 typedef uint8_t uint_8 RPM_GNUC_DEPRECATED;
24 
25 typedef rpm_tag_t * hTAG_t RPM_GNUC_DEPRECATED;
26 typedef rpm_tagtype_t * hTYP_t RPM_GNUC_DEPRECATED;
27 typedef const void * hPTR_t RPM_GNUC_DEPRECATED;
28 typedef rpm_count_t * hCNT_t RPM_GNUC_DEPRECATED;
29 
30 typedef rpmSpec Spec RPM_GNUC_DEPRECATED;
31 
32 /* legacy header interfaces */
33 
48 int headerGetEntry(Header h, rpm_tag_t tag,
49  rpm_tagtype_t * type,
50  rpm_data_t * p,
52 
66 int headerGetEntryMinMemory(Header h, rpm_tag_t tag,
67  rpm_tagtype_t * type,
68  rpm_data_t * p,
70 
85 int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
87 
102 int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
104 
114 int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
116 
129 int headerModifyEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
131 
142 int headerRemoveEntry(Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED;
143 
156 #define headerSprintf(_h, _fmt, _tbltags, _exts, _emsg) \
157  headerFormat((_h), (_fmt), (_emsg))
158 
170 int headerNextIterator(HeaderIterator hi,
171  rpm_tag_t * tag,
172  rpm_tagtype_t * type,
173  rpm_data_t * p,
175 
185 void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
186 
195 void * headerFreeData(rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
196 
201 typedef void * (*HFD_t) (rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECATED;
202 typedef int (*HGE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t * type,
203  rpm_data_t * p, rpm_count_t * c) RPM_GNUC_DEPRECATED;
204 typedef int (*HAE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type,
205  rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
206 typedef int (*HME_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type,
207  rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED;
208 typedef int (*HRE_t) (Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED;
211 /* other misc renamed / namespaced functions */
212 /* TODO: arrange deprecation warnings on these too... */
213 #define isCompressed rpmFileIsCompressed
214 #define makeTempFile rpmMkTempFile
215 #define whatis rpmfiWhatis
216 #define tagName rpmTagGetName
217 #define tagType rpmTagGetType
218 #define tagValue rpmTagGetValue
219 
220 #define xislower rislower
221 #define xisupper risupper
222 #define xisalpha risalpha
223 #define xisdigit risdigit
224 #define xisalnum risalnum
225 #define xisblank risblank
226 #define xisspace risspace
227 #define xtolower rtolower
228 #define xtoupper rtoupper
229 #define xstrcasecmp rstrcasecmp
230 #define xstrncasecmp rstrncasecmp
231 
232 #define rpmMessage rpmlog
233 #define rpmError rpmlog
234 
235 #endif /* _RPM_4_4_COMPAT */
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif /* _RPMLEGACY_H */