rpm: /home/mdomonko/code/rpm/rpm-4.20.x/include/rpm/rpmdb.h Source File

rpm 4.20.0 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
20 typedef enum rpmMireMode_e {
21 RPMMIRE_DEFAULT = 0,
22 RPMMIRE_STRCMP = 1,
23 RPMMIRE_REGEX = 2,
24 RPMMIRE_GLOB = 3
25} rpmMireMode;
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
48 rpmop rpmdbOp(rpmdb db, rpmdbOpX opx);
49
55 int rpmdbOpenAll (rpmdb db);
56
63 int rpmdbCountPackages(rpmdb db, const char * name);
64
70 unsigned int rpmdbGetIteratorOffset(rpmdbMatchIterator mi);
71
77 int rpmdbGetIteratorCount(rpmdbMatchIterator mi);
78
84 unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi);
85
93 int rpmdbAppendIterator(rpmdbMatchIterator mi,
94 const unsigned int * hdrNums, unsigned int nHdrNums);
95
104 int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag,
105 rpmMireMode mode, const char * pattern);
106
114 int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite);
115
122 int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified);
123
131 int 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
150 Header rpmdbNextIterator(rpmdbMatchIterator mi);
151
157rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
158
165rpmdbIndexIterator rpmdbIndexKeyIteratorInit(rpmdb db, rpmDbiTag rpmtag);
166
173rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag);
174
183 int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void ** key, size_t * keylen);
184
193 int rpmdbIndexIteratorNextTd(rpmdbIndexIterator ii, rpmtd keytd);
194
200 unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii);
201
208 unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned int nr);
209
216 unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int nr);
217
223rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii);
224
231 int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl);
232
239 char *rpmdbCookie(rpmdb db);
240
247 int rpmdbStat(const char *prefix, struct stat *statbuf);
248
255 int rpmdbFStat(rpmdb db, struct stat *statbuf);
256
257#ifdef __cplusplus
258}
259#endif
260
261#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)
rpmdbGetIteratorFileNum
unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi)
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:35