rpmps.h
Go to the documentation of this file.
#ifndef H_RPMPS
#define H_RPMPS
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmps_debug;
/*@=exportlocal@*/
typedef /*@abstract@*/ struct rpmProblem_s * rpmProblem;
typedef /*@abstract@*/ /*@refcounted@*/ struct rpmps_s * rpmps;
typedef /*@abstract@*/ struct rpmpsi_s * rpmpsi;
typedef enum rpmprobFilterFlags_e {
RPMPROB_FILTER_NONE = 0,
RPMPROB_FILTER_IGNOREOS = (1 << 0),
RPMPROB_FILTER_IGNOREARCH = (1 << 1),
RPMPROB_FILTER_REPLACEPKG = (1 << 2),
RPMPROB_FILTER_FORCERELOCATE= (1 << 3),
RPMPROB_FILTER_REPLACENEWFILES= (1 << 4),
RPMPROB_FILTER_REPLACEOLDFILES= (1 << 5),
RPMPROB_FILTER_OLDPACKAGE = (1 << 6),
RPMPROB_FILTER_DISKSPACE = (1 << 7),
RPMPROB_FILTER_DISKNODES = (1 << 8)
} rpmprobFilterFlags;
typedef enum rpmProblemType_e {
RPMPROB_BADARCH,
RPMPROB_BADOS,
RPMPROB_PKG_INSTALLED,
RPMPROB_BADRELOCATE,
RPMPROB_REQUIRES,
RPMPROB_CONFLICT,
RPMPROB_NEW_FILE_CONFLICT,
RPMPROB_FILE_CONFLICT,
RPMPROB_OLDPACKAGE,
RPMPROB_DISKSPACE,
RPMPROB_DISKNODES,
RPMPROB_RDONLY,
RPMPROB_BADPRETRANS,
RPMPROB_BADPLATFORM,
RPMPROB_NOREPACKAGE
} rpmProblemType;
#if defined(_RPMPS_INTERNAL)
struct rpmProblem_s {
/*@only@*/ /*@null@*/
char * pkgNEVR;
/*@only@*/ /*@null@*/
char * altNEVR;
/*@exposed@*/ /*@null@*/
fnpyKey key;
rpmProblemType type;
int ignoreProblem;
/*@only@*/ /*@null@*/
char * str1;
unsigned long long ulong1;
};
struct rpmps_s {
struct rpmioItem_s _item;
int numProblems;
int numProblemsAlloced;
rpmProblem probs;
#if defined(__LCLINT__)
/*@refs@*/
int nrefs;
#endif
};
struct rpmpsi_s {
int ix;
rpmps ps;
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*@-exportlocal@*/
/*@-redecl@*/ /* LCL: is confused. */
/*@only@*/ extern const char * rpmProblemString(const rpmProblem prob)
/*@*/;
/*@=redecl@*/
/*@=exportlocal@*/
/*@unused@*/ /*@null@*/
rpmps rpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
const char * msg)
/*@modifies ps @*/;
#define rpmpsUnlink(_ps, _msg) \
((rpmps)rpmioUnlinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
/*@unused@*/ /*@newref@*/
rpmps rpmpsLink (rpmps ps, const char * msg)
/*@modifies ps @*/;
#define rpmpsLink(_ps, _msg) \
((rpmps)rpmioLinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__))
int rpmpsNumProblems(/*@null@*/ rpmps ps)
/*@*/;
rpmpsi rpmpsInitIterator(rpmps ps)
/*@modifies ps @*/;
rpmpsi rpmpsFreeIterator(/*@only@*/ rpmpsi psi)
/*@modifies psi @*/;
int rpmpsNextIterator(rpmpsi psi)
/*@modifies psi @*/;
/*@observer@*/
rpmProblem rpmpsProblem(rpmpsi psi)
/*@*/;
rpmps rpmpsCreate(void)
/*@*/;
/*@null@*/
rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
/*@modifies ps @*/;
void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
/*@globals fileSystem @*/
/*@modifies *fp, ps, fileSystem @*/;
void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
/*@null@*/ const char * pkgNEVR,
/*@exposed@*/ /*@null@*/ fnpyKey key,
/*@null@*/ const char * dn, /*@null@*/ const char * bn,
/*@null@*/ const char * altNEVR,
rpmuint64_t ulong1)
/*@modifies ps @*/;
int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
/*@modifies ps @*/;
/*@exposed@*/
rpmProblem rpmpsGetProblem(/*@null@*/ rpmps ps, int num)
/*@*/;
/*@null@*/ /*@exposed@*/
char * rpmProblemGetPkgNEVR(rpmProblem prob)
/*@*/;
/*@null@*/ /*@exposed@*/
char * rpmProblemGetAltNEVR(rpmProblem prob)
/*@*/;
/*@null@*/ /*@exposed@*/
char * rpmProblemGetStr(rpmProblem prob)
/*@*/;
rpmuint64_t rpmProblemGetDiskNeed(rpmProblem prob)
/*@*/;
rpmProblemType rpmProblemGetType(rpmProblem prob)
/*@*/;
/*@null@*/ /*@exposed@*/
fnpyKey rpmProblemKey(rpmProblem prob)
/*@*/;
#ifdef __cplusplus
}
#endif
#endif /* H_RPMPS */