]> git.sur5r.net Git - openldap/blob - servers/slapd/back-bdb/proto-bdb.h
c896ec9ed2f07dd15e2e8f984497a8b6f41e90b0
[openldap] / servers / slapd / back-bdb / proto-bdb.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 2000 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6
7 #ifndef _PROTO_BDB_H
8 #define _PROTO_BDB_H
9
10 LDAP_BEGIN_DECL
11
12 /*
13  * alias.c
14  */
15 Entry *bdb_deref_internal_r LDAP_P((
16         Backend *be,
17         Entry *e,
18         const char *dn,
19         int *err,
20         Entry **matched,
21         const char **text ));
22
23 #define deref_entry_r( be, e, err, matched, text ) \
24         bdb_deref_internal_r( be, e, NULL, err, matched, text )
25 #define deref_dn_r( be, dn, err, matched, text ) \
26         bdb_deref_internal_r( be, NULL, dn, err, matched, text)
27
28 /*
29  * dn2id.c
30  */
31 int bdb_dn2id_add(
32         BackendDB *be,
33         DB_TXN *tid,
34         const char *dn,
35         ID id );
36
37 int bdb_dn2entry_rw LDAP_P(( Backend *be, DB_TXN *tid,
38         const char *dn, Entry **e, Entry **matched, int rw ));
39
40 #define dn2entry_r(be, tid, dn, p, m) bdb_dn2entry_rw((be), (tid), (dn), (p), (m), 0)
41 #define dn2entry_w(be, tid, dn, p, m) bdb_dn2entry_rw((be), (tid), (dn), (p), (m), 1)
42
43 /*
44  * entry.c
45  */
46 int bdb_entry_return( BackendDB *be, Entry *e );
47
48 /*
49  * error.c
50  */
51 void bdb_errcall( const char *pfx, char * msg );
52
53 /*
54  * id2entry
55  */
56 int bdb_id2entry_add(
57         Backend *be,
58         DB_TXN *tid,
59         Entry *e );
60
61 /*
62  * idl.c
63  */
64 int bdb_idl_insert_key(
65         BackendDB *be,
66         DB *db,
67         DB_TXN *txn,
68         DBT *key,
69         ID id );
70
71 /*
72  * nextid.c
73  */
74 int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
75
76 /*
77  * tools.c
78  */
79 int bdb_tool_entry_open( BackendDB *be, int mode );
80 int bdb_tool_entry_close( BackendDB *be );
81 ID bdb_tool_entry_next( BackendDB *be );
82 Entry* bdb_tool_entry_get( BackendDB *be, ID id );
83 ID bdb_tool_entry_put( BackendDB *be, Entry *e );
84
85
86 LDAP_END_DECL
87
88 #endif /* _PROTO_BDB_H */