Main Page | Modules | Namespace List | Data Structures | File List | Data Fields | Globals | Related Pages

apr_ldap_url.h

Go to the documentation of this file.
00001 /* Copyright 2000-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 
00020 #ifndef APR_LDAP_URL_H
00021 #define APR_LDAP_URL_H
00022 
00029 #if APR_HAS_LDAP
00030 
00031 #include "apu.h"
00032 #include "apr_pools.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif /* __cplusplus */
00037 
00039 typedef struct apr_ldap_url_desc_t {
00040     struct  apr_ldap_url_desc_t  *lud_next;
00041     char    *lud_scheme;
00042     char    *lud_host;
00043     int     lud_port;
00044     char    *lud_dn;
00045     char    **lud_attrs;
00046     int     lud_scope;
00047     char    *lud_filter;
00048     char    **lud_exts;
00049     int     lud_crit_exts;
00050 } apr_ldap_url_desc_t;
00051 
00052 #ifndef APR_LDAP_URL_SUCCESS
00053 #define APR_LDAP_URL_SUCCESS          0x00    /* Success */
00054 #define APR_LDAP_URL_ERR_MEM          0x01    /* can't allocate memory space */
00055 #define APR_LDAP_URL_ERR_PARAM        0x02    /* parameter is bad */
00056 #define APR_LDAP_URL_ERR_BADSCHEME    0x03    /* URL doesn't begin with "ldap[si]://" */
00057 #define APR_LDAP_URL_ERR_BADENCLOSURE 0x04    /* URL is missing trailing ">" */
00058 #define APR_LDAP_URL_ERR_BADURL       0x05    /* URL is bad */
00059 #define APR_LDAP_URL_ERR_BADHOST      0x06    /* host port is bad */
00060 #define APR_LDAP_URL_ERR_BADATTRS     0x07    /* bad (or missing) attributes */
00061 #define APR_LDAP_URL_ERR_BADSCOPE     0x08    /* scope string is invalid (or missing) */
00062 #define APR_LDAP_URL_ERR_BADFILTER    0x09    /* bad or missing filter */
00063 #define APR_LDAP_URL_ERR_BADEXTS      0x0a    /* bad or missing extensions */
00064 #endif
00065 
00070 APU_DECLARE(int) apr_ldap_is_ldap_url(const char *url);
00071 
00076 APU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);
00077 
00082 APU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);
00083 
00091 APU_DECLARE(int) apr_ldap_url_parse_ext(apr_pool_t *pool,
00092                                         const char *url_in,
00093                                         apr_ldap_url_desc_t **ludpp,
00094                                         apr_ldap_err_t **result_err);
00095 
00103 APU_DECLARE(int) apr_ldap_url_parse(apr_pool_t *pool,
00104                                     const char *url_in,
00105                                     apr_ldap_url_desc_t **ludpp,
00106                                     apr_ldap_err_t **result_err);
00107 
00108 #ifdef __cplusplus
00109 }
00110 #endif
00111 
00112 #endif /* APR_HAS_LDAP */
00113 
00116 #endif /* APR_LDAP_URL_H */

Generated on Sun Mar 20 20:00:15 2005 for Apache Portable Runtime Utility Library by  doxygen 1.3.9.1