rpmgi.h
Go to the documentation of this file.
#ifndef H_RPMGI
#define H_RPMGI
#include <fts.h>
#include <argv.h>
#include <rpmtypes.h>
#include <rpmds.h>
#include <rpmte.h>
#include <rpmts.h>
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmgi_debug;
/*@=exportlocal@*/
typedef enum rpmgiFlags_e {
RPMGI_NONE = 0,
RPMGI_TSADD = (1 << 0),
RPMGI_TSORDER = (1 << 1),
RPMGI_NOGLOB = (1 << 2),
RPMGI_NOMANIFEST = (1 << 3),
RPMGI_NOHEADER = (1 << 4),
RPMGI_ERASING = (1 << 5)
} rpmgiFlags;
/*@unchecked@*/
extern rpmgiFlags giFlags;
#if defined(_RPMGI_INTERNAL)
struct rpmgi_s {
struct rpmioItem_s _item;
/*@refcounted@*/
rpmts ts;
int (*tsOrder) (rpmts ts);
rpmTag tag;
/*@kept@*/ /*@relnull@*/
const void * keyp;
size_t keylen;
rpmgiFlags flags;
int active;
int i;
/*@null@*/
const char * hdrPath;
/*@refcounted@*/ /*@null@*/
Header h;
/*@null@*/
rpmtsi tsi;
/*@null@*/
rpmmi mi;
/*@refcounted@*/ /*@relnull@*/
FD_t fd;
ARGV_t argv;
int argc;
int ftsOpts;
/*@null@*/
FTS * ftsp;
/*@relnull@*/
FTSENT * fts;
/*@null@*/
rpmRC (*walkPathFilter) (rpmgi gi);
/*@null@*/
rpmRC (*stash) (rpmgi gi, Header h);
#if defined(__LCLINT__)
/*@refs@*/
int nrefs;
#endif
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*@unused@*/ /*@null@*/
rpmgi rpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
/*@null@*/ const char * msg)
/*@modifies gi @*/;
#define rpmgiUnlink(_gi, _msg) \
((rpmgi)rpmioUnlinkPoolItem((rpmioItem)(_gi), _msg, __FILE__, __LINE__))
/*@unused@*/ /*@newref@*/ /*@null@*/
rpmgi rpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg)
/*@modifies gi @*/;
#define rpmgiLink(_gi, _msg) \
((rpmgi)rpmioLinkPoolItem((rpmioItem)(_gi), _msg, __FILE__, __LINE__))
/*@null@*/
rpmgi rpmgiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
#define rpmgiFree(_gi) \
((rpmgi)rpmioFreePoolItem((rpmioItem)(_gi), __FUNCTION__, __FILE__, __LINE__))
/*@null@*/
rpmgi rpmgiNew(rpmts ts, int tag, /*@kept@*/ /*@null@*/ const void * keyp,
size_t keylen)
/*@globals internalState @*/
/*@modifies ts, internalState @*/;
rpmRC rpmgiNext(/*@null@*/ rpmgi gi)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
rpmgiFlags rpmgiGetFlags(/*@null@*/ rpmgi gi)
/*@*/;
/*@observer@*/ /*@null@*/
const char * rpmgiHdrPath(/*@null@*/ rpmgi gi)
/*@*/;
/*@null@*/
Header rpmgiHeader(/*@null@*/ rpmgi gi)
/*@*/;
/*@null@*/
rpmts rpmgiTs(/*@null@*/ rpmgi gi)
/*@*/;
const char * rpmgiEscapeSpaces(const char * s)
/*@*/;
rpmRC rpmgiSetArgs(/*@null@*/ rpmgi gi, /*@null@*/ ARGV_t argv,
int ftsOpts, rpmgiFlags flags)
/*@globals internalState @*/
/*@modifies gi, internalState @*/;
/*@null@*/
Header rpmgiReadHeader(rpmgi gi, const char * path)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
#ifdef __cplusplus
}
#endif
#endif /* H_RPMGI */