/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2002-2005 The OpenLDAP Foundation.
+ * Copyright 2002-2011 The OpenLDAP Foundation.
* Portions Copyright 1997,2002-2003 IBM Corporation.
* All rights reserved.
*
/*
* Quick 'n' dirty to make struct slapi_* in slapi-plugin.h opaque
*/
-#define slapi_entry slap_entry
-#define slapi_attr slap_attr
+#define slapi_entry Entry
+#define slapi_attr Attribute
#define slapi_value berval
#define slapi_valueset berval *
-#define slapi_filter slap_filter
+#define slapi_filter Filter
LDAP_END_DECL
#define SLAPI_OVERLAY_NAME "slapi"
#define SLAPI_OPERATION_PBLOCK(_op) ((_op)->o_callback->sc_private)
-#define SLAPI_CONNECTION_PBLOCK(_conn) ((_conn)->c_pb);
#define SLAPI_BACKEND_PBLOCK(_be) ((_be)->be_pb)
#define SLAPI_OPERATION_EXTENSIONS(_op) ((_op)->o_hdr->oh_extensions)
SLAPI_X_EXT_MAX = 2
} slapi_extension_t;
+struct slapi_dn {
+ unsigned char flag;
+ struct berval dn;
+ struct berval ndn;
+};
+
+struct slapi_rdn {
+ unsigned char flag;
+ struct berval bv;
+ LDAPRDN rdn;
+};
+
/*
* Was: slapi_pblock.h
*/
#define PBLOCK_ERROR (-1)
#define PBLOCK_MAX_PARAMS 100
+union slapi_pblock_value {
+ int pv_integer;
+ long pv_long_integer;
+ void *pv_pointer;
+ int (*pv_function_pointer)();
+};
+
struct slapi_pblock {
- ldap_pvt_thread_mutex_t pblockMutex;
- int numParams;
- int curParams[PBLOCK_MAX_PARAMS];
- void *curVals[PBLOCK_MAX_PARAMS];
+ ldap_pvt_thread_mutex_t pb_mutex;
+ int pb_nParams;
+ int pb_params[PBLOCK_MAX_PARAMS];
+ union slapi_pblock_value pb_values[PBLOCK_MAX_PARAMS];
/* native types */
- Connection *pconn;
- Operation *pop;
- SlapReply rs;
- int internal_op;
- char textbuf[ SLAP_TEXT_BUFLEN ];
+ Connection *pb_conn;
+ Operation *pb_op;
+ SlapReply *pb_rs;
+ int pb_intop;
+ char pb_textbuf[ SLAP_TEXT_BUFLEN ];
};
#endif /* !NO_PBLOCK_CLASS */