]> git.sur5r.net Git - openldap/commitdiff
SLAPI cleanup
authorLuke Howard <lukeh@openldap.org>
Fri, 22 Jul 2005 09:35:17 +0000 (09:35 +0000)
committerLuke Howard <lukeh@openldap.org>
Fri, 22 Jul 2005 09:35:17 +0000 (09:35 +0000)
include/ldap_cdefs.h
include/slapi-plugin.h

index fcc7ecf782d79eb9722709278eda9c8886895dad..265dbcfb2606c7a5cd2cfb7be11613f26fec91b4 100644 (file)
 #      define LDAP_SLAPD_V(type)       extern type
 #endif
 
+/* SLAPD (as a dynamic library exporting symbols) */
+#if defined(_WIN32) && defined(SLAPD_IMPORT)
+#      define LDAP_SLAPI_F(type)       extern __declspec(dllimport) type
+#      define LDAP_SLAPI_V(type)       extern __declspec(dllimport) type
+#else
+#      define LDAP_SLAPI_F(type)       extern type
+#      define LDAP_SLAPI_V(type)       extern type
+#endif
+
+/* SLAPD (as a dynamic library exporting symbols) */
+#if defined(_WIN32) && defined(SLAPD_IMPORT)
+#      define SLAPI_F(type)            extern __declspec(dllimport) type
+#      define SLAPI_V(type)            extern __declspec(dllimport) type
+#else
+#      define SLAPI_F(type)            extern type
+#      define SLAPI_V(type)            extern type
+#endif
+
 /*
  * C library. Mingw32 links with the dynamic C run-time library by default,
  * so the explicit definition of CSTATIC will keep dllimport from
index 1590b609bfa00c03f7cb14af23d3eb3079fcd845..9bad08a8fb1ad2e88a1cc49ac79ef9ad256d97d0 100644 (file)
@@ -43,6 +43,8 @@ typedef struct slapi_componentid      Slapi_ComponentId;
 #define SLAPI_ATTR_UNIQUEID    "entryUUID"
 #define SLAPI_ATTR_OBJECTCLASS "objectClass"
 
+#ifndef SLAP
+
 /* pblock routines */
 int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value );
 int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );
@@ -509,7 +511,7 @@ int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags );
 #define SLAPI_PLUGIN_EXT_OP_FN                 300
 #define SLAPI_PLUGIN_EXT_OP_OIDLIST            301
 
-/* functions for preoperation functions */
+/* preoperation */
 #define SLAPI_PLUGIN_PRE_BIND_FN               401
 #define SLAPI_PLUGIN_PRE_UNBIND_FN             402
 #define SLAPI_PLUGIN_PRE_SEARCH_FN             403
@@ -523,7 +525,19 @@ int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags );
 #define SLAPI_PLUGIN_PRE_REFERRAL_FN           411
 #define SLAPI_PLUGIN_PRE_RESULT_FN             412
 
-/*  functions for postoperation functions*/
+/* internal preoperation */
+#define SLAPI_PLUGIN_INTERNAL_PRE_ADD_FN       420
+#define SLAPI_PLUGIN_INTERNAL_PRE_MODIFY_FN    421
+#define SLAPI_PLUGIN_INTERNAL_PRE_MODRDN_FN    422
+#define SLAPI_PLUGIN_INTERNAL_PRE_DELETE_FN    423
+
+/* backend preoperation */
+#define SLAPI_PLUGIN_BE_PRE_ADD_FN             450
+#define SLAPI_PLUGIN_BE_PRE_MODIFY_FN          451
+#define SLAPI_PLUGIN_BE_PRE_MODRDN_FN          452
+#define SLAPI_PLUGIN_BE_PRE_DELETE_FN          453
+
+/* postoperation */
 #define SLAPI_PLUGIN_POST_BIND_FN              501
 #define SLAPI_PLUGIN_POST_UNBIND_FN            502
 #define SLAPI_PLUGIN_POST_SEARCH_FN            503
@@ -537,6 +551,18 @@ int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags );
 #define SLAPI_PLUGIN_POST_REFERRAL_FN          511
 #define SLAPI_PLUGIN_POST_RESULT_FN            512
 
+/* internal postoperation */
+#define SLAPI_PLUGIN_INTERNAL_POST_ADD_FN      520
+#define SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN   521
+#define SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN   522
+#define SLAPI_PLUGIN_INTERNAL_POST_DELETE_FN   523
+
+/* backend postoperation */
+#define SLAPI_PLUGIN_BE_POST_ADD_FN            550
+#define SLAPI_PLUGIN_BE_POST_MODIFY_FN         551
+#define SLAPI_PLUGIN_BE_POST_MODRDN_FN         552
+#define SLAPI_PLUGIN_BE_POST_DELETE_FN         553
+
 #define SLAPI_OPERATION_TYPE                   590
 
 #define SLAPI_PLUGIN_MR_FILTER_CREATE_FN       600
@@ -696,6 +722,7 @@ int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags );
 
 #define SLAPI_FAIL_DISKFULL            -2
 #define SLAPI_FAIL_GENERAL             -1
+#define SLAPI_PLUGIN_EXTENDED_NOT_HANDLED -2
 #define SLAPI_BIND_SUCCESS             0
 #define SLAPI_BIND_FAIL                        2
 #define SLAPI_BIND_ANONYMOUS           3