Apache Portable Runtime Utility Library
include/private/apu_internal.h
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #include "apr.h"
00018 #include "apr_dso.h"
00019 #include "apu.h"
00020 
00021 #ifndef APU_INTERNAL_H
00022 #define APU_INTERNAL_H
00023 
00024 #if APU_DSO_BUILD
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 /* For modular dso loading, an internal interlock to allow us to
00031  * continue to initialize modules by multiple threads, the caller
00032  * of apu_dso_load must lock first, and not unlock until any init
00033  * finalization is complete.
00034  */
00035 apr_status_t apu_dso_init(apr_pool_t *pool);
00036 
00037 apr_status_t apu_dso_mutex_lock(void);
00038 apr_status_t apu_dso_mutex_unlock(void);
00039 
00040 apr_status_t apu_dso_load(apr_dso_handle_t **dso, apr_dso_handle_sym_t *dsoptr, const char *module,
00041                           const char *modsym, apr_pool_t *pool);
00042 
00043 #if APR_HAS_LDAP
00044 
00045 /* For LDAP internal builds, wrap our LDAP namespace */
00046 
00047 struct apr__ldap_dso_fntable {
00048     int (*info)(apr_pool_t *pool, apr_ldap_err_t **result_err);
00049     int (*init)(apr_pool_t *pool, LDAP **ldap, const char *hostname,
00050                 int portno, int secure, apr_ldap_err_t **result_err);
00051     int (*ssl_init)(apr_pool_t *pool, const char *cert_auth_file,
00052                     int cert_file_type, apr_ldap_err_t **result_err);
00053     int (*ssl_deinit)(void);
00054     int (*get_option)(apr_pool_t *pool, LDAP *ldap, int option,
00055                       void *outvalue, apr_ldap_err_t **result_err);
00056     int (*set_option)(apr_pool_t *pool, LDAP *ldap, int option,
00057                       const void *invalue, apr_ldap_err_t **result_err);
00058     apr_status_t (*rebind_init)(apr_pool_t *pool);
00059     apr_status_t (*rebind_add)(apr_pool_t *pool, LDAP *ld,
00060                                const char *bindDN, const char *bindPW);
00061     apr_status_t (*rebind_remove)(LDAP *ld);
00062 };
00063 
00064 #endif /* APR_HAS_LDAP */
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 #endif /* APU_DSO_BUILD */
00071 
00072 #endif /* APU_INTERNAL_H */
00073 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines