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
00027 typedef enum rpmProblemType_e {
00028 RPMPROB_BADARCH,
00029 RPMPROB_BADOS,
00030 RPMPROB_PKG_INSTALLED,
00031 RPMPROB_BADRELOCATE,
00032 RPMPROB_REQUIRES,
00033 RPMPROB_CONFLICT,
00034 RPMPROB_NEW_FILE_CONFLICT,
00035 RPMPROB_FILE_CONFLICT,
00036 RPMPROB_OLDPACKAGE,
00037 RPMPROB_DISKSPACE,
00038 RPMPROB_DISKNODES,
00039 RPMPROB_RDONLY,
00040 RPMPROB_BADPRETRANS,
00041 RPMPROB_BADPLATFORM,
00042 RPMPROB_NOREPACKAGE
00043 } rpmProblemType;
00044
00047 #if defined(_RPMPS_INTERNAL)
00048 struct rpmProblem_s {
00049
00050 char * pkgNEVR;
00051
00052 char * altNEVR;
00053
00054 fnpyKey key;
00055 rpmProblemType type;
00056 int ignoreProblem;
00057
00058 char * str1;
00059 unsigned long long ulong1;
00060 };
00061
00064 struct rpmps_s {
00065 int numProblems;
00066 int numProblemsAlloced;
00067 rpmProblem probs;
00068
00069 int nrefs;
00070 };
00071 #endif
00072
00073 #ifdef __cplusplus
00074 extern "C" {
00075 #endif
00076
00082
00083
00084 extern const char * rpmProblemString(const rpmProblem prob)
00085 ;
00086
00087
00088
00095
00096 rpmps rpmpsUnlink ( rpmps ps,
00097 const char * msg)
00098 ;
00099
00101
00102
00103 rpmps XrpmpsUnlink ( rpmps ps,
00104 const char * msg, const char * fn, unsigned ln)
00105 ;
00106 #define rpmpsUnlink(_ps, _msg) XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)
00107
00108
00115
00116 rpmps rpmpsLink (rpmps ps, const char * msg)
00117 ;
00118
00120 rpmps XrpmpsLink (rpmps ps,
00121 const char * msg, const char * fn, unsigned ln)
00122 ;
00123 #define rpmpsLink(_ps, _msg) XrpmpsLink(_ps, _msg, __FILE__, __LINE__)
00124
00130 int rpmpsNumProblems( rpmps ps)
00131 ;
00132
00137 rpmps rpmpsCreate(void)
00138 ;
00139
00145
00146 rpmps rpmpsFree( rpmps ps)
00147 ;
00148
00154 void rpmpsPrint( FILE *fp, rpmps ps)
00155
00156 ;
00157
00171 void rpmpsAppend( rpmps ps, rpmProblemType type,
00172 const char * pkgNEVR,
00173 fnpyKey key,
00174 const char * dn, const char * bn,
00175 const char * altNEVR,
00176 unsigned long long ulong1)
00177 ;
00178
00194 int rpmpsTrim( rpmps ps, rpmps filter)
00195 ;
00196
00204 rpmProblem rpmpsGetProblem( rpmps ps, int num)
00205 ;
00206
00213 char * rpmProblemGetPkgNEVR(rpmProblem prob)
00214 ;
00215
00222 char * rpmProblemGetAltNEVR(rpmProblem prob)
00223 ;
00224
00231 char * rpmProblemGetStr(rpmProblem prob)
00232 ;
00233
00240 unsigned long long rpmProblemGetLong(rpmProblem prob)
00241 ;
00242
00249 rpmProblemType rpmProblemGetType(rpmProblem prob)
00250 ;
00251
00258 fnpyKey rpmProblemKey(rpmProblem prob)
00259 ;
00260
00261 #ifdef __cplusplus
00262 }
00263 #endif
00264
00265 #endif