- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# svn_dso.h

Go to the documentation of this file.

    00001 /**
    00002  * @copyright
    00003  * ====================================================================
    00004  *    Licensed to the Apache Software Foundation (ASF) under one
    00005  *    or more contributor license agreements.  See the NOTICE file
    00006  *    distributed with this work for additional information
    00007  *    regarding copyright ownership.  The ASF licenses this file
    00008  *    to you under the Apache License, Version 2.0 (the
    00009  *    "License"); you may not use this file except in compliance
    00010  *    with the License.  You may obtain a copy of the License at
    00011  *
    00012  *      http://www.apache.org/licenses/LICENSE-2.0
    00013  *
    00014  *    Unless required by applicable law or agreed to in writing,
    00015  *    software distributed under the License is distributed on an
    00016  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    00017  *    KIND, either express or implied.  See the License for the
    00018  *    specific language governing permissions and limitations
    00019  *    under the License.
    00020  * ====================================================================
    00021  * @endcopyright
    00022  *
    00023  * @file svn_dso.h
    00024  * @brief DSO loading routines
    00025  */
    00026
    00027
    00028
    00029 #ifndef SVN_DSO_H
    00030 #define SVN_DSO_H
    00031
    00032 #include <apr_dso.h>
    00033
    00034 #include "svn_types.h"
    00035
    00036 #ifdef __cplusplus
    00037 extern "C" {
    00038 #endif /* __cplusplus */
    00039
    00040 /**
    00041  * Initialize the DSO loading routines.
    00042  *
    00043  * @note This should be called prior to the creation of any pool that
    00044  *       is passed to a function that comes from a DSO, otherwise you
    00045  *       risk having the DSO unloaded before all pool cleanup callbacks
    00046  *       that live in the DSO have been executed.  If it is not called
    00047  *       prior to @c svn_dso_load being used for the first time there
    00048  *       will be a best effort attempt made to initialize the subsystem,
    00049  *       but it will not be entirely thread safe and it risks running
    00050  *       into the previously mentioned problems with DSO unloading and
    00051  *       pool cleanup callbacks.
    00052  *
    00053  * Returns svn_error_t object with corresponding apr_err returned by
    00054  * underlying calls. In case of no error returns @c SVN_NO_ERROR.
    00055  *
    00056  * @since New in 1.6.
    00057  */
    00058 svn_error_t *
    00059 svn_dso_initialize2(void);
    00060
    00061 /** The same as svn_dso_initialize2(), except that if there is an error this
    00062  * calls abort() instead of returning the error.
    00063  *
    00064  * @deprecated Provided for backwards compatibility with the 1.5 API.
    00065  *
    00066  * @since New in 1.4.
    00067  */
    00068 SVN_DEPRECATED
    00069 void
    00070 svn_dso_initialize(void);
    00071
    00072
    00073 #if APR_HAS_DSO
    00074
    00075 /**
    00076  * Attempt to load @a libname, returning it in @a *dso.
    00077  *
    00078  * If @a libname cannot be loaded set @a *dso to NULL and return
    00079  * @c SVN_NO_ERROR.
    00080  *
    00081  * @note Due to pool lifetime issues DSOs are all loaded into a global
    00082  *       pool, so you must be certain that there is a bounded number of
    00083  *       them that will ever be loaded by the system, otherwise you will
    00084  *       leak memory.
    00085  *
    00086  * @since New in 1.4.
    00087  */
    00088 svn_error_t *
    00089 svn_dso_load(apr_dso_handle_t **dso,
    00090              const char *libname);
    00091
    00092 #endif /* APR_HAS_DSO */
    00093
    00094
    00095 #ifdef __cplusplus
    00096 }
    00097 #endif /* __cplusplus */
    00098
    00099 #endif /* SVN_DSO_H */

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines