rpm  5.4.10
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 {
43 
47 typedef enum rpmProblemType_e {
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 /*@null@*/
151 rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
152  /*@modifies ps @*/;
153 #define rpmpsFree(_ps) \
154  ((rpmps)rpmioFreePoolItem((rpmioItem)(_ps), __FUNCTION__, __FILE__, __LINE__))
155 
161 int rpmpsNumProblems(/*@null@*/ rpmps ps)
162  /*@*/;
163 
170  /*@modifies ps @*/;
171 
177 rpmpsi rpmpsFreeIterator(/*@only@*/ rpmpsi psi)
178  /*@modifies psi @*/;
179 
185 int rpmpsNextIterator(rpmpsi psi)
186  /*@modifies psi @*/;
187 
193 /*@observer@*/
195  /*@*/;
196 
201 rpmps rpmpsCreate(void)
202  /*@*/;
203 
209 void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
210  /*@globals fileSystem @*/
211  /*@modifies *fp, ps, fileSystem @*/;
212 
226 void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
227  /*@null@*/ const char * pkgNEVR,
228  /*@exposed@*/ /*@null@*/ fnpyKey key,
229  /*@null@*/ const char * dn, /*@null@*/ const char * bn,
230  /*@null@*/ const char * altNEVR,
231  rpmuint64_t ulong1)
232  /*@modifies ps @*/;
233 
249 int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
250  /*@modifies ps @*/;
251 
259 /*@exposed@*/
260 rpmProblem rpmpsGetProblem(/*@null@*/ rpmps ps, int num)
261  /*@*/;
262 
269 /*@null@*/ /*@exposed@*/
270 char * rpmProblemGetPkgNEVR(rpmProblem prob)
271  /*@*/;
272 
279 /*@null@*/ /*@exposed@*/
280 char * rpmProblemGetAltNEVR(rpmProblem prob)
281  /*@*/;
282 
289 /*@null@*/ /*@exposed@*/
290 char * rpmProblemGetStr(rpmProblem prob)
291  /*@*/;
292 
299  /*@*/;
300 
308  /*@*/;
309 
316 /*@null@*/ /*@exposed@*/
318  /*@*/;
319 
320 #ifdef __cplusplus
321 }
322 #endif
323 
324 #endif /* H_RPMPS */