]> git.sur5r.net Git - openldap/blob - servers/slapd/back-bdb2/proto-back-bdb2.h
Add dummy bdb2_back_entry_release_rw() to be completed later
[openldap] / servers / slapd / back-bdb2 / proto-back-bdb2.h
1 #ifndef _PROTO_BACK_BDB2
2 #define _PROTO_BACK_BDB2
3
4 #include <ldap_cdefs.h>
5
6 #include <ac/time.h>            /* Needed in add.c compare.c struct timeval */
7
8 #include "external.h"
9
10 LDAP_BEGIN_DECL
11
12 /*
13  * alias.c
14  */
15 Entry *bdb2i_derefAlias_r LDAP_P((
16         BackendDB   *be,
17         Connection      *conn,
18         Operation       *op,
19         Entry       *e ));
20 char *bdb2i_derefDN LDAP_P((
21         BackendDB   *be,
22         Connection  *conn,
23         Operation   *op,
24         char        *dn ));
25
26 /*
27  * attr.c
28  */
29
30 void bdb2i_attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask,
31  int *syntaxmask ));
32 void bdb2i_attr_index_config LDAP_P(( struct ldbminfo *li, char *fname,
33  int lineno, int argc, char **argv, int init ));
34
35 /*
36  * cache.c
37  */
38
39 int bdb2i_cache_add_entry_rw LDAP_P(( struct cache *cache, Entry *e, int rw ));
40 int bdb2i_cache_update_entry LDAP_P(( struct cache *cache, Entry *e ));
41 void bdb2i_cache_return_entry_rw LDAP_P(( struct cache *cache, Entry *e,
42  int rw ));
43 #define bdb2i_cache_return_entry_r(c, e) bdb2i_cache_return_entry_rw((c), (e), 0)
44 #define bdb2i_cache_return_entry_w(c, e) bdb2i_cache_return_entry_rw((c), (e), 1)
45
46 ID bdb2i_cache_find_entry_dn2id LDAP_P(( BackendDB *be, struct cache *cache,
47  char *dn ));
48 Entry * bdb2i_cache_find_entry_id LDAP_P(( struct cache *cache, ID id, int rw ));
49 int bdb2i_cache_delete_entry LDAP_P(( struct cache *cache, Entry *e ));
50
51 /*
52  * dbcache.c
53  */
54
55 struct dbcache * bdb2i_cache_open LDAP_P(( BackendDB *be, char *name, char *suffix,
56  int flags ));
57 void bdb2i_cache_close LDAP_P(( BackendDB *be, struct dbcache *db ));
58 void bdb2i_cache_really_close LDAP_P(( BackendDB *be, struct dbcache *db ));
59 void bdb2i_cache_flush_all LDAP_P(( BackendDB *be ));
60 Datum bdb2i_cache_fetch LDAP_P(( struct dbcache *db, Datum key ));
61 int bdb2i_cache_store LDAP_P(( struct dbcache *db, Datum key, Datum data, int flags ));
62 int bdb2i_cache_delete LDAP_P(( struct dbcache *db, Datum key ));
63
64 /*
65  * dn2id.c
66  */
67
68 int bdb2i_dn2id_add LDAP_P(( BackendDB *be, char *dn, ID id ));
69 ID bdb2i_dn2id LDAP_P(( BackendDB *be, char *dn ));
70 int bdb2i_dn2id_delete LDAP_P(( BackendDB *be, char *dn ));
71
72 Entry * bdb2i_dn2entry_rw LDAP_P(( BackendDB *be, char *dn, char **matched,
73  int rw ));
74 #define bdb2i_dn2entry_r(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 0)
75 #define bdb2i_dn2entry_w(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 1)
76
77 /*
78  * entry.c
79  */
80 int bdb2_back_entry_release_rw LDAP_P(( BackendDB *be, Entry *e, int rw ));
81
82 /*
83  * filterindex.c
84  */
85
86 ID_BLOCK * bdb2i_filter_candidates LDAP_P(( BackendDB *be, Filter *f ));
87
88 /*
89  * id2children.c
90  */
91
92 int bdb2i_id2children_add LDAP_P(( BackendDB *be, Entry *p, Entry *e ));
93 int bdb2i_id2children_remove LDAP_P(( BackendDB *be, Entry *p, Entry *e ));
94 int bdb2i_has_children LDAP_P(( BackendDB *be, Entry *p ));
95
96 /*
97  * id2entry.c
98  */
99
100 int bdb2i_id2entry_add LDAP_P(( BackendDB *be, Entry *e ));
101 int bdb2i_id2entry_delete LDAP_P(( BackendDB *be, Entry *e ));
102
103 Entry * bdb2i_id2entry_rw LDAP_P(( BackendDB *be, ID id, int rw )); 
104 #define bdb2i_id2entry_r(be, id)  bdb2i_id2entry_rw((be), (id), 0)
105 #define bdb2i_id2entry_w(be, id)  bdb2i_id2entry_rw((be), (id), 1)
106
107 /*
108  * idl.c
109  */
110
111 ID_BLOCK * bdb2i_idl_alloc LDAP_P(( unsigned int nids ));
112 ID_BLOCK * bdb2i_idl_allids LDAP_P(( BackendDB *be ));
113 void bdb2i_idl_free LDAP_P(( ID_BLOCK *idl ));
114 ID_BLOCK * bdb2i_idl_fetch LDAP_P(( BackendDB *be, struct dbcache *db, Datum key ));
115 int bdb2i_idl_insert_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
116 int bdb2i_idl_insert LDAP_P(( ID_BLOCK **idl, ID id, unsigned int maxids ));
117 int bdb2i_idl_delete_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
118 ID_BLOCK * bdb2i_idl_intersection LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
119 ID_BLOCK * bdb2i_idl_union LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
120 ID_BLOCK * bdb2i_idl_notin LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
121 ID bdb2i_idl_firstid LDAP_P(( ID_BLOCK *idl ));
122 ID bdb2i_idl_nextid LDAP_P(( ID_BLOCK *idl, ID id ));
123
124 /*
125  * index.c
126  */
127
128 int bdb2i_index_add_entry LDAP_P(( BackendDB *be, Entry *e ));
129 int bdb2i_index_add_mods LDAP_P(( BackendDB *be, LDAPModList *ml, ID id ));
130 ID_BLOCK * bdb2i_index_read LDAP_P(( BackendDB *be, char *type, int indextype, char *val ));
131 int bdb2i_index_add_values LDAP_P(( BackendDB *be, char *type, struct berval **vals, ID  id ));
132
133 /*
134  * kerberos.c
135  */
136
137 #ifdef HAVE_KERBEROS
138 /* bdb2i_krbv4_ldap_auth LDAP_P(( BackendDB *be, struct berval *cred, AUTH_DAT *ad )); */
139 #endif
140
141 /*
142  * modify.c
143  * These prototypes are placed here because they are used by modify and
144  * modify rdn which are implemented in different files. 
145  */
146
147 int bdb2i_add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
148 int bdb2i_delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
149 int bdb2i_replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
150
151 /*
152  * nextid.c
153  */
154
155 ID bdb2i_next_id LDAP_P(( BackendDB *be ));
156 void bdb2i_next_id_return LDAP_P(( BackendDB *be, ID id ));
157 ID bdb2i_next_id_get LDAP_P(( BackendDB *be ));
158 int bdb2i_next_id_save LDAP_P(( BackendDB *be ));
159
160 /*
161  *  startup.c
162  */
163
164 int bdb2i_back_startup     LDAP_P(( BackendInfo *bi ));
165 int bdb2i_back_shutdown    LDAP_P(( BackendInfo *bi ));
166 int bdb2i_back_db_startup  LDAP_P(( BackendDB *be ));
167 int bdb2i_back_db_shutdown LDAP_P(( BackendDB *be ));
168
169 /*
170  *  timing.c
171  */
172
173 void bdb2i_uncond_start_timing LDAP_P(( struct timeval *time1 ));
174 #define bdb2i_start_timing(bi,time1)  if ( with_timing( bi )) bdb2i_uncond_start_timing( (time1) )
175 void bdb2i_uncond_stop_timing LDAP_P(( struct timeval time1,
176   char *func, Connection *conn, Operation *op, int level ));
177 #define bdb2i_stop_timing(bi,time1,func,conn,op)  if ( with_timing( bi )) bdb2i_uncond_stop_timing( (time1), (func), (conn), (op), LDAP_DEBUG_ANY )
178
179 /*
180  * porter.c
181  */
182
183 int bdb2i_enter_backend_rw  LDAP_P(( DB_LOCK *lock, int writer ));
184 #define bdb2i_enter_backend_r(lock)  bdb2i_enter_backend_rw((lock), 0 )
185 #define bdb2i_enter_backend_w(lock)  bdb2i_enter_backend_rw((lock), 1 )
186 int bdb2i_leave_backend_rw LDAP_P(( DB_LOCK lock, int writer ));
187 #define bdb2i_leave_backend_r(lock)  bdb2i_leave_backend_rw((lock), 0 )
188 #define bdb2i_leave_backend_w(lock)  bdb2i_leave_backend_rw((lock), 1 )
189
190 /*
191  *  txn.c
192  */
193
194 int bdb2i_txn_head_init  LDAP_P(( BDB2_TXN_HEAD *head ));
195 void bdb2i_txn_attr_config LDAP_P((
196  struct ldbminfo  *li,
197  char *attr,
198  int open ));
199 int bdb2i_txn_open_files LDAP_P(( BackendDB *be ));
200 void bdb2i_txn_close_files LDAP_P(( BackendDB *be ));
201 BDB2_TXN_FILES *bdb2i_get_db_file_cache LDAP_P((
202  struct ldbminfo *li,
203  char *name ));
204 int bdb2i_check_additional_attr_index LDAP_P(( struct ldbminfo *li ));
205 void bdb2i_check_default_attr_index_add LDAP_P((
206  struct ldbminfo *li,
207  Entry *e ));
208 void bdb2i_check_default_attr_index_mod LDAP_P((
209  struct ldbminfo *li,
210  LDAPModList *modlist ));
211 ID bdb2i_get_nextid  LDAP_P(( BackendDB *be ));
212 int bdb2i_put_nextid LDAP_P(( BackendDB *be, ID id ));
213 LDBM bdb2i_db_open LDAP_P(( char *name, int type, int rw, int mode,
214  int dbcachesize ));
215 int bdb2i_db_store   LDAP_P(( LDBM ldbm, Datum key, Datum data, int flags ));
216 int bdb2i_db_delete  LDAP_P(( LDBM ldbm, Datum key ));
217 Datum bdb2i_db_fetch LDAP_P(( LDBM ldbm, Datum key ));
218 Datum bdb2i_db_firstkey LDAP_P(( LDBM ldbm, DBC **dbch ));
219 Datum bdb2i_db_nextkey  LDAP_P(( LDBM ldbm, Datum key, DBC *dbcp ));
220 int bdb2i_start_transction   LDAP_P(( DB_TXNMGR *txmgr ));
221 int bdb2i_finish_transaction LDAP_P(( ));
222 int bdb2i_set_txn_checkpoint LDAP_P(( DB_TXNMGR *txmgr, int forced ));
223
224
225 LDAP_END_DECL
226 #endif