]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/proto-bdb.h
Add calls to module_init/module_kill to support dynamically loaded backends.
[openldap] / servers / slapd / back-bdb / proto-bdb.h
index 7cfe90293fdf37e7b73442db2753526f96aa7cab..6c7dfeb5863175293a4808a692a946e8324634ab 100644 (file)
@@ -58,9 +58,12 @@ bdb_db_cache(
  * dn2entry.c
  */
 int bdb_dn2entry_rw LDAP_P(( BackendDB *be, DB_TXN *tid,
-       struct berval *dn, Entry **e, Entry **matched, int flags, int rw , u_int32_t locker, DB_LOCK *lock));
-#define bdb_dn2entry_r(be, tid, dn, e, m, f, locker, lock) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0, locker, lock)
-#define bdb_dn2entry_w(be, tid, dn, e, m, f, locker, lock) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1, locker, lock)
+       struct berval *dn, Entry **e, Entry **matched, int flags, int rw,
+       u_int32_t locker, DB_LOCK *lock));
+#define bdb_dn2entry_r(be, tid, dn, e, m, f, locker, lock) \
+       bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0, locker, lock)
+#define bdb_dn2entry_w(be, tid, dn, e, m, f, locker, lock) \
+       bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1, locker, lock)
 
 /*
  * dn2id.c
@@ -69,14 +72,16 @@ int bdb_dn2id(
        BackendDB *be,
        DB_TXN *tid,
        struct berval *dn,
-       ID *id );
+       ID *id,
+       int flags );
 
 int bdb_dn2id_matched(
        BackendDB *be,
        DB_TXN *tid,
        struct berval *dn,
        ID *id,
-       ID *id2 );
+       ID *id2,
+       int flags );
 
 int bdb_dn2id_add(
        BackendDB *be,
@@ -93,7 +98,8 @@ int bdb_dn2id_delete(
 int bdb_dn2id_children(
        BackendDB *be,
        DB_TXN *tid,
-       struct berval *dn );
+       struct berval *dn,
+       int flags );
 
 int
 bdb_dn2idl(
@@ -155,8 +161,10 @@ int bdb_id2entry_rw(
        int rw,
        u_int32_t locker,
        DB_LOCK *lock );
-#define bdb_id2entry_r(be, tid, id, e, locker, lock)      bdb_id2entry_rw((be), (tid), (id), (e), 0, locker, lock)
-#define bdb_id2entry_w(be, tid, id, e, locker, lock)      bdb_id2entry_rw((be), (tid), (id), (e), 1, locker, lock)
+#define bdb_id2entry_r(be, tid, id, e, locker, lock) \
+       bdb_id2entry_rw((be), (tid), (id), (e), 0, locker, lock)
+#define bdb_id2entry_w(be, tid, id, e, locker, lock) \
+       bdb_id2entry_rw((be), (tid), (id), (e), 1, locker, lock)
 
 void bdb_entry_free ( Entry *e );
 
@@ -292,6 +300,17 @@ int bdb_modify_internal(
        char *textbuf,
        size_t textlen );
 
+/*
+ * operational.c
+ */
+int
+bdb_hasSubordinates(
+       BackendDB       *be,
+       Connection      *conn, 
+       Operation       *op,
+       Entry           *e,
+       int             *hasSubordinates );
+
 /*
  * passwd.c
  */
@@ -303,12 +322,17 @@ BI_op_extended bdb_exop_passwd;
  */
 
 void bdb_cache_entry_commit( Entry *e );
-void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e, int rw, DB_LOCK *lock );
-#define bdb_cache_return_entry_r(env, c, e, l) bdb_cache_return_entry_rw((env), (c), (e), 0, (l))
-#define bdb_cache_return_entry_w(env, c, e, l) bdb_cache_return_entry_rw((env), (c), (e), 1, (l))
+void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e,
+       int rw, DB_LOCK *lock );
+#define bdb_cache_return_entry_r(env, c, e, l) \
+       bdb_cache_return_entry_rw((env), (c), (e), 0, (l))
+#define bdb_cache_return_entry_w(env, c, e, l) \
+       bdb_cache_return_entry_rw((env), (c), (e), 1, (l))
 void bdb_unlocked_cache_return_entry_rw( Cache *cache, Entry *e, int rw );
-#define bdb_unlocked_cache_return_entry_r( c, e ) bdb_cache_return_entry_rw((c), (e), 0)
-#define bdb_unlocked_cache_return_entry_w( c, e ) bdb_cache_return_entry_rw((c), (e), 1)
+#define bdb_unlocked_cache_return_entry_r( c, e ) \
+       bdb_unlocked_cache_return_entry_rw((c), (e), 0)
+#define bdb_unlocked_cache_return_entry_w( c, e ) \
+       bdb_unlocked_cache_return_entry_rw((c), (e), 1)
 int bdb_cache_add_entry_rw(
        DB_ENV  *env,
        Cache   *cache,
@@ -340,6 +364,18 @@ int bdb_cache_delete_entry(
 );
 void bdb_cache_release_all( Cache *cache );
 
+#ifdef BDB_REUSE_LOCKERS
+
+int bdb_locker_id( Operation *op, DB_ENV *env, int *locker );
+
+#endif
+
+#ifdef HAVE_EBCDIC
+char *ebcdic_dberror( int rc );
+
+#define db_strerror(x) ebcdic_dberror(x)
+#endif
+
 LDAP_END_DECL
 
 #endif /* _PROTO_BDB_H */