rpm 5.2.1

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

- File List
- Globals

rpmps.h
Go to the documentation of this file.
1 #ifndef H_RPMPS
2 #define H_RPMPS
3
9 /*@-exportlocal@*/
10 /*@unchecked@*/
11 extern int _rpmps_debug;
12 /*@=exportlocal@*/
13
17 typedef /*@abstract@*/ struct rpmProblem_s * rpmProblem;
18
22 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmps_s * rpmps;
23
26 typedef /*@abstract@*/ struct rpmpsi_s * rpmpsi;
27
31 typedef enum rpmprobFilterFlags_e {
32 RPMPROB_FILTER_NONE = 0,
33 RPMPROB_FILTER_IGNOREOS = (1 << 0),
34 RPMPROB_FILTER_IGNOREARCH = (1 << 1),
35 RPMPROB_FILTER_REPLACEPKG = (1 << 2),
36 RPMPROB_FILTER_FORCERELOCATE= (1 << 3),
37 RPMPROB_FILTER_REPLACENEWFILES= (1 << 4),
38 RPMPROB_FILTER_REPLACEOLDFILES= (1 << 5),
39 RPMPROB_FILTER_OLDPACKAGE = (1 << 6),
40 RPMPROB_FILTER_DISKSPACE = (1 << 7),
41 RPMPROB_FILTER_DISKNODES = (1 << 8)
42 } rpmprobFilterFlags;
43
47 typedef enum rpmProblemType_e {
48 RPMPROB_BADARCH,
49 RPMPROB_BADOS,
50 RPMPROB_PKG_INSTALLED,
51 RPMPROB_BADRELOCATE,
52 RPMPROB_REQUIRES,
53 RPMPROB_CONFLICT,
54 RPMPROB_NEW_FILE_CONFLICT,
55 RPMPROB_FILE_CONFLICT,
56 RPMPROB_OLDPACKAGE,
57 RPMPROB_DISKSPACE,
58 RPMPROB_DISKNODES,
59 RPMPROB_RDONLY,
60 RPMPROB_BADPRETRANS,
61 RPMPROB_BADPLATFORM,
62 RPMPROB_NOREPACKAGE
63 } rpmProblemType;
64
67 #if defined(_RPMPS_INTERNAL)
68 struct rpmProblem_s {
69 /*@only@*/ /*@null@*/
70 char * pkgNEVR;
71 /*@only@*/ /*@null@*/
72 char * altNEVR;
73 /*@exposed@*/ /*@null@*/
74 fnpyKey key;
75 rpmProblemType type;
76 int ignoreProblem;
77 /*@only@*/ /*@null@*/
78 char * str1;
79 unsigned long long ulong1;
80 };
81
84 struct rpmps_s {
85 struct rpmioItem_s _item;
86 int numProblems;
87 int numProblemsAlloced;
88 rpmProblem probs;
89 #if defined(__LCLINT__)
90 /*@refs@*/
91 int nrefs;
92 #endif
93 };
94
97 struct rpmpsi_s {
98 int ix;
99 rpmps ps;
100 };
101
102 #endif
103
104 #ifdef __cplusplus
105 extern "C" {
106 #endif
107
113 /*@-exportlocal@*/
114 /*@-redecl@*/ /* LCL: is confused. */
115 /*@only@*/ extern const char * rpmProblemString(const rpmProblem prob)
116 /*@*/;
117 /*@=redecl@*/
118 /*@=exportlocal@*/
119
126 /*@unused@*/ /*@null@*/
127 rpmps rpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
128 const char * msg)
129 /*@modifies ps @*/;
130 #define rpmpsUnlink(_ps, _msg) \
131 ((rpmps)rpmioUnlinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
132
139 /*@unused@*/ /*@newref@*/
140 rpmps rpmpsLink (rpmps ps, const char * msg)
141 /*@modifies ps @*/;
142 #define rpmpsLink(_ps, _msg) \
143 ((rpmps)rpmioLinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
144
150 int rpmpsNumProblems(/*@null@*/ rpmps ps)
151 /*@*/;
152
158 rpmpsi rpmpsInitIterator(rpmps ps)
159 /*@modifies ps @*/;
160
166 rpmpsi rpmpsFreeIterator(/*@only@*/ rpmpsi psi)
167 /*@modifies psi @*/;
168
174 int rpmpsNextIterator(rpmpsi psi)
175 /*@modifies psi @*/;
176
182 /*@observer@*/
183 rpmProblem rpmpsProblem(rpmpsi psi)
184 /*@*/;
185
190 rpmps rpmpsCreate(void)
191 /*@*/;
192
198 /*@null@*/
199 rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
200 /*@modifies ps @*/;
201
207 void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
208 /*@globals fileSystem @*/
209 /*@modifies *fp, ps, fileSystem @*/;
210
224 void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
225 /*@null@*/ const char * pkgNEVR,
226 /*@exposed@*/ /*@null@*/ fnpyKey key,
227 /*@null@*/ const char * dn, /*@null@*/ const char * bn,
228 /*@null@*/ const char * altNEVR,
229 rpmuint64_t ulong1)
230 /*@modifies ps @*/;
231
247 int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
248 /*@modifies ps @*/;
249
257 /*@exposed@*/
258 rpmProblem rpmpsGetProblem(/*@null@*/ rpmps ps, int num)
259 /*@*/;
260
267 /*@null@*/ /*@exposed@*/
268 char * rpmProblemGetPkgNEVR(rpmProblem prob)
269 /*@*/;
270
277 /*@null@*/ /*@exposed@*/
278 char * rpmProblemGetAltNEVR(rpmProblem prob)
279 /*@*/;
280
287 /*@null@*/ /*@exposed@*/
288 char * rpmProblemGetStr(rpmProblem prob)
289 /*@*/;
290
296 rpmuint64_t rpmProblemGetDiskNeed(rpmProblem prob)
297 /*@*/;
298
305 rpmProblemType rpmProblemGetType(rpmProblem prob)
306 /*@*/;
307
314 /*@null@*/ /*@exposed@*/
315 fnpyKey rpmProblemKey(rpmProblem prob)
316 /*@*/;
317
318 #ifdef __cplusplus
319 }
320 #endif
321
322 #endif /* H_RPMPS */