X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb%2Fproto-bdb.h;h=cdea9803e190411fc29f2d066bf0051eca884bc4;hb=02fb60d3dad11f9ee46feb6ba3eb9ad96dde0c48;hp=802a81361d9d628ee5263184f4dece06b1a8d62c;hpb=ef31250591144910405471748e66ec2118100151;p=openldap diff --git a/servers/slapd/back-bdb/proto-bdb.h b/servers/slapd/back-bdb/proto-bdb.h index 802a81361d..cdea9803e1 100644 --- a/servers/slapd/back-bdb/proto-bdb.h +++ b/servers/slapd/back-bdb/proto-bdb.h @@ -1,6 +1,6 @@ /* $OpenLDAP$ */ /* - * Copyright 2000 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2002 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -57,8 +57,10 @@ bdb_db_cache( /* * dn2entry.c */ -int bdb_dn2entry LDAP_P(( BackendDB *be, DB_TXN *tid, - struct berval *dn, Entry **e, Entry **matched, int flags )); +int bdb_dn2entry_rw LDAP_P(( BackendDB *be, DB_TXN *tid, + struct berval *dn, Entry **e, Entry **matched, int flags, int rw )); +#define bdb_dn2entry_r(be, tid, dn, e, m, f) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0) +#define bdb_dn2entry_w(be, tid, dn, e, m, f) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1) /* * dn2id.c @@ -74,7 +76,7 @@ int bdb_dn2id_matched( DB_TXN *tid, struct berval *dn, ID *id, - char **matchedDN ); + ID *id2 ); int bdb_dn2id_add( BackendDB *be, @@ -103,7 +105,7 @@ bdb_dn2idl( /* * entry.c */ -int bdb_entry_return( BackendDB *be, Entry *e ); +int bdb_entry_return( Entry *e ); BI_entry_release_rw bdb_entry_release; /* @@ -118,7 +120,8 @@ int bdb_filter_candidates( Backend *be, Filter *f, ID *ids, - ID *tmp ); + ID *tmp, + ID *stack ); /* * group.c @@ -127,7 +130,7 @@ int bdb_filter_candidates( BI_acl_group bdb_group; /* - * id2entry + * id2entry.c */ int bdb_id2entry_add( BackendDB *be, @@ -142,13 +145,18 @@ int bdb_id2entry_update( int bdb_id2entry_delete( BackendDB *be, DB_TXN *tid, - ID id ); + Entry *e); -int bdb_id2entry( +int bdb_id2entry_rw( BackendDB *be, DB_TXN *tid, ID id, - Entry **e ); + Entry **e, + int rw ); +#define bdb_id2entry_r(be, tid, id, e) bdb_id2entry_rw((be), (tid), (id), (e), 0) +#define bdb_id2entry_w(be, tid, id, e) bdb_id2entry_rw((be), (tid), (id), (e), 1) + +void bdb_entry_free ( Entry *e ); /* * idl.c @@ -207,6 +215,11 @@ ID bdb_idl_next( ID *ids, ID *cursor ); * index.c */ extern int +bdb_index_is_indexed LDAP_P(( + Backend *be, + AttributeDescription *desc )); + +extern int bdb_index_param LDAP_P(( Backend *be, AttributeDescription *desc, @@ -220,7 +233,7 @@ bdb_index_values LDAP_P(( Backend *be, DB_TXN *txn, AttributeDescription *desc, - struct berval **vals, + BerVarray vals, ID id, int op )); @@ -232,6 +245,11 @@ int bdb_index_entry LDAP_P(( Backend *be, DB_TXN *t, #define bdb_index_entry_del(be,t,e,ap) \ bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e),(ap)) +/* + * init.c + */ +extern struct berval bdb_uuid; + /* * key.c */ @@ -277,6 +295,40 @@ int bdb_modify_internal( */ BI_op_extended bdb_exop_passwd; + +/* + * cache.c + */ + +void bdb_cache_entry_commit( Entry *e ); +void bdb_cache_return_entry_rw( Cache *cache, Entry *e, int rw ); +#define bdb_cache_return_entry_r(c, e) bdb_cache_return_entry_rw((c), (e), 0) +#define bdb_cache_return_entry_w(c, e) bdb_cache_return_entry_rw((c), (e), 1) +int bdb_cache_add_entry_rw( + Cache *cache, + Entry *e, + int rw +); +int bdb_cache_update_entry( + Cache *cache, + Entry *e +); +ID bdb_cache_find_entry_ndn2id( + Backend *be, + Cache *cache, + struct berval *ndn +); +Entry* bdb_cache_find_entry_id( + Cache *cache, + ID id, + int rw +); +int bdb_cache_delete_entry( + Cache *cache, + Entry *e +); +void bdb_cache_release_all( Cache *cache ); + LDAP_END_DECL #endif /* _PROTO_BDB_H */