Document FreeTDS DBD params
[apr-util.git] / include / apr_ldap_url.h
blob6ebda8324f51e3ec7620408c22f53e029980f565
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. 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.
17 /**
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
24 /**
25 * @defgroup APR_Util_LDAP LDAP
26 * @ingroup APR_Util
27 * @{
30 #if APR_HAS_LDAP
32 #include "apu.h"
33 #include "apr_pools.h"
35 #ifdef __cplusplus
36 extern "C" {
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;
42 char *lud_scheme;
43 char *lud_host;
44 int lud_port;
45 char *lud_dn;
46 char **lud_attrs;
47 int lud_scope;
48 char *lud_filter;
49 char **lud_exts;
50 int lud_crit_exts;
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 */
65 #endif
67 /**
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);
73 /**
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);
79 /**
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);
85 /**
86 * Parse an LDAP 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,
93 const char *url_in,
94 apr_ldap_url_desc_t **ludpp,
95 apr_ldap_err_t **result_err);
97 /**
98 * Parse an LDAP URL.
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,
105 const char *url_in,
106 apr_ldap_url_desc_t **ludpp,
107 apr_ldap_err_t **result_err);
109 #ifdef __cplusplus
111 #endif
113 #endif /* APR_HAS_LDAP */
115 /** @} */
117 #endif /* APR_LDAP_URL_H */