rpm  4.5
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 
27 typedef enum rpmProblemType_e {
44 
47 #if defined(_RPMPS_INTERNAL)
48 struct rpmProblem_s {
49 /*@only@*/ /*@null@*/
50  char * pkgNEVR;
51 /*@only@*/ /*@null@*/
52  char * altNEVR;
53 /*@exposed@*/ /*@null@*/
54  fnpyKey key;
55  rpmProblemType type;
56  int ignoreProblem;
57 /*@only@*/ /*@null@*/
58  char * str1;
59  unsigned long long ulong1;
60 };
61 
64 struct rpmps_s {
65  int numProblems;
66  int numProblemsAlloced;
67  rpmProblem probs;
68 /*@refs@*/
69  int nrefs;
70 };
71 #endif
72 
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76 
82 /*@-exportlocal@*/
83 /*@-redecl@*/ /* LCL: is confused. */
84 /*@only@*/ extern const char * rpmProblemString(const rpmProblem prob)
85  /*@*/;
86 /*@=redecl@*/
87 /*@=exportlocal@*/
88 
95 /*@unused@*/
96 rpmps rpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
97  const char * msg)
98  /*@modifies ps @*/;
99 
101 /*@-exportlocal@*/
102 /*@null@*/
103 rpmps XrpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
104  const char * msg, const char * fn, unsigned ln)
105  /*@modifies ps @*/;
106 #define rpmpsUnlink(_ps, _msg) XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)
107 /*@=exportlocal@*/
108 
115 /*@unused@*/
116 rpmps rpmpsLink (rpmps ps, const char * msg)
117  /*@modifies ps @*/;
118 
121  const char * msg, const char * fn, unsigned ln)
122  /*@modifies ps @*/;
123 #define rpmpsLink(_ps, _msg) XrpmpsLink(_ps, _msg, __FILE__, __LINE__)
124 
130 int rpmpsNumProblems(/*@null@*/ rpmps ps)
131  /*@*/;
132 
137 rpmps rpmpsCreate(void)
138  /*@*/;
139 
145 /*@null@*/
146 rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
147  /*@modifies ps @*/;
148 
154 void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
155  /*@globals fileSystem @*/
156  /*@modifies *fp, ps, fileSystem @*/;
157 
171 void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
172  /*@null@*/ const char * pkgNEVR,
173  /*@exposed@*/ /*@null@*/ fnpyKey key,
174  /*@null@*/ const char * dn, /*@null@*/ const char * bn,
175  /*@null@*/ const char * altNEVR,
176  unsigned long long ulong1)
177  /*@modifies ps @*/;
178 
194 int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
195  /*@modifies ps @*/;
196 
204 rpmProblem rpmpsGetProblem(/*@null@*/ rpmps ps, int num)
205  /*@*/;
206 
213 char * rpmProblemGetPkgNEVR(rpmProblem prob)
214  /*@*/;
215 
222 char * rpmProblemGetAltNEVR(rpmProblem prob)
223  /*@*/;
224 
231 char * rpmProblemGetStr(rpmProblem prob)
232  /*@*/;
233 
240 unsigned long long rpmProblemGetLong(rpmProblem prob)
241  /*@*/;
242 
250  /*@*/;
251 
259  /*@*/;
260 
261 #ifdef __cplusplus
262 }
263 #endif
264 
265 #endif /* H_RPMPS */