2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 2000-2011 The OpenLDAP Foundation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
11 * A copy of this license is available in the file LICENSE in the
12 * top-level directory of the distribution or, alternatively, at
13 * <http://www.OpenLDAP.org/license.html>.
21 #define MDB_UCTYPE "MDB"
27 AttrInfo *mdb_attr_mask( struct mdb_info *mdb,
28 AttributeDescription *desc );
30 void mdb_attr_flush( struct mdb_info *mdb );
32 int mdb_attr_slot( struct mdb_info *mdb,
33 AttributeDescription *desc, int *insert );
35 int mdb_attr_index_config LDAP_P(( struct mdb_info *mdb,
36 const char *fname, int lineno,
37 int argc, char **argv, struct config_reply_s *cr ));
39 void mdb_attr_index_unparse LDAP_P(( struct mdb_info *mdb, BerVarray *bva ));
40 void mdb_attr_index_destroy LDAP_P(( struct mdb_info *mdb ));
41 void mdb_attr_index_free LDAP_P(( struct mdb_info *mdb,
42 AttributeDescription *ad ));
44 void mdb_attr_info_free( AttrInfo *ai );
50 int mdb_back_init_cf( BackendInfo *bi );
66 int mdb_dn2entry LDAP_P(( Operation *op, MDB_txn *tid,
67 struct berval *dn, Entry **e, struct berval *matched ));
91 int mdb_dn2id_children(
104 int mdb_dn2id_parent(
115 struct berval *nname);
117 MDB_cmp_func mdb_dup_compare;
123 int mdb_filter_candidates(
135 int mdb_id2entry_add(
140 int mdb_id2entry_update(
145 int mdb_id2entry_delete(
156 void mdb_entry_free ( Entry *e );
157 int mdb_entry_return( Entry *e );
158 BI_entry_release_rw mdb_entry_release;
159 BI_entry_get_rw mdb_entry_get;
166 unsigned mdb_idl_search( ID *ids, ID id );
168 int mdb_idl_fetch_key(
174 MDB_cursor **saved_cursor,
177 int mdb_idl_insert( ID *ids, ID id );
179 int mdb_idl_insert_key(
186 int mdb_idl_delete_key(
194 mdb_idl_intersection(
203 ID mdb_idl_first( ID *ids, ID *cursor );
204 ID mdb_idl_next( ID *ids, ID *cursor );
206 void mdb_idl_sort( ID *ids, ID *tmp );
207 int mdb_idl_append( ID *a, ID *b );
208 int mdb_idl_append_one( ID *ids, ID id );
216 mdb_index_mask LDAP_P((
218 AttributeDescription *desc,
219 struct berval *name ));
222 mdb_index_param LDAP_P((
224 AttributeDescription *desc,
228 struct berval *prefix ));
231 mdb_index_values LDAP_P((
234 AttributeDescription *desc,
240 mdb_index_recset LDAP_P((
241 struct mdb_info *mdb,
248 mdb_index_recrun LDAP_P((
250 struct mdb_info *mdb,
255 int mdb_index_entry LDAP_P(( Operation *op, MDB_txn *t, int r, Entry *e ));
257 #define mdb_index_entry_add(op,t,e) \
258 mdb_index_entry((op),(t),SLAP_INDEX_ADD_OP,(e))
259 #define mdb_index_entry_del(op,t,e) \
260 mdb_index_entry((op),(t),SLAP_INDEX_DELETE_OP,(e))
273 MDB_cursor **saved_cursor,
289 int mdb_next_id( BackendDB *be, MDB_txn *tid, ID *id );
295 int mdb_modify_internal(
298 Modifications *modlist,
308 int mdb_monitor_db_init( BackendDB *be );
309 int mdb_monitor_db_open( BackendDB *be );
310 int mdb_monitor_db_close( BackendDB *be );
311 int mdb_monitor_db_destroy( BackendDB *be );
313 #ifdef MDB_MONITOR_IDX
316 struct mdb_info *mdb,
317 AttributeDescription *desc,
319 #endif /* MDB_MONITOR_IDX */
325 extern BI_init mdb_back_initialize;
327 extern BI_db_config mdb_db_config;
329 extern BI_op_add mdb_add;
330 extern BI_op_bind mdb_bind;
331 extern BI_op_compare mdb_compare;
332 extern BI_op_delete mdb_delete;
333 extern BI_op_modify mdb_modify;
334 extern BI_op_modrdn mdb_modrdn;
335 extern BI_op_search mdb_search;
336 extern BI_op_extended mdb_extended;
338 extern BI_chk_referrals mdb_referrals;
340 extern BI_operational mdb_operational;
342 extern BI_has_subordinates mdb_hasSubordinates;
345 extern BI_tool_entry_open mdb_tool_entry_open;
346 extern BI_tool_entry_close mdb_tool_entry_close;
347 extern BI_tool_entry_first_x mdb_tool_entry_first_x;
348 extern BI_tool_entry_next mdb_tool_entry_next;
349 extern BI_tool_entry_get mdb_tool_entry_get;
350 extern BI_tool_entry_put mdb_tool_entry_put;
351 extern BI_tool_entry_reindex mdb_tool_entry_reindex;
352 extern BI_tool_dn2id_get mdb_tool_dn2id_get;
353 extern BI_tool_entry_modify mdb_tool_entry_modify;
357 #endif /* _PROTO_MDB_H */