Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

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 
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 /*@only@*/ /*@null@*/
00050     char * pkgNEVR;
00051 /*@only@*/ /*@null@*/
00052     char * altNEVR;
00053 /*@exposed@*/ /*@null@*/
00054     fnpyKey key;
00055     rpmProblemType type;
00056     int ignoreProblem;
00057 /*@only@*/ /*@null@*/
00058     char * str1;
00059     unsigned long long ulong1;
00060 };
00061 
00064 struct rpmps_s {
00065     int numProblems;            
00066     int numProblemsAlloced;     
00067     rpmProblem probs;           
00068 /*@refs@*/
00069     int nrefs;                  
00070 };
00071 #endif
00072 
00073 #ifdef __cplusplus
00074 extern "C" {
00075 #endif
00076 
00082 /*@-exportlocal@*/
00083 /*@-redecl@*/   /* LCL: is confused. */
00084 /*@only@*/ extern const char * rpmProblemString(const rpmProblem prob)
00085         /*@*/;
00086 /*@=redecl@*/
00087 /*@=exportlocal@*/
00088 
00095 /*@unused@*/
00096 rpmps rpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
00097                 const char * msg)
00098         /*@modifies ps @*/;
00099 
00101 /*@-exportlocal@*/
00102 /*@null@*/
00103 rpmps XrpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
00104                 const char * msg, const char * fn, unsigned ln)
00105         /*@modifies ps @*/;
00106 #define rpmpsUnlink(_ps, _msg)  XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)
00107 /*@=exportlocal@*/
00108 
00115 /*@unused@*/
00116 rpmps rpmpsLink (rpmps ps, const char * msg)
00117         /*@modifies ps @*/;
00118 
00120 rpmps XrpmpsLink (rpmps ps,
00121                 const char * msg, const char * fn, unsigned ln)
00122         /*@modifies ps @*/;
00123 #define rpmpsLink(_ps, _msg)    XrpmpsLink(_ps, _msg, __FILE__, __LINE__)
00124 
00130 int rpmpsNumProblems(/*@null@*/ rpmps ps)
00131         /*@*/;
00132 
00137 rpmps rpmpsCreate(void)
00138         /*@*/;
00139 
00145 /*@null@*/
00146 rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
00147         /*@modifies ps @*/;
00148 
00154 void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
00155         /*@globals fileSystem @*/
00156         /*@modifies *fp, ps, fileSystem @*/;
00157 
00171 void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
00172                 /*@null@*/ const char * pkgNEVR,
00173                 /*@exposed@*/ /*@null@*/ fnpyKey key,
00174                 /*@null@*/ const char * dn, /*@null@*/ const char * bn,
00175                 /*@null@*/ const char * altNEVR,
00176                 unsigned long long ulong1)
00177         /*@modifies ps @*/;
00178 
00194 int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
00195         /*@modifies ps @*/;
00196 
00204 rpmProblem rpmpsGetProblem(/*@null@*/ 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  /* H_RPMPS */

Generated on Sun Aug 18 10:48:21 2013 for rpm by  doxygen 1.4.4