Diff for /include/slapi-plugin.h between versions 1.37 and 1.47

version 1.37, 2004/08/26 03:30:49 version 1.47, 2005/08/01 13:21:55
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/include/slapi-plugin.h,v 1.36 2004/08/25 13:18:56 lukeh Exp $ */  /* $OpenLDAP: pkg/ldap/include/slapi-plugin.h,v 1.46 2005/07/31 03:41:03 lukeh Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 1998-2004 The OpenLDAP Foundation.   * Copyright 1998-2005 The OpenLDAP Foundation.
  * Portions Copyright 1997,2002,2003 IBM Corporation.   * Portions Copyright 1997,2002,2003 IBM Corporation.
  * All rights reserved.   * All rights reserved.
  *   *
Line 40  typedef struct slapi_mod  Slapi_Mod; Line 40  typedef struct slapi_mod  Slapi_Mod;
 typedef struct slapi_mods               Slapi_Mods;  typedef struct slapi_mods               Slapi_Mods;
 typedef struct slapi_componentid        Slapi_ComponentId;  typedef struct slapi_componentid        Slapi_ComponentId;
   
   #define SLAPI_ATTR_UNIQUEID     "entryUUID"
   #define SLAPI_ATTR_OBJECTCLASS  "objectClass"
   
 /* pblock routines */  /* pblock routines */
 int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value );  int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value );
 int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );  int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );
Line 76  char *slapi_dn_normalize( char *dn ); Line 79  char *slapi_dn_normalize( char *dn );
 char *slapi_dn_normalize_case( char *dn );  char *slapi_dn_normalize_case( char *dn );
 int slapi_dn_issuffix( char *dn, char *suffix );  int slapi_dn_issuffix( char *dn, char *suffix );
 char *slapi_dn_beparent( Slapi_PBlock *pb, const char *dn );  char *slapi_dn_beparent( Slapi_PBlock *pb, const char *dn );
   int slapi_dn_isbesuffix( Slapi_PBlock *pb, char *dn );
 char *slapi_dn_parent( const char *dn );  char *slapi_dn_parent( const char *dn );
 int slapi_dn_isparent( const char *parentdn, const char *childdn );  int slapi_dn_isparent( const char *parentdn, const char *childdn );
 char *slapi_dn_ignore_case( char *dn );  char *slapi_dn_ignore_case( char *dn );
Line 218  void slapi_register_supported_saslmechan Line 222  void slapi_register_supported_saslmechan
 char **slapi_get_supported_saslmechanisms();  char **slapi_get_supported_saslmechanisms();
 char **slapi_get_supported_extended_ops(void);  char **slapi_get_supported_extended_ops(void);
   
   /* operation */
   int slapi_op_abandoned( Slapi_PBlock *pb );
   unsigned long slapi_op_get_type(Slapi_Operation * op);
   void slapi_operation_set_flag(Slapi_Operation *op, unsigned long flag);
   void slapi_operation_clear_flag(Slapi_Operation *op, unsigned long flag);
   int slapi_operation_is_flag_set(Slapi_Operation *op, unsigned long flag);
   char *slapi_op_type_to_string(unsigned long type);
   
 /* send ldap result back */  /* send ldap result back */
 void slapi_send_ldap_result( Slapi_PBlock *pb, int err, char *matched,  void slapi_send_ldap_result( Slapi_PBlock *pb, int err, char *matched,
Line 236  int slapi_filter_get_ava( Slapi_Filter * Line 247  int slapi_filter_get_ava( Slapi_Filter *
 Slapi_Filter *slapi_filter_list_first( Slapi_Filter *f );  Slapi_Filter *slapi_filter_list_first( Slapi_Filter *f );
 Slapi_Filter *slapi_filter_list_next( Slapi_Filter *f, Slapi_Filter *fprev );  Slapi_Filter *slapi_filter_list_next( Slapi_Filter *f, Slapi_Filter *fprev );
 int slapi_filter_get_attribute_type( Slapi_Filter *f, char **type );   int slapi_filter_get_attribute_type( Slapi_Filter *f, char **type ); 
   int slapi_x_filter_set_attribute_type( Slapi_Filter *f, const char *type );
 int slapi_filter_get_subfilt( Slapi_Filter *f, char **type, char **initial,  int slapi_filter_get_subfilt( Slapi_Filter *f, char **type, char **initial,
         char ***any, char **final );          char ***any, char **final );
 Slapi_Filter *slapi_filter_join( int ftype, Slapi_Filter *f1, Slapi_Filter *f2);  Slapi_Filter *slapi_filter_join( int ftype, Slapi_Filter *f1, Slapi_Filter *f2);
Line 266  Slapi_PBlock *slapi_delete_internal( cha Line 278  Slapi_PBlock *slapi_delete_internal( cha
 Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,  Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,
         int deloldrdn, LDAPControl **controls,          int deloldrdn, LDAPControl **controls,
         int log_change );          int log_change );
 #if 0  Slapi_PBlock *slapi_rename_internal( const char * olddn, const char *newrdn,
 Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,          const char *newsuperior, int delolrdn,
         char *newParent, int deloldrdn, LDAPControl **controls,          LDAPControl **controls, int log_change );
         int log_change );  
 #endif  
 void slapi_free_search_results_internal(Slapi_PBlock *pb);  void slapi_free_search_results_internal(Slapi_PBlock *pb);
   
   /* new internal add/delete/search/modify routines */
   typedef void (*plugin_result_callback)( int rc, void *callback_data );
   typedef int (*plugin_referral_entry_callback)( char * referral,
           void *callback_data );
   typedef int (*plugin_search_entry_callback)( Slapi_Entry *e,
           void *callback_data );
   void slapi_free_search_results_internal( Slapi_PBlock *pb );
   
   #define SLAPI_OP_FLAG_NEVER_CHAIN       0x0800
   
   int slapi_search_internal_pb( Slapi_PBlock *pb );
   int slapi_search_internal_callback_pb( Slapi_PBlock *pb, void *callback_data,
           plugin_result_callback prc, plugin_search_entry_callback psec,
           plugin_referral_entry_callback prec );
   int slapi_add_internal_pb( Slapi_PBlock *pb );
   int slapi_modify_internal_pb( Slapi_PBlock *pb );
   int slapi_modrdn_internal_pb( Slapi_PBlock *pb );
   int slapi_delete_internal_pb( Slapi_PBlock *pb );
   
   int slapi_seq_internal_callback_pb(Slapi_PBlock *pb, void *callback_data,
           plugin_result_callback res_callback,
           plugin_search_entry_callback srch_callback,
           plugin_referral_entry_callback ref_callback);
   
   void slapi_search_internal_set_pb( Slapi_PBlock *pb, const char *base,
           int scope, const char *filter, char **attrs, int attrsonly,
           LDAPControl **controls, const char *uniqueid,
           Slapi_ComponentId *plugin_identity, int operation_flags );
   void slapi_add_entry_internal_set_pb( Slapi_PBlock *pb, Slapi_Entry *e,
           LDAPControl **controls, Slapi_ComponentId *plugin_identity,
           int operation_flags );
   int slapi_add_internal_set_pb( Slapi_PBlock *pb, const char *dn,
           LDAPMod **attrs, LDAPControl **controls,
           Slapi_ComponentId *plugin_identity, int operation_flags );
   void slapi_modify_internal_set_pb( Slapi_PBlock *pb, const char *dn,
           LDAPMod **mods, LDAPControl **controls, const char *uniqueid,
           Slapi_ComponentId *plugin_identity, int operation_flags );
   void slapi_rename_internal_set_pb( Slapi_PBlock *pb, const char *olddn,
           const char *newrdn, const char *newsuperior, int deloldrdn,
           LDAPControl **controls, const char *uniqueid,
           Slapi_ComponentId *plugin_identity, int operation_flags );
   void slapi_delete_internal_set_pb( Slapi_PBlock *pb, const char *dn,
           LDAPControl **controls, const char *uniqueid,
           Slapi_ComponentId *plugin_identity, int operation_flags );
   void slapi_seq_internal_set_pb( Slapi_PBlock *pb, char *ibase, int type,
           char *attrname, char *val, char **attrs, int attrsonly,
           LDAPControl **controls, Slapi_ComponentId *plugin_identity,
           int operation_flags );
   
 /* connection related routines */  /* connection related routines */
 int slapi_is_connection_ssl(Slapi_PBlock *pPB, int *isSSL);  int slapi_is_connection_ssl(Slapi_PBlock *pPB, int *isSSL);
 int slapi_get_client_port(Slapi_PBlock *pPB, int *fromPort);  int slapi_get_client_port(Slapi_PBlock *pPB, int *fromPort);
Line 317  void *slapi_get_object_extension(int obj Line 376  void *slapi_get_object_extension(int obj
 void slapi_set_object_extension(int objecttype, void *object,  void slapi_set_object_extension(int objecttype, void *object,
         int extensionhandle, void *extension);          int extensionhandle, void *extension);
   
   int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags );
   
 /* parameters currently supported */  /* parameters currently supported */
   
 /*  /*
Line 331  void slapi_set_object_extension(int obje Line 392  void slapi_set_object_extension(int obje
 #define SLAPI_ATTR_FLAG_NOUSERMOD       0x0100  #define SLAPI_ATTR_FLAG_NOUSERMOD       0x0100
   
 /*  /*
    * Backend flags returned by slapi_x_backend_get_flags()
    */
   #define SLAPI_BACKEND_FLAG_NOLASTMOD            0x0001U
   #define SLAPI_BACKEND_FLAG_NO_SCHEMA_CHECK      0x0002U
   #define SLAPI_BACKEND_FLAG_GLUE_INSTANCE        0x0010U /* a glue backend */
   #define SLAPI_BACKEND_FLAG_GLUE_SUBORDINATE     0x0020U /* child of a glue hierarchy */
   #define SLAPI_BACKEND_FLAG_GLUE_LINKED          0x0040U /* child is connected to parent */
   #define SLAPI_BACKEND_FLAG_OVERLAY              0x0080U /* this db struct is an overlay */
   #define SLAPI_BACKEND_FLAG_GLOBAL_OVERLAY       0x0100U /* this db struct is a global overlay */
   #define SLAPI_BACKEND_FLAG_SHADOW               0x8000U /* a shadow */
   #define SLAPI_BACKEND_FLAG_SYNC_SHADOW          0x1000U /* a sync shadow */
   #define SLAPI_BACKEND_FLAG_SLURP_SHADOW         0x2000U /* a slurp shadow */
   
   /*
  * ACL levels   * ACL levels
  */   */
 #define SLAPI_ACL_COMPARE       0x01  #define SLAPI_ACL_COMPARE       0x01
Line 368  void slapi_set_object_extension(int obje Line 443  void slapi_set_object_extension(int obje
 /* operation params */  /* operation params */
 #define SLAPI_OPINITIATED_TIME                  140  #define SLAPI_OPINITIATED_TIME                  140
 #define SLAPI_REQUESTOR_DN                      141  #define SLAPI_REQUESTOR_DN                      141
 #define SLAPI_REQUESTOR_ISUPDATEDN              142  #define SLAPI_IS_REPLICATED_OPERATION           142
   #define SLAPI_REQUESTOR_ISUPDATEDN              SLAPI_IS_REPLICATED_OPERATION
   
 /* connection  structure params*/  /* connection  structure params*/
 #define SLAPI_CONN_DN                           143  #define SLAPI_CONN_DN                           143
Line 381  void slapi_set_object_extension(int obje Line 457  void slapi_set_object_extension(int obje
 #define SLAPI_X_CONN_IS_UDP                     1302  #define SLAPI_X_CONN_IS_UDP                     1302
 #define SLAPI_X_CONN_SSF                        1303  #define SLAPI_X_CONN_SSF                        1303
 #define SLAPI_X_CONN_SASL_CONTEXT               1304  #define SLAPI_X_CONN_SASL_CONTEXT               1304
   #define SLAPI_X_OPERATION_DELETE_GLUE_PARENT    1305
   #define SLAPI_X_MANAGEDIT                       1306
   #define SLAPI_X_OPERATION_NO_SCHEMA_CHECK       1307
   
 /*  Authentication types */  /*  Authentication types */
 #define SLAPD_AUTH_NONE   "none"  #define SLAPD_AUTH_NONE   "none"
Line 399  void slapi_set_object_extension(int obje Line 478  void slapi_set_object_extension(int obje
 #define SLAPI_PLUGIN_OBJECT                     10  #define SLAPI_PLUGIN_OBJECT                     10
 #define SLAPI_PLUGIN_DESTROY_FN                 11  #define SLAPI_PLUGIN_DESTROY_FN                 11
 #define SLAPI_PLUGIN_DESCRIPTION                12  #define SLAPI_PLUGIN_DESCRIPTION                12
   #define SLAPI_PLUGIN_IDENTITY                   13
   
 /* internal opreations params */  /* internal opreations params */
 #define SLAPI_PLUGIN_INTOP_RESULT               15  #define SLAPI_PLUGIN_INTOP_RESULT               15
 #define SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES       16  #define SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES       16
 #define SLAPI_PLUGIN_INTOP_SEARCH_REFERRALS     17  #define SLAPI_PLUGIN_INTOP_SEARCH_REFERRALS     17
   
   /* transaction arguments */
   #define SLAPI_PARENT_TXN                        190
   #define SLAPI_TXN                               191
   
 /* function pointer params for backends */  /* function pointer params for backends */
 #define SLAPI_PLUGIN_DB_BIND_FN                 200  #define SLAPI_PLUGIN_DB_BIND_FN                 200
 #define SLAPI_PLUGIN_DB_UNBIND_FN               201  #define SLAPI_PLUGIN_DB_UNBIND_FN               201
Line 440  void slapi_set_object_extension(int obje Line 524  void slapi_set_object_extension(int obje
 #define SLAPI_PLUGIN_EXT_OP_FN                  300  #define SLAPI_PLUGIN_EXT_OP_FN                  300
 #define SLAPI_PLUGIN_EXT_OP_OIDLIST             301  #define SLAPI_PLUGIN_EXT_OP_OIDLIST             301
   
 /* functions for preoperation functions */  /* preoperation */
 #define SLAPI_PLUGIN_PRE_BIND_FN                401  #define SLAPI_PLUGIN_PRE_BIND_FN                401
 #define SLAPI_PLUGIN_PRE_UNBIND_FN              402  #define SLAPI_PLUGIN_PRE_UNBIND_FN              402
 #define SLAPI_PLUGIN_PRE_SEARCH_FN              403  #define SLAPI_PLUGIN_PRE_SEARCH_FN              403
Line 454  void slapi_set_object_extension(int obje Line 538  void slapi_set_object_extension(int obje
 #define SLAPI_PLUGIN_PRE_REFERRAL_FN            411  #define SLAPI_PLUGIN_PRE_REFERRAL_FN            411
 #define SLAPI_PLUGIN_PRE_RESULT_FN              412  #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_BIND_FN               501
 #define SLAPI_PLUGIN_POST_UNBIND_FN             502  #define SLAPI_PLUGIN_POST_UNBIND_FN             502
 #define SLAPI_PLUGIN_POST_SEARCH_FN             503  #define SLAPI_PLUGIN_POST_SEARCH_FN             503
Line 468  void slapi_set_object_extension(int obje Line 564  void slapi_set_object_extension(int obje
 #define SLAPI_PLUGIN_POST_REFERRAL_FN           511  #define SLAPI_PLUGIN_POST_REFERRAL_FN           511
 #define SLAPI_PLUGIN_POST_RESULT_FN             512  #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_OPERATION_TYPE                    590
   
 #define SLAPI_PLUGIN_MR_FILTER_CREATE_FN        600  #define SLAPI_PLUGIN_MR_FILTER_CREATE_FN        600
Line 552  void slapi_set_object_extension(int obje Line 660  void slapi_set_object_extension(int obje
 #define SLAPI_CONFIG_ARGV                       43  #define SLAPI_CONFIG_ARGV                       43
   
 /*  operational params */  /*  operational params */
   #define SLAPI_TARGET_ADDRESS                    48
   #define SLAPI_TARGET_UNIQUEID                   49
 #define SLAPI_TARGET_DN                         50  #define SLAPI_TARGET_DN                         50
 #define SLAPI_REQCONTROLS                       51  
   
 /* server LDAPv3 controls  */  /* server LDAPv3 controls  */
   #define SLAPI_REQCONTROLS                       51
 #define SLAPI_RESCONTROLS                       55  #define SLAPI_RESCONTROLS                       55
 #define SLAPI_ADD_RESCONTROL                    56        #define SLAPI_ADD_RESCONTROL                    56      
   #define SLAPI_CONTROLS_ARG                      58
   
 /* add params */  /* add params */
 #define SLAPI_ADD_TARGET                        SLAPI_TARGET_DN  #define SLAPI_ADD_TARGET                        SLAPI_TARGET_DN
 #define SLAPI_ADD_ENTRY                         60  #define SLAPI_ADD_ENTRY                         60
   #define SLAPI_ADD_EXISTING_DN_ENTRY             61
   #define SLAPI_ADD_PARENT_ENTRY                  62
   #define SLAPI_ADD_PARENT_UNIQUEID               63
   #define SLAPI_ADD_EXISTING_UNIQUEID_ENTRY       64
   
 /* bind params */  /* bind params */
 #define SLAPI_BIND_TARGET                       SLAPI_TARGET_DN  #define SLAPI_BIND_TARGET                       SLAPI_TARGET_DN
Line 577  void slapi_set_object_extension(int obje Line 692  void slapi_set_object_extension(int obje
   
 /* delete params */  /* delete params */
 #define SLAPI_DELETE_TARGET                     SLAPI_TARGET_DN  #define SLAPI_DELETE_TARGET                     SLAPI_TARGET_DN
   #define SLAPI_DELETE_EXISTING_ENTRY             SLAPI_ADD_EXISTING_DN_ENTRY
   
 /* modify params */  /* modify params */
 #define SLAPI_MODIFY_TARGET                     SLAPI_TARGET_DN  #define SLAPI_MODIFY_TARGET                     SLAPI_TARGET_DN
 #define SLAPI_MODIFY_MODS                       90  #define SLAPI_MODIFY_MODS                       90
   #define SLAPI_MODIFY_EXISTING_ENTRY             SLAPI_ADD_EXISTING_DN_ENTRY
   
 /* modrdn params */  /* modrdn params */
 #define SLAPI_MODRDN_TARGET                     SLAPI_TARGET_DN  #define SLAPI_MODRDN_TARGET                     SLAPI_TARGET_DN
 #define SLAPI_MODRDN_NEWRDN                     100  #define SLAPI_MODRDN_NEWRDN                     100
 #define SLAPI_MODRDN_DELOLDRDN                  101  #define SLAPI_MODRDN_DELOLDRDN                  101
 #define SLAPI_MODRDN_NEWSUPERIOR                102     /* v3 only */  #define SLAPI_MODRDN_NEWSUPERIOR                102     /* v3 only */
   #define SLAPI_MODRDN_EXISTING_ENTRY             SLAPI_ADD_EXISTING_DN_ENTRY
   #define SLAPI_MODRDN_PARENT_ENTRY               104
   #define SLAPI_MODRDN_NEWPARENT_ENTRY            105
   #define SLAPI_MODRDN_TARGET_ENTRY               106
   #define SLAPI_MODRDN_NEWSUPERIOR_ADDRESS        107
   
 /* search params */  /* search params */
 #define SLAPI_SEARCH_TARGET                     SLAPI_TARGET_DN  #define SLAPI_SEARCH_TARGET                     SLAPI_TARGET_DN
Line 614  void slapi_set_object_extension(int obje Line 736  void slapi_set_object_extension(int obje
   
 #define SLAPI_FAIL_DISKFULL             -2  #define SLAPI_FAIL_DISKFULL             -2
 #define SLAPI_FAIL_GENERAL              -1  #define SLAPI_FAIL_GENERAL              -1
   #define SLAPI_PLUGIN_EXTENDED_NOT_HANDLED -2
 #define SLAPI_BIND_SUCCESS              0  #define SLAPI_BIND_SUCCESS              0
 #define SLAPI_BIND_FAIL                 2  #define SLAPI_BIND_FAIL                 2
 #define SLAPI_BIND_ANONYMOUS            3  #define SLAPI_BIND_ANONYMOUS            3

Removed from v.1.37  
changed lines
  Added in v.1.47


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org