Blame include/apr_ldap_url.h

Packit 383869
/* Licensed to the Apache Software Foundation (ASF) under one or more
Packit 383869
 * contributor license agreements.  See the NOTICE file distributed with
Packit 383869
 * this work for additional information regarding copyright ownership.
Packit 383869
 * The ASF licenses this file to You under the Apache License, Version 2.0
Packit 383869
 * (the "License"); you may not use this file except in compliance with
Packit 383869
 * the License.  You may obtain a copy of the License at
Packit 383869
 *
Packit 383869
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit 383869
 *
Packit 383869
 * Unless required by applicable law or agreed to in writing, software
Packit 383869
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 383869
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 383869
 * See the License for the specific language governing permissions and
Packit 383869
 * limitations under the License.
Packit 383869
 */
Packit 383869
Packit 383869
/**
Packit 383869
 * @file apr_ldap_url.h
Packit 383869
 * @brief  APR-UTIL LDAP ldap_init() functions
Packit 383869
 */
Packit 383869
#ifndef APR_LDAP_URL_H
Packit 383869
#define APR_LDAP_URL_H
Packit 383869
Packit 383869
/**
Packit 383869
 * @addtogroup APR_Util_LDAP
Packit 383869
 * @{
Packit 383869
 */
Packit 383869
Packit 383869
#if defined(DOXYGEN)
Packit 383869
#include "apr_ldap.h"
Packit 383869
#endif
Packit 383869
Packit 383869
#if APR_HAS_LDAP
Packit 383869
Packit 383869
#include "apu.h"
Packit 383869
#include "apr_pools.h"
Packit 383869
Packit 383869
#ifdef __cplusplus
Packit 383869
extern "C" {
Packit 383869
#endif /* __cplusplus */
Packit 383869
Packit 383869
/** Structure to access an exploded LDAP URL */
Packit 383869
typedef struct apr_ldap_url_desc_t {
Packit 383869
    struct  apr_ldap_url_desc_t  *lud_next;
Packit 383869
    char    *lud_scheme;
Packit 383869
    char    *lud_host;
Packit 383869
    int     lud_port;
Packit 383869
    char    *lud_dn;
Packit 383869
    char    **lud_attrs;
Packit 383869
    int     lud_scope;
Packit 383869
    char    *lud_filter;
Packit 383869
    char    **lud_exts;
Packit 383869
    int     lud_crit_exts;
Packit 383869
} apr_ldap_url_desc_t;
Packit 383869
Packit 383869
#ifndef APR_LDAP_URL_SUCCESS
Packit 383869
#define APR_LDAP_URL_SUCCESS          0x00    /* Success */
Packit 383869
#define APR_LDAP_URL_ERR_MEM          0x01    /* can't allocate memory space */
Packit 383869
#define APR_LDAP_URL_ERR_PARAM        0x02    /* parameter is bad */
Packit 383869
#define APR_LDAP_URL_ERR_BADSCHEME    0x03    /* URL doesn't begin with "ldap[si]://" */
Packit 383869
#define APR_LDAP_URL_ERR_BADENCLOSURE 0x04    /* URL is missing trailing ">" */
Packit 383869
#define APR_LDAP_URL_ERR_BADURL       0x05    /* URL is bad */
Packit 383869
#define APR_LDAP_URL_ERR_BADHOST      0x06    /* host port is bad */
Packit 383869
#define APR_LDAP_URL_ERR_BADATTRS     0x07    /* bad (or missing) attributes */
Packit 383869
#define APR_LDAP_URL_ERR_BADSCOPE     0x08    /* scope string is invalid (or missing) */
Packit 383869
#define APR_LDAP_URL_ERR_BADFILTER    0x09    /* bad or missing filter */
Packit 383869
#define APR_LDAP_URL_ERR_BADEXTS      0x0a    /* bad or missing extensions */
Packit 383869
#endif
Packit 383869
Packit 383869
/**
Packit 383869
 * Is this URL an ldap url? ldap://
Packit 383869
 * @param url The url to test
Packit 383869
 */
Packit 383869
APU_DECLARE(int) apr_ldap_is_ldap_url(const char *url);
Packit 383869
Packit 383869
/**
Packit 383869
 * Is this URL an SSL ldap url? ldaps://
Packit 383869
 * @param url The url to test
Packit 383869
 */
Packit 383869
APU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);
Packit 383869
Packit 383869
/**
Packit 383869
 * Is this URL an ldap socket url? ldapi://
Packit 383869
 * @param url The url to test
Packit 383869
 */
Packit 383869
APU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);
Packit 383869
Packit 383869
/**
Packit 383869
 * Parse an LDAP URL.
Packit 383869
 * @param pool The pool to use
Packit 383869
 * @param url_in The URL to parse
Packit 383869
 * @param ludpp The structure to return the exploded URL
Packit 383869
 * @param result_err The result structure of the operation
Packit 383869
 */
Packit 383869
APU_DECLARE(int) apr_ldap_url_parse_ext(apr_pool_t *pool,
Packit 383869
                                        const char *url_in,
Packit 383869
                                        apr_ldap_url_desc_t **ludpp,
Packit 383869
                                        apr_ldap_err_t **result_err);
Packit 383869
Packit 383869
/**
Packit 383869
 * Parse an LDAP URL.
Packit 383869
 * @param pool The pool to use
Packit 383869
 * @param url_in The URL to parse
Packit 383869
 * @param ludpp The structure to return the exploded URL
Packit 383869
 * @param result_err The result structure of the operation
Packit 383869
 */
Packit 383869
APU_DECLARE(int) apr_ldap_url_parse(apr_pool_t *pool,
Packit 383869
                                    const char *url_in,
Packit 383869
                                    apr_ldap_url_desc_t **ludpp,
Packit 383869
                                    apr_ldap_err_t **result_err);
Packit 383869
Packit 383869
#ifdef __cplusplus
Packit 383869
}
Packit 383869
#endif
Packit 383869
Packit 383869
#endif /* APR_HAS_LDAP */
Packit 383869
Packit 383869
/** @} */
Packit 383869
Packit 383869
#endif /* APR_LDAP_URL_H */