summaryrefslogtreecommitdiff
path: root/lib/rpmdb.h
blob: ec275008dc36c1d6edf5002d06e447705e7be47f (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef H_RPMDB
#define H_RPMDB

/** \file lib/rpmdb.h
 */

#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, /*@out@*/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, /*@out@*/dbiIndexSet * matchList, 
		    int numItems);

#ifdef __cplusplus
}
#endif

#endif	/* H_RPMDB */