- Main Page
- Related Pages
- Modules
- Data Structures
- Files

# rpmps.h

Go to the documentation of this file.

    00001 #ifndef H_RPMPS
    00002 #define H_RPMPS
    00003
    00009 #include <stdio.h>
    00010 #include <rpm/rpmtypes.h>
    00011
    00012 #ifdef __cplusplus
    00013 extern "C" {
    00014 #endif
    00015
    00016 extern int _rpmps_debug;
    00017
    00021 typedef enum rpmprobFilterFlags_e {
    00022     RPMPROB_FILTER_NONE         = 0,
    00023     RPMPROB_FILTER_IGNOREOS     = (1 << 0),
    00024     RPMPROB_FILTER_IGNOREARCH   = (1 << 1),
    00025     RPMPROB_FILTER_REPLACEPKG   = (1 << 2),
    00026     RPMPROB_FILTER_FORCERELOCATE= (1 << 3),
    00027     RPMPROB_FILTER_REPLACENEWFILES= (1 << 4),
    00028     RPMPROB_FILTER_REPLACEOLDFILES= (1 << 5),
    00029     RPMPROB_FILTER_OLDPACKAGE   = (1 << 6),
    00030     RPMPROB_FILTER_DISKSPACE    = (1 << 7),
    00031     RPMPROB_FILTER_DISKNODES    = (1 << 8)
    00032 } rpmprobFilterFlags;
    00033
    00037 typedef struct rpmProblem_s * rpmProblem;
    00038
    00042 typedef struct rpmps_s * rpmps;
    00043
    00044 typedef struct rpmpsi_s * rpmpsi;
    00045
    00049 typedef enum rpmProblemType_e {
    00050     RPMPROB_BADARCH,
    00051     RPMPROB_BADOS,
    00052     RPMPROB_PKG_INSTALLED,
    00053     RPMPROB_BADRELOCATE,
    00054     RPMPROB_REQUIRES,
    00055     RPMPROB_CONFLICT,
    00056     RPMPROB_NEW_FILE_CONFLICT,
    00057     RPMPROB_FILE_CONFLICT,
    00058     RPMPROB_OLDPACKAGE,
    00059     RPMPROB_DISKSPACE,
    00060     RPMPROB_DISKNODES,
    00061  } rpmProblemType;
    00062
    00074 rpmProblem rpmProblemCreate(rpmProblemType type,
    00075                             const char * pkgNEVR,
    00076                             fnpyKey key,
    00077                             const char * dn, const char * bn,
    00078                             const char * altNEVR,
    00079                             uint64_t number);
    00080
    00086 rpmProblem rpmProblemFree(rpmProblem prob);
    00087
    00093 const char * rpmProblemGetPkgNEVR(const rpmProblem prob);
    00099 const char * rpmProblemGetAltNEVR(const rpmProblem prob);
    00100
    00107 rpmProblemType rpmProblemGetType(const rpmProblem prob);
    00108
    00114 fnpyKey rpmProblemGetKey(const rpmProblem prob);
    00115
    00122 const char * rpmProblemGetStr(const rpmProblem prob);
    00123
    00131 rpm_loff_t rpmProblemGetDiskNeed(const rpmProblem prob);
    00132
    00138 char * rpmProblemString(const rpmProblem prob);
    00139
    00146 rpmps rpmpsUnlink (rpmps ps,
    00147                 const char * msg);
    00148
    00155 rpmps rpmpsLink (rpmps ps, const char * msg);
    00156
    00162 int rpmpsNumProblems(rpmps ps);
    00163
    00169 rpmpsi rpmpsInitIterator(rpmps ps);
    00170
    00176 rpmpsi rpmpsFreeIterator(rpmpsi psi);
    00177
    00183 int rpmpsNextIterator(rpmpsi psi);
    00184
    00190 rpmProblem rpmpsGetProblem(rpmpsi psi);
    00191
    00196 rpmps rpmpsCreate(void);
    00197
    00203 rpmps rpmpsFree(rpmps ps);
    00204
    00210 void rpmpsPrint(FILE *fp, rpmps ps);
    00211
    00217 void rpmpsAppendProblem(rpmps ps, rpmProblem prob);
    00218
    00230 void rpmpsAppend(rpmps ps, rpmProblemType type,
    00231                 const char * pkgNEVR,
    00232                 fnpyKey key,
    00233                 const char * dn, const char * bn,
    00234                 const char * altNEVR,
    00235                 uint64_t number);
    00236
    00252 int rpmpsTrim(rpmps ps, rpmps filter);
    00253
    00254 #ifdef __cplusplus
    00255 }
    00256 #endif
    00257
    00258 #endif  /* H_RPMPS */