00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef APR_LDAP_URL_H
00018 #define APR_LDAP_URL_H
00019
00020 #include "apr_ldap.h"
00021
00022 #if APR_HAS_LDAP
00023 #if APR_HAS_LDAP_URL_PARSE
00024
00025 #define apr_ldap_url_desc_t LDAPURLDesc
00026 #define apr_ldap_is_ldap_url(url) ldap_is_ldap_url(url)
00027 #define apr_ldap_is_ldaps_url(url) ldap_is_ldaps_url(url)
00028 #define apr_ldap_is_ldapi_url(url) ldap_is_ldapi_url(url)
00029 #define apr_ldap_url_parse(url, ludpp) ldap_url_parse(url, ludpp)
00030 #define apr_ldap_free_urldesc(ludp) ldap_free_urldesc(ludp)
00031
00032 #else
00033
00034
00035
00036
00037 typedef struct apr_ldap_url_desc_t {
00038 struct apr_ldap_url_desc_t *lud_next;
00039 char *lud_scheme;
00040 char *lud_host;
00041 int lud_port;
00042 char *lud_dn;
00043 char **lud_attrs;
00044 int lud_scope;
00045 char *lud_filter;
00046 char **lud_exts;
00047 int lud_crit_exts;
00048 } apr_ldap_url_desc_t;
00049
00050 #ifndef LDAP_URL_SUCCESS
00051 #define LDAP_URL_SUCCESS 0x00
00052 #define LDAP_URL_ERR_MEM 0x01
00053 #define LDAP_URL_ERR_PARAM 0x02
00054 #define LDAP_URL_ERR_BADSCHEME 0x03
00055 #define LDAP_URL_ERR_BADENCLOSURE 0x04
00056 #define LDAP_URL_ERR_BADURL 0x05
00057 #define LDAP_URL_ERR_BADHOST 0x06
00058 #define LDAP_URL_ERR_BADATTRS 0x07
00059 #define LDAP_URL_ERR_BADSCOPE 0x08
00060 #define LDAP_URL_ERR_BADFILTER 0x09
00061 #define LDAP_URL_ERR_BADEXTS 0x0a
00062 #endif
00063
00064
00065
00066
00067
00068
00069 APU_DECLARE(int) apr_ldap_is_ldap_url(const char *url);
00070
00071 APU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);
00072
00073 APU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);
00074
00075 APU_DECLARE(int) apr_ldap_url_parse(const char *url,
00076 apr_ldap_url_desc_t **ludpp);
00077
00078 APU_DECLARE(void) apr_ldap_free_urldesc(apr_ldap_url_desc_t *ludp);
00079
00080 #endif
00081
00082 #endif
00083
00084 #endif