include/apr_ldap.h

Go to the documentation of this file.
00001 /* Copyright 2002-2004 The Apache Software Foundation
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00016 /*
00017  * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
00018  */
00023 #ifndef APU_LDAP_H
00024 #define APU_LDAP_H
00025 
00033 /*
00034  * This switches LDAP support on or off.
00035  */
00036 
00037 /* this will be defined if LDAP support was compiled into apr-util */
00038 #define APR_HAS_LDAP              0
00039 
00040 /* this whole thing disappears if LDAP is not enabled */
00041 #if !APR_HAS_LDAP
00042 
00043 #define APR_HAS_NETSCAPE_LDAPSDK    0
00044 #define APR_HAS_NOVELL_LDAPSDK      0
00045 #define APR_HAS_OPENLDAP_LDAPSDK    0
00046 #define APR_HAS_MICROSOFT_LDAPSDK   0
00047 #define APR_HAS_OTHER_LDAPSDK       0
00048 
00049 #define APR_HAS_LDAP_SSL            0
00050 #define APR_HAS_LDAP_URL_PARSE    0
00051 
00052 
00053 #else /* ldap support available */
00054 
00055 #ifdef APR_NOT_READY_YET
00056 /* FIXME: this code awaits support from apu-conf.m4 */
00057 
00058    /* There a several LDAPv3 SDKs available on various platforms
00059     * define which LDAP SDK is used 
00060  */
00061 #define APR_HAS_NETSCAPE_LDAPSDK    @apu_has_ldap_netscape@
00062 #define APR_HAS_NOVELL_LDAPSDK      @apu_has_ldap_novell@
00063 #define APR_HAS_OPENLDAP_LDAPSDK    @apu_has_ldap_openldap@
00064 #define APR_HAS_MICROSOFT_LDAPSDK   @apu_has_ldap_microsoft@
00065 #define APR_HAS_OTHER_LDAPSDK       @apu_has_ldap_other@
00066 
00067    /* define if LDAP SSL support is available 
00068    */
00069 #define APR_HAS_LDAP_SSL            @apu_has_ldap_ssl@
00070 
00071 #else /* APR_NOT_READY_YET */
00072 
00073 /* FIXME: remove this when above code works.  Default to build with
00074  * OpenLDAP until apu-conf.m4 support exists */
00075 #define APR_HAS_OPENLDAP_LDAPSDK 1 
00076 #define APR_HAS_LDAP_SSL 1
00077 
00078 #endif /* APR_NOT_READY_YET */
00079 
00080    /* If no APR_HAS_xxx_LDAPSDK is defined error out
00081     * Define if the SDK supports the ldap_url_parse function 
00082    */
00083 #if APR_HAS_NETSCAPE_LDAPSDK 
00084    #define APR_HAS_LDAP_URL_PARSE      1
00085 #elif APR_HAS_NOVELL_LDAPSDK 
00086    #define APR_HAS_LDAP_URL_PARSE      1
00087 #elif APR_HAS_OPENLDAP_LDAPSDK
00088    #define APR_HAS_LDAP_URL_PARSE      1
00089 #elif APR_HAS_MICROSOFT_LDAPSDK
00090    #define APR_HAS_LDAP_URL_PARSE      0
00091 #elif APR_HAS_OTHER_LDAPSDK
00092    #define APR_HAS_LDAP_URL_PARSE      0
00093 #else 
00094    #define APR_HAS_LDAP_URL_PARSE      0
00095    #error "ERROR no LDAP SDK defined!"
00096 #endif
00097 
00098 /* These are garbage, our public macros are always APR_HAS_ prefixed,
00099  * and use 0/1 values, not defined/undef semantics.  
00100  *
00101  * Will be deprecated in APR 1.0
00102  */
00103 #if APR_HAS_LDAP
00104 #define APU_HAS_LDAP
00105 #endif
00106 
00107 /* LDAP header files */
00108 
00109 #if APR_HAS_NETSCAPE_LDAPSDK
00110 
00111 
00112 #if APR_HAS_LDAP_SSL 
00113 
00114 #endif
00115 #endif
00116 
00117 #if APR_HAS_NOVELL_LDAPSDK
00118 
00119 
00120 #if APR_HAS_LDAP_SSL 
00121 
00122 #endif
00123 #endif
00124 
00125 #if APR_HAS_OPENLDAP_LDAPSDK
00126 #if !defined(LDAP_DEPRECATED) 
00127 /* Ensure that the "deprecated" interfaces are still exposed
00128  * with OpenLDAP >= 2.3; these were exposed by default in earlier
00129  * releases. */
00130 #define LDAP_DEPRECATED 1
00131 #endif
00132 
00133 
00134 #endif
00135 
00136 /* MS & v2 LDAP SDKs don't use const parameters in their prototypes,
00137  * LDAPv3 SDKs mostly use const.  Bridge the gap for clean compilation.
00138  */
00139 
00140 #if LDAP_VERSION_MAX <= 2 || APR_HAS_MICROSOFT_LDAPSDK || defined(DOXYGEN)
00141 
00145 #define APR_LDAP_UNCONST(conststr) ((char *)(conststr))
00146 #else
00147 #define APR_LDAP_UNCONST(conststr) (conststr)
00148 #endif
00149 
00150 #ifndef __cplusplus
00151 
00160 #define const_cast(conststr) APR_LDAP_UNCONST(conststr)
00161 #endif
00162    
00163 #include "apr_ldap_url.h"
00164 
00165 /* Define some errors that are mysteriously gone from OpenLDAP 2.x */
00166 #ifndef LDAP_URL_ERR_NOTLDAP
00167 #define LDAP_URL_ERR_NOTLDAP LDAP_URL_ERR_BADSCHEME
00168 #endif
00169 
00170 #ifndef LDAP_URL_ERR_NODN
00171 #define LDAP_URL_ERR_NODN LDAP_URL_ERR_BADURL
00172 #endif
00173 
00175 #endif /* APR_HAS_LDAP */
00176 #endif /* APU_LDAP_H */

Generated on Tue Sep 11 08:13:14 2007 for Apache Portable Runtime Utility Library by  doxygen 1.5.2