]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/proto-back-ldbm.h
Remove abandon cruft
[openldap] / servers / slapd / back-ldbm / proto-back-ldbm.h
index 8275b03752179334384194d93551f129a18935d4..4433f736cf2fff43f4af95596ed7f0344c838d13 100644 (file)
@@ -1,5 +1,6 @@
+/* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -18,10 +19,10 @@ LDAP_BEGIN_DECL
 Entry *deref_internal_r LDAP_P((
        Backend *be,
        Entry *e,
-       char *dn,
+       struct berval *dn,
        int *err,
        Entry **matched,
-       char **text ));
+       const char **text ));
 
 #define deref_entry_r( be, e, err, matched, text ) \
        deref_internal_r( be, e, NULL, err, matched, text )
@@ -32,13 +33,14 @@ Entry *deref_internal_r LDAP_P((
  * attr.c
  */
 
-void attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask,
- int *syntaxmask ));
-void attr_index_config LDAP_P(( struct ldbminfo *li, char *fname, int lineno,
- int argc, char **argv, int init ));
-#ifdef SLAP_CLEANUP
+void attr_mask LDAP_P(( struct ldbminfo *li,
+       AttributeDescription *desc,
+       slap_mask_t *indexmask ));
+
+int attr_index_config LDAP_P(( struct ldbminfo *li,
+       const char *fname, int lineno,
+       int argc, char **argv ));
 void attr_index_destroy LDAP_P(( Avlnode *tree ));
-#endif
 
 /*
  * cache.c
@@ -49,43 +51,48 @@ int cache_update_entry LDAP_P(( Cache *cache, Entry *e ));
 void cache_return_entry_rw LDAP_P(( Cache *cache, Entry *e, int rw ));
 #define cache_return_entry_r(c, e) cache_return_entry_rw((c), (e), 0)
 #define cache_return_entry_w(c, e) cache_return_entry_rw((c), (e), 1)
+void cache_entry_commit LDAP_P(( Entry *e ));
 
-ID cache_find_entry_dn2id LDAP_P(( Backend *be, Cache *cache, char *dn ));
+ID cache_find_entry_dn2id LDAP_P(( Backend *be, Cache *cache, const char *dn ));
+ID cache_find_entry_ndn2id LDAP_P(( Backend *be, Cache *cache, const char *ndn ));
 Entry * cache_find_entry_id LDAP_P(( Cache *cache, ID id, int rw ));
 int cache_delete_entry LDAP_P(( Cache *cache, Entry *e ));
-#ifdef SLAP_CLEANUP
 void cache_release_all LDAP_P(( Cache *cache ));
-#endif
 
 /*
  * dbcache.c
  */
 
 DBCache * ldbm_cache_open LDAP_P(( Backend *be,
-       char *name, char *suffix, int flags ));
+       const char *name, const char *suffix, int flags ));
 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 ));
 Datum ldbm_cache_fetch LDAP_P(( DBCache *db, Datum key ));
 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 *));
 
 /*
  * dn2id.c
  */
 
-int dn2id_add LDAP_P(( Backend *be, char *dn, ID id ));
-ID dn2id LDAP_P(( Backend *be, char *dn ));
-int dn2id_delete LDAP_P(( Backend *be, char *dn ));
+int dn2id_add LDAP_P(( Backend *be, const char *dn, ID id ));
+int dn2id LDAP_P(( Backend *be, const char *dn, ID *idp ));
+int dn2idl LDAP_P(( Backend *be, struct berval *dn, int prefix, ID_BLOCK **idlp ));
+int dn2id_delete LDAP_P(( Backend *be, const char *dn, ID id ));
 
-Entry * dn2entry_rw LDAP_P(( Backend *be, char *dn, Entry **matched, int rw ));
+Entry * dn2entry_rw LDAP_P(( Backend *be, const char *dn, Entry **matched, int rw ));
 #define dn2entry_r(be, dn, m) dn2entry_rw((be), (dn), (m), 0)
 #define dn2entry_w(be, dn, m) dn2entry_rw((be), (dn), (m), 1)
 
 /*
  * entry.c
  */
-int ldbm_back_entry_release_rw LDAP_P(( Backend *be, Entry *e, int rw ));
+int ldbm_back_entry_release_rw LDAP_P(( Backend *be,
+       Connection *conn, Operation *op,
+       Entry *e, int rw ));
 
 /*
  * filterindex.c
@@ -132,29 +139,59 @@ ID idl_nextid LDAP_P(( ID_BLOCK *idl, ID *cursor ));
 /*
  * index.c
  */
+extern int
+index_param LDAP_P((
+       Backend *be,
+       AttributeDescription *desc,
+       int ftype,
+       char **dbname,
+       slap_mask_t *mask,
+       struct berval *prefix ));
+
+extern int
+index_values LDAP_P((
+       Backend *be,
+       AttributeDescription *desc,
+       struct berval **vals,
+       ID id,
+       int op ));
 
-int index_add_entry LDAP_P(( Backend *be, Entry *e ));
-int index_add_mods LDAP_P(( Backend *be, LDAPModList *ml, ID id ));
-ID_BLOCK * index_read LDAP_P(( Backend *be,
-       char *type, int indextype, char *val ));
-/* Possible operations supported (op) by index_change_values() */
-#define __INDEX_ADD_OP         0x0001
-#define __INDEX_DELETE_OP      0x0002
-int index_change_values LDAP_P(( Backend *be,
-                                char *type,
-                                struct berval **vals,
-                                ID  id,
-                                unsigned int op ));
+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))
 
 
 /*
- * kerberos.c
+ * key.c
  */
+extern int
+key_change LDAP_P((
+    Backend            *be,
+    DBCache    *db,
+    struct berval *k,
+    ID                 id,
+    int                        op ));
+extern int
+key_read LDAP_P((
+    Backend    *be,
+       DBCache *db,
+    struct berval *k,
+       ID_BLOCK **idout ));
 
-#ifdef HAVE_KERBEROS
-/* krbv4_ldap_auth LDAP_P(( Backend *be, struct berval *cred, AUTH_DAT *ad )); */
-#endif
+/*
+ * 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
@@ -167,21 +204,19 @@ int index_change_values LDAP_P(( Backend *be,
  * 
  */
 
-int add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
-int delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
-int replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
+/* returns LDAP error code indicating error OR SLAPD_ABANDON */
 int ldbm_modify_internal LDAP_P((Backend *be,
        Connection *conn, Operation *op,
-       char *dn, LDAPModList *mods, Entry *e));
+       const char *dn, Modifications *mods, Entry *e,
+       const char **text, char *textbuf, size_t textlen ));
 
 /*
  * nextid.c
  */
 
-ID next_id LDAP_P(( Backend *be ));
-void next_id_return LDAP_P(( Backend *be, ID id ));
-ID next_id_get LDAP_P(( Backend *be ));
-int next_id_save LDAP_P(( Backend *be ));
+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 ));
 
 LDAP_END_DECL
 #endif