Loading...
Searching...
No Matches
rpmdb.h
Go to the documentation of this file.
#ifndef H_RPMDB
#define H_RPMDB
#include <rpm/rpmtag.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 */
rpmdbIndexIteratorNextTd
int rpmdbIndexIteratorNextTd(rpmdbIndexIterator ii, rpmtd keytd)
rpmdbGetIteratorCount
int rpmdbGetIteratorCount(rpmdbMatchIterator mi)
rpmdbCtrl
int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl)
rpmdbInitIterator
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)
rpmdbIndexIteratorNumPkgs
unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii)
rpmdbStat
int rpmdbStat(const char *prefix, struct stat *statbuf)
rpmdbIndexIteratorInit
rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag)
rpmdbAppendIterator
int rpmdbAppendIterator(rpmdbMatchIterator mi, const unsigned int *hdrNums, unsigned int nHdrNums)
rpmdbCountPackages
int rpmdbCountPackages(rpmdb db, const char *name)
rpmdbGetIteratorOffset
unsigned int rpmdbGetIteratorOffset(rpmdbMatchIterator mi)
rpmdbIndexIteratorFree
rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii)
rpmdbIndexIteratorTagNum
unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int nr)
rpmdbIndexKeyIteratorInit
rpmdbIndexIterator rpmdbIndexKeyIteratorInit(rpmdb db, rpmDbiTag rpmtag)
rpmdbFreeIterator
rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
rpmdbSetHdrChk
int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, char **msg))
rpmdbNextIterator
Header rpmdbNextIterator(rpmdbMatchIterator mi)
rpmdbSetIteratorModified
int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified)
rpmdbOpenAll
int rpmdbOpenAll(rpmdb db)
rpmdbSetIteratorRewrite
int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite)
rpmdbOp
rpmop rpmdbOp(rpmdb db, rpmdbOpX opx)
rpmdbIndexIteratorNext
int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void **key, size_t *keylen)
rpmdbCookie
char * rpmdbCookie(rpmdb db)
rpmdbFStat
int rpmdbFStat(rpmdb db, struct stat *statbuf)
rpmdbIndexIteratorPkgOffset
unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned int nr)
rpmdbSetIteratorRE
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag, rpmMireMode mode, const char *pattern)
rpmDbiTag
enum rpmDbiTag_e rpmDbiTag
rpmts
struct rpmts_s * rpmts
Definition: rpmtypes.h:63
rpmRC
enum rpmRC_e rpmRC
Header
struct headerToken_s * Header
Definition: rpmtypes.h:24
rpmMireMode
enum rpmMireMode_e rpmMireMode
rpmMireMode_e
rpmMireMode_e
Definition: rpmdb.h:20
RPMMIRE_STRCMP
@ RPMMIRE_STRCMP
Definition: rpmdb.h:22
RPMMIRE_REGEX
@ RPMMIRE_REGEX
Definition: rpmdb.h:23
RPMMIRE_GLOB
@ RPMMIRE_GLOB
Definition: rpmdb.h:24
RPMMIRE_DEFAULT
@ RPMMIRE_DEFAULT
Definition: rpmdb.h:21
rpmsw.h
rpmtag.h
rpmop_s
Definition: rpmsw.h:42
rpmtd_s
Definition: rpmtd.h:32