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

# lib/rpmte.h

Go to the documentation of this file.

    00001 #ifndef H_RPMTE
    00002 #define H_RPMTE
    00003
    00011 /*@-exportlocal@*/
    00012 /*@unchecked@*/
    00013 extern int _rpmte_debug;
    00014 /*@=exportlocal@*/
    00015
    00019 typedef /*@abstract@*/ struct tsortInfo_s *             tsortInfo;
    00020
    00024 typedef /*@abstract@*/ struct rpmtsi_s *                rpmtsi;
    00025
    00029 typedef enum rpmElementType_e {
    00030     TR_ADDED            = (1 << 0),
    00031     TR_REMOVED          = (1 << 1)
    00032 } rpmElementType;
    00033
    00034 #if     defined(_RPMTE_INTERNAL)
    00035
    00038 /*@-fielduse@*/ /* LCL: confused by union? */
    00039 struct tsortInfo_s {
    00040     union {
    00041         int     count;
    00042         /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00043         rpmte   suc;
    00044     } tsi_u;
    00045 #define tsi_count       tsi_u.count
    00046 #define tsi_suc         tsi_u.suc
    00047 /*@owned@*/ /*@null@*/
    00048     struct tsortInfo_s * tsi_next;
    00049 /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00050     rpmte tsi_chain;
    00051     int         tsi_reqx;
    00052     int         tsi_qcnt;
    00053 };
    00054 /*@=fielduse@*/
    00055
    00059 struct rpmte_s {
    00060     rpmElementType type;
    00062 /*@refcounted@*/ /*@null@*/
    00063     Header h;
    00064 /*@only@*/
    00065     const char * NEVR;
    00066 /*@owned@*/
    00067     const char * name;
    00068 /*@only@*/ /*@null@*/
    00069     char * epoch;
    00070 /*@dependent@*/ /*@null@*/
    00071     char * version;
    00072 /*@dependent@*/ /*@null@*/
    00073     char * release;
    00074 /*@only@*/ /*@null@*/
    00075     const char * arch;
    00076 /*@only@*/ /*@null@*/
    00077     const char * os;
    00079     rpmte parent;
    00080     int degree;
    00081     int depth;
    00082     int npreds;
    00083     int tree;
    00084 /*@owned@*/
    00085     tsortInfo tsi;
    00087 /*@refcounted@*/ /*@null@*/
    00088     rpmds this;
    00089 /*@refcounted@*/ /*@null@*/
    00090     rpmds provides;
    00091 /*@refcounted@*/ /*@null@*/
    00092     rpmds requires;
    00093 /*@refcounted@*/ /*@null@*/
    00094     rpmds conflicts;
    00095 /*@refcounted@*/ /*@null@*/
    00096     rpmds obsoletes;
    00097 /*@refcounted@*/ /*@null@*/
    00098     rpmfi fi;
    00100     uint_32 multiLib;
    00102 /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00103     fnpyKey key;
    00104 /*@owned@*/ /*@null@*/
    00105     rpmRelocation * relocs;
    00106 /*@refcounted@*/ /*@null@*/
    00107     FD_t fd;
    00109 /*@-fielduse@*/ /* LCL: confused by union? */
    00110     union {
    00111 /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00112         alKey addedKey;
    00113         struct {
    00114 /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00115             alKey dependsOnKey;
    00116             int dboffset;
    00117         } removed;
    00118     } u;
    00119 /*@=fielduse@*/
    00120
    00121 };
    00122
    00126 struct rpmtsi_s {
    00127 /*@refcounted@*/
    00128     rpmts ts;
    00129     int reverse;
    00130     int ocsave;
    00131     int oc;
    00132 };
    00133
    00134 #endif  /* _RPMTE_INTERNAL */
    00135
    00136 #ifdef __cplusplus
    00137 extern "C" {
    00138 #endif
    00139
    00145 /*@null@*/
    00146 rpmte rpmteFree(/*@only@*/ /*@null@*/ rpmte te)
    00147         /*@globals fileSystem @*/
    00148         /*@modifies te, fileSystem @*/;
    00149
    00161 /*@only@*/ /*@null@*/
    00162 rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type,
    00163                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ fnpyKey key,
    00164                 /*@null@*/ rpmRelocation * relocs,
    00165                 int dboffset,
    00166                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey pkgKey)
    00167         /*@globals fileSystem @*/
    00168         /*@modifies ts, h, fileSystem @*/;
    00169
    00175 rpmElementType rpmteType(rpmte te)
    00176         /*@*/;
    00177
    00183 /*@observer@*/
    00184 extern const char * rpmteN(rpmte te)
    00185         /*@*/;
    00186
    00192 /*@observer@*/ /*@null@*/
    00193 extern const char * rpmteE(rpmte te)
    00194         /*@*/;
    00195
    00201 /*@observer@*/ /*@null@*/
    00202 extern const char * rpmteV(rpmte te)
    00203         /*@*/;
    00204
    00210 /*@observer@*/ /*@null@*/
    00211 extern const char * rpmteR(rpmte te)
    00212         /*@*/;
    00213
    00219 /*@observer@*/ /*@null@*/
    00220 extern const char * rpmteA(rpmte te)
    00221         /*@*/;
    00222
    00228 /*@observer@*/ /*@null@*/
    00229 extern const char * rpmteO(rpmte te)
    00230         /*@*/;
    00231
    00237 int rpmteMultiLib(rpmte te)
    00238         /*@*/;
    00239
    00246 int rpmteSetMultiLib(rpmte te, int nmultiLib)
    00247         /*@modifies te @*/;
    00248
    00254 int rpmteDepth(rpmte te)
    00255         /*@*/;
    00256
    00263 int rpmteSetDepth(rpmte te, int ndepth)
    00264         /*@modifies te @*/;
    00265
    00271 int rpmteNpreds(rpmte te)
    00272         /*@*/;
    00273
    00280 int rpmteSetNpreds(rpmte te, int npreds)
    00281         /*@modifies te @*/;
    00282
    00288 int rpmteTree(rpmte te)
    00289         /*@*/;
    00290
    00297 int rpmteSetTree(rpmte te, int ntree)
    00298         /*@modifies te @*/;
    00299
    00305 /*@observer@*/ /*@unused@*/
    00306 rpmte rpmteParent(rpmte te)
    00307         /*@*/;
    00308
    00315 rpmte rpmteSetParent(rpmte te, rpmte pte)
    00316         /*@modifies te @*/;
    00317
    00323 int rpmteDegree(rpmte te)
    00324         /*@*/;
    00325
    00332 int rpmteSetDegree(rpmte te, int ndegree)
    00333         /*@modifies te @*/;
    00334
    00340 tsortInfo rpmteTSI(rpmte te)
    00341         /*@*/;
    00342
    00347 void rpmteFreeTSI(rpmte te)
    00348         /*@modifies te @*/;
    00349
    00354 void rpmteNewTSI(rpmte te)
    00355         /*@modifies te @*/;
    00356
    00361 /*@unused@*/
    00362 void rpmteCleanDS(rpmte te)
    00363         /*@modifies te @*/;
    00364
    00370 /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00371 alKey rpmteAddedKey(rpmte te)
    00372         /*@*/;
    00373
    00380 /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00381 alKey rpmteSetAddedKey(rpmte te,
    00382                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey npkgKey)
    00383         /*@modifies te @*/;
    00384
    00390 /*@exposed@*/ /*@dependent@*/ /*@null@*/
    00391 alKey rpmteDependsOnKey(rpmte te)
    00392         /*@*/;
    00393
    00399 int rpmteDBOffset(rpmte te)
    00400         /*@*/;
    00401
    00407 /*@observer@*/
    00408 extern const char * rpmteNEVR(rpmte te)
    00409         /*@*/;
    00410
    00416 FD_t rpmteFd(rpmte te)
    00417         /*@*/;
    00418
    00424 /*@exposed@*/
    00425 fnpyKey rpmteKey(rpmte te)
    00426         /*@*/;
    00427
    00434 rpmds rpmteDS(rpmte te, rpmTag tag)
    00435         /*@*/;
    00436
    00443 rpmfi rpmteFI(rpmte te, rpmTag tag)
    00444         /*@*/;
    00445
    00451 int rpmtsiOc(rpmtsi tsi)
    00452         /*@*/;
    00453
    00459 /*@unused@*/ /*@null@*/
    00460 rpmtsi rpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi)
    00461         /*@globals fileSystem @*/
    00462         /*@modifies fileSystem @*/;
    00463
    00471 /*@null@*/
    00472 rpmtsi XrpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi,
    00473                 const char * fn, unsigned int ln)
    00474         /*@globals fileSystem @*/
    00475         /*@modifies fileSystem @*/;
    00476 #define rpmtsiFree(_tsi)        XrpmtsiFree(_tsi, __FILE__, __LINE__)
    00477
    00483 /*@unused@*/ /*@only@*/
    00484 rpmtsi rpmtsiInit(rpmts ts)
    00485         /*@modifies ts @*/;
    00486
    00494 /*@unused@*/ /*@only@*/
    00495 rpmtsi XrpmtsiInit(rpmts ts,
    00496                 const char * fn, unsigned int ln)
    00497         /*@modifies ts @*/;
    00498 #define rpmtsiInit(_ts)         XrpmtsiInit(_ts, __FILE__, __LINE__)
    00499
    00506 /*@dependent@*/ /*@null@*/
    00507 rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type)
    00508         /*@modifies tsi @*/;
    00509
    00510 #ifdef __cplusplus
    00511 }
    00512 #endif
    00513
    00514 #endif  /* H_RPMTE */