slapi-plugin-compat4.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. /*
  39. * Netscape Directory Server 4.x plugin API backwards compatible header file.
  40. */
  41. #ifndef _SLAPIPLUGINCOMPAT4
  42. #define _SLAPIPLUGINCOMPAT4
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. /******* Deprecated (obsolete) macros ****************************************/
  47. /*
  48. * The SLAPI_BIND_FAIL_OR_ANONYMOUS bind function return code is deprecated.
  49. * Use SLAPI_BIND_FAIL or SLAPI_BIND_ANONYMOUS instead.
  50. */
  51. #define SLAPI_BIND_FAIL_OR_ANONYMOUS 1 /* back end should send result */
  52. /******* Deprecated (obsolete) pblock arg identifiers ************************/
  53. #define SLAPI_CONFIG_FILENAME 40 /* use config. entries instead */
  54. #define SLAPI_CONFIG_LINENO 41 /* use config. entries instead */
  55. #define SLAPI_CONFIG_ARGC 42 /* use config. entries instead */
  56. #define SLAPI_CONFIG_ARGV 43 /* use config. entries instead */
  57. #define SLAPI_CONN_AUTHTYPE 144 /* use SLAPI_CONN_AUTHTYPE */
  58. #define SLAPI_REQUESTOR_ISUPDATEDN SLAPI_IS_REPLICATED_OPERATION
  59. #define SLAPI_CONN_CLIENTIP 145 /* use SLAPI_CONN_CLIENTNETADDR */
  60. #define SLAPI_CONN_SERVERIP 146 /* use SLAPI_CONN_SERVERNETADDR */
  61. /******* Deprecated (obsolete) functions *************************************/
  62. /*
  63. * Please use the new functions in slapi-plugin.h instead of the ones
  64. * below that are marked SLAPI_DEPRECATED.
  65. */
  66. #define SLAPI_DEPRECATED
  67. /*
  68. *
  69. * The following functions that deal with bervals are deprecated
  70. * and their use is not recommended. For each deprecated function, you
  71. * will find in slapi-plugin.h a corresponding function with a _sv
  72. * extension that uses Slapi_Values instead of bervals. The new
  73. * functions are more efficient than the old ones, and some of the old
  74. * functions are much less efficient than they were previously.
  75. */
  76. SLAPI_DEPRECATED int slapi_entry_attr_merge( Slapi_Entry *e, const char *type,
  77. struct berval **vals );
  78. SLAPI_DEPRECATED int slapi_entry_add_values( Slapi_Entry *e, const char *type,
  79. struct berval **vals );
  80. SLAPI_DEPRECATED int slapi_entry_delete_values( Slapi_Entry *e,
  81. const char *type, struct berval **vals );
  82. SLAPI_DEPRECATED int slapi_entry_attr_replace( Slapi_Entry *e,
  83. const char *type, struct berval **vals );
  84. SLAPI_DEPRECATED int slapi_attr_get_values( Slapi_Attr *attr,
  85. struct berval ***vals );
  86. SLAPI_DEPRECATED int slapi_attr_get_oid( const Slapi_Attr *attr, char **oid );
  87. SLAPI_DEPRECATED int slapi_filter_get_type( Slapi_Filter *f, char **type );
  88. SLAPI_DEPRECATED int slapi_pw_find( struct berval **vals, struct berval *v );
  89. SLAPI_DEPRECATED int slapi_call_syntax_values2keys( void *vpi,
  90. struct berval **vals, struct berval ***ivals, int ftype );
  91. SLAPI_DEPRECATED int slapi_call_syntax_assertion2keys_ava( void *vpi,
  92. struct berval *val, struct berval ***ivals, int ftype );
  93. SLAPI_DEPRECATED int slapi_call_syntax_assertion2keys_sub( void *vpi,
  94. char *initial, char **any, char *final, struct berval ***ivals );
  95. /*
  96. * slapi_entry_attr_hasvalue() has been deprecated in favor of
  97. * slapi_entry_attr_has_syntax_value() which respects the syntax of the
  98. * attribute type (slapi_entry_attr_hasvalue() assumes the value is a
  99. * caseIgnore ASCII string).
  100. */
  101. SLAPI_DEPRECATED int slapi_entry_attr_hasvalue(const Slapi_Entry *e,
  102. const char *type, const char *value);
  103. /*
  104. * The following "internal operation" calls are deprecated. The new internal
  105. * operation functions that are defined in slapi-plugin.h take a Slapi_PBlock
  106. * for extensibility and support the new plugin configuration capabilities
  107. * as well.
  108. */
  109. SLAPI_DEPRECATED int slapi_search_internal_callback( const char *ibase,
  110. int scope, const char *ifstr, char **attrs, int attrsonly,
  111. void *callback_data, LDAPControl **controls,
  112. plugin_result_callback prc, plugin_search_entry_callback psec,
  113. plugin_referral_entry_callback prec );
  114. SLAPI_DEPRECATED int slapi_seq_callback( const char *ibase, int type,
  115. char *attrname, char *val, char **attrs, int attrsonly,
  116. void *callback_data, LDAPControl **controls,
  117. plugin_result_callback res_callback,
  118. plugin_search_entry_callback srch_callback,
  119. plugin_referral_entry_callback ref_callback);
  120. SLAPI_DEPRECATED Slapi_PBlock *slapi_search_internal( const char *base,
  121. int scope, const char *filter, LDAPControl **controls, char **attrs,
  122. int attrsonly );
  123. SLAPI_DEPRECATED Slapi_PBlock *slapi_modify_internal( const char *dn,
  124. LDAPMod **mods, LDAPControl **controls, int dummy );
  125. SLAPI_DEPRECATED Slapi_PBlock *slapi_add_internal( const char * dn,
  126. LDAPMod **attrs, LDAPControl **controls, int dummy );
  127. SLAPI_DEPRECATED Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry *e,
  128. LDAPControl **controls, int dummy );
  129. SLAPI_DEPRECATED Slapi_PBlock *slapi_delete_internal( const char * dn,
  130. LDAPControl **controls, int dummy );
  131. SLAPI_DEPRECATED Slapi_PBlock *slapi_modrdn_internal( const char * olddn,
  132. const char * newrdn, int deloldrdn, LDAPControl **controls, int dummy);
  133. SLAPI_DEPRECATED Slapi_PBlock *slapi_rename_internal( const char *iodn,
  134. const char *inewrdn, const char *inewsuperior, int deloldrdn,
  135. LDAPControl **controls, int dummy);
  136. /*
  137. * These following three functions are not multi-thread (MT) safe (they return
  138. * a pointer to unprotected data). Use the new functions from slapi-plugin.h
  139. * that end in _copy() instead, e.g., use slapi_get_supported_controls_copy()
  140. * instead of slapi_get_supported_controls().
  141. */
  142. SLAPI_DEPRECATED int slapi_get_supported_controls( char ***ctrloidsp,
  143. unsigned long **ctrlopsp );
  144. SLAPI_DEPRECATED char **slapi_get_supported_extended_ops( void );
  145. SLAPI_DEPRECATED char **slapi_get_supported_saslmechanisms( void );
  146. #ifdef __cplusplus
  147. }
  148. #endif
  149. #endif /* _SLAPIPLUGINCOMPAT4 */