]> git.sur5r.net Git - openldap/blob - servers/slapd/back-bdb/proto-bdb.h
04cab9d0488b82b2121c7640ba0fa4fbc93efa37
[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         BackendDB *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  * dn2entry.c
30  */
31 int bdb_dn2entry LDAP_P(( BackendDB *be, DB_TXN *tid,
32         const char *dn, Entry **e, Entry **matched, int flags ));
33
34 /*
35  * dn2id.c
36  */
37 int bdb_dn2id(
38         BackendDB *be,
39         DB_TXN *tid,
40         const char *dn,
41         ID *id );
42
43 int bdb_dn2id_matched(
44         BackendDB *be,
45         DB_TXN *tid,
46         const char *dn,
47         ID *id,
48         char **matchedDN );
49
50 int bdb_dn2id_add(
51         BackendDB *be,
52         DB_TXN *tid,
53         const char *dn,
54         ID id );
55
56 int bdb_dn2id_delete(
57         BackendDB *be,
58         DB_TXN *tid,
59         const char *dn,
60         ID id );
61
62 int bdb_dn2id_children(
63         BackendDB *be,
64         DB_TXN *tid,
65         const char *dn );
66
67 /*
68  * entry.c
69  */
70 int bdb_entry_return( BackendDB *be, Entry *e );
71
72 /*
73  * error.c
74  */
75 void bdb_errcall( const char *pfx, char * msg );
76
77 /*
78  * id2entry
79  */
80 int bdb_id2entry_add(
81         BackendDB *be,
82         DB_TXN *tid,
83         Entry *e );
84
85 int bdb_id2entry_update(
86         BackendDB *be,
87         DB_TXN *tid,
88         Entry *e );
89
90 int bdb_id2entry_delete(
91         BackendDB *be,
92         DB_TXN *tid,
93         ID id );
94
95 int bdb_id2entry(
96         BackendDB *be,
97         DB_TXN *tid,
98         ID id,
99         Entry **e );
100
101 /*
102  * idl.c
103  */
104 unsigned bdb_idl_search( ID *ids, ID id );
105
106 int bdb_idl_insert_key(
107         BackendDB *be,
108         DB *db,
109         DB_TXN *txn,
110         DBT *key,
111         ID id );
112
113 int bdb_idl_delete_key(
114         BackendDB *be,
115         DB *db,
116         DB_TXN *txn,
117         DBT *key,
118         ID id );
119
120 /*
121  * nextid.c
122  */
123 int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
124
125 /*
126  * modify.c
127  */
128 int bdb_modify_internal(
129         BackendDB *be,
130         Connection *conn,
131         Operation *op,
132         DB_TXN *tid,
133         Modifications *modlist,
134         Entry *e,
135         const char **text );
136
137 /*
138  * passwd.c
139  */
140 int
141 bdb_exop_passwd(
142         Backend         *be,
143         Connection              *conn,
144         Operation               *op,
145         const char              *reqoid,
146         struct berval   *reqdata,
147         char                    **rspoid,
148         struct berval   **rspdata,
149         LDAPControl             *** rspctrls,
150         const char              **text,
151         struct berval   *** refs );
152
153 /*
154  * tools.c
155  */
156 int bdb_tool_entry_open( BackendDB *be, int mode );
157 int bdb_tool_entry_close( BackendDB *be );
158 ID bdb_tool_entry_next( BackendDB *be );
159 Entry* bdb_tool_entry_get( BackendDB *be, ID id );
160 ID bdb_tool_entry_put( BackendDB *be, Entry *e );
161 int bdb_tool_entry_reindex( BackendDB *be, ID id );
162
163
164 LDAP_END_DECL
165
166 #endif /* _PROTO_BDB_H */