rpm  4.14.0
Typedefs | Enumerations | Functions
rpmdb.h File Reference

RPM database API. More...

#include <rpm/rpmtypes.h>
#include <rpm/rpmsw.h>
Include dependency graph for rpmdb.h:

Go to the source code of this file.

Typedefs

typedef enum rpmMireMode_e rpmMireMode
 Tag value pattern match mode. More...
 
typedef enum rpmdbOpX_e rpmdbOpX
 
typedef enum rpmdbCtrlOp_e rpmdbCtrlOp
 

Enumerations

enum  rpmMireMode_e { RPMMIRE_DEFAULT = 0, RPMMIRE_STRCMP = 1, RPMMIRE_REGEX = 2, RPMMIRE_GLOB = 3 }
 Tag value pattern match mode. More...
 
enum  rpmdbOpX_e { RPMDB_OP_DBGET = 1, RPMDB_OP_DBPUT = 2, RPMDB_OP_DBDEL = 3, RPMDB_OP_MAX = 4 }
 
enum  rpmdbCtrlOp_e {
  RPMDB_CTRL_LOCK_RO = 1, RPMDB_CTRL_UNLOCK_RO = 2, RPMDB_CTRL_LOCK_RW = 3, RPMDB_CTRL_UNLOCK_RW = 4,
  RPMDB_CTRL_INDEXSYNC = 5
}
 

Functions

rpmop rpmdbOp (rpmdb db, rpmdbOpX opx)
 Retrieve operation timestamp from rpm database. More...
 
int rpmdbOpenAll (rpmdb db)
 Open all database indices. More...
 
int rpmdbCountPackages (rpmdb db, const char *name)
 Return number of instances of package in rpm database. More...
 
unsigned int rpmdbGetIteratorOffset (rpmdbMatchIterator mi)
 Return header join key for current position of rpm database iterator. More...
 
int rpmdbGetIteratorCount (rpmdbMatchIterator mi)
 Return number of elements in rpm database iterator. More...
 
unsigned int rpmdbGetIteratorFileNum (rpmdbMatchIterator mi)
 
int rpmdbAppendIterator (rpmdbMatchIterator mi, const unsigned int *hdrNums, unsigned int nHdrNums)
 Append items to set of package instances to iterate. More...
 
int rpmdbSetIteratorRE (rpmdbMatchIterator mi, rpmTagVal tag, rpmMireMode mode, const char *pattern)
 Add pattern to iterator selector. More...
 
int rpmdbSetIteratorRewrite (rpmdbMatchIterator mi, int rewrite)
 Prepare iterator for lazy writes. More...
 
int rpmdbSetIteratorModified (rpmdbMatchIterator mi, int modified)
 Modify iterator to mark header for lazy write on release. More...
 
int rpmdbSetHdrChk (rpmdbMatchIterator mi, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, char **msg))
 Modify iterator to verify retrieved header blobs. More...
 
rpmdbMatchIterator rpmdbInitIterator (rpmdb db, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)
 Return database iterator. More...
 
Header rpmdbNextIterator (rpmdbMatchIterator mi)
 Return next package header from iteration. More...
 
rpmdbMatchIterator rpmdbFreeIterator (rpmdbMatchIterator mi)
 Destroy rpm database iterator. More...
 
rpmdbIndexIterator rpmdbIndexIteratorInit (rpmdb db, rpmDbiTag rpmtag)
 Get an iterator for an index. More...
 
int rpmdbIndexIteratorNext (rpmdbIndexIterator ii, const void **key, size_t *keylen)
 Get the next key - Warning! Keys are not zero terminated! Binary tags may even contain zero bytes. More...
 
int rpmdbIndexIteratorNextTd (rpmdbIndexIterator ii, rpmtd keytd)
 Get the next key into a tag data container. More...
 
unsigned int rpmdbIndexIteratorNumPkgs (rpmdbIndexIterator ii)
 Get number of entries for current key. More...
 
unsigned int rpmdbIndexIteratorPkgOffset (rpmdbIndexIterator ii, unsigned int nr)
 Get package offset of entry. More...
 
unsigned int rpmdbIndexIteratorTagNum (rpmdbIndexIterator ii, unsigned int nr)
 Get tag number of entry. More...
 
rpmdbIndexIterator rpmdbIndexIteratorFree (rpmdbIndexIterator ii)
 Free index iterator. More...
 
int rpmdbCtrl (rpmdb db, rpmdbCtrlOp ctrl)
 manipulate the rpm database More...
 

Detailed Description

RPM database API.

Definition in file rpmdb.h.

Typedef Documentation

◆ rpmdbCtrlOp

typedef enum rpmdbCtrlOp_e rpmdbCtrlOp

◆ rpmdbOpX

typedef enum rpmdbOpX_e rpmdbOpX

◆ rpmMireMode

typedef enum rpmMireMode_e rpmMireMode

Tag value pattern match mode.

Enumeration Type Documentation

◆ rpmdbCtrlOp_e

Enumerator
RPMDB_CTRL_LOCK_RO 
RPMDB_CTRL_UNLOCK_RO 
RPMDB_CTRL_LOCK_RW 
RPMDB_CTRL_UNLOCK_RW 
RPMDB_CTRL_INDEXSYNC 

Definition at line 33 of file rpmdb.h.

◆ rpmdbOpX_e

enum rpmdbOpX_e
Enumerator
RPMDB_OP_DBGET 
RPMDB_OP_DBPUT 
RPMDB_OP_DBDEL 
RPMDB_OP_MAX 

Definition at line 26 of file rpmdb.h.

◆ rpmMireMode_e

Tag value pattern match mode.

Enumerator
RPMMIRE_DEFAULT 

regex with ., .* and ^...$ added

RPMMIRE_STRCMP 

strings using strcmp(3)

RPMMIRE_REGEX 

regex(7) patterns through regcomp(3)

RPMMIRE_GLOB 

glob(7) patterns through fnmatch(3)

Definition at line 19 of file rpmdb.h.