]> git.sur5r.net Git - openldap/blob - servers/slapd/back-monitor/proto-back-monitor.h
happy new year
[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-2007 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_remove LDAP_P((
58         monitor_info_t          *mi,
59         struct berval           *ndn,
60         Entry                   **ep ));
61 extern int
62 monitor_cache_dn2entry LDAP_P((
63         Operation               *op,
64         SlapReply               *rs,
65         struct berval           *ndn,
66         Entry                   **ep,
67         Entry                   **matched ));
68 extern int
69 monitor_cache_lock LDAP_P((
70         Entry                   *e ));
71 extern int
72 monitor_cache_release LDAP_P((
73         monitor_info_t          *mi,
74         Entry                   *e ));
75
76 extern int
77 monitor_cache_destroy LDAP_P((
78         monitor_info_t          *mi ));
79
80 /*
81  * connections
82  */
83 extern int
84 monitor_subsys_conn_init LDAP_P((
85         BackendDB               *be,
86         monitor_subsys_t        *ms ));
87
88 /*
89  * databases 
90  */
91 extern int
92 monitor_subsys_database_init LDAP_P((
93         BackendDB               *be,
94         monitor_subsys_t        *ms ));
95
96 /*
97  * entry
98  */
99 extern int
100 monitor_entry_update LDAP_P((
101         Operation               *op,
102         SlapReply               *rs,
103         Entry                   *e ));
104 extern int
105 monitor_entry_create LDAP_P((
106         Operation               *op,
107         SlapReply               *rs,
108         struct berval           *ndn,
109         Entry                   *e_parent,
110         Entry                   **ep ));
111 extern int
112 monitor_entry_modify LDAP_P((
113         Operation               *op,
114         SlapReply               *rs,
115         Entry                   *e ));
116 extern int
117 monitor_entry_test_flags LDAP_P((
118         monitor_entry_t         *mp,
119         int                     cond ));
120 extern monitor_entry_t *
121 monitor_entrypriv_create LDAP_P((
122         void ));
123
124 extern Entry *
125 monitor_entry_stub LDAP_P((
126         struct berval   *pdn,
127         struct berval   *pndn,
128         struct berval   *rdn,
129         ObjectClass             *oc,
130         monitor_info_t  *mi,
131         struct berval   *create,
132         struct berval   *modify));
133
134 /*
135  * init
136  */
137 extern int
138 monitor_back_register_subsys LDAP_P((
139         monitor_subsys_t        *ms ));
140 extern monitor_subsys_t *
141 monitor_back_get_subsys LDAP_P((
142         const char              *name ));
143 extern monitor_subsys_t *
144 monitor_back_get_subsys_by_dn LDAP_P((
145         struct berval           *ndn,
146         int                     sub ));
147 extern int
148 monitor_back_is_configured LDAP_P(( void ));
149 extern int
150 monitor_back_register_entry LDAP_P((
151         Entry                   *e,
152         monitor_callback_t      *cb,
153         monitor_subsys_t        *mss,
154         unsigned long           flags ));
155 extern int
156 monitor_back_register_entry_parent LDAP_P((
157         Entry                   *e,
158         monitor_callback_t      *cb,
159         monitor_subsys_t        *mss,
160         unsigned long           flags,
161         struct berval           *base,
162         int                     scope,
163         struct berval           *filter ));
164 extern int
165 monitor_search2ndn LDAP_P((
166         struct berval           *base,
167         int                     scope,
168         struct berval           *filter,
169         struct berval           *ndn ));
170 extern int
171 monitor_back_register_entry_attrs LDAP_P((
172         struct berval           *ndn,
173         Attribute               *a,
174         monitor_callback_t      *cb,
175         struct berval           *base,
176         int                     scope,
177         struct berval           *filter ));
178 extern int
179 monitor_back_register_entry_callback LDAP_P((
180         struct berval           *ndn,
181         monitor_callback_t      *cb,
182         struct berval           *base,
183         int                     scope,
184         struct berval           *filter ));
185 extern int
186 monitor_back_unregister_entry LDAP_P((
187         struct berval           *ndn ));
188 extern int
189 monitor_back_unregister_entry_parent LDAP_P((
190         struct berval           *nrdn,
191         monitor_callback_t      *target_cb,
192         struct berval           *base,
193         int                     scope,
194         struct berval           *filter ));
195 extern int
196 monitor_back_unregister_entry_attrs LDAP_P((
197         struct berval           *ndn,
198         Attribute               *a,
199         monitor_callback_t      *cb,
200         struct berval           *base,
201         int                     scope,
202         struct berval           *filter ));
203 extern int
204 monitor_back_unregister_entry_callback LDAP_P((
205         struct berval           *ndn,
206         monitor_callback_t      *cb,
207         struct berval           *base,
208         int                     scope,
209         struct berval           *filter ));
210
211 /*
212  * listener
213  */
214 extern int
215 monitor_subsys_listener_init LDAP_P((
216         BackendDB               *be,
217         monitor_subsys_t        *ms ));
218
219 /*
220  * log
221  */
222 extern int
223 monitor_subsys_log_init LDAP_P((
224         BackendDB               *be,
225         monitor_subsys_t        *ms ));
226
227 /*
228  * operations
229  */
230 extern int
231 monitor_subsys_ops_init LDAP_P((
232         BackendDB               *be,
233         monitor_subsys_t        *ms ));
234
235 /*
236  * overlay
237  */
238 extern int
239 monitor_subsys_overlay_init LDAP_P((
240         BackendDB               *be,
241         monitor_subsys_t        *ms ));
242
243 /*
244  * sent
245  */
246 extern int
247 monitor_subsys_sent_init LDAP_P((
248         BackendDB               *be,
249         monitor_subsys_t        *ms ));
250
251 /*
252  * threads
253  */
254 extern int
255 monitor_subsys_thread_init LDAP_P((
256         BackendDB               *be,
257         monitor_subsys_t        *ms ));
258
259 /*
260  * time
261  */
262 extern int monitor_subsys_time_init LDAP_P((
263         BackendDB               *be,
264         monitor_subsys_t        *ms ));
265
266 /*
267  * waiters
268  */
269 extern int
270 monitor_subsys_rww_init LDAP_P((
271         BackendDB               *be,
272         monitor_subsys_t        *ms ));
273
274 /*
275  * former external.h
276  */
277
278 extern BI_init                  monitor_back_initialize;
279
280 extern BI_db_init               monitor_back_db_init;
281 extern BI_db_open               monitor_back_db_open;
282 extern BI_config                monitor_back_config;
283 extern BI_db_destroy            monitor_back_db_destroy;
284 extern BI_db_config             monitor_back_db_config;
285
286 extern BI_op_search             monitor_back_search;
287 extern BI_op_compare            monitor_back_compare;
288 extern BI_op_modify             monitor_back_modify;
289 extern BI_op_bind               monitor_back_bind;
290 extern BI_operational           monitor_back_operational;
291
292 LDAP_END_DECL
293
294 #endif /* _PROTO_BACK_MONITOR */
295