lib/rpmfi.h

Go to the documentation of this file.
00001 #ifndef H_RPMFI
00002 #define H_RPMFI
00003 
00009 /*@-exportlocal@*/
00010 /*@unchecked@*/
00011 extern int _rpmfi_debug;
00012 /*@=exportlocal@*/
00013 
00014 #if defined(_RPMFI_INTERNAL)
00015 
00017 typedef struct sharedFileInfo_s *               sharedFileInfo;
00018 
00021 struct sharedFileInfo_s {
00022     int pkgFileNum;
00023     int otherFileNum;
00024     int otherPkg;
00025     int isRemoved;
00026 };
00027 
00031 struct rpmfi_s {
00032     int i;                      
00033     int j;                      
00035 /*@observer@*/
00036     const char * Type;          
00038     rpmTag tagN;                
00039 /*@refcounted@*/ /*@null@*/
00040     Header h;                   
00042 /*@only@*/ /*?null?*/
00043     const char ** bnl;          
00044 /*@only@*/ /*?null?*/
00045     const char ** dnl;          
00047 /*@only@*/ /*@relnull@*/
00048     const char ** fmd5s;        
00049 /*@only@*/ /*@relnull@*/
00050     const char ** flinks;       
00051 /*@only@*/ /*@null@*/
00052     const char ** flangs;       
00054 /*@only@*/ /*@relnull@*/
00055           uint_32 * dil;        
00056 /*@only@*/ /*?null?*/
00057     const uint_32 * fflags;     
00058 /*@only@*/ /*?null?*/
00059     const uint_32 * fsizes;     
00060 /*@only@*/ /*?null?*/
00061     const uint_32 * fmtimes;    
00062 /*@only@*/ /*?null?*/
00063           uint_16 * fmodes;     
00064 /*@only@*/ /*?null?*/
00065     const uint_16 * frdevs;     
00066 /*@only@*/ /*?null?*/
00067     const uint_32 * finodes;    
00069 /*@only@*/ /*@null@*/
00070     const char ** fuser;        
00071 /*@only@*/ /*@null@*/
00072     const char ** fgroup;       
00074 /*@only@*/ /*@null@*/
00075     char * fstates;             
00077 /*@only@*/ /*@null@*/
00078     const uint_32 * fcolors;    
00080 /*@only@*/ /*@null@*/
00081     const char ** fcontexts;    
00083 /*@only@*/ /*@null@*/
00084     const char ** cdict;        
00085     int_32 ncdict;              
00086 /*@only@*/ /*@null@*/
00087     const uint_32 * fcdictx;    
00089 /*@only@*/ /*@null@*/
00090     const uint_32 * ddict;      
00091     int_32 nddict;              
00092 /*@only@*/ /*@null@*/
00093     const uint_32 * fddictx;    
00094 /*@only@*/ /*@null@*/
00095     const uint_32 * fddictn;    
00097 /*@only@*/ /*?null?*/
00098     const uint_32 * vflags;     
00100     int_32 dc;                  
00101     int_32 fc;                  
00103 /*=============================*/
00104 /*@dependent@*/ /*@relnull@*/
00105     rpmte te;
00106 
00107     HGE_t hge;                  
00108     HAE_t hae;                  
00109     HME_t hme;                  
00110     HRE_t hre;                  
00111     HFD_t hfd;                  
00112 /*-----------------------------*/
00113     uid_t uid;                  
00114     gid_t gid;                  
00115     uint_32 flags;              
00116     fileAction action;          
00117 /*@owned@*/ /*@relnull@*/
00118     fileAction * actions;       
00119 /*@owned@*/
00120     struct fingerPrint_s * fps; 
00121 /*@owned@*/
00122     const char ** obnl;         
00123 /*@owned@*/
00124     const char ** odnl;         
00125 /*@unused@*/
00126     int_32 * odil;              
00128 /*@only@*/ /*@relnull@*/
00129     unsigned char * md5s;       
00131 /*@only@*/ /*@null@*/
00132     const char * pretrans;
00133 /*@only@*/ /*@null@*/
00134     const char * pretransprog;
00135 /*@only@*/ /*@null@*/
00136     const char * posttrans;
00137 /*@only@*/ /*@null@*/
00138     const char * posttransprog;
00139 
00140 /*@only@*/ /*@null@*/
00141     char * fn;                  
00142     int fnlen;                  
00144     int astriplen;
00145     int striplen;
00146     unsigned int archivePos;
00147     unsigned int archiveSize;
00148     mode_t dperms;              
00149     mode_t fperms;              
00150 /*@only@*/ /*@null@*/
00151     const char ** apath;
00152     int mapflags;
00153 /*@owned@*/ /*@null@*/
00154     int * fmapflags;
00155 /*@owned@*/
00156     FSM_t fsm;                  
00157     int keep_header;            
00158     uint_32 color;              
00159 /*@owned@*/
00160     sharedFileInfo replaced;    
00161 /*@owned@*/
00162     uint_32 * replacedSizes;    
00163     unsigned int record;        
00164     int magic;
00165 #define RPMFIMAGIC      0x09697923
00166 /*=============================*/
00167 
00168 /*@refs@*/ int nrefs;           
00169 };
00170 
00171 #endif  /* _RPMFI_INTERNAL */
00172 
00173 #ifdef __cplusplus
00174 extern "C" {
00175 #endif
00176 
00183 /*@unused@*/ /*@null@*/
00184 rpmfi rpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
00185                 /*@null@*/ const char * msg)
00186         /*@modifies fi @*/;
00187 
00195 /*@-exportlocal@*/
00196 /*@null@*/
00197 rpmfi XrpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
00198                 /*@null@*/ const char * msg, const char * fn, unsigned ln)
00199         /*@modifies fi @*/;
00200 /*@=exportlocal@*/
00201 #define rpmfiUnlink(_fi, _msg) XrpmfiUnlink(_fi, _msg, __FILE__, __LINE__)
00202 
00209 /*@unused@*/ /*@null@*/
00210 rpmfi rpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg)
00211         /*@modifies fi @*/;
00212 
00220 /*@null@*/
00221 rpmfi XrpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg,
00222                 const char * fn, unsigned ln)
00223         /*@modifies fi @*/;
00224 #define rpmfiLink(_fi, _msg)    XrpmfiLink(_fi, _msg, __FILE__, __LINE__)
00225 
00231 int rpmfiFC(/*@null@*/ rpmfi fi)
00232         /*@*/;
00233 
00239 /*@unused@*/
00240 int rpmfiFX(/*@null@*/ rpmfi fi)
00241         /*@*/;
00242 
00249 /*@unused@*/
00250 int rpmfiSetFX(/*@null@*/ rpmfi fi, int fx)
00251         /*@modifies fi @*/;
00252 
00258 int rpmfiDC(/*@null@*/ rpmfi fi)
00259         /*@*/;
00260 
00266 int rpmfiDX(/*@null@*/ rpmfi fi)
00267         /*@*/;
00268 
00275 int rpmfiSetDX(/*@null@*/ rpmfi fi, int dx)
00276         /*@modifies fi @*/;
00277 
00283 /*@observer@*/ /*@null@*/
00284 extern const char * rpmfiBN(/*@null@*/ rpmfi fi)
00285         /*@*/;
00286 
00292 /*@observer@*/ /*@null@*/
00293 extern const char * rpmfiDN(/*@null@*/ rpmfi fi)
00294         /*@*/;
00295 
00301 /*@observer@*/
00302 extern const char * rpmfiFN(/*@null@*/ rpmfi fi)
00303         /*@modifies fi @*/;
00304 
00310 int_32 rpmfiFFlags(/*@null@*/ rpmfi fi)
00311         /*@*/;
00312 
00318 int_32 rpmfiVFlags(/*@null@*/ rpmfi fi)
00319         /*@*/;
00320 
00326 int_16 rpmfiFMode(/*@null@*/ rpmfi fi)
00327         /*@*/;
00328 
00334 rpmfileState rpmfiFState(/*@null@*/ rpmfi fi)
00335         /*@*/;
00336 
00342 /*@observer@*/ /*@null@*/
00343 extern const unsigned char * rpmfiMD5(/*@null@*/ rpmfi fi)
00344         /*@*/;
00345 
00351 /*@observer@*/ /*@null@*/
00352 extern const char * rpmfiFLink(/*@null@*/ rpmfi fi)
00353         /*@*/;
00354 
00360 int_32 rpmfiFSize(/*@null@*/ rpmfi fi)
00361         /*@*/;
00362 
00368 int_16 rpmfiFRdev(/*@null@*/ rpmfi fi)
00369         /*@*/;
00370 
00376 int_32 rpmfiFInode(/*@null@*/ rpmfi fi)
00377         /*@*/;
00378 
00384 uint_32 rpmfiColor(/*@null@*/ rpmfi fi)
00385         /*@*/;
00386 
00392 uint_32 rpmfiFColor(/*@null@*/ rpmfi fi)
00393         /*@*/;
00394 
00400 /*@-exportlocal@*/
00401 /*@observer@*/ /*@null@*/
00402 extern const char * rpmfiFClass(/*@null@*/ rpmfi fi)
00403         /*@*/;
00404 /*@=exportlocal@*/
00405 
00411 /*@-exportlocal@*/
00412 /*@observer@*/ /*@null@*/
00413 extern const char * rpmfiFContext(/*@null@*/ rpmfi fi)
00414         /*@*/;
00415 /*@=exportlocal@*/
00416 
00423 int_32 rpmfiFDepends(/*@null@*/ rpmfi fi,
00424                 /*@out@*/ /*@null@*/ const int_32 ** fddictp)
00425         /*@modifies *fddictp @*/;
00426 
00432 int_32 rpmfiFNlink(/*@null@*/ rpmfi fi)
00433         /*@*/;
00434 
00440 int_32 rpmfiFMtime(/*@null@*/ rpmfi fi)
00441         /*@*/;
00442 
00448 /*@observer@*/ /*@null@*/
00449 extern const char * rpmfiFUser(/*@null@*/ rpmfi fi)
00450         /*@*/;
00451 
00457 /*@observer@*/ /*@null@*/
00458 extern const char * rpmfiFGroup(/*@null@*/ rpmfi fi)
00459         /*@*/;
00460 
00466 int rpmfiNext(/*@null@*/ rpmfi fi)
00467         /*@modifies fi @*/;
00468 
00475 /*@null@*/
00476 rpmfi rpmfiInit(/*@null@*/ rpmfi fi, int fx)
00477         /*@modifies fi @*/;
00478 
00484 /*@unused@*/
00485 int rpmfiNextD(/*@null@*/ rpmfi fi)
00486         /*@modifies fi @*/;
00487 
00494 /*@unused@*/ /*@null@*/
00495 rpmfi rpmfiInitD(/*@null@*/ rpmfi fi, int dx)
00496         /*@modifies fi @*/;
00497 
00503 /*@null@*/
00504 rpmfi rpmfiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi)
00505         /*@globals fileSystem @*/
00506         /*@modifies fi, fileSystem @*/;
00507 
00517 /*@null@*/
00518 rpmfi rpmfiNew(/*@null@*/ const rpmts ts, Header h, rpmTag tagN, int scareMem)
00519         /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
00520         /*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/;
00521 
00531 void rpmfiBuildFClasses(Header h,
00532                 /*@out@*/ const char *** fclassp, /*@out@*/ int * fcp)
00533         /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
00534         /*@modifies h, *fclassp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
00535 
00545 void rpmfiBuildFContexts(Header h,
00546                 /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
00547         /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
00548         /*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
00549 
00559 void rpmfiBuildFSContexts(Header h,
00560                 /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
00561         /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
00562         /*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
00563 
00573 void rpmfiBuildREContexts(Header h,
00574                 /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
00575         /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
00576         /*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
00577 
00588 void rpmfiBuildFDeps(Header h, rpmTag tagN,
00589                 /*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp)
00590         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00591         /*@modifies h, *fdepsp, *fcp,
00592                 rpmGlobalMacroContext, fileSystem, internalState @*/;
00593 
00599 fileTypes whatis(uint_16 mode)
00600         /*@*/;
00601 
00608 int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
00609         /*@*/;
00610 
00618 fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
00619         /*@globals h_errno, fileSystem, internalState @*/
00620         /*@modifies nfi, fileSystem, internalState @*/;
00621 
00627 int rpmfiConfigConflict(const rpmfi fi)
00628         /*@*/;
00629 
00635 /*@-redef@*/
00636 /*@observer@*/
00637 const char *const rpmfiTypeString(rpmfi fi)
00638         /*@*/;
00639 /*@=redef@*/
00640 
00641 #ifdef __cplusplus
00642 }
00643 #endif
00644 
00645 #endif  /* H_RPMDS */

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