lib/rpmgi.h File Reference

#include <rpmlib.h>
#include <rpmte.h>
#include <rpmts.h>
#include <fts.h>
#include <argv.h>

Go to the source code of this file.

Defines

#define rpmgiUnlink(_gi, _msg)   XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)
#define rpmgiLink(_gi, _msg)   XrpmgiLink(_gi, _msg, __FILE__, __LINE__)

Typedefs

typedef enum rpmgiFlags_e rpmgiFlags

Enumerations

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)
}

Functions

rpmgi rpmgiUnlink (rpmgi gi, const char *msg)
 Unreference a generalized iterator instance.
rpmgi XrpmgiUnlink (rpmgi gi, const char *msg, const char *fn, unsigned ln)
rpmgi rpmgiLink (rpmgi gi, const char *msg)
 Reference a generalized iterator instance.
rpmgi XrpmgiLink (rpmgi gi, const char *msg, const char *fn, unsigned ln)
rpmgi rpmgiFree (rpmgi gi)
 Destroy a generalized iterator.
rpmgi rpmgiNew (rpmts ts, int tag, const void *keyp, size_t keylen)
 Return a generalized iterator.
rpmRC rpmgiNext (rpmgi gi)
 Perform next iteration step.
const char * rpmgiHdrPath (rpmgi gi)
 Return current header path.
Header rpmgiHeader (rpmgi gi)
 Return current iteration header.
rpmts rpmgiTs (rpmgi gi)
 Return current iteration transaction set.
rpmRC rpmgiSetArgs (rpmgi gi, ARGV_t argv, int ftsOpts, rpmgiFlags flags)
 Load iterator args.

Variables

int _rpmgi_debug
rpmgiFlags giFlags


Detailed Description

Definition in file rpmgi.h.


Define Documentation

#define rpmgiLink ( _gi,
_msg   )     XrpmgiLink(_gi, _msg, __FILE__, __LINE__)

Definition at line 116 of file rpmgi.h.

Referenced by rpmgiNew().

#define rpmgiUnlink ( _gi,
_msg   )     XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)

Definition at line 99 of file rpmgi.h.

Referenced by rpmgiFree().


Typedef Documentation

typedef enum rpmgiFlags_e rpmgiFlags


Enumeration Type Documentation

enum rpmgiFlags_e

Enumerator:
RPMGI_NONE 
RPMGI_TSADD 
RPMGI_TSORDER 
RPMGI_NOGLOB 
RPMGI_NOMANIFEST 
RPMGI_NOHEADER 

Definition at line 23 of file rpmgi.h.


Function Documentation

rpmgi rpmgiFree ( rpmgi  gi  ) 

Destroy a generalized iterator.

Parameters:
gi generalized iterator
Returns:
NULL always

Definition at line 405 of file rpmgi.c.

References _free(), argvFree(), Fclose(), Fts_close(), headerFree(), rpmdbFreeIterator(), rpmgiUnlink, rpmtsFree(), and rpmtsiFree.

Referenced by rpmcliArgIter().

const char* rpmgiHdrPath ( rpmgi  gi  ) 

Return current header path.

Parameters:
gi generalized iterator
Returns:
header path

Definition at line 668 of file rpmgi.c.

Referenced by rpmcliArgIter().

Header rpmgiHeader ( rpmgi  gi  ) 

Return current iteration header.

Parameters:
gi generalized iterator
Returns:
header

Definition at line 673 of file rpmgi.c.

Referenced by rpmgiShowMatches().

rpmgi rpmgiLink ( rpmgi  gi,
const char *  msg 
)

Reference a generalized iterator instance.

Parameters:
gi generalized iterator
msg 
Returns:
new generalized iterator reference

rpmgi rpmgiNew ( rpmts  ts,
int  tag,
const void *  keyp,
size_t  keylen 
)

Return a generalized iterator.

Parameters:
ts transaction set
tag rpm tag
keyp key data (NULL for sequential access)
keylen key data length (0 will use strlen(keyp))
Returns:
new iterator

Definition at line 444 of file rpmgi.c.

References rpmgiLink, rpmtsLink, and xcalloc().

Referenced by rpmcliArgIter().

rpmRC rpmgiNext ( rpmgi  gi  ) 

Perform next iteration step.

Parameters:
gi generalized iterator
Returns:
RPMRC_OK on success, RPMRC_NOTFOUND on EOI

Definition at line 478 of file rpmgi.c.

References _, _free(), _rpmgi_debug, Fclose(), Fts_close(), Fts_open(), HEADER_MAGIC_YES, headerFree(), headerLink(), headerRead(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMDBI_PACKAGES, rpmdbNextIterator(), rpmExpand(), RPMGI_NOHEADER, RPMGI_TSADD, RPMGI_TSORDER, rpmgiInitFilter(), rpmgiLoadReadHeader(), rpmgiOpen(), rpmgiWalkReadHeader(), rpmIsVerbose, RPMMESS_VERBOSE, rpmMessage, rpmpsFree(), rpmpsNumProblems(), rpmpsPrint(), RPMRC_NOTFOUND, RPMRC_OK, rpmteHeader(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsCloseDB(), rpmtsiFree, rpmtsiInit, rpmtsiNext(), rpmtsOrder(), rpmtsProblems(), TR_ADDED, and xstrdup().

Referenced by rpmcliArgIter(), and rpmgiShowMatches().

rpmRC rpmgiSetArgs ( rpmgi  gi,
ARGV_t  argv,
int  ftsOpts,
rpmgiFlags  flags 
)

Load iterator args.

Parameters:
gi generalized iterator
argv arg list
ftsOpts fts(3) flags
flags iterator flags
Returns:
RPMRC_OK on success

Definition at line 687 of file rpmgi.c.

References rpmgiGlobArgv().

Referenced by rpmcliArgIter().

rpmts rpmgiTs ( rpmgi  gi  ) 

Return current iteration transaction set.

Parameters:
gi generalized iterator
Returns:
transaction set

Definition at line 680 of file rpmgi.c.

rpmgi rpmgiUnlink ( rpmgi  gi,
const char *  msg 
)

Unreference a generalized iterator instance.

Parameters:
gi generalized iterator
msg 
Returns:
NULL always

rpmgi XrpmgiLink ( rpmgi  gi,
const char *  msg,
const char *  fn,
unsigned  ln 
)

Todo:
Remove debugging entry from the ABI.

Definition at line 394 of file rpmgi.c.

References _rpmgi_debug.

rpmgi XrpmgiUnlink ( rpmgi  gi,
const char *  msg,
const char *  fn,
unsigned  ln 
)

Todo:
Remove debugging entry from the ABI.

Definition at line 383 of file rpmgi.c.

References _rpmgi_debug.


Variable Documentation

int _rpmgi_debug

Definition at line 26 of file rpmgi.c.

rpmgiFlags giFlags

Definition at line 29 of file rpmgi.c.

Referenced by rpmcliArgIter().


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