proto-slapi.h 3.92 KB
Newer Older
Pierangelo Masarati's avatar
Pierangelo Masarati committed
1
/* $OpenLDAP$ */
2
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 *
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
4
 * Copyright 2002-2019 The OpenLDAP Foundation.
5
6
7
 * Portions Copyright 1997,2002-2003 IBM Corporation.
 * All rights reserved.
 *
8
9
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted only as authorized by the OpenLDAP
10
11
12
13
14
15
16
17
18
19
20
 * Public License.
 *
 * A copy of this license is available in the file LICENSE in the
 * top-level directory of the distribution or, alternatively, at
 * <http://www.OpenLDAP.org/license.html>.
 */
/* ACKNOWLEDGEMENTS:
 * This work was initially developed by IBM Corporation for use in
 * IBM products and subsequently ported to OpenLDAP Software by
 * Steve Omrani.  Additional significant contributors include:
 *   Luke Howard
21
22
 */

23
24
#ifndef _PROTO_SLAPI_H
#define _PROTO_SLAPI_H
25

Kurt Zeilenga's avatar
Kurt Zeilenga committed
26
27
LDAP_BEGIN_DECL

Luke Howard's avatar
Luke Howard committed
28
/* slapi_utils.c */
Luke Howard's avatar
Luke Howard committed
29
LDAP_SLAPI_F (LDAPMod **) slapi_int_modifications2ldapmods LDAP_P(( Modifications * ));
Howard Chu's avatar
Howard Chu committed
30
LDAP_SLAPI_F (Modifications *) slapi_int_ldapmods2modifications LDAP_P(( Operation *op, LDAPMod ** ));
31
LDAP_SLAPI_F (int) slapi_int_count_controls LDAP_P(( LDAPControl **ctrls ));
Luke Howard's avatar
Luke Howard committed
32
LDAP_SLAPI_F (char **) slapi_get_supported_extended_ops LDAP_P((void));
Luke Howard's avatar
Luke Howard committed
33
LDAP_SLAPI_F (int) slapi_int_access_allowed LDAP_P((Operation *op, Entry *entry, AttributeDescription *desc, struct berval *val, slap_access_t access, AccessControlState *state ));
Luke Howard's avatar
Luke Howard committed
34
35

/* slapi_ops.c */
36
LDAP_SLAPI_F (int) slapi_int_response LDAP_P(( Slapi_Operation *op, SlapReply *rs ));
37
38
LDAP_SLAPI_F (void) slapi_int_connection_init_pb LDAP_P(( Slapi_PBlock *pb, ber_tag_t OpType ));
LDAP_SLAPI_F (void) slapi_int_connection_done_pb LDAP_P(( Slapi_PBlock *pb ));
Luke Howard's avatar
Luke Howard committed
39
40
41
42
43
44
45
46

/* slapi_pblock.c */
LDAP_SLAPI_F (int) slapi_pblock_delete_param LDAP_P(( Slapi_PBlock *p, int param ));
LDAP_SLAPI_F (void) slapi_pblock_clear LDAP_P(( Slapi_PBlock *pb ));

LDAP_SLAPI_F (int) slapi_int_pblock_get_first LDAP_P(( Backend *be, Slapi_PBlock **pb ));
LDAP_SLAPI_F (int) slapi_int_pblock_get_next LDAP_P(( Slapi_PBlock **pb ));

Luke Howard's avatar
Luke Howard committed
47
#define PBLOCK_ASSERT_CONN( _pb ) do { \
48
		assert( (_pb) != NULL ); \
49
		assert( (_pb)->pb_conn != NULL ); \
Luke Howard's avatar
Luke Howard committed
50
51
52
53
	} while (0)

#define PBLOCK_ASSERT_OP( _pb, _tag ) do { \
		PBLOCK_ASSERT_CONN( _pb ); \
54
		assert( (_pb)->pb_op != NULL ); \
55
		assert( (_pb)->pb_rs != NULL ); \
56
		if ( _tag != 0 ) \
57
			assert( (_pb)->pb_op->o_tag == (_tag)); \
58
59
60
61
	} while (0)
	
#define PBLOCK_ASSERT_INTOP( _pb, _tag ) do { \
		PBLOCK_ASSERT_OP( _pb, _tag ); \
62
63
		assert( (_pb)->pb_intop ); \
		assert( (_pb)->pb_op == (Operation *)pb->pb_conn->c_pending_ops.stqh_first ); \
64
65
	} while (0)
	
Luke Howard's avatar
Luke Howard committed
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* plugin.c */
LDAP_SLAPI_F (int) slapi_int_register_plugin LDAP_P((Backend *be, Slapi_PBlock *pPB));
LDAP_SLAPI_F (int) slapi_int_call_plugins LDAP_P((Backend *be, int funcType, Slapi_PBlock * pPB));
LDAP_SLAPI_F (int) slapi_int_get_plugins LDAP_P((Backend *be, int functype, SLAPI_FUNC **ppFuncPtrs));
LDAP_SLAPI_F (int) slapi_int_register_extop LDAP_P((Backend *pBE, ExtendedOp **opList, Slapi_PBlock *pPB));
LDAP_SLAPI_F (int) slapi_int_get_extop_plugin LDAP_P((struct berval  *reqoid, SLAPI_FUNC *pFuncAddr ));
LDAP_SLAPI_F (struct berval *) slapi_int_get_supported_extop LDAP_P(( int ));
LDAP_SLAPI_F (int) slapi_int_read_config LDAP_P((Backend *be, const char *fname, int lineno,
		int argc, char **argv ));
LDAP_SLAPI_F (void) slapi_int_plugin_unparse LDAP_P((Backend *be, BerVarray *out ));
LDAP_SLAPI_F (int) slapi_int_initialize LDAP_P((void));

/* slapi_ext.c */
LDAP_SLAPI_F (int) slapi_int_init_object_extensions LDAP_P((void));
LDAP_SLAPI_F (int) slapi_int_free_object_extensions LDAP_P((int objecttype, void *object));
LDAP_SLAPI_F (int) slapi_int_create_object_extensions LDAP_P((int objecttype, void *object));
LDAP_SLAPI_F (int) slapi_int_clear_object_extensions LDAP_P((int objecttype, void *object));
83

84
/* slapi_overlay.c */
85
LDAP_SLAPI_F (int) slapi_over_is_inst LDAP_P((BackendDB *));
86
LDAP_SLAPI_F (int) slapi_over_config LDAP_P((BackendDB *, ConfigReply *));
87

Kurt Zeilenga's avatar
Kurt Zeilenga committed
88
89
LDAP_END_DECL

90
#endif /* _PROTO_SLAPI_H */
91