2000-09-19 05:35:08 +08:00
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
|
|
|
* Copyright 2000 The OpenLDAP Foundation, All Rights Reserved.
|
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PROTO_BDB_H
|
|
|
|
#define _PROTO_BDB_H
|
|
|
|
|
|
|
|
LDAP_BEGIN_DECL
|
|
|
|
|
|
|
|
/*
|
2000-09-22 09:40:57 +08:00
|
|
|
* alias.c
|
2000-09-19 05:35:08 +08:00
|
|
|
*/
|
2000-09-22 09:40:57 +08:00
|
|
|
Entry *bdb_deref_internal_r LDAP_P((
|
2000-09-26 07:41:16 +08:00
|
|
|
BackendDB *be,
|
2000-09-22 09:40:57 +08:00
|
|
|
Entry *e,
|
|
|
|
const char *dn,
|
|
|
|
int *err,
|
|
|
|
Entry **matched,
|
|
|
|
const char **text ));
|
|
|
|
|
|
|
|
#define deref_entry_r( be, e, err, matched, text ) \
|
|
|
|
bdb_deref_internal_r( be, e, NULL, err, matched, text )
|
|
|
|
#define deref_dn_r( be, dn, err, matched, text ) \
|
|
|
|
bdb_deref_internal_r( be, NULL, dn, err, matched, text)
|
2000-09-19 05:35:08 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
/*
|
|
|
|
* dn2entry.c
|
|
|
|
*/
|
2000-09-26 07:41:16 +08:00
|
|
|
int bdb_dn2entry LDAP_P(( BackendDB *be, DB_TXN *tid,
|
2000-09-25 06:48:13 +08:00
|
|
|
const char *dn, Entry **e, Entry **matched, int flags ));
|
|
|
|
|
2000-09-20 04:13:41 +08:00
|
|
|
/*
|
2000-09-20 15:21:09 +08:00
|
|
|
* dn2id.c
|
2000-09-20 04:13:41 +08:00
|
|
|
*/
|
2000-09-25 06:48:13 +08:00
|
|
|
int bdb_dn2id(
|
|
|
|
BackendDB *be,
|
|
|
|
DB_TXN *tid,
|
|
|
|
const char *dn,
|
|
|
|
ID *id );
|
|
|
|
|
|
|
|
int bdb_dn2id_matched(
|
|
|
|
BackendDB *be,
|
|
|
|
DB_TXN *tid,
|
|
|
|
const char *dn,
|
|
|
|
ID *id,
|
|
|
|
char **matchedDN );
|
|
|
|
|
2000-09-22 14:46:32 +08:00
|
|
|
int bdb_dn2id_add(
|
2000-09-20 04:13:41 +08:00
|
|
|
BackendDB *be,
|
|
|
|
DB_TXN *tid,
|
|
|
|
const char *dn,
|
|
|
|
ID id );
|
|
|
|
|
2000-09-24 14:04:58 +08:00
|
|
|
int bdb_dn2id_delete(
|
|
|
|
BackendDB *be,
|
|
|
|
DB_TXN *tid,
|
|
|
|
const char *dn,
|
|
|
|
ID id );
|
|
|
|
|
|
|
|
int bdb_dn2id_children(
|
|
|
|
BackendDB *be,
|
|
|
|
DB_TXN *tid,
|
|
|
|
const char *dn );
|
|
|
|
|
2000-09-22 14:46:32 +08:00
|
|
|
/*
|
|
|
|
* entry.c
|
|
|
|
*/
|
|
|
|
int bdb_entry_return( BackendDB *be, Entry *e );
|
|
|
|
|
2000-09-22 09:40:57 +08:00
|
|
|
/*
|
|
|
|
* error.c
|
|
|
|
*/
|
|
|
|
void bdb_errcall( const char *pfx, char * msg );
|
|
|
|
|
2000-09-22 14:46:32 +08:00
|
|
|
/*
|
|
|
|
* id2entry
|
|
|
|
*/
|
|
|
|
int bdb_id2entry_add(
|
2000-09-26 07:41:16 +08:00
|
|
|
BackendDB *be,
|
2000-09-22 14:46:32 +08:00
|
|
|
DB_TXN *tid,
|
|
|
|
Entry *e );
|
|
|
|
|
2000-09-28 06:28:59 +08:00
|
|
|
int bdb_id2entry_update(
|
|
|
|
BackendDB *be,
|
|
|
|
DB_TXN *tid,
|
|
|
|
Entry *e );
|
|
|
|
|
2000-09-24 14:04:58 +08:00
|
|
|
int bdb_id2entry_delete(
|
2000-09-26 07:41:16 +08:00
|
|
|
BackendDB *be,
|
2000-09-24 14:04:58 +08:00
|
|
|
DB_TXN *tid,
|
|
|
|
ID id );
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
int bdb_id2entry(
|
2000-09-26 07:41:16 +08:00
|
|
|
BackendDB *be,
|
2000-09-25 06:48:13 +08:00
|
|
|
DB_TXN *tid,
|
|
|
|
ID id,
|
|
|
|
Entry **e );
|
|
|
|
|
2000-09-20 15:21:09 +08:00
|
|
|
/*
|
|
|
|
* idl.c
|
|
|
|
*/
|
2000-09-27 06:22:42 +08:00
|
|
|
unsigned bdb_idl_search( ID *ids, ID id );
|
2000-09-26 02:59:15 +08:00
|
|
|
|
2000-09-20 15:21:09 +08:00
|
|
|
int bdb_idl_insert_key(
|
|
|
|
BackendDB *be,
|
|
|
|
DB *db,
|
|
|
|
DB_TXN *txn,
|
|
|
|
DBT *key,
|
|
|
|
ID id );
|
|
|
|
|
2000-09-24 14:04:58 +08:00
|
|
|
int bdb_idl_delete_key(
|
|
|
|
BackendDB *be,
|
|
|
|
DB *db,
|
|
|
|
DB_TXN *txn,
|
|
|
|
DBT *key,
|
|
|
|
ID id );
|
|
|
|
|
2000-09-20 04:13:41 +08:00
|
|
|
/*
|
|
|
|
* nextid.c
|
|
|
|
*/
|
|
|
|
int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
|
|
|
|
|
2000-09-28 06:28:59 +08:00
|
|
|
/*
|
|
|
|
* modify.c
|
|
|
|
*/
|
|
|
|
int bdb_modify_internal(
|
|
|
|
BackendDB *be,
|
|
|
|
Connection *conn,
|
|
|
|
Operation *op,
|
|
|
|
DB_TXN *tid,
|
|
|
|
Modifications *modlist,
|
|
|
|
Entry *e,
|
|
|
|
const char **text );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* passwd.c
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
bdb_exop_passwd(
|
|
|
|
Backend *be,
|
|
|
|
Connection *conn,
|
|
|
|
Operation *op,
|
|
|
|
const char *reqoid,
|
|
|
|
struct berval *reqdata,
|
|
|
|
char **rspoid,
|
|
|
|
struct berval **rspdata,
|
|
|
|
LDAPControl *** rspctrls,
|
|
|
|
const char **text,
|
|
|
|
struct berval *** refs );
|
|
|
|
|
2000-09-20 15:21:09 +08:00
|
|
|
/*
|
|
|
|
* tools.c
|
|
|
|
*/
|
|
|
|
int bdb_tool_entry_open( BackendDB *be, int mode );
|
|
|
|
int bdb_tool_entry_close( BackendDB *be );
|
|
|
|
ID bdb_tool_entry_next( BackendDB *be );
|
|
|
|
Entry* bdb_tool_entry_get( BackendDB *be, ID id );
|
|
|
|
ID bdb_tool_entry_put( BackendDB *be, Entry *e );
|
2000-09-27 04:41:54 +08:00
|
|
|
int bdb_tool_entry_reindex( BackendDB *be, ID id );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
|
2000-09-19 05:35:08 +08:00
|
|
|
LDAP_END_DECL
|
|
|
|
|
|
|
|
#endif /* _PROTO_BDB_H */
|