]> git.sur5r.net Git - openldap/blob - servers/slapd/slapi/slapi_pblock.h
SLAPI - Netscape plugin API for slapd - based on patch contributed by Steve Omrani...
[openldap] / servers / slapd / slapi / slapi_pblock.h
1 /*
2  * Copyright 1998-2002 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 struct slapi_pblock {
24         ldap_pvt_thread_mutex_t pblockMutex;
25         int                     ckParams;
26         int                     numParams;
27         int                     curParams[MAX_PARAMS];
28         void                    *curVals[MAX_PARAMS];
29 };
30
31 Slapi_PBlock *slapi_pblock_new();
32 void slapi_pblock_destroy( Slapi_PBlock* );
33 int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value );
34 int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );
35 void slapi_pblock_check_params(Slapi_PBlock *pb, int flag);
36 int slapi_pblock_delete_param(Slapi_PBlock *p, int param);
37 void slapi_pblock_clear(Slapi_PBlock *pb); 
38
39 #endif /* SLAPI_PBLOCK_H */
40