00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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
00032
00033
00034
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
00051 #define LDAP_URL_ERR_MEM 0x01
00052 #define LDAP_URL_ERR_PARAM 0x02
00053 #define LDAP_URL_ERR_BADSCHEME 0x03
00054 #define LDAP_URL_ERR_BADENCLOSURE 0x04
00055 #define LDAP_URL_ERR_BADURL 0x05
00056 #define LDAP_URL_ERR_BADHOST 0x06
00057 #define LDAP_URL_ERR_BADATTRS 0x07
00058 #define LDAP_URL_ERR_BADSCOPE 0x08
00059 #define LDAP_URL_ERR_BADFILTER 0x09
00060 #define LDAP_URL_ERR_BADEXTS 0x0a
00061 #endif
00062
00063
00064
00065
00066
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
00080
00081 #endif
00082
00083 #endif