slapi-plugin-compat4.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  3. * Copyright (C) 2005 Red Hat, Inc.
  4. * All rights reserved.
  5. *
  6. * License: GPL (version 3 or any later version).
  7. * See LICENSE for details.
  8. * END COPYRIGHT BLOCK **/
  9. #ifdef HAVE_CONFIG_H
  10. # include <config.h>
  11. #endif
  12. /*
  13. * Netscape Directory Server 4.x plugin API backwards compatible header file.
  14. */
  15. #ifndef _SLAPIPLUGINCOMPAT4
  16. #define _SLAPIPLUGINCOMPAT4
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /******* Deprecated (obsolete) macros ****************************************/
  21. /*
  22. * The SLAPI_BIND_FAIL_OR_ANONYMOUS bind function return code is deprecated.
  23. * Use SLAPI_BIND_FAIL or SLAPI_BIND_ANONYMOUS instead.
  24. */
  25. #define SLAPI_BIND_FAIL_OR_ANONYMOUS 1 /* back end should send result */
  26. /******* Deprecated (obsolete) pblock arg identifiers ************************/
  27. #define SLAPI_CONFIG_FILENAME 40 /* use config. entries instead */
  28. #define SLAPI_CONFIG_LINENO 41 /* use config. entries instead */
  29. #define SLAPI_CONFIG_ARGC 42 /* use config. entries instead */
  30. #define SLAPI_CONFIG_ARGV 43 /* use config. entries instead */
  31. #define SLAPI_CONN_AUTHTYPE 144 /* use SLAPI_CONN_AUTHTYPE */
  32. #define SLAPI_REQUESTOR_ISUPDATEDN SLAPI_IS_REPLICATED_OPERATION
  33. #define SLAPI_CONN_CLIENTIP 145 /* use SLAPI_CONN_CLIENTNETADDR */
  34. #define SLAPI_CONN_SERVERIP 146 /* use SLAPI_CONN_SERVERNETADDR */
  35. /******* Deprecated (obsolete) functions *************************************/
  36. /*
  37. * Please use the new functions in slapi-plugin.h instead of the ones
  38. * below that are marked SLAPI_DEPRECATED.
  39. */
  40. #define SLAPI_DEPRECATED
  41. /*
  42. *
  43. * The following functions that deal with bervals are deprecated
  44. * and their use is not recommended. For each deprecated function, you
  45. * will find in slapi-plugin.h a corresponding function with a _sv
  46. * extension that uses Slapi_Values instead of bervals. The new
  47. * functions are more efficient than the old ones, and some of the old
  48. * functions are much less efficient than they were previously.
  49. */
  50. SLAPI_DEPRECATED int slapi_entry_attr_merge( Slapi_Entry *e, const char *type,
  51. struct berval **vals );
  52. SLAPI_DEPRECATED int slapi_entry_add_values( Slapi_Entry *e, const char *type,
  53. struct berval **vals );
  54. SLAPI_DEPRECATED int slapi_entry_delete_values( Slapi_Entry *e,
  55. const char *type, struct berval **vals );
  56. SLAPI_DEPRECATED int slapi_entry_attr_replace( Slapi_Entry *e,
  57. const char *type, struct berval **vals );
  58. SLAPI_DEPRECATED int slapi_attr_get_values( Slapi_Attr *attr,
  59. struct berval ***vals );
  60. SLAPI_DEPRECATED int slapi_attr_get_oid( const Slapi_Attr *attr, char **oid );
  61. SLAPI_DEPRECATED int slapi_filter_get_type( Slapi_Filter *f, char **type );
  62. SLAPI_DEPRECATED int slapi_pw_find( struct berval **vals, struct berval *v );
  63. SLAPI_DEPRECATED int slapi_call_syntax_values2keys( void *vpi,
  64. struct berval **vals, struct berval ***ivals, int ftype );
  65. SLAPI_DEPRECATED int slapi_call_syntax_assertion2keys_ava( void *vpi,
  66. struct berval *val, struct berval ***ivals, int ftype );
  67. SLAPI_DEPRECATED int slapi_call_syntax_assertion2keys_sub( void *vpi,
  68. char *initial, char **any, char *final, struct berval ***ivals );
  69. SLAPI_DEPRECATED int slapi_attr_values2keys( const Slapi_Attr *sattr,
  70. struct berval **vals, struct berval ***ivals, int ftype );
  71. SLAPI_DEPRECATED int slapi_attr_assertion2keys_ava( const Slapi_Attr *sattr,
  72. struct berval *val, struct berval ***ivals, int ftype );
  73. SLAPI_DEPRECATED int slapi_attr_assertion2keys_sub( const Slapi_Attr *sattr,
  74. char *initial, char **any, char *final, struct berval ***ivals );
  75. /*
  76. * slapi_entry_attr_hasvalue() has been deprecated in favor of
  77. * slapi_entry_attr_has_syntax_value() which respects the syntax of the
  78. * attribute type (slapi_entry_attr_hasvalue() assumes the value is a
  79. * caseIgnore ASCII string).
  80. */
  81. SLAPI_DEPRECATED int slapi_entry_attr_hasvalue(const Slapi_Entry *e,
  82. const char *type, const char *value);
  83. /*
  84. * The following "internal operation" calls are deprecated. The new internal
  85. * operation functions that are defined in slapi-plugin.h take a Slapi_PBlock
  86. * for extensibility and support the new plugin configuration capabilities
  87. * as well.
  88. */
  89. SLAPI_DEPRECATED int slapi_search_internal_callback( const char *ibase,
  90. int scope, const char *ifstr, char **attrs, int attrsonly,
  91. void *callback_data, LDAPControl **controls,
  92. plugin_result_callback prc, plugin_search_entry_callback psec,
  93. plugin_referral_entry_callback prec );
  94. SLAPI_DEPRECATED int slapi_seq_callback( const char *ibase, int type,
  95. char *attrname, char *val, char **attrs, int attrsonly,
  96. void *callback_data, LDAPControl **controls,
  97. plugin_result_callback res_callback,
  98. plugin_search_entry_callback srch_callback,
  99. plugin_referral_entry_callback ref_callback);
  100. SLAPI_DEPRECATED Slapi_PBlock *slapi_search_internal( const char *base,
  101. int scope, const char *filter, LDAPControl **controls, char **attrs,
  102. int attrsonly );
  103. SLAPI_DEPRECATED Slapi_PBlock *slapi_modify_internal( const char *dn,
  104. LDAPMod **mods, LDAPControl **controls, int dummy );
  105. SLAPI_DEPRECATED Slapi_PBlock *slapi_add_internal( const char * dn,
  106. LDAPMod **attrs, LDAPControl **controls, int dummy );
  107. SLAPI_DEPRECATED Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry *e,
  108. LDAPControl **controls, int dummy );
  109. SLAPI_DEPRECATED Slapi_PBlock *slapi_delete_internal( const char * dn,
  110. LDAPControl **controls, int dummy );
  111. SLAPI_DEPRECATED Slapi_PBlock *slapi_modrdn_internal( const char * olddn,
  112. const char * newrdn, int deloldrdn, LDAPControl **controls, int dummy);
  113. SLAPI_DEPRECATED Slapi_PBlock *slapi_rename_internal( const char *iodn,
  114. const char *inewrdn, const char *inewsuperior, int deloldrdn,
  115. LDAPControl **controls, int dummy);
  116. /*
  117. * These following three functions are not multi-thread (MT) safe (they return
  118. * a pointer to unprotected data). Use the new functions from slapi-plugin.h
  119. * that end in _copy() instead, e.g., use slapi_get_supported_controls_copy()
  120. * instead of slapi_get_supported_controls().
  121. */
  122. SLAPI_DEPRECATED int slapi_get_supported_controls( char ***ctrloidsp,
  123. unsigned long **ctrlopsp );
  124. SLAPI_DEPRECATED char **slapi_get_supported_extended_ops( void );
  125. SLAPI_DEPRECATED char **slapi_get_supported_saslmechanisms( void );
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129. #endif /* _SLAPIPLUGINCOMPAT4 */