rpmdb.h
Go to the documentation of this file.
#ifndef H_RPMDB
#define H_RPMDB
#include <rpm/rpmtypes.h>
#include <rpm/rpmsw.h>
#include <sys/stat.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum rpmMireMode_e {
RPMMIRE_DEFAULT = 0,
RPMMIRE_STRCMP = 1,
RPMMIRE_REGEX = 2,
RPMMIRE_GLOB = 3
} rpmMireMode;
typedef enum rpmdbOpX_e {
RPMDB_OP_DBGET = 1,
RPMDB_OP_DBPUT = 2,
RPMDB_OP_DBDEL = 3,
RPMDB_OP_MAX = 4
} rpmdbOpX;
typedef 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
} rpmdbCtrlOp;
rpmop rpmdbOp(rpmdb db, rpmdbOpX opx);
int rpmdbOpenAll (rpmdb db);
int rpmdbCountPackages(rpmdb db, const char * name);
unsigned int rpmdbGetIteratorOffset(rpmdbMatchIterator mi);
int rpmdbGetIteratorCount(rpmdbMatchIterator mi);
unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi);
int rpmdbAppendIterator(rpmdbMatchIterator mi,
const unsigned int * hdrNums, unsigned int nHdrNums);
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag,
rpmMireMode mode, const char * pattern);
int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite);
int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified);
int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts,
rpmRC (*hdrchk) (rpmts ts, const void * uh, size_t uc, char ** msg));
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag,
const void * keyp, size_t keylen);
Header rpmdbNextIterator(rpmdbMatchIterator mi);
rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
rpmdbIndexIterator rpmdbIndexKeyIteratorInit(rpmdb db, rpmDbiTag rpmtag);
rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag);
int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void ** key, size_t * keylen);
int rpmdbIndexIteratorNextTd(rpmdbIndexIterator ii, rpmtd keytd);
unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii);
unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned int nr);
unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int nr);
rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii);
int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl);
char *rpmdbCookie(rpmdb db);
int rpmdbStat(const char *prefix, struct stat *statbuf);
int rpmdbFStat(rpmdb db, struct stat *statbuf);
#ifdef __cplusplus
}
#endif
#endif /* H_RPMDB */
rpmMireMode
enum rpmMireMode_e rpmMireMode
Tag value pattern match mode.
rpmdbSetIteratorRewrite
int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite)
rpmDbiTag
enum rpmDbiTag_e rpmDbiTag
rpmts
struct rpmts_s * rpmts
Definition: rpmtypes.h:63
RPMDB_CTRL_LOCK_RO
@ RPMDB_CTRL_LOCK_RO
Definition: rpmdb.h:35
RPMDB_CTRL_UNLOCK_RO
@ RPMDB_CTRL_UNLOCK_RO
Definition: rpmdb.h:36
rpmdbOpenAll
int rpmdbOpenAll(rpmdb db)
RPMDB_CTRL_UNLOCK_RW
@ RPMDB_CTRL_UNLOCK_RW
Definition: rpmdb.h:38
rpmdbInitIterator
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)
RPMDB_OP_DBPUT
@ RPMDB_OP_DBPUT
Definition: rpmdb.h:29
rpmdbGetIteratorFileNum
unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi)
rpmdbIndexIteratorTagNum
unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int nr)
rpmdbFStat
int rpmdbFStat(rpmdb db, struct stat *statbuf)
rpmdbGetIteratorCount
int rpmdbGetIteratorCount(rpmdbMatchIterator mi)
rpmdbIndexIteratorInit
rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag)
rpmRC
enum rpmRC_e rpmRC
rpmdbOp
rpmop rpmdbOp(rpmdb db, rpmdbOpX opx)
rpmdbCookie
char * rpmdbCookie(rpmdb db)
rpmdbStat
int rpmdbStat(const char *prefix, struct stat *statbuf)
rpmdbSetHdrChk
int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, char **msg))
rpmdbGetIteratorOffset
unsigned int rpmdbGetIteratorOffset(rpmdbMatchIterator mi)
rpmdbIndexIterator
struct rpmdbIndexIterator_s * rpmdbIndexIterator
Definition: rpmtypes.h:75
RPMMIRE_GLOB
@ RPMMIRE_GLOB
Definition: rpmdb.h:24
rpmdbMatchIterator
struct rpmdbMatchIterator_s * rpmdbMatchIterator
Definition: rpmtypes.h:69
rpmdbIndexIteratorNext
int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void **key, size_t *keylen)
rpmdbIndexKeyIteratorInit
rpmdbIndexIterator rpmdbIndexKeyIteratorInit(rpmdb db, rpmDbiTag rpmtag)
rpmdbFreeIterator
rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
rpmdbSetIteratorModified
int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified)
rpmdbCtrl
int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl)
RPMDB_OP_DBGET
@ RPMDB_OP_DBGET
Definition: rpmdb.h:28
rpmdbSetIteratorRE
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag, rpmMireMode mode, const char *pattern)
rpmdbCtrlOp_e
rpmdbCtrlOp_e
Definition: rpmdb.h:34
rpmtd_s
Definition: rpmtd.h:32
rpmdbIndexIteratorPkgOffset
unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned int nr)
rpmdbIndexIteratorNumPkgs
unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii)
rpmdbAppendIterator
int rpmdbAppendIterator(rpmdbMatchIterator mi, const unsigned int *hdrNums, unsigned int nHdrNums)
RPMMIRE_REGEX
@ RPMMIRE_REGEX
Definition: rpmdb.h:23
RPMDB_CTRL_INDEXSYNC
@ RPMDB_CTRL_INDEXSYNC
Definition: rpmdb.h:39
rpmdbIndexIteratorNextTd
int rpmdbIndexIteratorNextTd(rpmdbIndexIterator ii, rpmtd keytd)
RPMMIRE_STRCMP
@ RPMMIRE_STRCMP
Definition: rpmdb.h:22
RPMDB_OP_MAX
@ RPMDB_OP_MAX
Definition: rpmdb.h:31
rpmop_s
Definition: rpmsw.h:42
Header
struct headerToken_s * Header
Definition: rpmtypes.h:24
rpmdbCtrlOp
enum rpmdbCtrlOp_e rpmdbCtrlOp
rpmMireMode_e
rpmMireMode_e
Tag value pattern match mode.
Definition: rpmdb.h:20
rpmTagVal
rpm_tag_t rpmTagVal
Definition: rpmtypes.h:30
RPMDB_CTRL_LOCK_RW
@ RPMDB_CTRL_LOCK_RW
Definition: rpmdb.h:37
rpmDbiTagVal
rpm_tag_t rpmDbiTagVal
Definition: rpmtypes.h:31
rpmdbNextIterator
Header rpmdbNextIterator(rpmdbMatchIterator mi)
rpmdbIndexIteratorFree
rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii)
RPMDB_OP_DBDEL
@ RPMDB_OP_DBDEL
Definition: rpmdb.h:30
rpmdbCountPackages
int rpmdbCountPackages(rpmdb db, const char *name)
RPMMIRE_DEFAULT
@ RPMMIRE_DEFAULT
Definition: rpmdb.h:21
rpmdb
struct rpmdb_s * rpmdb
Definition: rpmtypes.h:68
rpmdbOpX_e
rpmdbOpX_e
Definition: rpmdb.h:27
rpmdbOpX
enum rpmdbOpX_e rpmdbOpX