1
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
18
* @file apr_ldap_url.h
19
* @brief APR-UTIL LDAP ldap_init() functions
21
#ifndef APR_LDAP_URL_H
22
#define APR_LDAP_URL_H
25
* @defgroup APR_Util_LDAP LDAP
33
#include "apr_pools.h"
37
#endif /* __cplusplus */
39
/** Structure to access an exploded LDAP URL */
40
typedef struct apr_ldap_url_desc_t {
41
struct apr_ldap_url_desc_t *lud_next;
51
} apr_ldap_url_desc_t;
53
#ifndef APR_LDAP_URL_SUCCESS
54
#define APR_LDAP_URL_SUCCESS 0x00 /* Success */
55
#define APR_LDAP_URL_ERR_MEM 0x01 /* can't allocate memory space */
56
#define APR_LDAP_URL_ERR_PARAM 0x02 /* parameter is bad */
57
#define APR_LDAP_URL_ERR_BADSCHEME 0x03 /* URL doesn't begin with "ldap[si]://" */
58
#define APR_LDAP_URL_ERR_BADENCLOSURE 0x04 /* URL is missing trailing ">" */
59
#define APR_LDAP_URL_ERR_BADURL 0x05 /* URL is bad */
60
#define APR_LDAP_URL_ERR_BADHOST 0x06 /* host port is bad */
61
#define APR_LDAP_URL_ERR_BADATTRS 0x07 /* bad (or missing) attributes */
62
#define APR_LDAP_URL_ERR_BADSCOPE 0x08 /* scope string is invalid (or missing) */
63
#define APR_LDAP_URL_ERR_BADFILTER 0x09 /* bad or missing filter */
64
#define APR_LDAP_URL_ERR_BADEXTS 0x0a /* bad or missing extensions */
68
* Is this URL an ldap url? ldap://
69
* @param url The url to test
71
APU_DECLARE(int) apr_ldap_is_ldap_url(const char *url);
74
* Is this URL an SSL ldap url? ldaps://
75
* @param url The url to test
77
APU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);
80
* Is this URL an ldap socket url? ldapi://
81
* @param url The url to test
83
APU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);
87
* @param pool The pool to use
88
* @param url_in The URL to parse
89
* @param ludpp The structure to return the exploded URL
90
* @param result_err The result structure of the operation
92
APU_DECLARE(int) apr_ldap_url_parse_ext(apr_pool_t *pool,
94
apr_ldap_url_desc_t **ludpp,
95
apr_ldap_err_t **result_err);
99
* @param pool The pool to use
100
* @param url_in The URL to parse
101
* @param ludpp The structure to return the exploded URL
102
* @param result_err The result structure of the operation
104
APU_DECLARE(int) apr_ldap_url_parse(apr_pool_t *pool,
106
apr_ldap_url_desc_t **ludpp,
107
apr_ldap_err_t **result_err);
113
#endif /* APR_HAS_LDAP */
117
#endif /* APR_LDAP_URL_H */