1
0

slapi-plugin-compat4.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. #ifdef HAVE_CONFIG_H
  39. # include <config.h>
  40. #endif
  41. /*
  42. * Netscape Directory Server 4.x plugin API backwards compatible header file.
  43. */
  44. #ifndef _SLAPIPLUGINCOMPAT4
  45. #define _SLAPIPLUGINCOMPAT4
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49. /******* Deprecated (obsolete) macros ****************************************/
  50. /*
  51. * The SLAPI_BIND_FAIL_OR_ANONYMOUS bind function return code is deprecated.
  52. * Use SLAPI_BIND_FAIL or SLAPI_BIND_ANONYMOUS instead.
  53. */
  54. #define SLAPI_BIND_FAIL_OR_ANONYMOUS 1 /* back end should send result */
  55. /******* Deprecated (obsolete) pblock arg identifiers ************************/
  56. #define SLAPI_CONFIG_FILENAME 40 /* use config. entries instead */
  57. #define SLAPI_CONFIG_LINENO 41 /* use config. entries instead */
  58. #define SLAPI_CONFIG_ARGC 42 /* use config. entries instead */
  59. #define SLAPI_CONFIG_ARGV 43 /* use config. entries instead */
  60. #define SLAPI_CONN_AUTHTYPE 144 /* use SLAPI_CONN_AUTHTYPE */
  61. #define SLAPI_REQUESTOR_ISUPDATEDN SLAPI_IS_REPLICATED_OPERATION
  62. #define SLAPI_CONN_CLIENTIP 145 /* use SLAPI_CONN_CLIENTNETADDR */
  63. #define SLAPI_CONN_SERVERIP 146 /* use SLAPI_CONN_SERVERNETADDR */
  64. /******* Deprecated (obsolete) functions *************************************/
  65. /*
  66. * Please use the new functions in slapi-plugin.h instead of the ones
  67. * below that are marked SLAPI_DEPRECATED.
  68. */
  69. #define SLAPI_DEPRECATED
  70. /*
  71. *
  72. * The following functions that deal with bervals are deprecated
  73. * and their use is not recommended. For each deprecated function, you
  74. * will find in slapi-plugin.h a corresponding function with a _sv
  75. * extension that uses Slapi_Values instead of bervals. The new
  76. * functions are more efficient than the old ones, and some of the old
  77. * functions are much less efficient than they were previously.
  78. */
  79. SLAPI_DEPRECATED int slapi_entry_attr_merge( Slapi_Entry *e, const char *type,
  80. struct berval **vals );
  81. SLAPI_DEPRECATED int slapi_entry_add_values( Slapi_Entry *e, const char *type,
  82. struct berval **vals );
  83. SLAPI_DEPRECATED int slapi_entry_delete_values( Slapi_Entry *e,
  84. const char *type, struct berval **vals );
  85. SLAPI_DEPRECATED int slapi_entry_attr_replace( Slapi_Entry *e,
  86. const char *type, struct berval **vals );
  87. SLAPI_DEPRECATED int slapi_attr_get_values( Slapi_Attr *attr,
  88. struct berval ***vals );
  89. SLAPI_DEPRECATED int slapi_attr_get_oid( const Slapi_Attr *attr, char **oid );
  90. SLAPI_DEPRECATED int slapi_filter_get_type( Slapi_Filter *f, char **type );
  91. SLAPI_DEPRECATED int slapi_pw_find( struct berval **vals, struct berval *v );
  92. SLAPI_DEPRECATED int slapi_call_syntax_values2keys( void *vpi,
  93. struct berval **vals, struct berval ***ivals, int ftype );
  94. SLAPI_DEPRECATED int slapi_call_syntax_assertion2keys_ava( void *vpi,
  95. struct berval *val, struct berval ***ivals, int ftype );
  96. SLAPI_DEPRECATED int slapi_call_syntax_assertion2keys_sub( void *vpi,
  97. char *initial, char **any, char *final, struct berval ***ivals );
  98. /*
  99. * slapi_entry_attr_hasvalue() has been deprecated in favor of
  100. * slapi_entry_attr_has_syntax_value() which respects the syntax of the
  101. * attribute type (slapi_entry_attr_hasvalue() assumes the value is a
  102. * caseIgnore ASCII string).
  103. */
  104. SLAPI_DEPRECATED int slapi_entry_attr_hasvalue(const Slapi_Entry *e,
  105. const char *type, const char *value);
  106. /*
  107. * The following "internal operation" calls are deprecated. The new internal
  108. * operation functions that are defined in slapi-plugin.h take a Slapi_PBlock
  109. * for extensibility and support the new plugin configuration capabilities
  110. * as well.
  111. */
  112. SLAPI_DEPRECATED int slapi_search_internal_callback( const char *ibase,
  113. int scope, const char *ifstr, char **attrs, int attrsonly,
  114. void *callback_data, LDAPControl **controls,
  115. plugin_result_callback prc, plugin_search_entry_callback psec,
  116. plugin_referral_entry_callback prec );
  117. SLAPI_DEPRECATED int slapi_seq_callback( const char *ibase, int type,
  118. char *attrname, char *val, char **attrs, int attrsonly,
  119. void *callback_data, LDAPControl **controls,
  120. plugin_result_callback res_callback,
  121. plugin_search_entry_callback srch_callback,
  122. plugin_referral_entry_callback ref_callback);
  123. SLAPI_DEPRECATED Slapi_PBlock *slapi_search_internal( const char *base,
  124. int scope, const char *filter, LDAPControl **controls, char **attrs,
  125. int attrsonly );
  126. SLAPI_DEPRECATED Slapi_PBlock *slapi_modify_internal( const char *dn,
  127. LDAPMod **mods, LDAPControl **controls, int dummy );
  128. SLAPI_DEPRECATED Slapi_PBlock *slapi_add_internal( const char * dn,
  129. LDAPMod **attrs, LDAPControl **controls, int dummy );
  130. SLAPI_DEPRECATED Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry *e,
  131. LDAPControl **controls, int dummy );
  132. SLAPI_DEPRECATED Slapi_PBlock *slapi_delete_internal( const char * dn,
  133. LDAPControl **controls, int dummy );
  134. SLAPI_DEPRECATED Slapi_PBlock *slapi_modrdn_internal( const char * olddn,
  135. const char * newrdn, int deloldrdn, LDAPControl **controls, int dummy);
  136. SLAPI_DEPRECATED Slapi_PBlock *slapi_rename_internal( const char *iodn,
  137. const char *inewrdn, const char *inewsuperior, int deloldrdn,
  138. LDAPControl **controls, int dummy);
  139. /*
  140. * These following three functions are not multi-thread (MT) safe (they return
  141. * a pointer to unprotected data). Use the new functions from slapi-plugin.h
  142. * that end in _copy() instead, e.g., use slapi_get_supported_controls_copy()
  143. * instead of slapi_get_supported_controls().
  144. */
  145. SLAPI_DEPRECATED int slapi_get_supported_controls( char ***ctrloidsp,
  146. unsigned long **ctrlopsp );
  147. SLAPI_DEPRECATED char **slapi_get_supported_extended_ops( void );
  148. SLAPI_DEPRECATED char **slapi_get_supported_saslmechanisms( void );
  149. #ifdef __cplusplus
  150. }
  151. #endif
  152. #endif /* _SLAPIPLUGINCOMPAT4 */