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@*/ /*@relnull@*/
00063     Header h;                   
00064 /*@only@*/
00065     const char * NEVR;          
00066 /*@only@*/
00067     const char * NEVRA;         
00068 /*@owned@*/
00069     const char * name;          
00070 /*@only@*/ /*@null@*/
00071     char * epoch;
00072 /*@dependent@*/ /*@null@*/
00073     char * version;             
00074 /*@dependent@*/ /*@null@*/
00075     char * release;             
00076 /*@only@*/ /*@null@*/
00077     const char * arch;          
00078 /*@only@*/ /*@null@*/
00079     const char * os;            
00080     int archScore;              
00081     int osScore;                
00082     int isSource;               
00084     rpmte parent;               
00085     int degree;                 
00086     int npreds;                 
00087     int tree;                   
00088     int depth;                  
00089     int breadth;                
00090     unsigned int db_instance;   
00091 /*@owned@*/
00092     tsortInfo tsi;              
00094 /*@refcounted@*/ /*@null@*/
00095     rpmds this;                 
00096 /*@refcounted@*/ /*@null@*/
00097     rpmds provides;             
00098 /*@refcounted@*/ /*@null@*/
00099     rpmds requires;             
00100 /*@refcounted@*/ /*@null@*/
00101     rpmds conflicts;            
00102 /*@refcounted@*/ /*@null@*/
00103     rpmds obsoletes;            
00104 /*@refcounted@*/ /*@null@*/
00105     rpmfi fi;                   
00107     uint_32 color;              
00108     uint_32 pkgFileSize;        
00110 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00111     fnpyKey key;                
00112 /*@owned@*/ /*@null@*/
00113     rpmRelocation * relocs;     
00114     int nrelocs;                
00115     int autorelocatex;          
00116 /*@refcounted@*/ /*@null@*/     
00117     FD_t fd;                    
00119 /*@-fielduse@*/ /* LCL: confused by union? */
00120     union {
00121 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00122         alKey addedKey;
00123         struct {
00124 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00125             alKey dependsOnKey;
00126             int dboffset;
00127         } removed;
00128     } u;
00129 /*@=fielduse@*/
00130 
00131 };
00132 
00136 struct rpmtsi_s {
00137 /*@refcounted@*/
00138     rpmts ts;           
00139     int reverse;        
00140     int ocsave;         
00141     int oc;             
00142 };
00143 
00144 #endif  /* _RPMTE_INTERNAL */
00145 
00146 #ifdef __cplusplus
00147 extern "C" {
00148 #endif
00149 
00155 /*@null@*/
00156 rpmte rpmteFree(/*@only@*/ /*@null@*/ rpmte te)
00157         /*@globals fileSystem @*/
00158         /*@modifies te, fileSystem @*/;
00159 
00171 /*@only@*/ /*@null@*/
00172 rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type,
00173                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ fnpyKey key,
00174                 /*@null@*/ rpmRelocation * relocs,
00175                 int dboffset,
00176                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey pkgKey)
00177         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00178         /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
00179 
00185 extern Header rpmteHeader(rpmte te)
00186         /*@modifies te @*/;
00187 
00194 extern Header rpmteSetHeader(rpmte te, Header h)
00195         /*@modifies te, h @*/;
00196 
00202 rpmElementType rpmteType(rpmte te)
00203         /*@*/;
00204 
00210 /*@observer@*/
00211 extern const char * rpmteN(rpmte te)
00212         /*@*/;
00213 
00219 /*@observer@*/ /*@null@*/
00220 extern const char * rpmteE(rpmte te)
00221         /*@*/;
00222 
00228 /*@observer@*/ /*@null@*/
00229 extern const char * rpmteV(rpmte te)
00230         /*@*/;
00231 
00237 /*@observer@*/ /*@null@*/
00238 extern const char * rpmteR(rpmte te)
00239         /*@*/;
00240 
00246 /*@observer@*/ /*@null@*/
00247 extern const char * rpmteA(rpmte te)
00248         /*@*/;
00249 
00255 /*@observer@*/ /*@null@*/
00256 extern const char * rpmteO(rpmte te)
00257         /*@*/;
00258 
00264 extern int rpmteIsSource(rpmte te)
00265         /*@*/;
00266 
00272 uint_32 rpmteColor(rpmte te)
00273         /*@*/;
00274 
00281 uint_32 rpmteSetColor(rpmte te, uint_32 color)
00282         /*@modifies te @*/;
00283 
00289 unsigned int rpmteDBInstance(rpmte te)
00290         /*@*/;
00291 
00298 void rpmteSetDBInstance(rpmte te, unsigned int instance)
00299         /*@modifies te @*/;
00300 
00307 uint_32 rpmtePkgFileSize(rpmte te)
00308         /*@*/;
00309 
00315 int rpmteDepth(rpmte te)
00316         /*@*/;
00317 
00324 int rpmteSetDepth(rpmte te, int ndepth)
00325         /*@modifies te @*/;
00326 
00332 int rpmteBreadth(rpmte te)
00333         /*@*/;
00334 
00341 int rpmteSetBreadth(rpmte te, int nbreadth)
00342         /*@modifies te @*/;
00343 
00349 int rpmteNpreds(rpmte te)
00350         /*@*/;
00351 
00358 int rpmteSetNpreds(rpmte te, int npreds)
00359         /*@modifies te @*/;
00360 
00366 int rpmteTree(rpmte te)
00367         /*@*/;
00368 
00375 int rpmteSetTree(rpmte te, int ntree)
00376         /*@modifies te @*/;
00377 
00383 /*@observer@*/ /*@unused@*/
00384 rpmte rpmteParent(rpmte te)
00385         /*@*/;
00386 
00393 /*@null@*/
00394 rpmte rpmteSetParent(rpmte te, rpmte pte)
00395         /*@modifies te @*/;
00396 
00402 int rpmteDegree(rpmte te)
00403         /*@*/;
00404 
00411 int rpmteSetDegree(rpmte te, int ndegree)
00412         /*@modifies te @*/;
00413 
00419 tsortInfo rpmteTSI(rpmte te)
00420         /*@*/;
00421 
00426 void rpmteFreeTSI(rpmte te)
00427         /*@modifies te @*/;
00428 
00433 void rpmteNewTSI(rpmte te)
00434         /*@modifies te @*/;
00435 
00440 /*@unused@*/
00441 void rpmteCleanDS(rpmte te)
00442         /*@modifies te @*/;
00443 
00449 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00450 alKey rpmteAddedKey(rpmte te)
00451         /*@*/;
00452 
00459 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00460 alKey rpmteSetAddedKey(rpmte te,
00461                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey npkgKey)
00462         /*@modifies te @*/;
00463 
00469 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00470 alKey rpmteDependsOnKey(rpmte te)
00471         /*@*/;
00472 
00478 int rpmteDBOffset(rpmte te)
00479         /*@*/;
00480 
00486 /*@observer@*/
00487 extern const char * rpmteNEVR(rpmte te)
00488         /*@*/;
00489 
00495 /*@-exportlocal@*/
00496 /*@observer@*/
00497 extern const char * rpmteNEVRA(rpmte te)
00498         /*@*/;
00499 /*@=exportlocal@*/
00500 
00506 FD_t rpmteFd(rpmte te)
00507         /*@*/;
00508 
00514 /*@exposed@*/
00515 fnpyKey rpmteKey(rpmte te)
00516         /*@*/;
00517 
00524 rpmds rpmteDS(rpmte te, rpmTag tag)
00525         /*@*/;
00526 
00533 rpmfi rpmteFI(rpmte te, rpmTag tag)
00534         /*@*/;
00535 
00541 /*@-exportlocal@*/
00542 void rpmteColorDS(rpmte te, rpmTag tag)
00543         /*@modifies te @*/;
00544 /*@=exportlocal@*/
00545 
00551 int rpmtsiOc(rpmtsi tsi)
00552         /*@*/;
00553 
00559 /*@unused@*/ /*@null@*/
00560 rpmtsi rpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi)
00561         /*@globals fileSystem @*/
00562         /*@modifies fileSystem @*/;
00563 
00571 /*@null@*/
00572 rpmtsi XrpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi,
00573                 const char * fn, unsigned int ln)
00574         /*@globals fileSystem @*/
00575         /*@modifies fileSystem @*/;
00576 #define rpmtsiFree(_tsi)        XrpmtsiFree(_tsi, __FILE__, __LINE__)
00577 
00583 /*@unused@*/ /*@only@*/
00584 rpmtsi rpmtsiInit(rpmts ts)
00585         /*@modifies ts @*/;
00586 
00594 /*@unused@*/ /*@only@*/
00595 rpmtsi XrpmtsiInit(rpmts ts,
00596                 const char * fn, unsigned int ln)
00597         /*@modifies ts @*/;
00598 #define rpmtsiInit(_ts)         XrpmtsiInit(_ts, __FILE__, __LINE__)
00599 
00606 /*@dependent@*/ /*@null@*/
00607 rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type)
00608         /*@modifies tsi @*/;
00609 
00610 #ifdef __cplusplus
00611 }
00612 #endif
00613 
00614 #endif  /* H_RPMTE */

Generated on Fri Oct 12 08:44:54 2007 for rpm by  doxygen 1.5.2