Apache Portable Runtime Utility Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apu_internal.h
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 
17 #include "apr.h"
18 #include "apr_dso.h"
19 #include "apu.h"
20 
21 #ifndef APU_INTERNAL_H
22 #define APU_INTERNAL_H
23 
24 #if APU_DSO_BUILD
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /* For modular dso loading, an internal interlock to allow us to
31  * continue to initialize modules by multiple threads, the caller
32  * of apu_dso_load must lock first, and not unlock until any init
33  * finalization is complete.
34  */
35 apr_status_t apu_dso_init(apr_pool_t *pool);
36 
37 apr_status_t apu_dso_mutex_lock(void);
38 apr_status_t apu_dso_mutex_unlock(void);
39 
40 apr_status_t apu_dso_load(apr_dso_handle_t **dso, apr_dso_handle_sym_t *dsoptr, const char *module,
41  const char *modsym, apr_pool_t *pool);
42 
43 #if APR_HAS_LDAP
44 
45 /* For LDAP internal builds, wrap our LDAP namespace */
46 
47 struct apr__ldap_dso_fntable {
48  int (*info)(apr_pool_t *pool, apr_ldap_err_t **result_err);
49  int (*init)(apr_pool_t *pool, LDAP **ldap, const char *hostname,
50  int portno, int secure, apr_ldap_err_t **result_err);
51  int (*ssl_init)(apr_pool_t *pool, const char *cert_auth_file,
52  int cert_file_type, apr_ldap_err_t **result_err);
53  int (*ssl_deinit)(void);
54  int (*get_option)(apr_pool_t *pool, LDAP *ldap, int option,
55  void *outvalue, apr_ldap_err_t **result_err);
56  int (*set_option)(apr_pool_t *pool, LDAP *ldap, int option,
57  const void *invalue, apr_ldap_err_t **result_err);
58  apr_status_t (*rebind_init)(apr_pool_t *pool);
59  apr_status_t (*rebind_add)(apr_pool_t *pool, LDAP *ld,
60  const char *bindDN, const char *bindPW);
61  apr_status_t (*rebind_remove)(LDAP *ld);
62 };
63 
64 #endif /* APR_HAS_LDAP */
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* APU_DSO_BUILD */
71 
72 #endif /* APU_INTERNAL_H */
73