apr_dso.h

Go to the documentation of this file.
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 #ifndef APR_DSO_DOT_H
00018 #define APR_DSO_DOT_H
00019 
00020 /**
00021  * @file apr_dso.h
00022  * @brief APR Dynamic Object Handling Routines
00023  */
00024 
00025 #include "apr.h"
00026 #include "apr_pools.h"
00027 #include "apr_errno.h"
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 /**
00034  * @defgroup apr_dso Dynamic Object Handling
00035  * @ingroup APR 
00036  * @{
00037  */
00038 
00039 #if APR_HAS_DSO || defined(DOXYGEN)
00040 
00041 /**
00042  * Structure for referencing dynamic objects
00043  */
00044 typedef struct apr_dso_handle_t       apr_dso_handle_t;
00045 
00046 /**
00047  * Structure for referencing symbols from dynamic objects
00048  */
00049 typedef void *                        apr_dso_handle_sym_t;
00050 
00051 /**
00052  * Load a DSO library.
00053  * @param res_handle Location to store new handle for the DSO.
00054  * @param path Path to the DSO library
00055  * @param ctx Pool to use.
00056  * @bug We aught to provide an alternative to RTLD_GLOBAL, which
00057  * is the only supported method of loading DSOs today.
00058  */
00059 APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, 
00060                                        const char *path, apr_pool_t *ctx);
00061 
00062 /**
00063  * Close a DSO library.
00064  * @param handle handle to close.
00065  */
00066 APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle);
00067 
00068 /**
00069  * Load a symbol from a DSO handle.
00070  * @param ressym Location to store the loaded symbol
00071  * @param handle handle to load the symbol from.
00072  * @param symname Name of the symbol to load.
00073  */
00074 APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym, 
00075                                       apr_dso_handle_t *handle,
00076                                       const char *symname);
00077 
00078 /**
00079  * Report more information when a DSO function fails.
00080  * @param dso The dso handle that has been opened
00081  * @param buf Location to store the dso error
00082  * @param bufsize The size of the provided buffer
00083  */
00084 APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buf, apr_size_t bufsize);
00085 
00086 #endif /* APR_HAS_DSO */
00087 
00088 /** @} */
00089 
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093 
00094 #endif

Generated on Mon Nov 26 11:23:52 2007 for Apache Portable Runtime by  doxygen 1.5.2