• 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     int numProblems;            
00086     int numProblemsAlloced;     
00087     rpmProblem probs;           
00088 /*@refs@*/
00089     int nrefs;                  
00090 };
00091 
00094 struct rpmpsi_s {
00095     int ix;
00096     rpmps ps;
00097 };
00098 
00099 #endif
00100 
00101 #ifdef __cplusplus
00102 extern "C" {
00103 #endif
00104 
00110 /*@-exportlocal@*/
00111 /*@-redecl@*/   /* LCL: is confused. */
00112 /*@only@*/ extern const char * rpmProblemString(const rpmProblem prob)
00113         /*@*/;
00114 /*@=redecl@*/
00115 /*@=exportlocal@*/
00116 
00123 /*@unused@*/
00124 rpmps rpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
00125                 const char * msg)
00126         /*@modifies ps @*/;
00127 
00129 /*@-exportlocal@*/
00130 /*@null@*/
00131 rpmps XrpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
00132                 const char * msg, const char * fn, unsigned ln)
00133         /*@modifies ps @*/;
00134 #define rpmpsUnlink(_ps, _msg)  XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)
00135 /*@=exportlocal@*/
00136 
00143 /*@unused@*/
00144 rpmps rpmpsLink (rpmps ps, const char * msg)
00145         /*@modifies ps @*/;
00146 
00148 rpmps XrpmpsLink (rpmps ps,
00149                 const char * msg, const char * fn, unsigned ln)
00150         /*@modifies ps @*/;
00151 #define rpmpsLink(_ps, _msg)    XrpmpsLink(_ps, _msg, __FILE__, __LINE__)
00152 
00158 int rpmpsNumProblems(/*@null@*/ rpmps ps)
00159         /*@*/;
00160 
00166 rpmpsi rpmpsInitIterator(rpmps ps)
00167         /*@*/;
00168 
00174 rpmpsi rpmpsFreeIterator(rpmpsi psi)
00175         /*@*/;
00176 
00182 int rpmpsNextIterator(rpmpsi psi)
00183         /*@*/;
00184 
00190 rpmProblem rpmpsProblem(rpmpsi psi)
00191         /*@*/;
00192 
00197 rpmps rpmpsCreate(void)
00198         /*@*/;
00199 
00205 /*@null@*/
00206 rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
00207         /*@modifies ps @*/;
00208 
00214 void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
00215         /*@globals fileSystem @*/
00216         /*@modifies *fp, ps, fileSystem @*/;
00217 
00231 void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
00232                 /*@null@*/ const char * pkgNEVR,
00233                 /*@exposed@*/ /*@null@*/ fnpyKey key,
00234                 /*@null@*/ const char * dn, /*@null@*/ const char * bn,
00235                 /*@null@*/ const char * altNEVR,
00236                 uint64_t ulong1)
00237         /*@modifies ps @*/;
00238 
00254 int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
00255         /*@modifies ps @*/;
00256 
00264 /*@exposed@*/
00265 rpmProblem rpmpsGetProblem(/*@null@*/ rpmps ps, int num)
00266         /*@*/;
00267 
00274 /*@null@*/ /*@exposed@*/
00275 char * rpmProblemGetPkgNEVR(rpmProblem prob)
00276         /*@*/;
00277 
00284 /*@null@*/ /*@exposed@*/
00285 char * rpmProblemGetAltNEVR(rpmProblem prob)
00286         /*@*/;
00287 
00294 char * rpmProblemGetStr(rpmProblem prob)
00295         /*@*/;
00296 
00303 unsigned long long rpmProblemGetLong(rpmProblem prob)
00304         /*@*/;
00305 
00312 rpmProblemType rpmProblemGetType(rpmProblem prob)
00313         /*@*/;
00314 
00321 /*@null@*/ /*@exposed@*/
00322 fnpyKey rpmProblemKey(rpmProblem prob)
00323         /*@*/;
00324 
00325 #ifdef __cplusplus
00326 }
00327 #endif
00328 
00329 #endif  /* H_RPMPS */

Generated on Mon Nov 29 2010 05:18:44 for rpm by  doxygen 1.7.2