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
00017
00018 extern int _rpmgi_debug;
00019
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
00033 extern rpmgiFlags giFlags;
00034
00035 #if defined(_RPMGI_INTERNAL)
00036
00038 struct rpmgi_s {
00039
00040 rpmts ts;
00041 int tag;
00042
00043 const void * keyp;
00044 size_t keylen;
00046 rpmgiFlags flags;
00047 int active;
00048 int i;
00049
00050 const char * hdrPath;
00051
00052 Header h;
00054
00055 rpmtsi tsi;
00056
00057
00058 rpmdbMatchIterator mi;
00059
00060
00061 FD_t fd;
00062
00063 ARGV_t argv;
00064 int argc;
00065
00066 int ftsOpts;
00067
00068 FTS * ftsp;
00069
00070 FTSENT * fts;
00071
00072
00073 int nrefs;
00074 };
00075 #endif
00076
00077 #ifdef __cplusplus
00078 extern "C" {
00079 #endif
00080
00087
00088 rpmgi rpmgiUnlink ( rpmgi gi,
00089 const char * msg)
00090 ;
00091
00093
00094
00095 rpmgi XrpmgiUnlink ( rpmgi gi,
00096 const char * msg, const char * fn, unsigned ln)
00097 ;
00098
00099 #define rpmgiUnlink(_gi, _msg) XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)
00100
00107
00108 rpmgi rpmgiLink ( rpmgi gi, const char * msg)
00109 ;
00110
00112
00113 rpmgi XrpmgiLink ( rpmgi gi, const char * msg,
00114 const char * fn, unsigned ln)
00115 ;
00116 #define rpmgiLink(_gi, _msg) XrpmgiLink(_gi, _msg, __FILE__, __LINE__)
00117
00122
00123 rpmgi rpmgiFree( rpmgi gi)
00124
00125 ;
00126
00135
00136 rpmgi rpmgiNew(rpmts ts, int tag, const void * keyp,
00137 size_t keylen)
00138
00139 ;
00140
00146 rpmRC rpmgiNext( rpmgi gi)
00147
00148 ;
00149
00155
00156 const char * rpmgiHdrPath(rpmgi gi)
00157 ;
00158
00164
00165 Header rpmgiHeader( rpmgi gi)
00166 ;
00167
00173
00174 rpmts rpmgiTs( rpmgi gi)
00175 ;
00176
00185 rpmRC rpmgiSetArgs(rpmgi gi, ARGV_t argv,
00186 int ftsOpts, rpmgiFlags flags)
00187
00188 ;
00189
00190 #ifdef __cplusplus
00191 }
00192 #endif
00193
00194 #endif