Go to the documentation of this file.00001 #ifndef H_RPMGI
00002 #define H_RPMGI
00003
00008 #include <fts.h>
00009 #include <argv.h>
00010 #include <rpmtypes.h>
00011 #include <rpmds.h>
00012 #include <rpmte.h>
00013 #include <rpmts.h>
00014
00017
00018
00019 extern int _rpmgi_debug;
00020
00021
00024 typedef enum rpmgiFlags_e {
00025 RPMGI_NONE = 0,
00026 RPMGI_TSADD = (1 << 0),
00027 RPMGI_TSORDER = (1 << 1),
00028 RPMGI_NOGLOB = (1 << 2),
00029 RPMGI_NOMANIFEST = (1 << 3),
00030 RPMGI_NOHEADER = (1 << 4),
00031 RPMGI_ERASING = (1 << 5)
00032 } rpmgiFlags;
00033
00036
00037 extern rpmgiFlags giFlags;
00038
00039 #if defined(_RPMGI_INTERNAL)
00040
00042 struct rpmgi_s {
00043 struct rpmioItem_s _item;
00044
00045 rpmts ts;
00046 int (*tsOrder) (rpmts ts);
00047 rpmTag tag;
00048
00049 const void * keyp;
00050 size_t keylen;
00052 rpmgiFlags flags;
00053 int active;
00054 int i;
00055
00056 const char * hdrPath;
00057
00058 Header h;
00060
00061 rpmtsi tsi;
00062
00063
00064 rpmmi mi;
00065
00066
00067 FD_t fd;
00068
00069 ARGV_t argv;
00070 int argc;
00071
00072 int ftsOpts;
00073
00074 FTS * ftsp;
00075
00076 FTSENT * fts;
00077
00078 rpmRC (*walkPathFilter) (rpmgi gi);
00079
00080 rpmRC (*stash) (rpmgi gi, Header h);
00081
00082 #if defined(__LCLINT__)
00083
00084 int nrefs;
00085 #endif
00086 };
00087 #endif
00088
00089 #ifdef __cplusplus
00090 extern "C" {
00091 #endif
00092
00095
00102
00103 rpmgi rpmgiUnlink ( rpmgi gi,
00104 const char * msg)
00105 ;
00106 #define rpmgiUnlink(_gi, _msg) \
00107 ((rpmgi)rpmioUnlinkPoolItem((rpmioItem)(_gi), _msg, __FILE__, __LINE__))
00108
00115
00116 rpmgi rpmgiLink ( rpmgi gi, const char * msg)
00117 ;
00118 #define rpmgiLink(_gi, _msg) \
00119 ((rpmgi)rpmioLinkPoolItem((rpmioItem)(_gi), _msg, __FILE__, __LINE__))
00120
00125
00126 rpmgi rpmgiFree( rpmgi gi)
00127
00128 ;
00129 #define rpmgiFree(_gi) \
00130 ((rpmgi)rpmioFreePoolItem((rpmioItem)(_gi), __FUNCTION__, __FILE__, __LINE__))
00131
00140
00141 rpmgi rpmgiNew(rpmts ts, int tag, const void * keyp,
00142 size_t keylen)
00143
00144 ;
00145
00151 rpmRC rpmgiNext( rpmgi gi)
00152
00153 ;
00154
00160 rpmgiFlags rpmgiGetFlags( rpmgi gi)
00161 ;
00162
00168
00169 const char * rpmgiHdrPath( rpmgi gi)
00170 ;
00171
00177
00178 Header rpmgiHeader( rpmgi gi)
00179 ;
00180
00186
00187 rpmts rpmgiTs( rpmgi gi)
00188 ;
00189
00195 const char * rpmgiEscapeSpaces(const char * s)
00196 ;
00197
00206 rpmRC rpmgiSetArgs( rpmgi gi, ARGV_t argv,
00207 int ftsOpts, rpmgiFlags flags)
00208
00209 ;
00210
00217
00218 Header rpmgiReadHeader(rpmgi gi, const char * path)
00219
00220 ;
00221
00224 #ifdef __cplusplus
00225 }
00226 #endif
00227
00228 #endif