]> git.sur5r.net Git - openldap/blob - servers/slapd/slapi/slapi_pblock.h
Ensure that global plugins are called after backend-specific plugins
[openldap] / servers / slapd / slapi / slapi_pblock.h
1 /*
2  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5 /*
6  * (C) Copyright IBM Corp. 1997,2002
7  * Redistribution and use in source and binary forms are permitted
8  * provided that this notice is preserved and that due credit is 
9  * given to IBM Corporation. This software is provided ``as is'' 
10  * without express or implied warranty.
11  */
12
13 #ifndef SLAPI_PBLOCK_H
14 #define SLAPI_PBLOCK_H
15
16 #define CMP_EQUAL 0
17 #define CMP_GREATER 1
18 #define CMP_LOWER (-1)
19 #define PBLOCK_ERROR (-1)
20 #define INVALID_PARAM PBLOCK_ERROR
21 #define MAX_PARAMS 100
22
23 LDAP_BEGIN_DECL
24
25 struct slapi_pblock {
26         ldap_pvt_thread_mutex_t pblockMutex;
27         int                     ckParams;
28         int                     numParams;
29         int                     curParams[MAX_PARAMS];
30         void                    *curVals[MAX_PARAMS];
31 };
32
33 Slapi_PBlock *slapi_pblock_new();
34 void slapi_pblock_destroy( Slapi_PBlock* );
35 int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value );
36 int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );
37 void slapi_pblock_check_params(Slapi_PBlock *pb, int flag);
38 int slapi_pblock_delete_param(Slapi_PBlock *p, int param);
39 void slapi_pblock_clear(Slapi_PBlock *pb); 
40
41 /*
42  * OpenLDAP extensions
43  */
44 int slapi_x_pblock_get_first( Backend *be, Slapi_PBlock **pb );
45 int slapi_x_pblock_get_next( Slapi_PBlock **pb );
46
47 LDAP_END_DECL
48
49 #endif /* SLAPI_PBLOCK_H */
50