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 /*@null@*/
00050     const char * hdrPath;       
00051 /*@refcounted@*/ /*@null@*/
00052     Header h;                   
00054 /*@null@*/
00055     rpmtsi tsi;
00056 
00057 /*@null@*/
00058     rpmdbMatchIterator mi;
00059 
00060 /*@refcounted@*/
00061     FD_t fd;
00062 
00063     ARGV_t argv;
00064     int argc;
00065 
00066     int ftsOpts;
00067 /*@null@*/
00068     FTS * ftsp;
00069 /*@relnull@*/
00070     FTSENT * fts;
00071 
00072 /*@refs@*/
00073     int nrefs;                  
00074 };
00075 #endif
00076 
00077 #ifdef __cplusplus
00078 extern "C" {
00079 #endif
00080 
00087 /*@unused@*/ /*@null@*/
00088 rpmgi rpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
00089                 /*@null@*/ const char * msg)
00090         /*@modifies gi @*/;
00091 
00093 /*@-exportlocal@*/
00094 /*@null@*/
00095 rpmgi XrpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
00096                 /*@null@*/ const char * msg, const char * fn, unsigned ln)
00097         /*@modifies gi @*/;
00098 /*@=exportlocal@*/
00099 #define rpmgiUnlink(_gi, _msg)  XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)
00100 
00107 /*@unused@*/ /*@newref@*/ /*@null@*/
00108 rpmgi rpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg)
00109         /*@modifies gi @*/;
00110 
00112 /*@newref@*/ /*@null@*/
00113 rpmgi XrpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg,
00114                 const char * fn, unsigned ln)
00115         /*@modifies gi @*/;
00116 #define rpmgiLink(_gi, _msg)    XrpmgiLink(_gi, _msg, __FILE__, __LINE__)
00117 
00122 /*@null@*/
00123 rpmgi rpmgiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi)
00124         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
00125         /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
00126 
00135 /*@null@*/
00136 rpmgi rpmgiNew(rpmts ts, int tag, /*@kept@*/ /*@null@*/ const void * keyp,
00137                 size_t keylen)
00138         /*@globals internalState @*/
00139         /*@modifies ts, internalState @*/;
00140 
00146 rpmRC rpmgiNext(/*@null@*/ rpmgi gi)
00147         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
00148         /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
00149 
00155 /*@observer@*/ /*@null@*/
00156 const char * rpmgiHdrPath(rpmgi gi)
00157         /*@*/;
00158 
00164 /*@null@*/
00165 Header rpmgiHeader(/*@null@*/ rpmgi gi)
00166         /*@*/;
00167 
00173 /*@null@*/
00174 rpmts rpmgiTs(/*@null@*/ rpmgi gi)
00175         /*@*/;
00176 
00185 rpmRC rpmgiSetArgs(rpmgi gi, /*@null@*/ ARGV_t argv,
00186                 int ftsOpts, rpmgiFlags flags)
00187         /*@globals internalState @*/
00188         /*@modifies gi, internalState @*/;
00189 
00190 #ifdef __cplusplus
00191 }
00192 #endif
00193 
00194 #endif  /* H_RPMGI */

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