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

/usr/src/rpmbuilder/BUILD/apr-util-APU_0_9_BRANCH/include/apr_ldap_url.h

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 
00016 #ifndef APR_LDAP_URL_H
00017 #define APR_LDAP_URL_H
00018 
00019 #include "apr_ldap.h"
00020 
00021 #if APR_HAS_LDAP
00022 #if APR_HAS_LDAP_URL_PARSE
00023 
00024 #define apr_ldap_url_desc_t             LDAPURLDesc
00025 #define apr_ldap_is_ldap_url(url)       ldap_is_ldap_url(url)
00026 #define apr_ldap_is_ldaps_url(url)      ldap_is_ldaps_url(url)
00027 #define apr_ldap_is_ldapi_url(url)      ldap_is_ldapi_url(url)
00028 #define apr_ldap_url_parse(url, ludpp)  ldap_url_parse(url, ludpp)
00029 #define apr_ldap_free_urldesc(ludp)     ldap_free_urldesc(ludp)
00030 
00031 #else /* ! APR_HAS_LDAP_URL_PARSE */
00032 
00033 /*
00034  * types for ldap URL handling
00035  */
00036 typedef struct apr_ldap_url_desc_t {
00037     struct  apr_ldap_url_desc_t  *lud_next;
00038     char    *lud_scheme;
00039     char    *lud_host;
00040     int     lud_port;
00041     char    *lud_dn;
00042     char    **lud_attrs;
00043     int     lud_scope;
00044     char    *lud_filter;
00045     char    **lud_exts;
00046     int     lud_crit_exts;
00047 } apr_ldap_url_desc_t;
00048 
00049 #ifndef LDAP_URL_SUCCESS
00050 #define LDAP_URL_SUCCESS          0x00    /* Success */
00051 #define LDAP_URL_ERR_MEM          0x01    /* can't allocate memory space */
00052 #define LDAP_URL_ERR_PARAM        0x02    /* parameter is bad */
00053 #define LDAP_URL_ERR_BADSCHEME    0x03    /* URL doesn't begin with "ldap[si]://" */
00054 #define LDAP_URL_ERR_BADENCLOSURE 0x04    /* URL is missing trailing ">" */
00055 #define LDAP_URL_ERR_BADURL       0x05    /* URL is bad */
00056 #define LDAP_URL_ERR_BADHOST      0x06    /* host port is bad */
00057 #define LDAP_URL_ERR_BADATTRS     0x07    /* bad (or missing) attributes */
00058 #define LDAP_URL_ERR_BADSCOPE     0x08    /* scope string is invalid (or missing) */
00059 #define LDAP_URL_ERR_BADFILTER    0x09    /* bad or missing filter */
00060 #define LDAP_URL_ERR_BADEXTS      0x0a    /* bad or missing extensions */
00061 #endif
00062 
00063 /*
00064  * in url.c
00065  *
00066  * need _ext varients
00067  */
00068 APU_DECLARE(int) apr_ldap_is_ldap_url(const char *url);
00069 
00070 APU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);
00071 
00072 APU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);
00073 
00074 APU_DECLARE(int) apr_ldap_url_parse(const char *url, 
00075                                     apr_ldap_url_desc_t **ludpp);
00076 
00077 APU_DECLARE(void) apr_ldap_free_urldesc(apr_ldap_url_desc_t *ludp);
00078 
00079 #endif /* ! APR_HAS_LDAP_URL_PARSE */
00080 
00081 #endif /* APR_HAS_LDAP */
00082 
00083 #endif /* APR_LDAP_URL_H */

Generated on Fri Apr 23 07:22:21 2004 for Apache Portable Runtime Utility Library by doxygen 1.3.4