2
0

apr_ldap.h.in 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
  2. * applicable.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
  18. */
  19. /**
  20. * @file apr_ldap.h
  21. * @brief APR-UTIL LDAP
  22. */
  23. #ifndef APU_LDAP_H
  24. #define APU_LDAP_H
  25. /**
  26. * @defgroup APR_Util_LDAP LDAP
  27. * @ingroup APR_Util
  28. * @{
  29. */
  30. /* this will be defined if LDAP support was compiled into apr-util */
  31. #define APR_HAS_LDAP @apu_has_ldap@
  32. /* identify the LDAP toolkit used */
  33. #define APR_HAS_NETSCAPE_LDAPSDK @apu_has_ldap_netscape@
  34. #define APR_HAS_SOLARIS_LDAPSDK @apu_has_ldap_solaris@
  35. #define APR_HAS_NOVELL_LDAPSDK @apu_has_ldap_novell@
  36. #define APR_HAS_MOZILLA_LDAPSDK @apu_has_ldap_mozilla@
  37. #define APR_HAS_OPENLDAP_LDAPSDK @apu_has_ldap_openldap@
  38. #define APR_HAS_MICROSOFT_LDAPSDK @apu_has_ldap_microsoft@
  39. #define APR_HAS_OTHER_LDAPSDK @apu_has_ldap_other@
  40. /*
  41. * Handle the case when LDAP is enabled
  42. */
  43. #if APR_HAS_LDAP
  44. /*
  45. * The following #defines are DEPRECATED and should not be used for
  46. * anything. They remain to maintain binary compatibility.
  47. * The original code defined the OPENLDAP SDK as present regardless
  48. * of what really was there, which was way bogus. In addition, the
  49. * apr_ldap_url_parse*() functions have been rewritten specifically for
  50. * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
  51. */
  52. #define APR_HAS_LDAP_SSL 1
  53. #define APR_HAS_LDAP_URL_PARSE 0
  54. #if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED)
  55. /* Ensure that the "deprecated" interfaces are still exposed
  56. * with OpenLDAP >= 2.3; these were exposed by default in earlier
  57. * releases. */
  58. #define LDAP_DEPRECATED 1
  59. #endif
  60. /*
  61. * Include the standard LDAP header files.
  62. */
  63. @lber_h@
  64. @ldap_h@
  65. @ldap_ssl_h@
  66. /*
  67. * Detected standard functions
  68. */
  69. #define APR_HAS_LDAPSSL_CLIENT_INIT @apu_has_ldapssl_client_init@
  70. #define APR_HAS_LDAPSSL_CLIENT_DEINIT @apu_has_ldapssl_client_deinit@
  71. #define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT @apu_has_ldapssl_add_trusted_cert@
  72. #define APR_HAS_LDAP_START_TLS_S @apu_has_ldap_start_tls_s@
  73. #define APR_HAS_LDAP_SSLINIT @apu_has_ldap_sslinit@
  74. #define APR_HAS_LDAPSSL_INIT @apu_has_ldapssl_init@
  75. #define APR_HAS_LDAPSSL_INSTALL_ROUTINES @apu_has_ldapssl_install_routines@
  76. /*
  77. * Make sure the secure LDAP port is defined
  78. */
  79. #ifndef LDAPS_PORT
  80. #define LDAPS_PORT 636 /* ldaps:/// default LDAP over TLS port */
  81. #endif
  82. /* Note: Macros defining const casting has been removed in APR v1.0,
  83. * pending real support for LDAP v2.0 toolkits.
  84. *
  85. * In the mean time, please use an LDAP v3.0 toolkit.
  86. */
  87. #if LDAP_VERSION_MAX <= 2
  88. #error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.
  89. #endif
  90. #ifdef __cplusplus
  91. extern "C" {
  92. #endif /* __cplusplus */
  93. /**
  94. * This structure allows the C LDAP API error codes to be returned
  95. * along with plain text error messages that explain to us mere mortals
  96. * what really happened.
  97. */
  98. typedef struct apr_ldap_err_t {
  99. const char *reason;
  100. const char *msg;
  101. int rc;
  102. } apr_ldap_err_t;
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106. #include "apr_ldap_url.h"
  107. #include "apr_ldap_init.h"
  108. #include "apr_ldap_option.h"
  109. /** @} */
  110. #endif /* APR_HAS_LDAP */
  111. #endif /* APU_LDAP_H */