blob: a11e53d2b7d17a42977e5d1fa945391edcb069dd (
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
|
#ifndef _RCC_DB4_H
#define _RCC_DB4_H
#include "../config.h"
#include "librcc.h"
#ifdef HAVE_DB_H
# include <db.h>
#endif /* HAVE_DB_H */
struct db4_context_t {
#ifdef HAVE_DB_H
DB_ENV *dbe;
DB *db;
#endif /* HAVE_DB_H */
rcc_db4_flags flags;
};
typedef struct db4_context_t db4_context_s;
typedef struct db4_context_t *db4_context;
db4_context rccDb4CreateContext(const char *dbpath, rcc_db4_flags flags);
void rccDb4FreeContext(db4_context ctx);
int rccDb4SetKey(db4_context ctx, const char *orig, size_t olen, const char *string);
char *rccDb4GetKey(db4_context ctx, const char *orig, size_t olen);
#endif /* _RCC_DB4_H */
|