Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_compat.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Copyright (c) 2006-2008 CollabNet. All rights reserved.
5  *
6  * This software is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution. The terms
8  * are also available at http://subversion.tigris.org/license-1.html.
9  * If newer versions of this license are posted there, you may use a
10  * newer version instead, at your option.
11  *
12  * This software consists of voluntary contributions made by many
13  * individuals. For exact contribution history, see the revision
14  * history and logs, available at http://subversion.tigris.org/.
15  * ====================================================================
16  * @endcopyright
17  *
18  * @file svn_compat.h
19  * @brief Utilities to help applications provide backwards-compatibility
20  */
21 
22 #ifndef SVN_COMPAT_H
23 #define SVN_COMPAT_H
24 
25 #include <apr_pools.h>
26 #include <apr_hash.h>
27 #include <apr_tables.h>
28 
29 #include "svn_types.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34 
35 /** Return, in @a *callback2 and @a *callback2_baton a function/baton that
36  * will call @a callback/@a callback_baton, allocating the @a *callback2_baton
37  * in @a pool.
38  *
39  * @note This is used by compatibility wrappers, which exist in more than
40  * Subversion core library.
41  *
42  * @since New in 1.4.
43  */
44 void
46  void **callback2_baton,
47  svn_commit_callback_t callback,
48  void *callback_baton,
49  apr_pool_t *pool);
50 
51 /** Clear svn:author, svn:date, and svn:log from @a revprops if not NULL.
52  * Use this if you must handle these three properties separately for
53  * compatibility reasons.
54  *
55  * @since New in 1.5.
56  */
57 void
58 svn_compat_log_revprops_clear(apr_hash_t *revprops);
59 
60 /** Return a list to pass to post-1.5 log-retrieval functions in order to
61  * retrieve the pre-1.5 set of revprops: svn:author, svn:date, and svn:log.
62  *
63  * @since New in 1.5.
64  */
65 apr_array_header_t *
66 svn_compat_log_revprops_in(apr_pool_t *pool);
67 
68 /** Return, in @a **author, @a **date, and @a **message, the values of the
69  * svn:author, svn:date, and svn:log revprops from @a revprops. If @a
70  * revprops is NULL, all return values are NULL. Any return value may be
71  * NULL if the corresponding property is not set in @a revprops.
72  *
73  * @since New in 1.5.
74  */
75 void
76 svn_compat_log_revprops_out(const char **author, const char **date,
77  const char **message, apr_hash_t *revprops);
78 
79 /** Return, in @a *receiver2 and @a *receiver2_baton a function/baton that
80  * will call @a receiver/@a receiver_baton, allocating the @a *receiver2_baton
81  * in @a pool.
82  *
83  * @note This is used by compatibility wrappers, which exist in more than
84  * Subversion core library.
85  *
86  * @since New in 1.5.
87  */
88 void
90  void **receiver2_baton,
92  void *receiver_baton,
93  apr_pool_t *pool);
94 
95 #ifdef __cplusplus
96 }
97 #endif /* __cplusplus */
98 
99 #endif /* SVN_COMPAT_H */