Blame include/apr_ldap.h.in

Packit 383869
/* Licensed to the Apache Software Foundation (ASF) under one or more
Packit 383869
 * contributor license agreements.  See the NOTICE file distributed with
Packit 383869
 * this work for additional information regarding copyright ownership.
Packit 383869
 * The ASF licenses this file to You under the Apache License, Version 2.0
Packit 383869
 * (the "License"); you may not use this file except in compliance with
Packit 383869
 * the License.  You may obtain a copy of the License at
Packit 383869
 *
Packit 383869
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit 383869
 *
Packit 383869
 * Unless required by applicable law or agreed to in writing, software
Packit 383869
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 383869
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 383869
 * See the License for the specific language governing permissions and
Packit 383869
 * limitations under the License.
Packit 383869
 */
Packit 383869
Packit 383869
/*
Packit 383869
 * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
Packit 383869
 */
Packit 383869
/**
Packit 383869
 * @file apr_ldap.h
Packit 383869
 * @brief  APR-UTIL LDAP 
Packit 383869
 */
Packit 383869
#ifndef APU_LDAP_H
Packit 383869
#define APU_LDAP_H
Packit 383869
Packit 383869
/**
Packit 383869
 * @defgroup APR_Util_LDAP LDAP
Packit 383869
 * @ingroup APR_Util
Packit 383869
 * @{
Packit 383869
 */
Packit 383869
Packit 383869
/* this will be defined if LDAP support was compiled into apr-util */
Packit 383869
#define APR_HAS_LDAP		  @apu_has_ldap@
Packit 383869
Packit 383869
/* identify the LDAP toolkit used */
Packit 383869
#define APR_HAS_NETSCAPE_LDAPSDK  @apu_has_ldap_netscape@
Packit 383869
#define APR_HAS_SOLARIS_LDAPSDK   @apu_has_ldap_solaris@
Packit 383869
#define APR_HAS_NOVELL_LDAPSDK    @apu_has_ldap_novell@
Packit 383869
#define APR_HAS_MOZILLA_LDAPSDK   @apu_has_ldap_mozilla@
Packit 383869
#define APR_HAS_OPENLDAP_LDAPSDK  @apu_has_ldap_openldap@
Packit 383869
#define APR_HAS_MICROSOFT_LDAPSDK @apu_has_ldap_microsoft@
Packit 383869
#define APR_HAS_TIVOLI_LDAPSDK    @apu_has_ldap_tivoli@
Packit 383869
#define APR_HAS_ZOS_LDAPSDK       @apu_has_ldap_zos@
Packit 383869
#define APR_HAS_OTHER_LDAPSDK     @apu_has_ldap_other@
Packit 383869
Packit 383869
Packit 383869
/*
Packit 383869
 * Handle the case when LDAP is enabled
Packit 383869
 */
Packit 383869
#if APR_HAS_LDAP
Packit 383869
Packit 383869
/*
Packit 383869
 * The following #defines are DEPRECATED and should not be used for
Packit 383869
 * anything. They remain to maintain binary compatibility.
Packit 383869
 * The original code defined the OPENLDAP SDK as present regardless
Packit 383869
 * of what really was there, which was way bogus. In addition, the
Packit 383869
 * apr_ldap_url_parse*() functions have been rewritten specifically for
Packit 383869
 * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
Packit 383869
 */
Packit 383869
#if APR_HAS_TIVOLI_LDAPSDK
Packit 383869
#define APR_HAS_LDAP_SSL 0
Packit 383869
#else
Packit 383869
#define APR_HAS_LDAP_SSL 1
Packit 383869
#endif
Packit 383869
#define APR_HAS_LDAP_URL_PARSE      0
Packit 383869
Packit 383869
#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) 
Packit 383869
/* Ensure that the "deprecated" interfaces are still exposed
Packit 383869
 * with OpenLDAP >= 2.3; these were exposed by default in earlier
Packit 383869
 * releases. */
Packit 383869
#define LDAP_DEPRECATED 1
Packit 383869
#endif
Packit 383869
Packit 383869
/*
Packit 383869
 * Include the standard LDAP header files.
Packit 383869
 */
Packit 383869
Packit 383869
@lber_h@
Packit 383869
@ldap_h@
Packit 383869
@ldap_ssl_h@
Packit 383869
Packit 383869
Packit 383869
/*
Packit 383869
 * Detected standard functions
Packit 383869
 */
Packit 383869
#define APR_HAS_LDAPSSL_CLIENT_INIT @apu_has_ldapssl_client_init@
Packit 383869
#define APR_HAS_LDAPSSL_CLIENT_DEINIT @apu_has_ldapssl_client_deinit@
Packit 383869
#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT @apu_has_ldapssl_add_trusted_cert@
Packit 383869
#define APR_HAS_LDAP_START_TLS_S @apu_has_ldap_start_tls_s@
Packit 383869
#define APR_HAS_LDAP_SSLINIT @apu_has_ldap_sslinit@
Packit 383869
#define APR_HAS_LDAPSSL_INIT @apu_has_ldapssl_init@
Packit 383869
#define APR_HAS_LDAPSSL_INSTALL_ROUTINES @apu_has_ldapssl_install_routines@
Packit 383869
Packit 383869
/*
Packit 383869
 * Make sure the secure LDAP port is defined
Packit 383869
 */
Packit 383869
#ifndef LDAPS_PORT
Packit 383869
#define LDAPS_PORT 636  /* ldaps:/// default LDAP over TLS port */
Packit 383869
#endif
Packit 383869
Packit 383869
/*
Packit 383869
 * For ldap function calls that input a size limit on the number of returned elements
Packit 383869
 * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)
Packit 383869
 * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK
Packit 383869
 * or process is configured for.
Packit 383869
 */
Packit 383869
#ifdef LDAP_DEFAULT_LIMIT
Packit 383869
#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
Packit 383869
#else
Packit 383869
#ifdef LDAP_NO_LIMIT
Packit 383869
#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
Packit 383869
#endif
Packit 383869
#endif
Packit 383869
Packit 383869
#ifndef APR_LDAP_SIZELIMIT
Packit 383869
#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */
Packit 383869
#endif
Packit 383869
Packit 383869
/*
Packit 383869
 * z/OS is missing some defines
Packit 383869
 */
Packit 383869
#ifndef LDAP_VERSION_MAX
Packit 383869
#define LDAP_VERSION_MAX  LDAP_VERSION
Packit 383869
#endif
Packit 383869
#if APR_HAS_ZOS_LDAPSDK
Packit 383869
#define LDAP_VENDOR_NAME "IBM z/OS"
Packit 383869
#endif
Packit 383869
Packit 383869
/* Note: Macros defining const casting has been removed in APR v1.0,
Packit 383869
 * pending real support for LDAP v2.0 toolkits.
Packit 383869
 *
Packit 383869
 * In the mean time, please use an LDAP v3.0 toolkit.
Packit 383869
 */
Packit 383869
#if LDAP_VERSION_MAX <= 2
Packit 383869
#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.
Packit 383869
#endif 
Packit 383869
Packit 383869
#ifdef __cplusplus
Packit 383869
extern "C" {
Packit 383869
#endif /* __cplusplus */
Packit 383869
Packit 383869
/**
Packit 383869
 * This structure allows the C LDAP API error codes to be returned
Packit 383869
 * along with plain text error messages that explain to us mere mortals
Packit 383869
 * what really happened.
Packit 383869
 */
Packit 383869
typedef struct apr_ldap_err_t {
Packit 383869
    const char *reason;
Packit 383869
    const char *msg;
Packit 383869
    int rc;
Packit 383869
} apr_ldap_err_t;
Packit 383869
Packit 383869
#ifdef __cplusplus
Packit 383869
}
Packit 383869
#endif
Packit 383869
Packit 383869
/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection
Packit 383869
 * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone 
Packit 383869
 * manually chooses another SDK on Windows 
Packit 383869
 */
Packit 383869
#if APR_HAS_MICROSOFT_LDAPSDK
Packit 383869
#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \
Packit 383869
                                    || (s) == LDAP_UNAVAILABLE)
Packit 383869
#else
Packit 383869
#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)
Packit 383869
#endif
Packit 383869
Packit 383869
/* These symbols are not actually exported in a DSO build, but mapped into
Packit 383869
 * a private exported function array for apr_ldap_stub to bind dynamically.
Packit 383869
 * Rename them appropriately to protect the global namespace.
Packit 383869
 */
Packit 383869
#ifdef APU_DSO_LDAP_BUILD
Packit 383869
Packit 383869
#define apr_ldap_info apr__ldap_info
Packit 383869
#define apr_ldap_init apr__ldap_init
Packit 383869
#define apr_ldap_ssl_init apr__ldap_ssl_init
Packit 383869
#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit
Packit 383869
#define apr_ldap_get_option apr__ldap_get_option
Packit 383869
#define apr_ldap_set_option apr__ldap_set_option
Packit 383869
#define apr_ldap_rebind_init apr__ldap_rebind_init
Packit 383869
#define apr_ldap_rebind_add apr__ldap_rebind_add
Packit 383869
#define apr_ldap_rebind_remove apr__ldap_rebind_remove
Packit 383869
Packit 383869
#define APU_DECLARE_LDAP(type) type
Packit 383869
#else
Packit 383869
#define APU_DECLARE_LDAP(type) APU_DECLARE(type)
Packit 383869
#endif
Packit 383869
Packit 383869
#include "apr_ldap_url.h"
Packit 383869
#include "apr_ldap_init.h"
Packit 383869
#include "apr_ldap_option.h"
Packit 383869
#include "apr_ldap_rebind.h"
Packit 383869
Packit 383869
#endif /* APR_HAS_LDAP */
Packit 383869
/** @} */
Packit 383869
#endif /* APU_LDAP_H */