]> git.sur5r.net Git - openldap/blob - servers/slapd/back-monitor/proto-back-monitor.h
update for new backend types
[openldap] / servers / slapd / back-monitor / proto-back-monitor.h
1 /* $OpenLDAP$ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3  *
4  * Copyright 2001-2005 The OpenLDAP Foundation.
5  * Portions Copyright 2001-2003 Pierangelo Masarati.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted only as authorized by the OpenLDAP
10  * Public License.
11  *
12  * A copy of this license is available in file LICENSE in the
13  * top-level directory of the distribution or, alternatively, at
14  * <http://www.OpenLDAP.org/license.html>.
15  */
16 /* ACKNOWLEDGEMENTS:
17  * This work was initially developed by Pierangelo Masarati for inclusion
18  * in OpenLDAP Software.
19  */
20
21 #ifndef _PROTO_BACK_MONITOR
22 #define _PROTO_BACK_MONITOR
23
24 #include <ldap_cdefs.h>
25
26 LDAP_BEGIN_DECL
27
28 /*
29  * backends
30  */
31 int
32 monitor_subsys_backend_init LDAP_P((
33         BackendDB               *be,
34         monitor_subsys_t        *ms ));
35
36 /*
37  * cache
38  */
39 extern int
40 monitor_cache_cmp LDAP_P((
41         const void              *c1,
42         const void              *c2 ));
43 extern int
44 monitor_cache_dup LDAP_P((
45         void                    *c1,
46         void                    *c2 ));
47 extern int
48 monitor_cache_add LDAP_P((
49         monitor_info_t          *mi,
50         Entry                   *e ));
51 extern int
52 monitor_cache_get LDAP_P((
53         monitor_info_t          *mi,
54         struct berval           *ndn,
55         Entry                   **ep ));
56 extern int
57 monitor_cache_dn2entry LDAP_P((
58         Operation               *op,
59         SlapReply               *rs,
60         struct berval           *ndn,
61         Entry                   **ep,
62         Entry                   **matched ));
63 extern int
64 monitor_cache_lock LDAP_P((
65         Entry                   *e ));
66 extern int
67 monitor_cache_release LDAP_P((
68         monitor_info_t          *mi,
69         Entry                   *e ));
70
71 extern int
72 monitor_cache_destroy LDAP_P((
73         monitor_info_t          *mi ));
74
75 /*
76  * connections
77  */
78 extern int
79 monitor_subsys_conn_init LDAP_P((
80         BackendDB               *be,
81         monitor_subsys_t        *ms ));
82 extern int
83 monitor_subsys_conn_update LDAP_P((
84         Operation               *op,
85         SlapReply               *rs,
86         Entry                   *e ));
87 extern int
88 monitor_subsys_conn_create LDAP_P((
89         Operation               *op,
90         SlapReply               *rs,
91         struct berval           *ndn,
92         Entry                   *e_parent,
93         Entry                   **ep ));
94
95 /*
96  * databases 
97  */
98 extern int
99 monitor_subsys_database_init LDAP_P((
100         BackendDB               *be,
101         monitor_subsys_t        *ms ));
102 extern int
103 monitor_subsys_database_modify LDAP_P((
104         Operation               *op,
105         SlapReply               *rs,
106         Entry                   *e ));
107
108 /*
109  * entry
110  */
111 extern int
112 monitor_entry_update LDAP_P((
113         Operation               *op,
114         SlapReply               *rs,
115         Entry                   *e ));
116 extern int
117 monitor_entry_create LDAP_P((
118         Operation               *op,
119         SlapReply               *rs,
120         struct berval           *ndn,
121         Entry                   *e_parent,
122         Entry                   **ep ));
123 extern int
124 monitor_entry_modify LDAP_P((
125         Operation               *op,
126         SlapReply               *rs,
127         Entry                   *e ));
128 extern int
129 monitor_entry_test_flags LDAP_P((
130         monitor_entry_t         *mp,
131         int                     cond ));
132 extern monitor_entry_t *
133 monitor_entrypriv_create LDAP_P((
134         void ));
135
136 /*
137  * init
138  */
139 extern int
140 monitor_back_register_subsys LDAP_P((
141         monitor_subsys_t        *ms ));
142 extern monitor_subsys_t *
143 monitor_back_get_subsys LDAP_P((
144         const char              *name ));
145 extern monitor_subsys_t *
146 monitor_back_get_subsys_by_dn LDAP_P((
147         struct berval           *ndn,
148         int                     sub ));
149 extern int
150 monitor_back_register_entry LDAP_P((
151         Entry                   *e,
152         monitor_callback_t      *cb ));
153 extern int
154 monitor_back_register_entry_parent LDAP_P((
155         Entry                   *e,
156         monitor_callback_t      *cb,
157         struct berval           *base,
158         int                     scope,
159         struct berval           *filter ));
160 extern int
161 monitor_filter2ndn LDAP_P((
162         struct berval           *base,
163         int                     scope,
164         struct berval           *filter,
165         struct berval           *ndn ));
166 extern int
167 monitor_back_register_entry_attrs LDAP_P((
168         struct berval           *ndn,
169         Attribute               *a,
170         monitor_callback_t      *cb,
171         struct berval           *base,
172         int                     scope,
173         struct berval           *filter ));
174 extern int
175 monitor_back_register_entry_callback LDAP_P((
176         struct berval           *ndn,
177         monitor_callback_t      *cb,
178         struct berval           *base,
179         int                     scope,
180         struct berval           *filter ));
181
182 /*
183  * listener
184  */
185 extern int
186 monitor_subsys_listener_init LDAP_P((
187         BackendDB               *be,
188         monitor_subsys_t        *ms ));
189
190 /*
191  * log
192  */
193 extern int
194 monitor_subsys_log_init LDAP_P((
195         BackendDB               *be,
196         monitor_subsys_t        *ms ));
197 extern int
198 monitor_subsys_log_modify LDAP_P((
199         Operation               *op,
200         SlapReply               *rs,
201         Entry                   *e ));
202
203 /*
204  * operations
205  */
206 extern int
207 monitor_subsys_ops_init LDAP_P((
208         BackendDB               *be,
209         monitor_subsys_t        *ms ));
210 extern int
211 monitor_subsys_ops_update LDAP_P((
212         Operation               *op,
213         SlapReply               *rs,
214         Entry                   *e ));
215
216 /*
217  * overlay
218  */
219 extern int
220 monitor_subsys_overlay_init LDAP_P((
221         BackendDB               *be,
222         monitor_subsys_t        *ms ));
223
224 /*
225  * sent
226  */
227 extern int
228 monitor_subsys_sent_init LDAP_P((
229         BackendDB               *be,
230         monitor_subsys_t        *ms ));
231 extern int
232 monitor_subsys_sent_update LDAP_P((
233         Operation               *op,
234         SlapReply               *rs,
235         Entry                   *e ));
236
237 /*
238  * threads
239  */
240 extern int
241 monitor_subsys_thread_init LDAP_P((
242         BackendDB               *be,
243         monitor_subsys_t        *ms ));
244 extern int
245 monitor_subsys_thread_update LDAP_P((
246         Operation               *op,
247         SlapReply               *rs,
248         Entry                   *e ));
249
250 /*
251  * time
252  */
253 extern int monitor_subsys_time_init LDAP_P((
254         BackendDB               *be,
255         monitor_subsys_t        *ms ));
256 extern int
257 monitor_subsys_time_update LDAP_P((
258         Operation               *op,
259         SlapReply               *rs,
260         Entry                   *e ));
261
262 /*
263  * waiters
264  */
265 extern int
266 monitor_subsys_rww_init LDAP_P((
267         BackendDB               *be,
268         monitor_subsys_t        *ms ));
269 extern int
270 monitor_subsys_rww_update LDAP_P((
271         Operation               *op,
272         SlapReply               *rs,
273         Entry                   *e ));
274
275 /*
276  * former external.h
277  */
278
279 extern BI_init                  monitor_back_initialize;
280
281 extern BI_db_init               monitor_back_db_init;
282 extern BI_db_open               monitor_back_db_open;
283 extern BI_config                monitor_back_config;
284 extern BI_db_destroy            monitor_back_db_destroy;
285 extern BI_db_config             monitor_back_db_config;
286
287 extern BI_op_search             monitor_back_search;
288 extern BI_op_compare            monitor_back_compare;
289 extern BI_op_modify             monitor_back_modify;
290 extern BI_op_bind               monitor_back_bind;
291 extern BI_operational           monitor_back_operational;
292
293 LDAP_END_DECL
294
295 #endif /* _PROTO_BACK_MONITOR */
296