Followup to r29625: fix getopt tests.
[svn.git] / subversion / include / svn_compat.h
blob9508125aff4cace4c00e2b1b35b2ad704a400dae
1 /**
2 * @copyright
3 * ====================================================================
4 * Copyright (c) 2006, 2007 CollabNet. All rights reserved.
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.
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
18 * @file svn_compat.h
19 * @brief Utilities to help applications provide backwards-compatibility
22 #ifndef SVN_COMPAT_H
23 #define SVN_COMPAT_H
25 #include <apr_pools.h>
26 #include <apr_hash.h>
27 #include <apr_tables.h>
29 #include "svn_types.h"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
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.
39 * @note This is used by compatibility wrappers, which exist in more than
40 * Subversion core library.
42 * @since New in 1.4.
44 void svn_compat_wrap_commit_callback(svn_commit_callback2_t *callback2,
45 void **callback2_baton,
46 svn_commit_callback_t callback,
47 void *callback_baton,
48 apr_pool_t *pool);
50 /** Clear svn:author, svn:date, and svn:log from @a revprops if not NULL.
51 * Use this if you must handle these three properties separately for
52 * compatibility reasons.
54 * @since New in 1.5.
56 void
57 svn_compat_log_revprops_clear(apr_hash_t *revprops);
59 /** Return a list to pass to post-1.5 log-retrieval functions in order to
60 * retrieve the pre-1.5 set of revprops: svn:author, svn:date, and svn:log.
62 * @since New in 1.5.
64 apr_array_header_t *
65 svn_compat_log_revprops_in(apr_pool_t *pool);
67 /** Return, in @a **author, @a **date, and @a **message, the values of the
68 * svn:author, svn:date, and svn:log revprops from @a revprops. If @a
69 * revprops is NULL, all return values are NULL. Any return value may be
70 * NULL if the corresponding property is not set in @a revprops.
72 * @since New in 1.5.
74 void
75 svn_compat_log_revprops_out(const char **author, const char **date,
76 const char **message, apr_hash_t *revprops);
78 /** Return, in @a *receiver2 and @a *receiver2_baton a function/baton that
79 * will call @a receiver/@a receiver_baton, allocating the @a *receiver2_baton
80 * in @a pool.
82 * @note This is used by compatibility wrappers, which exist in more than
83 * Subversion core library.
85 * @since New in 1.5.
87 void svn_compat_wrap_log_receiver(svn_log_entry_receiver_t *receiver2,
88 void **receiver2_baton,
89 svn_log_message_receiver_t receiver,
90 void *receiver_baton,
91 apr_pool_t *pool);
93 #ifdef __cplusplus
95 #endif /* __cplusplus */
97 #endif /* SVN_COMPAT_H */