Subversion 1.6.16
|
00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Copyright (c) 2006, 2008 CollabNet. All rights reserved. 00005 * 00006 * This software is licensed as described in the file COPYING, which 00007 * you should have received as part of this distribution. The terms 00008 * are also available at http://subversion.tigris.org/license-1.html. 00009 * If newer versions of this license are posted there, you may use a 00010 * newer version instead, at your option. 00011 * 00012 * This software consists of voluntary contributions made by many 00013 * individuals. For exact contribution history, see the revision 00014 * history and logs, available at http://subversion.tigris.org/. 00015 * ==================================================================== 00016 * @endcopyright 00017 * 00018 * @file svn_dso.h 00019 * @brief DSO loading routines 00020 */ 00021 00022 00023 00024 #ifndef SVN_DSO_H 00025 #define SVN_DSO_H 00026 00027 #include <apr_dso.h> 00028 00029 #include "svn_types.h" 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif /* __cplusplus */ 00034 00035 /** 00036 * Initialize the DSO loading routines. 00037 * 00038 * @note This should be called prior to the creation of any pool that 00039 * is passed to a function that comes from a DSO, otherwise you 00040 * risk having the DSO unloaded before all pool cleanup callbacks 00041 * that live in the DSO have been executed. If it is not called 00042 * prior to @c svn_dso_load being used for the first time there 00043 * will be a best effort attempt made to initialize the subsystem, 00044 * but it will not be entirely thread safe and it risks running 00045 * into the previously mentioned problems with DSO unloading and 00046 * pool cleanup callbacks. 00047 * 00048 * Returns svn_error_t object with corresponding apr_err returned by 00049 * underlying calls. In case of no error returns @c SVN_NO_ERROR. 00050 * 00051 * @since New in 1.6. 00052 */ 00053 svn_error_t * 00054 svn_dso_initialize2(void); 00055 00056 /** 00057 * Initialize the DSO loading routines. 00058 * 00059 * @note This should be called prior to the creation of any pool that 00060 * is passed to a function that comes from a DSO, otherwise you 00061 * risk having the DSO unloaded before all pool cleanup callbacks 00062 * that live in the DSO have been executed. If it is not called 00063 * prior to @c svn_dso_load being used for the first time there 00064 * will be a best effort attempt made to initialize the subsystem, 00065 * but it will not be entirely thread safe and it risks running 00066 * into the previously mentioned problems with DSO unloading and 00067 * pool cleanup callbacks. 00068 * 00069 * Calls svn_dso_initialize2(void) upon error aborts. 00070 * 00071 * @deprecated Provided for backwards compatibility with the 1.5 API. 00072 * 00073 * @since New in 1.4. 00074 */ 00075 SVN_DEPRECATED 00076 void 00077 svn_dso_initialize(void); 00078 00079 00080 #if APR_HAS_DSO 00081 00082 /** 00083 * Attempt to load @a libname, returning it in @a dso. 00084 * 00085 * If @a libname cannot be loaded set @a dso to NULL and return 00086 * @c SVN_NO_ERROR. 00087 * 00088 * @note Due to pool lifetime issues DSOs are all loaded into a global 00089 * pool, so you must be certain that there is a bounded number of 00090 * them that will ever be loaded by the system, otherwise you will 00091 * leak memory. 00092 * 00093 * @since New in 1.4. 00094 */ 00095 svn_error_t * 00096 svn_dso_load(apr_dso_handle_t **dso, 00097 const char *libname); 00098 00099 #endif /* APR_HAS_DSO */ 00100 00101 00102 #ifdef __cplusplus 00103 } 00104 #endif /* __cplusplus */ 00105 00106 #endif /* SVN_DSO_H */