]> git.sur5r.net Git - openldap/blob - servers/slapd/back-monitor/proto-back-monitor.h
ITS#4587: selfwrite access is broken
[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-2006 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
83 /*
84  * databases 
85  */
86 extern int
87 monitor_subsys_database_init LDAP_P((
88         BackendDB               *be,
89         monitor_subsys_t        *ms ));
90
91 /*
92  * entry
93  */
94 extern int
95 monitor_entry_update LDAP_P((
96         Operation               *op,
97         SlapReply               *rs,
98         Entry                   *e ));
99 extern int
100 monitor_entry_create LDAP_P((
101         Operation               *op,
102         SlapReply               *rs,
103         struct berval           *ndn,
104         Entry                   *e_parent,
105         Entry                   **ep ));
106 extern int
107 monitor_entry_modify LDAP_P((
108         Operation               *op,
109         SlapReply               *rs,
110         Entry                   *e ));
111 extern int
112 monitor_entry_test_flags LDAP_P((
113         monitor_entry_t         *mp,
114         int                     cond ));
115 extern monitor_entry_t *
116 monitor_entrypriv_create LDAP_P((
117         void ));
118
119 /*
120  * init
121  */
122 extern int
123 monitor_back_register_subsys LDAP_P((
124         monitor_subsys_t        *ms ));
125 extern monitor_subsys_t *
126 monitor_back_get_subsys LDAP_P((
127         const char              *name ));
128 extern monitor_subsys_t *
129 monitor_back_get_subsys_by_dn LDAP_P((
130         struct berval           *ndn,
131         int                     sub ));
132 extern int
133 monitor_back_is_configured LDAP_P(( void ));
134 extern int
135 monitor_back_register_entry LDAP_P((
136         Entry                   *e,
137         monitor_callback_t      *cb ));
138 extern int
139 monitor_back_register_entry_parent LDAP_P((
140         Entry                   *e,
141         monitor_callback_t      *cb,
142         struct berval           *base,
143         int                     scope,
144         struct berval           *filter ));
145 extern int
146 monitor_filter2ndn LDAP_P((
147         struct berval           *base,
148         int                     scope,
149         struct berval           *filter,
150         struct berval           *ndn ));
151 extern int
152 monitor_back_register_entry_attrs LDAP_P((
153         struct berval           *ndn,
154         Attribute               *a,
155         monitor_callback_t      *cb,
156         struct berval           *base,
157         int                     scope,
158         struct berval           *filter ));
159 extern int
160 monitor_back_register_entry_callback LDAP_P((
161         struct berval           *ndn,
162         monitor_callback_t      *cb,
163         struct berval           *base,
164         int                     scope,
165         struct berval           *filter ));
166
167 /*
168  * listener
169  */
170 extern int
171 monitor_subsys_listener_init LDAP_P((
172         BackendDB               *be,
173         monitor_subsys_t        *ms ));
174
175 /*
176  * log
177  */
178 extern int
179 monitor_subsys_log_init LDAP_P((
180         BackendDB               *be,
181         monitor_subsys_t        *ms ));
182
183 /*
184  * operations
185  */
186 extern int
187 monitor_subsys_ops_init LDAP_P((
188         BackendDB               *be,
189         monitor_subsys_t        *ms ));
190
191 /*
192  * overlay
193  */
194 extern int
195 monitor_subsys_overlay_init LDAP_P((
196         BackendDB               *be,
197         monitor_subsys_t        *ms ));
198
199 /*
200  * sent
201  */
202 extern int
203 monitor_subsys_sent_init LDAP_P((
204         BackendDB               *be,
205         monitor_subsys_t        *ms ));
206
207 /*
208  * threads
209  */
210 extern int
211 monitor_subsys_thread_init LDAP_P((
212         BackendDB               *be,
213         monitor_subsys_t        *ms ));
214
215 /*
216  * time
217  */
218 extern int monitor_subsys_time_init LDAP_P((
219         BackendDB               *be,
220         monitor_subsys_t        *ms ));
221
222 /*
223  * waiters
224  */
225 extern int
226 monitor_subsys_rww_init LDAP_P((
227         BackendDB               *be,
228         monitor_subsys_t        *ms ));
229
230 /*
231  * former external.h
232  */
233
234 extern BI_init                  monitor_back_initialize;
235
236 extern BI_db_init               monitor_back_db_init;
237 extern BI_db_open               monitor_back_db_open;
238 extern BI_config                monitor_back_config;
239 extern BI_db_destroy            monitor_back_db_destroy;
240 extern BI_db_config             monitor_back_db_config;
241
242 extern BI_op_search             monitor_back_search;
243 extern BI_op_compare            monitor_back_compare;
244 extern BI_op_modify             monitor_back_modify;
245 extern BI_op_bind               monitor_back_bind;
246 extern BI_operational           monitor_back_operational;
247
248 LDAP_END_DECL
249
250 #endif /* _PROTO_BACK_MONITOR */
251