include/apr_ldap_url.h

Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00021 #ifndef APR_LDAP_URL_H
00022 #define APR_LDAP_URL_H
00023 
00030 #if APR_HAS_LDAP
00031 
00032 #include "apu.h"
00033 #include "apr_pools.h"
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif /* __cplusplus */
00038 
00040 typedef struct apr_ldap_url_desc_t {
00041     struct  apr_ldap_url_desc_t  *lud_next;
00042     char    *lud_scheme;
00043     char    *lud_host;
00044     int     lud_port;
00045     char    *lud_dn;
00046     char    **lud_attrs;
00047     int     lud_scope;
00048     char    *lud_filter;
00049     char    **lud_exts;
00050     int     lud_crit_exts;
00051 } apr_ldap_url_desc_t;
00052 
00053 #ifndef APR_LDAP_URL_SUCCESS
00054 #define APR_LDAP_URL_SUCCESS          0x00    /* Success */
00055 #define APR_LDAP_URL_ERR_MEM          0x01    /* can't allocate memory space */
00056 #define APR_LDAP_URL_ERR_PARAM        0x02    /* parameter is bad */
00057 #define APR_LDAP_URL_ERR_BADSCHEME    0x03    /* URL doesn't begin with "ldap[si]://" */
00058 #define APR_LDAP_URL_ERR_BADENCLOSURE 0x04    /* URL is missing trailing ">" */
00059 #define APR_LDAP_URL_ERR_BADURL       0x05    /* URL is bad */
00060 #define APR_LDAP_URL_ERR_BADHOST      0x06    /* host port is bad */
00061 #define APR_LDAP_URL_ERR_BADATTRS     0x07    /* bad (or missing) attributes */
00062 #define APR_LDAP_URL_ERR_BADSCOPE     0x08    /* scope string is invalid (or missing) */
00063 #define APR_LDAP_URL_ERR_BADFILTER    0x09    /* bad or missing filter */
00064 #define APR_LDAP_URL_ERR_BADEXTS      0x0a    /* bad or missing extensions */
00065 #endif
00066 
00071 APU_DECLARE(int) apr_ldap_is_ldap_url(const char *url);
00072 
00077 APU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);
00078 
00083 APU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);
00084 
00092 APU_DECLARE(int) apr_ldap_url_parse_ext(apr_pool_t *pool,
00093                                         const char *url_in,
00094                                         apr_ldap_url_desc_t **ludpp,
00095                                         apr_ldap_err_t **result_err);
00096 
00104 APU_DECLARE(int) apr_ldap_url_parse(apr_pool_t *pool,
00105                                     const char *url_in,
00106                                     apr_ldap_url_desc_t **ludpp,
00107                                     apr_ldap_err_t **result_err);
00108 
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112 
00113 #endif /* APR_HAS_LDAP */
00114 
00117 #endif /* APR_LDAP_URL_H */

Generated on Mon Nov 26 11:24:10 2007 for Apache Portable Runtime Utility Library by  doxygen 1.5.2