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  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements. See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership. The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License. You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied. See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_compat.h
24  * @brief Utilities to help applications provide backwards-compatibility
25  */
26 
27 #ifndef SVN_COMPAT_H
28 #define SVN_COMPAT_H
29 
30 #include <apr_pools.h>
31 #include <apr_hash.h>
32 #include <apr_tables.h>
33 
34 #include "svn_types.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif /* __cplusplus */
39 
40 /** Return, in @a *callback2 and @a *callback2_baton a function/baton that
41  * will call @a callback/@a callback_baton, allocating the @a *callback2_baton
42  * in @a pool.
43  *
44  * @note This is used by compatibility wrappers, which exist in more than
45  * Subversion core library.
46  *
47  * @since New in 1.4.
48  */
49 void
51  void **callback2_baton,
52  svn_commit_callback_t callback,
53  void *callback_baton,
54  apr_pool_t *pool);
55 
56 /** Clear svn:author, svn:date, and svn:log from @a revprops if not NULL.
57  * Use this if you must handle these three properties separately for
58  * compatibility reasons.
59  *
60  * @since New in 1.5.
61  */
62 void
63 svn_compat_log_revprops_clear(apr_hash_t *revprops);
64 
65 /** Return a list to pass to post-1.5 log-retrieval functions in order to
66  * retrieve the pre-1.5 set of revprops: svn:author, svn:date, and svn:log.
67  *
68  * @since New in 1.5.
69  */
70 apr_array_header_t *
71 svn_compat_log_revprops_in(apr_pool_t *pool);
72 
73 /** Return, in @a **author, @a **date, and @a **message, the values of the
74  * svn:author, svn:date, and svn:log revprops from @a revprops. If @a
75  * revprops is NULL, all return values are NULL. Any return value may be
76  * NULL if the corresponding property is not set in @a revprops.
77  *
78  * @since New in 1.5.
79  */
80 void
81 svn_compat_log_revprops_out(const char **author, const char **date,
82  const char **message, apr_hash_t *revprops);
83 
84 /** Return, in @a *receiver2 and @a *receiver2_baton a function/baton that
85  * will call @a receiver/@a receiver_baton, allocating the @a *receiver2_baton
86  * in @a pool.
87  *
88  * @note This is used by compatibility wrappers, which exist in more than
89  * Subversion core library.
90  *
91  * @since New in 1.5.
92  */
93 void
95  void **receiver2_baton,
97  void *receiver_baton,
98  apr_pool_t *pool);
99 
100 #ifdef __cplusplus
101 }
102 #endif /* __cplusplus */
103 
104 #endif /* SVN_COMPAT_H */
void svn_compat_log_revprops_clear(apr_hash_t *revprops)
Clear svn:author, svn:date, and svn:log from revprops if not NULL.
void svn_compat_wrap_commit_callback(svn_commit_callback2_t *callback2, void **callback2_baton, svn_commit_callback_t callback, void *callback_baton, apr_pool_t *pool)
Return, in *callback2 and *callback2_baton a function/baton that will call callback/callback_baton, allocating the *callback2_baton in pool.
apr_array_header_t * svn_compat_log_revprops_in(apr_pool_t *pool)
Return a list to pass to post-1.5 log-retrieval functions in order to retrieve the pre-1...
Subversion&#39;s data types.
void svn_compat_wrap_log_receiver(svn_log_entry_receiver_t *receiver2, void **receiver2_baton, svn_log_message_receiver_t receiver, void *receiver_baton, apr_pool_t *pool)
Return, in *receiver2 and *receiver2_baton a function/baton that will call receiver/receiver_baton, allocating the *receiver2_baton in pool.
svn_error_t *(* svn_log_message_receiver_t)(void *baton, apr_hash_t *changed_paths, svn_revnum_t revision, const char *author, const char *date, const char *message, apr_pool_t *pool)
Similar to svn_log_entry_receiver_t, except this uses separate parameters for each part of the log en...
Definition: svn_types.h:995
void svn_compat_log_revprops_out(const char **author, const char **date, const char **message, apr_hash_t *revprops)
Return, in **author, **date, and **message, the values of the svn:author, svn:date, and svn:log revprops from revprops.
svn_error_t *(* svn_log_entry_receiver_t)(void *baton, svn_log_entry_t *log_entry, apr_pool_t *pool)
The callback invoked by log message loopers, such as svn_ra_plugin_t.get_log() and svn_repos_get_logs...
Definition: svn_types.h:984
svn_error_t *(* svn_commit_callback_t)(svn_revnum_t new_revision, const char *date, const char *author, void *baton)
Same as svn_commit_callback2_t, but uses individual data elements instead of the svn_commit_info_t st...
Definition: svn_types.h:1024
svn_error_t *(* svn_commit_callback2_t)(const svn_commit_info_t *commit_info, void *baton, apr_pool_t *pool)
Callback function type for commits.
Definition: svn_types.h:1014