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@*/ /*@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;                
00083     rpmte parent;               
00084     int degree;                 
00085     int depth;                  
00086     int npreds;                 
00087     int tree;                   
00088 /*@owned@*/
00089     tsortInfo tsi;              
00091 /*@refcounted@*/ /*@null@*/
00092     rpmds this;                 
00093 /*@refcounted@*/ /*@null@*/
00094     rpmds provides;             
00095 /*@refcounted@*/ /*@null@*/
00096     rpmds requires;             
00097 /*@refcounted@*/ /*@null@*/
00098     rpmds conflicts;            
00099 /*@refcounted@*/ /*@null@*/
00100     rpmds obsoletes;            
00101 /*@refcounted@*/ /*@null@*/
00102     rpmfi fi;                   
00104     uint_32 color;              
00105     uint_32 pkgFileSize;        
00107 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00108     fnpyKey key;                
00109 /*@owned@*/ /*@null@*/
00110     rpmRelocation * relocs;     
00111     int nrelocs;                
00112     int autorelocatex;          
00113 /*@refcounted@*/ /*@null@*/     
00114     FD_t fd;                    
00116 /*@-fielduse@*/ /* LCL: confused by union? */
00117     union { 
00118 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00119         alKey addedKey;
00120         struct {
00121 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00122             alKey dependsOnKey;
00123             int dboffset;
00124         } removed;
00125     } u;
00126 /*@=fielduse@*/
00127 
00128 };
00129 
00133 struct rpmtsi_s {
00134 /*@refcounted@*/
00135     rpmts ts;           
00136     int reverse;        
00137     int ocsave;         
00138     int oc;             
00139 };
00140 
00141 #endif  /* _RPMTE_INTERNAL */
00142 
00143 #ifdef __cplusplus
00144 extern "C" {
00145 #endif
00146 
00152 /*@null@*/
00153 rpmte rpmteFree(/*@only@*/ /*@null@*/ rpmte te)
00154         /*@globals fileSystem @*/
00155         /*@modifies te, fileSystem @*/;
00156 
00168 /*@only@*/ /*@null@*/
00169 rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type,
00170                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ fnpyKey key,
00171                 /*@null@*/ rpmRelocation * relocs,
00172                 int dboffset,
00173                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey pkgKey)
00174         /*@globals fileSystem @*/
00175         /*@modifies ts, h, fileSystem @*/;
00176 
00182 rpmElementType rpmteType(rpmte te)
00183         /*@*/;
00184 
00190 /*@observer@*/
00191 extern const char * rpmteN(rpmte te)
00192         /*@*/;
00193 
00199 /*@observer@*/ /*@null@*/
00200 extern const char * rpmteE(rpmte te)
00201         /*@*/;
00202 
00208 /*@observer@*/ /*@null@*/
00209 extern const char * rpmteV(rpmte te)
00210         /*@*/;
00211 
00217 /*@observer@*/ /*@null@*/
00218 extern const char * rpmteR(rpmte te)
00219         /*@*/;
00220 
00226 /*@observer@*/ /*@null@*/
00227 extern const char * rpmteA(rpmte te)
00228         /*@*/;
00229 
00235 /*@observer@*/ /*@null@*/
00236 extern const char * rpmteO(rpmte te)
00237         /*@*/;
00238 
00244 uint_32 rpmteColor(rpmte te)
00245         /*@*/;
00246 
00253 uint_32 rpmteSetColor(rpmte te, uint_32 color)
00254         /*@modifies te @*/;
00255 
00262 uint_32 rpmtePkgFileSize(rpmte te)
00263         /*@*/;
00264 
00270 int rpmteDepth(rpmte te)
00271         /*@*/;
00272 
00279 int rpmteSetDepth(rpmte te, int ndepth)
00280         /*@modifies te @*/;
00281 
00287 int rpmteNpreds(rpmte te)
00288         /*@*/;
00289 
00296 int rpmteSetNpreds(rpmte te, int npreds)
00297         /*@modifies te @*/;
00298 
00304 int rpmteTree(rpmte te)
00305         /*@*/;
00306 
00313 int rpmteSetTree(rpmte te, int ntree)
00314         /*@modifies te @*/;
00315 
00321 /*@observer@*/ /*@unused@*/
00322 rpmte rpmteParent(rpmte te)
00323         /*@*/;
00324 
00331 /*@null@*/
00332 rpmte rpmteSetParent(rpmte te, rpmte pte)
00333         /*@modifies te @*/;
00334 
00340 int rpmteDegree(rpmte te)
00341         /*@*/;
00342 
00349 int rpmteSetDegree(rpmte te, int ndegree)
00350         /*@modifies te @*/;
00351 
00357 tsortInfo rpmteTSI(rpmte te)
00358         /*@*/;
00359 
00364 void rpmteFreeTSI(rpmte te)
00365         /*@modifies te @*/;
00366 
00371 void rpmteNewTSI(rpmte te)
00372         /*@modifies te @*/;
00373 
00378 /*@unused@*/
00379 void rpmteCleanDS(rpmte te)
00380         /*@modifies te @*/;
00381 
00387 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00388 alKey rpmteAddedKey(rpmte te)
00389         /*@*/;
00390 
00397 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00398 alKey rpmteSetAddedKey(rpmte te,
00399                 /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey npkgKey)
00400         /*@modifies te @*/;
00401 
00407 /*@exposed@*/ /*@dependent@*/ /*@null@*/
00408 alKey rpmteDependsOnKey(rpmte te)
00409         /*@*/;
00410 
00416 int rpmteDBOffset(rpmte te)
00417         /*@*/;
00418 
00424 /*@observer@*/
00425 extern const char * rpmteNEVR(rpmte te)
00426         /*@*/;
00427 
00433 /*@-exportlocal@*/
00434 /*@observer@*/
00435 extern const char * rpmteNEVRA(rpmte te)
00436         /*@*/;
00437 /*@=exportlocal@*/
00438 
00444 FD_t rpmteFd(rpmte te)
00445         /*@*/;
00446 
00452 /*@exposed@*/
00453 fnpyKey rpmteKey(rpmte te)
00454         /*@*/;
00455 
00462 rpmds rpmteDS(rpmte te, rpmTag tag)
00463         /*@*/;
00464 
00471 rpmfi rpmteFI(rpmte te, rpmTag tag)
00472         /*@*/;
00473 
00479 /*@-exportlocal@*/
00480 void rpmteColorDS(rpmte te, rpmTag tag)
00481         /*@modifies te @*/;
00482 /*@=exportlocal@*/
00483 
00489 int rpmtsiOc(rpmtsi tsi)
00490         /*@*/;
00491 
00497 /*@unused@*/ /*@null@*/
00498 rpmtsi rpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi)
00499         /*@globals fileSystem @*/
00500         /*@modifies fileSystem @*/;
00501 
00509 /*@null@*/
00510 rpmtsi XrpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi,
00511                 const char * fn, unsigned int ln)
00512         /*@globals fileSystem @*/
00513         /*@modifies fileSystem @*/;
00514 #define rpmtsiFree(_tsi)        XrpmtsiFree(_tsi, __FILE__, __LINE__)
00515 
00521 /*@unused@*/ /*@only@*/
00522 rpmtsi rpmtsiInit(rpmts ts)
00523         /*@modifies ts @*/;
00524 
00532 /*@unused@*/ /*@only@*/
00533 rpmtsi XrpmtsiInit(rpmts ts,
00534                 const char * fn, unsigned int ln)
00535         /*@modifies ts @*/;
00536 #define rpmtsiInit(_ts)         XrpmtsiInit(_ts, __FILE__, __LINE__)
00537 
00544 /*@dependent@*/ /*@null@*/
00545 rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type)
00546         /*@modifies tsi @*/;
00547 
00548 #ifdef __cplusplus
00549 }
00550 #endif
00551 
00552 #endif  /* H_RPMTE */

Generated on Sun Oct 26 13:02:01 2003 for rpm by doxygen1.2.18