1251881Speter/** 2251881Speter * @copyright 3251881Speter * ==================================================================== 4251881Speter * Licensed to the Apache Software Foundation (ASF) under one 5251881Speter * or more contributor license agreements. See the NOTICE file 6251881Speter * distributed with this work for additional information 7251881Speter * regarding copyright ownership. The ASF licenses this file 8251881Speter * to you under the Apache License, Version 2.0 (the 9251881Speter * "License"); you may not use this file except in compliance 10251881Speter * with the License. You may obtain a copy of the License at 11251881Speter * 12251881Speter * http://www.apache.org/licenses/LICENSE-2.0 13251881Speter * 14251881Speter * Unless required by applicable law or agreed to in writing, 15251881Speter * software distributed under the License is distributed on an 16251881Speter * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17251881Speter * KIND, either express or implied. See the License for the 18251881Speter * specific language governing permissions and limitations 19251881Speter * under the License. 20251881Speter * ==================================================================== 21251881Speter * @endcopyright 22251881Speter * 23251881Speter * @file svn_compat.h 24251881Speter * @brief Utilities to help applications provide backwards-compatibility 25251881Speter */ 26251881Speter 27251881Speter#ifndef SVN_COMPAT_H 28251881Speter#define SVN_COMPAT_H 29251881Speter 30251881Speter#include <apr_pools.h> 31251881Speter#include <apr_hash.h> 32251881Speter#include <apr_tables.h> 33251881Speter 34251881Speter#include "svn_types.h" 35289180Speter#include "svn_string.h" 36251881Speter 37251881Speter#ifdef __cplusplus 38251881Speterextern "C" { 39251881Speter#endif /* __cplusplus */ 40251881Speter 41251881Speter/** Return, in @a *callback2 and @a *callback2_baton a function/baton that 42251881Speter * will call @a callback/@a callback_baton, allocating the @a *callback2_baton 43251881Speter * in @a pool. 44251881Speter * 45251881Speter * @note This is used by compatibility wrappers, which exist in more than 46251881Speter * Subversion core library. 47251881Speter * 48251881Speter * @since New in 1.4. 49251881Speter */ 50251881Spetervoid 51251881Spetersvn_compat_wrap_commit_callback(svn_commit_callback2_t *callback2, 52251881Speter void **callback2_baton, 53251881Speter svn_commit_callback_t callback, 54251881Speter void *callback_baton, 55251881Speter apr_pool_t *pool); 56251881Speter 57251881Speter/** Clear svn:author, svn:date, and svn:log from @a revprops if not NULL. 58251881Speter * Use this if you must handle these three properties separately for 59251881Speter * compatibility reasons. 60251881Speter * 61251881Speter * @since New in 1.5. 62251881Speter */ 63251881Spetervoid 64251881Spetersvn_compat_log_revprops_clear(apr_hash_t *revprops); 65251881Speter 66251881Speter/** Return a list to pass to post-1.5 log-retrieval functions in order to 67251881Speter * retrieve the pre-1.5 set of revprops: svn:author, svn:date, and svn:log. 68251881Speter * 69251881Speter * @since New in 1.5. 70251881Speter */ 71251881Speterapr_array_header_t * 72251881Spetersvn_compat_log_revprops_in(apr_pool_t *pool); 73251881Speter 74251881Speter/** Return, in @a **author, @a **date, and @a **message, the values of the 75251881Speter * svn:author, svn:date, and svn:log revprops from @a revprops. If @a 76251881Speter * revprops is NULL, all return values are NULL. Any return value may be 77251881Speter * NULL if the corresponding property is not set in @a revprops. 78251881Speter * 79289180Speter * @since New in 1.9. 80289180Speter */ 81289180Spetervoid 82289180Spetersvn_compat_log_revprops_out_string(const svn_string_t **author, 83289180Speter const svn_string_t **date, 84289180Speter const svn_string_t **message, 85289180Speter apr_hash_t *revprops); 86289180Speter 87289180Speter/** Simiar to svn_compat_log_revprops_out_string() but returns C-style strings 88289180Speter * instead of #svn_string_t. 89289180Speter * 90251881Speter * @since New in 1.5. 91251881Speter */ 92251881Spetervoid 93251881Spetersvn_compat_log_revprops_out(const char **author, const char **date, 94251881Speter const char **message, apr_hash_t *revprops); 95251881Speter 96251881Speter/** Return, in @a *receiver2 and @a *receiver2_baton a function/baton that 97251881Speter * will call @a receiver/@a receiver_baton, allocating the @a *receiver2_baton 98251881Speter * in @a pool. 99251881Speter * 100251881Speter * @note This is used by compatibility wrappers, which exist in more than 101251881Speter * Subversion core library. 102251881Speter * 103251881Speter * @since New in 1.5. 104251881Speter */ 105251881Spetervoid 106251881Spetersvn_compat_wrap_log_receiver(svn_log_entry_receiver_t *receiver2, 107251881Speter void **receiver2_baton, 108251881Speter svn_log_message_receiver_t receiver, 109251881Speter void *receiver_baton, 110251881Speter apr_pool_t *pool); 111251881Speter 112251881Speter#ifdef __cplusplus 113251881Speter} 114251881Speter#endif /* __cplusplus */ 115251881Speter 116251881Speter#endif /* SVN_COMPAT_H */ 117