Subversion 1.6.16

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