]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldbm/proto-back-ldbm.h
Change slapd/delete stats message for consistency.
[openldap] / servers / slapd / back-ldbm / proto-back-ldbm.h
1 #ifndef _PROTO_BACK_LDBM
2 #define _PROTO_BACK_LDBM
3
4 #include <ldap_cdefs.h>
5
6 LDAP_BEGIN_DECL
7
8 /*
9  * alias.c
10  */
11 Entry *derefAlias_r LDAP_P((
12         Backend     *be,
13         Connection      *conn,
14         Operation       *op,
15         Entry       *e ));
16 char *derefDN LDAP_P((
17         Backend     *be,
18         Connection  *conn,
19         Operation   *op,
20         char        *dn ));
21
22 /*
23  * attr.c
24  */
25
26 void attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask,
27  int *syntaxmask ));
28 void attr_index_config LDAP_P(( struct ldbminfo *li, char *fname, int lineno,
29  int argc, char **argv, int init ));
30
31 /*
32  * cache.c
33  */
34
35 void cache_set_state LDAP_P(( struct cache *cache, Entry *e, int state ));
36 void cache_return_entry_r LDAP_P(( struct cache *cache, Entry *e ));
37 void cache_return_entry_w LDAP_P(( struct cache *cache, Entry *e ));
38 int cache_add_entry LDAP_P(( struct cache *cache, Entry *e, int state ));
39 int cache_update_entry LDAP_P(( struct cache *cache, Entry *e ));
40 ID cache_find_entry_dn2id LDAP_P(( Backend *be, struct cache *cache, char *dn ));
41 Entry * cache_find_entry_id LDAP_P(( struct cache *cache, ID id, int rw ));
42 int cache_delete_entry LDAP_P(( struct cache *cache, Entry *e ));
43
44 /*
45  * dbcache.c
46  */
47
48 struct dbcache * ldbm_cache_open LDAP_P(( Backend *be, char *name, char *suffix,
49  int flags ));
50 void ldbm_cache_close LDAP_P(( Backend *be, struct dbcache *db ));
51 void ldbm_cache_really_close LDAP_P(( Backend *be, struct dbcache *db ));
52 void ldbm_cache_flush_all LDAP_P(( Backend *be ));
53 Datum ldbm_cache_fetch LDAP_P(( struct dbcache *db, Datum key ));
54 int ldbm_cache_store LDAP_P(( struct dbcache *db, Datum key, Datum data, int flags ));
55 int ldbm_cache_delete LDAP_P(( struct dbcache *db, Datum key ));
56
57 /*
58  * dn2id.c
59  */
60
61 int dn2id_add LDAP_P(( Backend *be, char *dn, ID id ));
62 ID dn2id LDAP_P(( Backend *be, char *dn ));
63 int dn2id_delete LDAP_P(( Backend *be, char *dn ));
64 Entry * dn2entry_r LDAP_P(( Backend *be, char *dn, char **matched ));
65 Entry * dn2entry_w LDAP_P(( Backend *be, char *dn, char **matched ));
66
67 /*
68  * filterindex.c
69  */
70
71 ID_BLOCK * filter_candidates LDAP_P(( Backend *be, Filter *f ));
72
73 /*
74  * id2children.c
75  */
76
77 int id2children_add LDAP_P(( Backend *be, Entry *p, Entry *e ));
78 int id2children_remove LDAP_P(( Backend *be, Entry *p, Entry *e ));
79 int has_children LDAP_P(( Backend *be, Entry *p ));
80
81 /*
82  * id2entry.c
83  */
84
85 int id2entry_add LDAP_P(( Backend *be, Entry *e ));
86 int id2entry_delete LDAP_P(( Backend *be, Entry *e ));
87 Entry * id2entry LDAP_P(( Backend *be, ID id, int rw )); 
88 Entry * id2entry_r LDAP_P(( Backend *be, ID id ));
89 Entry * id2entry_w LDAP_P(( Backend *be, ID id ));
90
91 /*
92  * idl.c
93  */
94
95 ID_BLOCK * idl_alloc LDAP_P(( int nids ));
96 ID_BLOCK * idl_allids LDAP_P(( Backend *be ));
97 void idl_free LDAP_P(( ID_BLOCK *idl ));
98 ID_BLOCK * idl_fetch LDAP_P(( Backend *be, struct dbcache *db, Datum key ));
99 int idl_insert_key LDAP_P(( Backend *be, struct dbcache *db, Datum key, ID id ));
100 int idl_insert LDAP_P(( ID_BLOCK **idl, ID id, int maxids ));
101 int idl_delete_key LDAP_P(( Backend *be, struct dbcache *db, Datum key, ID id ));
102 ID_BLOCK * idl_intersection LDAP_P(( Backend *be, ID_BLOCK *a, ID_BLOCK *b ));
103 ID_BLOCK * idl_union LDAP_P(( Backend *be, ID_BLOCK *a, ID_BLOCK *b ));
104 ID_BLOCK * idl_notin LDAP_P(( Backend *be, ID_BLOCK *a, ID_BLOCK *b ));
105 ID idl_firstid LDAP_P(( ID_BLOCK *idl ));
106 ID idl_nextid LDAP_P(( ID_BLOCK *idl, ID id ));
107
108 /*
109  * index.c
110  */
111
112 int index_add_entry LDAP_P(( Backend *be, Entry *e ));
113 int index_add_mods LDAP_P(( Backend *be, LDAPMod *mods, ID id ));
114 ID_BLOCK * index_read LDAP_P(( Backend *be, char *type, int indextype, char *val ));
115
116 /* To keep index files up-to-date we needed a index_delete_values() but since
117  * that function is so similar to index_add_values() I have merged them in one
118  * called index_change_values(). (gomez 07/07/1999)
119  */
120
121 /* int index_add_values LDAP_P(( Backend *be, char *type, struct berval **vals, ID  id )); */
122 /* Possible operations supported (op) by index_change_values() */
123 #define __INDEX_ADD_OP  0x0001
124 #define __INDEX_DEL_OP  0x0002
125 int index_change_values LDAP_P(( Backend *be,
126                                  char *type,
127                                  struct berval **vals,
128                                  ID  id,
129                                  unsigned int op ));
130
131
132
133 /*
134  * kerberos.c
135  */
136
137 #ifdef HAVE_KERBEROS
138 /* krbv4_ldap_auth LDAP_P(( Backend *be, struct berval *cred, AUTH_DAT *ad )); */
139 #endif
140
141 /*
142  * modify.c
143  */
144
145 /* We need this function because of LDAP modrdn. If we do not 
146  * add this there would be a bunch of code replication here 
147  * and there and of course the likelihood of bugs increases.
148  * Juan C. Gomez (gomez@engr.sgi.com) 05/18/99
149  */ 
150 int ldbm_internal_modify LDAP_P((Backend *be, Connection *conn, Operation *op,
151                                  char *dn, LDAPMod *mods, Entry *e));
152
153 /*
154  * nextid.c
155  */
156
157 ID next_id LDAP_P(( Backend *be ));
158 void next_id_return LDAP_P(( Backend *be, ID id ));
159 ID next_id_get LDAP_P(( Backend *be ));
160 int next_id_save LDAP_P(( Backend *be ));
161
162 LDAP_END_DECL
163 #endif