rpm  4.5
Typedefs | Enumerations | Variables
lib/rpmgi.h File Reference
#include <rpmlib.h>
#include <rpmds.h>
#include <rpmte.h>
#include <rpmts.h>
#include <fts.h>
#include <argv.h>
Include dependency graph for rpmgi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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), RPMGI_ERASING = (1 << 5)
}

Variables

int _rpmgi_debug
rpmgiFlags giFlags

RPMGI

#define rpmgiUnlink(_gi, _msg)   XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)
#define rpmgiLink(_gi, _msg)   XrpmgiLink(_gi, _msg, __FILE__, __LINE__)
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.
const char * rpmgiEscapeSpaces (const char *s)
 Escape isspace(3) characters in string.
rpmRC rpmgiSetArgs (rpmgi gi, ARGV_t argv, int ftsOpts, rpmgiFlags flags)
 Load iterator args.

Detailed Description

Definition in file rpmgi.h.


Define Documentation

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

Definition at line 130 of file rpmgi.h.

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

Definition at line 111 of file rpmgi.h.


Typedef Documentation

typedef enum rpmgiFlags_e rpmgiFlags

Enumeration Type Documentation

Enumerator:
RPMGI_NONE 
RPMGI_TSADD 
RPMGI_TSORDER 
RPMGI_NOGLOB 
RPMGI_NOMANIFEST 
RPMGI_NOHEADER 
RPMGI_ERASING 

Definition at line 24 of file rpmgi.h.


Function Documentation

const char* rpmgiEscapeSpaces ( const char *  s)

Escape isspace(3) characters in string.

Parameters:
sstring
Returns:
escaped string

Definition at line 323 of file rpmgi.c.

References xmalloc().

Referenced by IDTXglob(), rpmgiGlobArgv(), and rpmInstall().

rpmgi rpmgiFree ( rpmgi  gi)

Destroy a generalized iterator.

Parameters:
gigeneralized iterator
Returns:
NULL always

Definition at line 475 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:
gigeneralized iterator
Returns:
header path

Definition at line 813 of file rpmgi.c.

Referenced by rpmcliArgIter().

Header rpmgiHeader ( rpmgi  gi)

Return current iteration header.

Parameters:
gigeneralized iterator
Returns:
header

Definition at line 818 of file rpmgi.c.

Referenced by rpmgiShowMatches().

rpmgi rpmgiLink ( rpmgi  gi,
const char *  msg 
)

Reference a generalized iterator instance.

Parameters:
gigeneralized iterator
msg
Returns:
new generalized iterator reference

Referenced by rpmgiNew().

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

Return a generalized iterator.

Parameters:
tstransaction set
tagrpm tag
keypkey data (NULL for sequential access)
keylenkey data length (0 will use strlen(keyp))
Returns:
new iterator

Definition at line 514 of file rpmgi.c.

References rpmgiLink(), rpmtsLink(), rpmtsOrder(), and xcalloc().

Referenced by rpmcliArgIter().

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

Load iterator args.

Parameters:
gigeneralized iterator
argvarg list
ftsOptsfts(3) flags
flagsiterator flags
Returns:
RPMRC_OK on success

Definition at line 832 of file rpmgi.c.

References ftsOpts, rpmgiGlobArgv(), and RPMRC_FAIL.

Referenced by rpmcliArgIter().

rpmts rpmgiTs ( rpmgi  gi)

Return current iteration transaction set.

Parameters:
gigeneralized iterator
Returns:
transaction set

Definition at line 825 of file rpmgi.c.

rpmgi rpmgiUnlink ( rpmgi  gi,
const char *  msg 
)

Unreference a generalized iterator instance.

Parameters:
gigeneralized iterator
msg
Returns:
NULL always

Referenced by rpmgiFree().

rpmgi XrpmgiLink ( rpmgi  gi,
const char *  msg,
const char *  fn,
unsigned  ln 
)
Todo:
Remove debugging entry from the ABI.

Definition at line 464 of file rpmgi.c.

References _rpmgi_debug, and tagName().

rpmgi XrpmgiUnlink ( rpmgi  gi,
const char *  msg,
const char *  fn,
unsigned  ln 
)
Todo:
Remove debugging entry from the ABI.

Definition at line 453 of file rpmgi.c.

References _rpmgi_debug, and tagName().


Variable Documentation

Definition at line 28 of file rpmgi.c.

Definition at line 33 of file rpmgi.c.

Referenced by rpmcliArgIter().