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_BADPRETRANS 
00040  } rpmProblemType;
00041 
00044 struct rpmProblem_s {
00045  
00046     char * pkgNEVR;
00047  
00048     char * altNEVR;
00049  
00050     fnpyKey key;
00051     rpmProblemType type;
00052     int ignoreProblem;
00053  
00054     char * str1;
00055     unsigned long ulong1;
00056 };
00057 
00060 struct rpmps_s {
00061     int numProblems;            
00062     int numProblemsAlloced;     
00063     rpmProblem probs;           
00064 
00065     int nrefs;                  
00066 };
00067 
00068 #ifdef __cplusplus
00069 extern "C" {
00070 #endif
00071 
00077 
00078    
00079  extern const char * rpmProblemString(const rpmProblem prob)
00080         ;
00081 
00082 
00083 
00090 
00091 rpmps rpmpsUnlink (  rpmps ps,
00092                 const char * msg)
00093         ;
00094 
00096 
00097 
00098 rpmps XrpmpsUnlink (  rpmps ps,
00099                 const char * msg, const char * fn, unsigned ln)
00100         ;
00101 #define rpmpsUnlink(_ps, _msg)  XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)
00102 
00103 
00110 
00111 rpmps rpmpsLink (rpmps ps, const char * msg)
00112         ;
00113 
00115 rpmps XrpmpsLink (rpmps ps,
00116                 const char * msg, const char * fn, unsigned ln)
00117         ;
00118 #define rpmpsLink(_ps, _msg)    XrpmpsLink(_ps, _msg, __FILE__, __LINE__)
00119 
00125 int rpmpsNumProblems( rpmps ps)
00126         ;
00127 
00132 rpmps rpmpsCreate(void)
00133         ;
00134 
00140 
00141 rpmps rpmpsFree(   rpmps ps)
00142         ;
00143 
00149 void rpmpsPrint( FILE *fp,  rpmps ps)
00150         
00151         ;
00152 
00164 void rpmpsAppend( rpmps ps, rpmProblemType type,
00165                  const char * pkgNEVR,
00166                   fnpyKey key,
00167                  const char * dn,  const char * bn,
00168                  const char * altNEVR,
00169                 unsigned long ulong1)
00170         ;
00171 
00187 int rpmpsTrim( rpmps ps,  rpmps filter)
00188         ;
00189 
00190 #ifdef __cplusplus
00191 }
00192 #endif
00193 
00194 #endif