lib/rpmgi.h

Go to the documentation of this file.
00001 #ifndef H_RPMGI
00002 #define H_RPMGI
00003 
00008 #include <rpmlib.h>
00009 #include <rpmte.h>
00010 #include <rpmts.h>
00011 #include <fts.h>
00012 #include <argv.h>
00013 
00016 /*@-exportlocal@*/
00017 /*@unchecked@*/
00018 extern int _rpmgi_debug;
00019 /*@=exportlocal@*/
00020 
00023 typedef enum rpmgiFlags_e {
00024     RPMGI_NONE          = 0,
00025     RPMGI_TSADD         = (1 << 0),
00026     RPMGI_TSORDER       = (1 << 1),
00027     RPMGI_NOGLOB        = (1 << 2),
00028     RPMGI_NOMANIFEST    = (1 << 3),
00029     RPMGI_NOHEADER      = (1 << 4)
00030 } rpmgiFlags;
00031 
00032 /*@unchecked@*/
00033 extern rpmgiFlags giFlags;
00034 
00035 #if defined(_RPMGI_INTERNAL)
00036 
00038 struct rpmgi_s {
00039 /*@refcounted@*/
00040     rpmts ts;                   
00041     int tag;                    
00042 /*@kept@*/ /*@relnull@*/
00043     const void * keyp;          
00044     size_t keylen;              
00046     rpmgiFlags flags;           
00047     int active;                 
00048     int i;                      
00049     int errors;                 
00050 /*@null@*/
00051     const char * hdrPath;       
00052 /*@refcounted@*/ /*@null@*/
00053     Header h;                   
00055 /*@null@*/
00056     rpmtsi tsi;
00057 
00058 /*@null@*/
00059     rpmdbMatchIterator mi;
00060 
00061 /*@refcounted@*/
00062     FD_t fd;
00063 
00064     ARGV_t argv;
00065     int argc;
00066 
00067     int ftsOpts;
00068 /*@null@*/
00069     FTS * ftsp;
00070 /*@relnull@*/
00071     FTSENT * fts;
00072 
00073 /*@refs@*/
00074     int nrefs;                  
00075 };
00076 #endif
00077 
00078 #ifdef __cplusplus
00079 extern "C" {
00080 #endif
00081 
00088 /*@unused@*/ /*@null@*/
00089 rpmgi rpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
00090                 /*@null@*/ const char * msg)
00091         /*@modifies gi @*/;
00092 
00094 /*@-exportlocal@*/
00095 /*@null@*/
00096 rpmgi XrpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
00097                 /*@null@*/ const char * msg, const char * fn, unsigned ln)
00098         /*@modifies gi @*/;
00099 /*@=exportlocal@*/
00100 #define rpmgiUnlink(_gi, _msg)  XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)
00101 
00108 /*@unused@*/ /*@newref@*/ /*@null@*/
00109 rpmgi rpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg)
00110         /*@modifies gi @*/;
00111 
00113 /*@newref@*/ /*@null@*/
00114 rpmgi XrpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg,
00115                 const char * fn, unsigned ln)
00116         /*@modifies gi @*/;
00117 #define rpmgiLink(_gi, _msg)    XrpmgiLink(_gi, _msg, __FILE__, __LINE__)
00118 
00123 /*@null@*/
00124 rpmgi rpmgiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi)
00125         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
00126         /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
00127 
00136 /*@null@*/
00137 rpmgi rpmgiNew(rpmts ts, int tag, /*@kept@*/ /*@null@*/ const void * keyp,
00138                 size_t keylen)
00139         /*@globals internalState @*/
00140         /*@modifies ts, internalState @*/;
00141 
00147 rpmRC rpmgiNext(/*@null@*/ rpmgi gi)
00148         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
00149         /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
00150 
00156 /*@observer@*/ /*@null@*/
00157 const char * rpmgiHdrPath(rpmgi gi)
00158         /*@*/;
00159 
00165 /*@null@*/
00166 Header rpmgiHeader(/*@null@*/ rpmgi gi)
00167         /*@*/;
00168 
00174 /*@null@*/
00175 rpmts rpmgiTs(/*@null@*/ rpmgi gi)
00176         /*@*/;
00177 
00186 rpmRC rpmgiSetArgs(rpmgi gi, /*@null@*/ ARGV_t argv,
00187                 int ftsOpts, rpmgiFlags flags)
00188         /*@globals internalState @*/
00189         /*@modifies gi, internalState @*/;
00190 
00196 int rpmgiNumErrors(rpmgi gi);
00197 
00198 
00199 #ifdef __cplusplus
00200 }
00201 #endif
00202 
00203 #endif  /* H_RPMGI */

Generated on Wed Sep 8 11:07:42 2010 for rpm by  doxygen 1.4.7