]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/proto-back-ldbm.h
rework op/rs structures to deal with opeartional attributes
[openldap] / servers / slapd / back-ldbm / proto-back-ldbm.h
index 781e846776efc60563908dc8d655ca575288a260..6960bd984ad97318ac0673ef2a60e30d006a963a 100644 (file)
@@ -1,7 +1,16 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 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-2004 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
@@ -68,7 +77,11 @@ 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 *));
@@ -89,15 +102,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
@@ -139,6 +151,11 @@ ID idl_nextid LDAP_P(( ID_BLOCK *idl, ID *cursor ));
  * index.c
  */
 extern int
+index_is_indexed LDAP_P((
+       Backend *be,
+       AttributeDescription *desc ));
+
+extern int
 index_param LDAP_P((
        Backend *be,
        AttributeDescription *desc,
@@ -149,15 +166,15 @@ index_param LDAP_P((
 
 extern int
 index_values LDAP_P((
-       Backend *be,
+       Operation *op,
        AttributeDescription *desc,
-       struct berval **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))
 
 
 /*
@@ -177,20 +194,6 @@ key_read LDAP_P((
     struct berval *k,
        ID_BLOCK **idout ));
 
-/*
- * passwd.c
- */
-extern int ldbm_back_exop_passwd LDAP_P(( BackendDB *bd,
-       Connection *conn, Operation *op,
-       const char *reqoid,
-       struct berval *reqdata,
-       char **rspoid,
-       struct berval **rspdata,
-       LDAPControl ***rspctrls,
-       const char **text,
-       struct berval *** refs ));
-
 /*
  * modify.c
  * These prototypes are placed here because they are used by modify and
@@ -204,9 +207,8 @@ extern int ldbm_back_exop_passwd LDAP_P(( BackendDB *bd,
  */
 
 /* 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 ));
 
 /*