Go to the documentation of this file.00001 #ifndef H_RPMPS
00002 #define H_RPMPS
00003
00009
00010
00011 extern int _rpmps_debug;
00012
00013
00017 typedef struct rpmProblem_s * rpmProblem;
00018
00022 typedef struct rpmps_s * rpmps;
00023
00026 typedef 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
00070 char * pkgNEVR;
00071
00072 char * altNEVR;
00073
00074 fnpyKey key;
00075 rpmProblemType type;
00076 int ignoreProblem;
00077
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
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
00114
00115 extern const char * rpmProblemString(const rpmProblem prob)
00116 ;
00117
00118
00119
00126
00127 rpmps rpmpsUnlink ( rpmps ps,
00128 const char * msg)
00129 ;
00130 #define rpmpsUnlink(_ps, _msg) \
00131 ((rpmps)rpmioUnlinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
00132
00139
00140 rpmps rpmpsLink (rpmps ps, const char * msg)
00141 ;
00142 #define rpmpsLink(_ps, _msg) \
00143 ((rpmps)rpmioLinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
00144
00150 int rpmpsNumProblems( rpmps ps)
00151 ;
00152
00158 rpmpsi rpmpsInitIterator(rpmps ps)
00159 ;
00160
00166 rpmpsi rpmpsFreeIterator( rpmpsi psi)
00167 ;
00168
00174 int rpmpsNextIterator(rpmpsi psi)
00175 ;
00176
00182
00183 rpmProblem rpmpsProblem(rpmpsi psi)
00184 ;
00185
00190 rpmps rpmpsCreate(void)
00191 ;
00192
00198
00199 rpmps rpmpsFree( rpmps ps)
00200 ;
00201
00207 void rpmpsPrint( FILE *fp, rpmps ps)
00208
00209 ;
00210
00224 void rpmpsAppend( rpmps ps, rpmProblemType type,
00225 const char * pkgNEVR,
00226 fnpyKey key,
00227 const char * dn, const char * bn,
00228 const char * altNEVR,
00229 rpmuint64_t ulong1)
00230 ;
00231
00247 int rpmpsTrim( rpmps ps, rpmps filter)
00248 ;
00249
00257
00258 rpmProblem rpmpsGetProblem( rpmps ps, int num)
00259 ;
00260
00267
00268 char * rpmProblemGetPkgNEVR(rpmProblem prob)
00269 ;
00270
00277
00278 char * rpmProblemGetAltNEVR(rpmProblem prob)
00279 ;
00280
00287
00288 char * rpmProblemGetStr(rpmProblem prob)
00289 ;
00290
00296 rpmuint64_t rpmProblemGetDiskNeed(rpmProblem prob)
00297 ;
00298
00305 rpmProblemType rpmProblemGetType(rpmProblem prob)
00306 ;
00307
00314
00315 fnpyKey rpmProblemKey(rpmProblem prob)
00316 ;
00317
00318 #ifdef __cplusplus
00319 }
00320 #endif
00321
00322 #endif