Subversion
svn_compat.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_compat.h
00024  * @brief Utilities to help applications provide backwards-compatibility
00025  */
00026 
00027 #ifndef SVN_COMPAT_H
00028 #define SVN_COMPAT_H
00029 
00030 #include <apr_pools.h>
00031 #include <apr_hash.h>
00032 #include <apr_tables.h>
00033 
00034 #include "svn_types.h"
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif /* __cplusplus */
00039 
00040 /** Return, in @a *callback2 and @a *callback2_baton a function/baton that
00041  * will call @a callback/@a callback_baton, allocating the @a *callback2_baton
00042  * in @a pool.
00043  *
00044  * @note This is used by compatibility wrappers, which exist in more than
00045  * Subversion core library.
00046  *
00047  * @since New in 1.4.
00048  */
00049 void
00050 svn_compat_wrap_commit_callback(svn_commit_callback2_t *callback2,
00051                                 void **callback2_baton,
00052                                 svn_commit_callback_t callback,
00053                                 void *callback_baton,
00054                                 apr_pool_t *pool);
00055 
00056 /** Clear svn:author, svn:date, and svn:log from @a revprops if not NULL.
00057  * Use this if you must handle these three properties separately for
00058  * compatibility reasons.
00059  *
00060  * @since New in 1.5.
00061  */
00062 void
00063 svn_compat_log_revprops_clear(apr_hash_t *revprops);
00064 
00065 /** Return a list to pass to post-1.5 log-retrieval functions in order to
00066  * retrieve the pre-1.5 set of revprops: svn:author, svn:date, and svn:log.
00067  *
00068  * @since New in 1.5.
00069  */
00070 apr_array_header_t *
00071 svn_compat_log_revprops_in(apr_pool_t *pool);
00072 
00073 /** Return, in @a **author, @a **date, and @a **message, the values of the
00074  * svn:author, svn:date, and svn:log revprops from @a revprops.  If @a
00075  * revprops is NULL, all return values are NULL.  Any return value may be
00076  * NULL if the corresponding property is not set in @a revprops.
00077  *
00078  * @since New in 1.5.
00079  */
00080 void
00081 svn_compat_log_revprops_out(const char **author, const char **date,
00082                             const char **message, apr_hash_t *revprops);
00083 
00084 /** Return, in @a *receiver2 and @a *receiver2_baton a function/baton that
00085  * will call @a receiver/@a receiver_baton, allocating the @a *receiver2_baton
00086  * in @a pool.
00087  *
00088  * @note This is used by compatibility wrappers, which exist in more than
00089  * Subversion core library.
00090  *
00091  * @since New in 1.5.
00092  */
00093 void
00094 svn_compat_wrap_log_receiver(svn_log_entry_receiver_t *receiver2,
00095                              void **receiver2_baton,
00096                              svn_log_message_receiver_t receiver,
00097                              void *receiver_baton,
00098                              apr_pool_t *pool);
00099 
00100 #ifdef __cplusplus
00101 }
00102 #endif /* __cplusplus */
00103 
00104 #endif /* SVN_COMPAT_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines