Annotation of win32/apache22/srclib/apr-util/include/apr_ldap.hnw, revision 1.1
1.1 ! moko 1: /* Licensed to the Apache Software Foundation (ASF) under one or more
! 2: * contributor license agreements. See the NOTICE file distributed with
! 3: * this work for additional information regarding copyright ownership.
! 4: * The ASF licenses this file to You under the Apache License, Version 2.0
! 5: * (the "License"); you may not use this file except in compliance with
! 6: * the License. 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: /*
! 18: * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
! 19: */
! 20: /**
! 21: * @file apr_ldap.h
! 22: * @brief APR-UTIL LDAP
! 23: */
! 24: #ifndef APU_LDAP_H
! 25: #define APU_LDAP_H
! 26:
! 27: /**
! 28: * @defgroup APR_Util_LDAP LDAP
! 29: * @ingroup APR_Util
! 30: * @{
! 31: */
! 32:
! 33: /* this will be defined if LDAP support was compiled into apr-util */
! 34: #define APR_HAS_LDAP 1
! 35:
! 36: /* identify the LDAP toolkit used */
! 37: #define APR_HAS_NETSCAPE_LDAPSDK 0
! 38: #define APR_HAS_SOLARIS_LDAPSDK 0
! 39: #define APR_HAS_NOVELL_LDAPSDK 1
! 40: #define APR_HAS_MOZILLA_LDAPSDK 0
! 41: #define APR_HAS_OPENLDAP_LDAPSDK 0
! 42: #define APR_HAS_MICROSOFT_LDAPSDK 0
! 43: #define APR_HAS_OTHER_LDAPSDK 0
! 44:
! 45:
! 46: /*
! 47: * Handle the case when LDAP is enabled
! 48: */
! 49: #if APR_HAS_LDAP
! 50:
! 51: /*
! 52: * The following #defines are DEPRECATED and should not be used for
! 53: * anything. They remain to maintain binary compatibility.
! 54: * The original code defined the OPENLDAP SDK as present regardless
! 55: * of what really was there, which was way bogus. In addition, the
! 56: * apr_ldap_url_parse*() functions have been rewritten specifically for
! 57: * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
! 58: */
! 59: #define APR_HAS_LDAP_SSL 1
! 60: #define APR_HAS_LDAP_URL_PARSE 0
! 61:
! 62:
! 63: /*
! 64: * Include the standard LDAP header files.
! 65: */
! 66:
! 67: #ifdef GENEXPORTS
! 68: #define LDAP_VERSION_MAX 3
! 69: #define LDAP_INSUFFICIENT_ACCESS
! 70: #else
! 71: #include <lber.h>
! 72: #include <ldap.h>
! 73: #if APR_HAS_LDAP_SSL
! 74: #include <ldap_ssl.h>
! 75: #endif
! 76: #endif
! 77:
! 78:
! 79: /*
! 80: * Detected standard functions
! 81: */
! 82: #define APR_HAS_LDAPSSL_CLIENT_INIT 1
! 83: #define APR_HAS_LDAPSSL_CLIENT_DEINIT 1
! 84: #define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 1
! 85: #define APR_HAS_LDAP_START_TLS_S 0
! 86: #define APR_HAS_LDAP_SSLINIT 0
! 87: #define APR_HAS_LDAPSSL_INIT 1
! 88: #define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0
! 89:
! 90:
! 91: /*
! 92: * Make sure the secure LDAP port is defined
! 93: */
! 94: #ifndef LDAPS_PORT
! 95: #define LDAPS_PORT 636 /* ldaps:/// default LDAP over TLS port */
! 96: #endif
! 97:
! 98:
! 99: /* Note: Macros defining const casting has been removed in APR v1.0,
! 100: * pending real support for LDAP v2.0 toolkits.
! 101: *
! 102: * In the mean time, please use an LDAP v3.0 toolkit.
! 103: */
! 104: #if LDAP_VERSION_MAX <= 2
! 105: #error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.
! 106: #endif
! 107:
! 108: #ifdef __cplusplus
! 109: extern "C" {
! 110: #endif /* __cplusplus */
! 111:
! 112: /**
! 113: * This structure allows the C LDAP API error codes to be returned
! 114: * along with plain text error messages that explain to us mere mortals
! 115: * what really happened.
! 116: */
! 117: typedef struct apr_ldap_err_t {
! 118: const char *reason;
! 119: const char *msg;
! 120: int rc;
! 121: } apr_ldap_err_t;
! 122:
! 123: #ifdef __cplusplus
! 124: }
! 125: #endif
! 126:
! 127: #define APR_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN)
! 128:
! 129: /* These symbols are not actually exported in a DSO build, but mapped into
! 130: * a private exported function array for apr_ldap_stub to bind dynamically.
! 131: * Rename them appropriately to protect the global namespace.
! 132: */
! 133: #ifdef APU_DSO_LDAP_BUILD
! 134:
! 135: #define apr_ldap_info apr__ldap_info
! 136: #define apr_ldap_init apr__ldap_init
! 137: #define apr_ldap_ssl_init apr__ldap_ssl_init
! 138: #define apr_ldap_ssl_deinit apr__ldap_ssl_deinit
! 139: #define apr_ldap_get_option apr__ldap_get_option
! 140: #define apr_ldap_set_option apr__ldap_set_option
! 141: #define apr_ldap_rebind_init apr__ldap_rebind_init
! 142: #define apr_ldap_rebind_add apr__ldap_rebind_add
! 143: #define apr_ldap_rebind_remove apr__ldap_rebind_remove
! 144:
! 145: #define APU_DECLARE_LDAP(type) type
! 146: #else
! 147: #define APU_DECLARE_LDAP(type) APU_DECLARE(type)
! 148: #endif
! 149:
! 150: #include "apr_ldap_url.h"
! 151: #include "apr_ldap_init.h"
! 152: #include "apr_ldap_option.h"
! 153: #include "apr_ldap_rebind.h"
! 154:
! 155: /** @} */
! 156: #endif /* APR_HAS_LDAP */
! 157: #endif /* APU_LDAP_H */
! 158:
E-mail: