]> git.sur5r.net Git - openldap/blob - servers/slapd/back-bdb/proto-bdb.h
Finished the integerMatch matching rule and the integer syntax.
[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 int
68 bdb_dn2idl(
69         BackendDB       *be,
70         const char      *dn,
71         int prefix,
72         ID *ids );
73
74 /*
75  * entry.c
76  */
77 int bdb_entry_return( BackendDB *be, Entry *e );
78
79 /*
80  * error.c
81  */
82 void bdb_errcall( const char *pfx, char * msg );
83
84 /*
85  * filterentry.c
86  */
87 int bdb_filter_candidates(
88         Backend *be,
89         ID *range,
90         Filter  *f,
91         ID *ids );
92
93 /*
94  * id2entry
95  */
96 int bdb_id2entry_add(
97         BackendDB *be,
98         DB_TXN *tid,
99         Entry *e );
100
101 int bdb_id2entry_update(
102         BackendDB *be,
103         DB_TXN *tid,
104         Entry *e );
105
106 int bdb_id2entry_delete(
107         BackendDB *be,
108         DB_TXN *tid,
109         ID id );
110
111 int bdb_id2entry(
112         BackendDB *be,
113         DB_TXN *tid,
114         ID id,
115         Entry **e );
116
117 /*
118  * idl.c
119  */
120 unsigned bdb_idl_search( ID *ids, ID id );
121
122 int bdb_idl_insert_key(
123         BackendDB *be,
124         DB *db,
125         DB_TXN *txn,
126         DBT *key,
127         ID id );
128
129 int bdb_idl_delete_key(
130         BackendDB *be,
131         DB *db,
132         DB_TXN *txn,
133         DBT *key,
134         ID id );
135
136 int
137 bdb_idl_notin(
138     ID  *a,
139     ID  *b,
140         ID      *ids );
141
142 int
143 bdb_idl_intersection(
144         ID *a,
145         ID *b,
146         ID *ids );
147
148 int
149 bdb_idl_union(
150         ID *a,
151         ID *b,
152         ID *ids );
153
154 ID bdb_idl_first( ID *ids, ID *cursor );
155 ID bdb_idl_next( ID *ids, ID *cursor );
156
157
158 /*
159  * index.c
160  */
161 extern int
162 bdb_index_param(
163         Backend *be,
164         AttributeDescription *desc,
165         int ftype,
166         DB **db,
167         slap_mask_t *mask,
168         struct berval **prefix );
169         
170 /*
171  * key.c
172  */
173 extern int
174 bdb_key_read(
175     Backend     *be,
176         DB *db,
177     struct berval *k,
178         ID *ids );
179         
180 /*
181  * nextid.c
182  */
183 int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
184 int bdb_last_id( BackendDB *be, DB_TXN *tid );
185
186 /*
187  * modify.c
188  */
189 int bdb_modify_internal(
190         BackendDB *be,
191         Connection *conn,
192         Operation *op,
193         DB_TXN *tid,
194         Modifications *modlist,
195         Entry *e,
196         const char **text,
197         char *textbuf,
198         size_t textlen );
199
200 /*
201  * passwd.c
202  */
203 int
204 bdb_exop_passwd(
205         Backend         *be,
206         Connection              *conn,
207         Operation               *op,
208         const char              *reqoid,
209         struct berval   *reqdata,
210         char                    **rspoid,
211         struct berval   **rspdata,
212         LDAPControl             *** rspctrls,
213         const char              **text,
214         struct berval   *** refs );
215
216 /*
217  * tools.c
218  */
219 int bdb_tool_entry_open( BackendDB *be, int mode );
220 int bdb_tool_entry_close( BackendDB *be );
221 ID bdb_tool_entry_next( BackendDB *be );
222 Entry* bdb_tool_entry_get( BackendDB *be, ID id );
223 ID bdb_tool_entry_put( BackendDB *be, Entry *e );
224 int bdb_tool_entry_reindex( BackendDB *be, ID id );
225
226
227 LDAP_END_DECL
228
229 #endif /* _PROTO_BDB_H */