]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/proto-back-ldbm.h
ITS#4310 seems to affect also back-ldbm
[openldap] / servers / slapd / back-ldbm / proto-back-ldbm.h
index 20ef3dfee926fed33593f4aa7a2c34164a736227..8af8808846e7898f6f3487c1f7c995b9c8c640cc 100644 (file)
@@ -1,7 +1,16 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2006 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
 
 #ifndef _PROTO_BACK_LDBM
@@ -9,8 +18,6 @@
 
 #include <ldap_cdefs.h>
 
-#include "external.h"
-
 LDAP_BEGIN_DECL
 
 /*
@@ -68,10 +75,14 @@ void ldbm_cache_close LDAP_P(( Backend *be, DBCache *db ));
 void ldbm_cache_really_close LDAP_P(( Backend *be, DBCache *db ));
 void ldbm_cache_flush_all LDAP_P(( Backend *be ));
 void ldbm_cache_sync LDAP_P(( Backend *be ));
+#if 0 /* replaced by macro */
 Datum ldbm_cache_fetch LDAP_P(( DBCache *db, Datum key ));
+#else /* 1 */
+#define ldbm_cache_fetch( db, key )    ldbm_fetch( (db)->dbc_db, (key) )
+#endif /* 1 */
 int ldbm_cache_store LDAP_P(( DBCache *db, Datum key, Datum data, int flags ));
 int ldbm_cache_delete LDAP_P(( DBCache *db, Datum key ));
-void *ldbm_cache_sync_daemon LDAP_P(( void *));
+void *ldbm_cache_sync_daemon LDAP_P(( void *ctx, void *arg ));
 
 /*
  * dn2id.c
@@ -89,15 +100,14 @@ Entry * dn2entry_rw LDAP_P(( Backend *be, struct berval *dn, Entry **matched, in
 /*
  * entry.c
  */
-int ldbm_back_entry_release_rw LDAP_P(( Backend *be,
-       Connection *conn, Operation *op,
-       Entry *e, int rw ));
+BI_entry_release_rw ldbm_back_entry_release_rw;
+BI_entry_get_rw ldbm_back_entry_get;
 
 /*
  * filterindex.c
  */
 
-ID_BLOCK * filter_candidates LDAP_P(( Backend *be, Filter *f ));
+ID_BLOCK * filter_candidates LDAP_P(( Operation *op, Filter *f ));
 
 /*
  * id2children.c
@@ -154,15 +164,15 @@ index_param LDAP_P((
 
 extern int
 index_values LDAP_P((
-       Backend *be,
+       Operation *op,
        AttributeDescription *desc,
-       BVarray vals,
+       BerVarray vals,
        ID id,
-       int op ));
+       int opid ));
 
-int index_entry LDAP_P(( Backend *be, int r, Entry *e, Attribute *ap ));
-#define index_entry_add(be,e,ap) index_entry((be),SLAP_INDEX_ADD_OP,(e),(ap))
-#define index_entry_del(be,e,ap) index_entry((be),SLAP_INDEX_DELETE_OP,(e),(ap))
+int index_entry LDAP_P(( Operation *op, int r, Entry *e ));
+#define index_entry_add(be,e) index_entry((be),SLAP_INDEX_ADD_OP,(e))
+#define index_entry_del(be,e) index_entry((be),SLAP_INDEX_DELETE_OP,(e))
 
 
 /*
@@ -182,11 +192,6 @@ key_read LDAP_P((
     struct berval *k,
        ID_BLOCK **idout ));
 
-/*
- * passwd.c
- */
-extern BI_op_extended ldbm_back_exop_passwd;
-
 /*
  * modify.c
  * These prototypes are placed here because they are used by modify and
@@ -200,9 +205,8 @@ extern BI_op_extended ldbm_back_exop_passwd;
  */
 
 /* returns LDAP error code indicating error OR SLAPD_ABANDON */
-int ldbm_modify_internal LDAP_P((Backend *be,
-       Connection *conn, Operation *op,
-       const char *dn, Modifications *mods, Entry *e,
+int ldbm_modify_internal LDAP_P(( Operation *op,
+       Modifications *mods, Entry *e,
        const char **text, char *textbuf, size_t textlen ));
 
 /*
@@ -213,5 +217,47 @@ int next_id LDAP_P(( Backend *be, ID *idp ));
 int next_id_get LDAP_P(( Backend *be, ID *idp ));
 int next_id_write LDAP_P(( Backend *be, ID id ));
 
+/*
+ * former external.h
+ */
+
+extern BI_init                 ldbm_back_initialize;
+
+extern BI_open                 ldbm_back_open;
+extern BI_close                        ldbm_back_close;
+extern BI_destroy              ldbm_back_destroy;
+
+extern BI_db_init              ldbm_back_db_init;
+extern BI_db_open              ldbm_back_db_open;
+extern BI_db_close             ldbm_back_db_close;
+extern BI_db_destroy           ldbm_back_db_destroy;
+extern BI_db_config            ldbm_back_db_config;
+
+extern BI_op_extended          ldbm_back_extended;
+extern BI_op_bind              ldbm_back_bind;
+extern BI_op_search            ldbm_back_search;
+extern BI_op_compare           ldbm_back_compare;
+extern BI_op_modify            ldbm_back_modify;
+extern BI_op_modrdn            ldbm_back_modrdn;
+extern BI_op_add               ldbm_back_add;
+extern BI_op_delete            ldbm_back_delete;
+
+extern BI_operational          ldbm_back_operational;
+extern BI_has_subordinates     ldbm_back_hasSubordinates;
+
+/* hooks for slap tools */
+extern BI_tool_entry_open      ldbm_tool_entry_open;
+extern BI_tool_entry_close     ldbm_tool_entry_close;
+extern BI_tool_entry_first     ldbm_tool_entry_first;
+extern BI_tool_entry_next      ldbm_tool_entry_next;
+extern BI_tool_entry_get       ldbm_tool_entry_get;
+extern BI_tool_entry_put       ldbm_tool_entry_put;
+
+extern BI_tool_entry_reindex   ldbm_tool_entry_reindex;
+extern BI_tool_sync            ldbm_tool_sync;
+
+extern BI_chk_referrals                ldbm_back_referrals;
+
 LDAP_END_DECL
-#endif
+
+#endif /* _PROTO_BACK_LDBM */