svn_dso.h

Go to the documentation of this file.
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_error.h"
00030 #include "svn_types.h"
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif /* __cplusplus */
00035 
00036 /**
00037  * Initialize the DSO loading routines.
00038  *
00039  * @note This should be called prior to the creation of any pool that
00040  *       is passed to a function that comes from a DSO, otherwise you
00041  *       risk having the DSO unloaded before all pool cleanup callbacks
00042  *       that live in the DSO have been executed.  If it is not called
00043  *       prior to @c svn_dso_load being used for the first time there
00044  *       will be a best effort attempt made to initialize the subsystem,
00045  *       but it will not be entirely thread safe and it risks running
00046  *       into the previously mentioned problems with DSO unloading and
00047  *       pool cleanup callbacks.
00048  *
00049  * Returns svn_error_t object with corresponding apr_err returned by
00050  * underlying calls. In case of no error returns @c SVN_NO_ERROR.
00051  *
00052  * @since New in 1.6.
00053  */
00054 svn_error_t *
00055 svn_dso_initialize2(void);
00056 
00057 /**
00058  * Initialize the DSO loading routines.
00059  *
00060  * @note This should be called prior to the creation of any pool that
00061  *       is passed to a function that comes from a DSO, otherwise you
00062  *       risk having the DSO unloaded before all pool cleanup callbacks
00063  *       that live in the DSO have been executed.  If it is not called
00064  *       prior to @c svn_dso_load being used for the first time there
00065  *       will be a best effort attempt made to initialize the subsystem,
00066  *       but it will not be entirely thread safe and it risks running
00067  *       into the previously mentioned problems with DSO unloading and
00068  *       pool cleanup callbacks.
00069  *
00070  * Calls svn_dso_initialize2(void) upon error aborts.
00071  *
00072  * @deprecated Provided for backwards compatibility with the 1.5 API.
00073  *
00074  * @since New in 1.4.
00075  */
00076 SVN_DEPRECATED
00077 void
00078 svn_dso_initialize(void);
00079 
00080 #if APR_HAS_DSO
00081 /**
00082  * Attempt to load @a libname, returning it in @a dso.
00083  *
00084  * If @a libname cannot be loaded set @a dso to NULL and return
00085  * @c SVN_NO_ERROR.
00086  *
00087  * @note Due to pool lifetime issues DSOs are all loaded into a global
00088  *       pool, so you must be certain that there is a bounded number of
00089  *       them that will ever be loaded by the system, otherwise you will
00090  *       leak memory.
00091  *
00092  * @since New in 1.4.
00093  */
00094 svn_error_t *
00095 svn_dso_load(apr_dso_handle_t **dso,
00096              const char *libname);
00097 #endif /* APR_HAS_DSO */
00098 
00099 #ifdef __cplusplus
00100 }
00101 #endif /* __cplusplus */
00102 
00103 #endif /* SVN_DSO_H */

Generated on Sat Aug 30 04:08:06 2008 for Subversion by  doxygen 1.3.9.1