00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
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 
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    
00055 #define APR_LDAP_URL_ERR_MEM          0x01    
00056 #define APR_LDAP_URL_ERR_PARAM        0x02    
00057 #define APR_LDAP_URL_ERR_BADSCHEME    0x03    
00058 #define APR_LDAP_URL_ERR_BADENCLOSURE 0x04    
00059 #define APR_LDAP_URL_ERR_BADURL       0x05    
00060 #define APR_LDAP_URL_ERR_BADHOST      0x06    
00061 #define APR_LDAP_URL_ERR_BADATTRS     0x07    
00062 #define APR_LDAP_URL_ERR_BADSCOPE     0x08    
00063 #define APR_LDAP_URL_ERR_BADFILTER    0x09    
00064 #define APR_LDAP_URL_ERR_BADEXTS      0x0a    
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 
00114 
00117 #endif