2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 2000-2014 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_dbs_open( BackendDB *be, MDB_txn *txn, struct config_reply_s *cr );
36 void mdb_attr_dbs_close( struct mdb_info *mdb );
38 int mdb_attr_index_config LDAP_P(( struct mdb_info *mdb,
39 const char *fname, int lineno,
40 int argc, char **argv, struct config_reply_s *cr ));
42 void mdb_attr_index_unparse LDAP_P(( struct mdb_info *mdb, BerVarray *bva ));
43 void mdb_attr_index_destroy LDAP_P(( struct mdb_info *mdb ));
44 void mdb_attr_index_free LDAP_P(( struct mdb_info *mdb,
45 AttributeDescription *ad ));
47 void mdb_attr_info_free( AttrInfo *ai );
49 int mdb_ad_read( struct mdb_info *mdb, MDB_txn *txn );
50 int mdb_ad_get( struct mdb_info *mdb, MDB_txn *txn, AttributeDescription *ad );
56 int mdb_back_init_cf( BackendInfo *bi );
62 int mdb_dn2entry LDAP_P(( Operation *op, MDB_txn *tid, MDB_cursor *mc,
63 struct berval *dn, Entry **e, ID *nsubs, int matched ));
76 struct berval *matched,
77 struct berval *nmatched );
94 int mdb_dn2id_children(
114 int mdb_dn2id_parent(
126 struct berval *nname);
139 struct IdScopes *isc );
143 struct IdScopes *isc );
147 struct IdScopes *isc );
149 MDB_cmp_func mdb_dup_compare;
155 int mdb_filter_candidates(
167 int mdb_id2entry_add(
173 int mdb_id2entry_update(
179 int mdb_id2entry_delete(
196 int mdb_entry_return( Operation *op, Entry *e );
197 BI_entry_release_rw mdb_entry_release;
198 BI_entry_get_rw mdb_entry_get;
200 int mdb_entry_decode( Operation *op, MDB_txn *txn, MDB_val *data, Entry **e );
202 void mdb_reader_flush( MDB_env *env );
203 int mdb_opinfo_get( Operation *op, struct mdb_info *mdb, int rdonly, mdb_op_info **moi );
209 unsigned mdb_idl_search( ID *ids, ID id );
211 int mdb_idl_fetch_key(
217 MDB_cursor **saved_cursor,
220 int mdb_idl_insert( ID *ids, ID id );
222 typedef int (mdb_idl_keyfunc)(
228 mdb_idl_keyfunc mdb_idl_insert_keys;
229 mdb_idl_keyfunc mdb_idl_delete_keys;
232 mdb_idl_intersection(
241 ID mdb_idl_first( ID *ids, ID *cursor );
242 ID mdb_idl_next( ID *ids, ID *cursor );
244 void mdb_idl_sort( ID *ids, ID *tmp );
245 int mdb_idl_append( ID *a, ID *b );
246 int mdb_idl_append_one( ID *ids, ID id );
254 mdb_index_mask LDAP_P((
256 AttributeDescription *desc,
257 struct berval *name ));
260 mdb_index_param LDAP_P((
262 AttributeDescription *desc,
266 struct berval *prefix ));
269 mdb_index_values LDAP_P((
272 AttributeDescription *desc,
278 mdb_index_recset LDAP_P((
279 struct mdb_info *mdb,
286 mdb_index_recrun LDAP_P((
289 struct mdb_info *mdb,
294 int mdb_index_entry LDAP_P(( Operation *op, MDB_txn *t, int r, Entry *e ));
296 #define mdb_index_entry_add(op,t,e) \
297 mdb_index_entry((op),(t),SLAP_INDEX_ADD_OP,(e))
298 #define mdb_index_entry_del(op,t,e) \
299 mdb_index_entry((op),(t),SLAP_INDEX_DELETE_OP,(e))
312 MDB_cursor **saved_cursor,
319 int mdb_next_id( BackendDB *be, MDB_cursor *mc, ID *id );
325 int mdb_modify_internal(
328 Modifications *modlist,
338 int mdb_monitor_db_init( BackendDB *be );
339 int mdb_monitor_db_open( BackendDB *be );
340 int mdb_monitor_db_close( BackendDB *be );
341 int mdb_monitor_db_destroy( BackendDB *be );
343 #ifdef MDB_MONITOR_IDX
346 struct mdb_info *mdb,
347 AttributeDescription *desc,
349 #endif /* MDB_MONITOR_IDX */
355 extern BI_init mdb_back_initialize;
357 extern BI_db_config mdb_db_config;
359 extern BI_op_add mdb_add;
360 extern BI_op_bind mdb_bind;
361 extern BI_op_compare mdb_compare;
362 extern BI_op_delete mdb_delete;
363 extern BI_op_modify mdb_modify;
364 extern BI_op_modrdn mdb_modrdn;
365 extern BI_op_search mdb_search;
366 extern BI_op_extended mdb_extended;
368 extern BI_chk_referrals mdb_referrals;
370 extern BI_operational mdb_operational;
372 extern BI_has_subordinates mdb_hasSubordinates;
375 extern BI_tool_entry_open mdb_tool_entry_open;
376 extern BI_tool_entry_close mdb_tool_entry_close;
377 extern BI_tool_entry_first_x mdb_tool_entry_first_x;
378 extern BI_tool_entry_next mdb_tool_entry_next;
379 extern BI_tool_entry_get mdb_tool_entry_get;
380 extern BI_tool_entry_put mdb_tool_entry_put;
381 extern BI_tool_entry_reindex mdb_tool_entry_reindex;
382 extern BI_tool_dn2id_get mdb_tool_dn2id_get;
383 extern BI_tool_entry_modify mdb_tool_entry_modify;
385 extern mdb_idl_keyfunc mdb_tool_idl_add;
389 #endif /* _PROTO_MDB_H */