summaryrefslogtreecommitdiff
path: root/lib/rpmdb.h
blob: e4fbf7d76178aed3a314aafbbc767da50637ee36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef H_RPMDB
#define H_RPMDB

#include <rpmlib.h>
#include "fprint.h"

/* for RPM's internal use only */

#define RPMDB_FLAG_JUSTCHECK	(1 << 0)
#define RPMDB_FLAG_MINIMAL	(1 << 1)

#ifdef __cplusplus
extern "C" {
#endif

int openDatabase(const char * prefix, const char * dbpath, rpmdb *rpmdbp, int mode,
		 int perms, int flags);
int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant);
int rpmdbAdd(rpmdb db, Header dbentry);
int rpmdbUpdateRecord(rpmdb db, int secOffset, Header secHeader);
void rpmdbRemoveDatabase(const char * rootdir, const char * dbpath);
int rpmdbMoveDatabase(const char * rootdir, const char * olddbpath, const char * newdbpath);
/* matchList must be preallocated!!! */
int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, 
		    int numItems);

#ifdef __cplusplus
}
#endif

#endif	/* H_RPMDB */