apu_internal.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #include "apr.h"
  17. #include "apr_dso.h"
  18. #include "apu.h"
  19. #ifndef APU_INTERNAL_H
  20. #define APU_INTERNAL_H
  21. #if APU_DSO_BUILD
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* For modular dso loading, an internal interlock to allow us to
  26. * continue to initialize modules by multiple threads, the caller
  27. * of apu_dso_load must lock first, and not unlock until any init
  28. * finalization is complete.
  29. */
  30. apr_status_t apu_dso_init(apr_pool_t *pool);
  31. apr_status_t apu_dso_mutex_lock(void);
  32. apr_status_t apu_dso_mutex_unlock(void);
  33. apr_status_t apu_dso_load(apr_dso_handle_t **dso, apr_dso_handle_sym_t *dsoptr, const char *module,
  34. const char *modsym, apr_pool_t *pool);
  35. #if APR_HAS_LDAP
  36. /* For LDAP internal builds, wrap our LDAP namespace */
  37. struct apr__ldap_dso_fntable {
  38. int (*info)(apr_pool_t *pool, apr_ldap_err_t **result_err);
  39. int (*init)(apr_pool_t *pool, LDAP **ldap, const char *hostname,
  40. int portno, int secure, apr_ldap_err_t **result_err);
  41. int (*ssl_init)(apr_pool_t *pool, const char *cert_auth_file,
  42. int cert_file_type, apr_ldap_err_t **result_err);
  43. int (*ssl_deinit)(void);
  44. int (*get_option)(apr_pool_t *pool, LDAP *ldap, int option,
  45. void *outvalue, apr_ldap_err_t **result_err);
  46. int (*set_option)(apr_pool_t *pool, LDAP *ldap, int option,
  47. const void *invalue, apr_ldap_err_t **result_err);
  48. apr_status_t (*rebind_init)(apr_pool_t *pool);
  49. apr_status_t (*rebind_add)(apr_pool_t *pool, LDAP *ld,
  50. const char *bindDN, const char *bindPW);
  51. apr_status_t (*rebind_remove)(LDAP *ld);
  52. };
  53. #endif /* APR_HAS_LDAP */
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif /* APU_DSO_BUILD */
  58. #endif /* APU_INTERNAL_H */