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