svn_compat.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  * Copyright (c) 2006, 2007 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 svn_compat_wrap_commit_callback(svn_commit_callback2_t *callback2,
00045                                      void **callback2_baton,
00046                                      svn_commit_callback_t callback,
00047                                      void *callback_baton,
00048                                      apr_pool_t *pool);
00049 
00050 /** Clear svn:author, svn:date, and svn:log from @a revprops if not NULL.
00051  * Use this if you must handle these three properties separately for
00052  * compatibility reasons.
00053  *
00054  * @since New in 1.5.
00055  */
00056 void
00057 svn_compat_log_revprops_clear(apr_hash_t *revprops);
00058 
00059 /** Return a list to pass to post-1.5 log-retrieval functions in order to
00060  * retrieve the pre-1.5 set of revprops: svn:author, svn:date, and svn:log.
00061  *
00062  * @since New in 1.5.
00063  */
00064 apr_array_header_t *
00065 svn_compat_log_revprops_in(apr_pool_t *pool);
00066 
00067 /** Return, in @a **author, @a **date, and @a **message, the values of the
00068  * svn:author, svn:date, and svn:log revprops from @a revprops.  If @a
00069  * revprops is NULL, all return values are NULL.  Any return value may be
00070  * NULL if the corresponding property is not set in @a revprops.
00071  *
00072  * @since New in 1.5.
00073  */
00074 void
00075 svn_compat_log_revprops_out(const char **author, const char **date,
00076                             const char **message, apr_hash_t *revprops);
00077 
00078 /** Return, in @a *receiver2 and @a *receiver2_baton a function/baton that
00079  * will call @a receiver/@a receiver_baton, allocating the @a *receiver2_baton
00080  * in @a pool.
00081  *
00082  * @note This is used by compatibility wrappers, which exist in more than
00083  * Subversion core library.
00084  *
00085  * @since New in 1.5.
00086  */
00087 void svn_compat_wrap_log_receiver(svn_log_entry_receiver_t *receiver2,
00088                                   void **receiver2_baton,
00089                                   svn_log_message_receiver_t receiver,
00090                                   void *receiver_baton,
00091                                   apr_pool_t *pool);
00092 
00093 #ifdef __cplusplus
00094 }
00095 #endif /* __cplusplus */
00096 
00097 #endif /* SVN_COMPAT_H */

Generated on Sun Dec 21 19:08:26 2008 for Subversion by  doxygen 1.3.9.1