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 #include "svn_string.h"
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif /* __cplusplus */
00040 
00041 /** Return, in @a *callback2 and @a *callback2_baton a function/baton that
00042  * will call @a callback/@a callback_baton, allocating the @a *callback2_baton
00043  * in @a pool.
00044  *
00045  * @note This is used by compatibility wrappers, which exist in more than
00046  * Subversion core library.
00047  *
00048  * @since New in 1.4.
00049  */
00050 void
00051 svn_compat_wrap_commit_callback(svn_commit_callback2_t *callback2,
00052                                 void **callback2_baton,
00053                                 svn_commit_callback_t callback,
00054                                 void *callback_baton,
00055                                 apr_pool_t *pool);
00056 
00057 /** Clear svn:author, svn:date, and svn:log from @a revprops if not NULL.
00058  * Use this if you must handle these three properties separately for
00059  * compatibility reasons.
00060  *
00061  * @since New in 1.5.
00062  */
00063 void
00064 svn_compat_log_revprops_clear(apr_hash_t *revprops);
00065 
00066 /** Return a list to pass to post-1.5 log-retrieval functions in order to
00067  * retrieve the pre-1.5 set of revprops: svn:author, svn:date, and svn:log.
00068  *
00069  * @since New in 1.5.
00070  */
00071 apr_array_header_t *
00072 svn_compat_log_revprops_in(apr_pool_t *pool);
00073 
00074 /** Return, in @a **author, @a **date, and @a **message, the values of the
00075  * svn:author, svn:date, and svn:log revprops from @a revprops.  If @a
00076  * revprops is NULL, all return values are NULL.  Any return value may be
00077  * NULL if the corresponding property is not set in @a revprops.
00078  *
00079  * @since New in 1.9.
00080  */
00081 void
00082 svn_compat_log_revprops_out_string(const svn_string_t **author,
00083                                    const svn_string_t **date,
00084                                    const svn_string_t **message,
00085                                    apr_hash_t *revprops);
00086 
00087 /** Simiar to svn_compat_log_revprops_out_string() but returns C-style strings
00088  * instead of #svn_string_t.
00089  *
00090  * @since New in 1.5.
00091  */
00092 void
00093 svn_compat_log_revprops_out(const char **author, const char **date,
00094                             const char **message, apr_hash_t *revprops);
00095 
00096 /** Return, in @a *receiver2 and @a *receiver2_baton a function/baton that
00097  * will call @a receiver/@a receiver_baton, allocating the @a *receiver2_baton
00098  * in @a pool.
00099  *
00100  * @note This is used by compatibility wrappers, which exist in more than
00101  * Subversion core library.
00102  *
00103  * @since New in 1.5.
00104  */
00105 void
00106 svn_compat_wrap_log_receiver(svn_log_entry_receiver_t *receiver2,
00107                              void **receiver2_baton,
00108                              svn_log_message_receiver_t receiver,
00109                              void *receiver_baton,
00110                              apr_pool_t *pool);
00111 
00112 #ifdef __cplusplus
00113 }
00114 #endif /* __cplusplus */
00115 
00116 #endif /* SVN_COMPAT_H */

Generated on Wed Dec 9 13:01:49 2015 for Subversion by  doxygen 1.4.7