]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldbm/proto-back-ldbm.h
Merge in latest from -current.
[openldap] / servers / slapd / back-ldbm / proto-back-ldbm.h
1 #ifndef _PROTO_BACK_LDBM
2 #define _PROTO_BACK_LDBM
3
4 /*
5  * attr.c
6  */
7
8 void attr_masks( struct ldbminfo *li, char *type, int *indexmask,
9  int *syntaxmask );
10 void attr_index_config( struct ldbminfo *li, char *fname, int lineno,
11  int argc, char **argv, int init );
12
13 /*
14  * cache.c
15  */
16
17 void cache_set_state( struct cache *cache, Entry *e, int state );
18 void cache_return_entry_r( struct cache *cache, Entry *e );
19 void cache_return_entry_w( struct cache *cache, Entry *e );
20 int cache_add_entry_lock( struct cache *cache, Entry *e, int state );
21 ID cache_find_entry_dn2id( Backend *be, struct cache *cache, char *dn );
22 Entry * cache_find_entry_id( struct cache *cache, ID id, int rw );
23 int cache_delete_entry( struct cache *cache, Entry *e );
24
25 /*
26  * dbcache.c
27  */
28
29 struct dbcache * ldbm_cache_open( Backend *be, char *name, char *suffix,
30  int flags );
31 void ldbm_cache_close( Backend *be, struct dbcache *db );
32 void ldbm_cache_flush_all( Backend *be );
33 Datum ldbm_cache_fetch( struct dbcache *db, Datum key );
34 int ldbm_cache_store( struct dbcache *db, Datum key, Datum data, int flags );
35 int ldbm_cache_delete( struct dbcache *db, Datum key );
36
37 /*
38  * dn2id.c
39  */
40
41 int dn2id_add( Backend *be, char *dn, ID id );
42 ID dn2id( Backend *be, char *dn );
43 int dn2id_delete( Backend *be, char *dn );
44 /*Entry * dn2entry( Backend *be, char *dn, char **matched );*/
45 Entry * dn2entry_r( Backend *be, char *dn, char **matched );
46 Entry * dn2entry_w( Backend *be, char *dn, char **matched );
47
48 /*
49  * filterindex.c
50  */
51
52 IDList * filter_candidates( Backend *be, Filter *f );
53
54 /*
55  * id2children.c
56  */
57
58 int id2children_add( Backend *be, Entry *p, Entry *e );
59 int has_children( Backend *be, Entry *p );
60
61 /*
62  * id2entry.c
63  */
64
65 int id2entry_add( Backend *be, Entry *e );
66 int id2entry_delete( Backend *be, Entry *e );
67 Entry * id2entry( Backend *be, ID id, int rw ); 
68 Entry * id2entry_r( Backend *be, ID id );
69 Entry * id2entry_w( Backend *be, ID id );
70
71 /*
72  * idl.c
73  */
74
75 IDList * idl_alloc( int nids );
76 IDList * idl_allids( Backend *be );
77 void idl_free( IDList *idl );
78 IDList * idl_fetch( Backend *be, struct dbcache *db, Datum key );
79 int idl_insert_key( Backend *be, struct dbcache *db, Datum key, ID id );
80 int idl_insert( IDList **idl, ID id, int maxids );
81 IDList * idl_intersection( Backend *be, IDList *a, IDList *b );
82 IDList * idl_union( Backend *be, IDList *a, IDList *b );
83 IDList * idl_notin( Backend *be, IDList *a, IDList *b );
84 ID idl_firstid( IDList *idl );
85 ID idl_nextid( IDList *idl, ID id );
86
87 /*
88  * index.c
89  */
90
91 int index_add_entry( Backend *be, Entry *e );
92 int index_add_mods( Backend *be, LDAPMod *mods, ID id );
93 IDList * index_read( Backend *be, char *type, int indextype, char *val );
94 int index_add_values( Backend *be, char *type, struct berval **vals, ID  id );
95
96 /*
97  * kerberos.c
98  */
99
100 #ifdef KERBEROS
101 /* krbv4_ldap_auth( Backend *be, struct berval *cred, AUTH_DAT *ad ); */
102 #endif
103
104 /*
105  * nextid.c
106  */
107
108 ID next_id( Backend *be );
109 void next_id_return( Backend *be, ID id );
110 ID next_id_get( Backend *be );
111
112 #endif