rpm 4.19.92
The RPM Package Manager
Loading...
Searching...
No Matches
rpmdb.h
Go to the documentation of this file.
1#ifndef H_RPMDB
2#define H_RPMDB
3
9#include <rpm/rpmtag.h>
10#include <rpm/rpmsw.h>
11#include <sys/stat.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
20typedef enum rpmMireMode_e {
24 RPMMIRE_GLOB = 3
26
27typedef enum rpmdbOpX_e {
28 RPMDB_OP_DBGET = 1,
29 RPMDB_OP_DBPUT = 2,
30 RPMDB_OP_DBDEL = 3,
31 RPMDB_OP_MAX = 4
32} rpmdbOpX;
33
34typedef enum rpmdbCtrlOp_e {
35 RPMDB_CTRL_LOCK_RO = 1,
36 RPMDB_CTRL_UNLOCK_RO = 2,
37 RPMDB_CTRL_LOCK_RW = 3,
38 RPMDB_CTRL_UNLOCK_RW = 4,
39 RPMDB_CTRL_INDEXSYNC = 5
40} rpmdbCtrlOp;
41
48rpmop rpmdbOp(rpmdb db, rpmdbOpX opx);
49
55int rpmdbOpenAll (rpmdb db);
56
63int rpmdbCountPackages(rpmdb db, const char * name);
64
70unsigned int rpmdbGetIteratorOffset(rpmdbMatchIterator mi);
71
77int rpmdbGetIteratorCount(rpmdbMatchIterator mi);
78
84unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi);
85
93int rpmdbAppendIterator(rpmdbMatchIterator mi,
94 const unsigned int * hdrNums, unsigned int nHdrNums);
95
104int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag,
105 rpmMireMode mode, const char * pattern);
106
114int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite);
115
122int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified);
123
131int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts,
132 rpmRC (*hdrchk) (rpmts ts, const void * uh, size_t uc, char ** msg));
133
142rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag,
143 const void * keyp, size_t keylen);
144
150Header rpmdbNextIterator(rpmdbMatchIterator mi);
151
157rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
158
165rpmdbIndexIterator rpmdbIndexKeyIteratorInit(rpmdb db, rpmDbiTag rpmtag);
166
173rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag);
174
183int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void ** key, size_t * keylen);
184
193int rpmdbIndexIteratorNextTd(rpmdbIndexIterator ii, rpmtd keytd);
194
200unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii);
201
208unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned int nr);
209
216unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int nr);
217
223rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii);
224
231int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl);
232
239char *rpmdbCookie(rpmdb db);
240
247int rpmdbStat(const char *prefix, struct stat *statbuf);
248
255int rpmdbFStat(rpmdb db, struct stat *statbuf);
256
257#ifdef __cplusplus
258}
259#endif
260
261#endif /* H_RPMDB */
int rpmdbIndexIteratorNextTd(rpmdbIndexIterator ii, rpmtd keytd)
int rpmdbGetIteratorCount(rpmdbMatchIterator mi)
int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl)
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)
unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii)
unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi)
int rpmdbStat(const char *prefix, struct stat *statbuf)
rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag)
int rpmdbAppendIterator(rpmdbMatchIterator mi, const unsigned int *hdrNums, unsigned int nHdrNums)
int rpmdbCountPackages(rpmdb db, const char *name)
unsigned int rpmdbGetIteratorOffset(rpmdbMatchIterator mi)
rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii)
unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int nr)
rpmdbIndexIterator rpmdbIndexKeyIteratorInit(rpmdb db, rpmDbiTag rpmtag)
rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, char **msg))
Header rpmdbNextIterator(rpmdbMatchIterator mi)
int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified)
int rpmdbOpenAll(rpmdb db)
int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite)
rpmop rpmdbOp(rpmdb db, rpmdbOpX opx)
int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void **key, size_t *keylen)
char * rpmdbCookie(rpmdb db)
int rpmdbFStat(rpmdb db, struct stat *statbuf)
unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned int nr)
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag, rpmMireMode mode, const char *pattern)
enum rpmDbiTag_e rpmDbiTag
struct rpmts_s * rpmts
Definition rpmtypes.h:63
enum rpmRC_e rpmRC
struct headerToken_s * Header
Definition rpmtypes.h:24
enum rpmMireMode_e rpmMireMode
rpmMireMode_e
Definition rpmdb.h:20
@ RPMMIRE_STRCMP
Definition rpmdb.h:22
@ RPMMIRE_REGEX
Definition rpmdb.h:23
@ RPMMIRE_GLOB
Definition rpmdb.h:24
@ RPMMIRE_DEFAULT
Definition rpmdb.h:21
Definition rpmsw.h:42
Definition rpmtd.h:35