rpm 5.2.1

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

- File List
- Globals

lib/rpmps.h
Go to the documentation of this file.

    00001 #ifndef H_RPMPS
    00002 #define H_RPMPS
    00003
    00009 /*@-exportlocal@*/
    00010 /*@unchecked@*/
    00011 extern int _rpmps_debug;
    00012 /*@=exportlocal@*/
    00013
    00017 typedef /*@abstract@*/ struct rpmProblem_s * rpmProblem;
    00018
    00022 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmps_s * rpmps;
    00023
    00026 typedef /*@abstract@*/ struct rpmpsi_s * rpmpsi;
    00027
    00031 typedef enum rpmprobFilterFlags_e {
    00032     RPMPROB_FILTER_NONE         = 0,
    00033     RPMPROB_FILTER_IGNOREOS     = (1 << 0),
    00034     RPMPROB_FILTER_IGNOREARCH   = (1 << 1),
    00035     RPMPROB_FILTER_REPLACEPKG   = (1 << 2),
    00036     RPMPROB_FILTER_FORCERELOCATE= (1 << 3),
    00037     RPMPROB_FILTER_REPLACENEWFILES= (1 << 4),
    00038     RPMPROB_FILTER_REPLACEOLDFILES= (1 << 5),
    00039     RPMPROB_FILTER_OLDPACKAGE   = (1 << 6),
    00040     RPMPROB_FILTER_DISKSPACE    = (1 << 7),
    00041     RPMPROB_FILTER_DISKNODES    = (1 << 8)
    00042 } rpmprobFilterFlags;
    00043
    00047 typedef enum rpmProblemType_e {
    00048     RPMPROB_BADARCH,
    00049     RPMPROB_BADOS,
    00050     RPMPROB_PKG_INSTALLED,
    00051     RPMPROB_BADRELOCATE,
    00052     RPMPROB_REQUIRES,
    00053     RPMPROB_CONFLICT,
    00054     RPMPROB_NEW_FILE_CONFLICT,
    00055     RPMPROB_FILE_CONFLICT,
    00056     RPMPROB_OLDPACKAGE,
    00057     RPMPROB_DISKSPACE,
    00058     RPMPROB_DISKNODES,
    00059     RPMPROB_RDONLY,
    00060     RPMPROB_BADPRETRANS,
    00061     RPMPROB_BADPLATFORM,
    00062     RPMPROB_NOREPACKAGE
    00063  } rpmProblemType;
    00064
    00067 #if defined(_RPMPS_INTERNAL)
    00068 struct rpmProblem_s {
    00069 /*@only@*/ /*@null@*/
    00070     char * pkgNEVR;
    00071 /*@only@*/ /*@null@*/
    00072     char * altNEVR;
    00073 /*@exposed@*/ /*@null@*/
    00074     fnpyKey key;
    00075     rpmProblemType type;
    00076     int ignoreProblem;
    00077 /*@only@*/ /*@null@*/
    00078     char * str1;
    00079     unsigned long long ulong1;
    00080 };
    00081
    00084 struct rpmps_s {
    00085     struct rpmioItem_s _item;
    00086     int numProblems;
    00087     int numProblemsAlloced;
    00088     rpmProblem probs;
    00089 #if defined(__LCLINT__)
    00090 /*@refs@*/
    00091     int nrefs;
    00092 #endif
    00093 };
    00094
    00097 struct rpmpsi_s {
    00098     int ix;
    00099     rpmps ps;
    00100 };
    00101
    00102 #endif
    00103
    00104 #ifdef __cplusplus
    00105 extern "C" {
    00106 #endif
    00107
    00113 /*@-exportlocal@*/
    00114 /*@-redecl@*/   /* LCL: is confused. */
    00115 /*@only@*/ extern const char * rpmProblemString(const rpmProblem prob)
    00116         /*@*/;
    00117 /*@=redecl@*/
    00118 /*@=exportlocal@*/
    00119
    00126 /*@unused@*/ /*@null@*/
    00127 rpmps rpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
    00128                 const char * msg)
    00129         /*@modifies ps @*/;
    00130 #define rpmpsUnlink(_ps, _msg)  \
    00131         ((rpmps)rpmioUnlinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
    00132
    00139 /*@unused@*/ /*@newref@*/
    00140 rpmps rpmpsLink (rpmps ps, const char * msg)
    00141         /*@modifies ps @*/;
    00142 #define rpmpsLink(_ps, _msg)    \
    00143         ((rpmps)rpmioLinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
    00144
    00150 int rpmpsNumProblems(/*@null@*/ rpmps ps)
    00151         /*@*/;
    00152
    00158 rpmpsi rpmpsInitIterator(rpmps ps)
    00159         /*@modifies ps @*/;
    00160
    00166 rpmpsi rpmpsFreeIterator(/*@only@*/ rpmpsi psi)
    00167         /*@modifies psi @*/;
    00168
    00174 int rpmpsNextIterator(rpmpsi psi)
    00175         /*@modifies psi @*/;
    00176
    00182 /*@observer@*/
    00183 rpmProblem rpmpsProblem(rpmpsi psi)
    00184         /*@*/;
    00185
    00190 rpmps rpmpsCreate(void)
    00191         /*@*/;
    00192
    00198 /*@null@*/
    00199 rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
    00200         /*@modifies ps @*/;
    00201
    00207 void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
    00208         /*@globals fileSystem @*/
    00209         /*@modifies *fp, ps, fileSystem @*/;
    00210
    00224 void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
    00225                 /*@null@*/ const char * pkgNEVR,
    00226                 /*@exposed@*/ /*@null@*/ fnpyKey key,
    00227                 /*@null@*/ const char * dn, /*@null@*/ const char * bn,
    00228                 /*@null@*/ const char * altNEVR,
    00229                 rpmuint64_t ulong1)
    00230         /*@modifies ps @*/;
    00231
    00247 int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
    00248         /*@modifies ps @*/;
    00249
    00257 /*@exposed@*/
    00258 rpmProblem rpmpsGetProblem(/*@null@*/ rpmps ps, int num)
    00259         /*@*/;
    00260
    00267 /*@null@*/ /*@exposed@*/
    00268 char * rpmProblemGetPkgNEVR(rpmProblem prob)
    00269         /*@*/;
    00270
    00277 /*@null@*/ /*@exposed@*/
    00278 char * rpmProblemGetAltNEVR(rpmProblem prob)
    00279         /*@*/;
    00280
    00287 /*@null@*/ /*@exposed@*/
    00288 char * rpmProblemGetStr(rpmProblem prob)
    00289         /*@*/;
    00290
    00296 rpmuint64_t rpmProblemGetDiskNeed(rpmProblem prob)
    00297         /*@*/;
    00298
    00305 rpmProblemType rpmProblemGetType(rpmProblem prob)
    00306         /*@*/;
    00307
    00314 /*@null@*/ /*@exposed@*/
    00315 fnpyKey rpmProblemKey(rpmProblem prob)
    00316         /*@*/;
    00317
    00318 #ifdef __cplusplus
    00319 }
    00320 #endif
    00321
    00322 #endif  /* H_RPMPS */