]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/subversion/subversion/include/private/svn_delta_private.h
MFC r275385 (by bapt):
[FreeBSD/stable/10.git] / contrib / subversion / subversion / include / private / svn_delta_private.h
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_delta_private.h
24  * @brief The Subversion delta/diff/editor library - Internal routines
25  */
26
27 #ifndef SVN_DELTA_PRIVATE_H
28 #define SVN_DELTA_PRIVATE_H
29
30 #include <apr_pools.h>
31
32 #include "svn_types.h"
33 #include "svn_error.h"
34 #include "svn_delta.h"
35 #include "svn_editor.h"
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif /* __cplusplus */
40
41
42 typedef svn_error_t *(*svn_delta__start_edit_func_t)(
43   void *baton,
44   svn_revnum_t base_revision);
45
46 typedef svn_error_t *(*svn_delta__target_revision_func_t)(
47   void *baton,
48   svn_revnum_t target_revision,
49   apr_pool_t *scratch_pool);
50
51 typedef svn_error_t *(*svn_delta__unlock_func_t)(
52   void *baton,
53   const char *path,
54   apr_pool_t *scratch_pool);
55
56
57 /* See svn_editor__insert_shims() for more information. */
58 struct svn_delta__extra_baton
59 {
60   svn_delta__start_edit_func_t start_edit;
61   svn_delta__target_revision_func_t target_revision;
62   void *baton;
63 };
64
65
66 /** A temporary API to convert from a delta editor to an Ev2 editor. */
67 svn_error_t *
68 svn_delta__editor_from_delta(svn_editor_t **editor_p,
69                              struct svn_delta__extra_baton **exb,
70                              svn_delta__unlock_func_t *unlock_func,
71                              void **unlock_baton,
72                              const svn_delta_editor_t *deditor,
73                              void *dedit_baton,
74                              svn_boolean_t *send_abs_paths,
75                              const char *repos_root,
76                              const char *base_relpath,
77                              svn_cancel_func_t cancel_func,
78                              void *cancel_baton,
79                              svn_delta_fetch_kind_func_t fetch_kind_func,
80                              void *fetch_kind_baton,
81                              svn_delta_fetch_props_func_t fetch_props_func,
82                              void *fetch_props_baton,
83                              apr_pool_t *result_pool,
84                              apr_pool_t *scratch_pool);
85
86
87 /** A temporary API to convert from an Ev2 editor to a delta editor. */
88 svn_error_t *
89 svn_delta__delta_from_editor(const svn_delta_editor_t **deditor,
90                              void **dedit_baton,
91                              svn_editor_t *editor,
92                              svn_delta__unlock_func_t unlock_func,
93                              void *unlock_baton,
94                              svn_boolean_t *found_abs_paths,
95                              const char *repos_root,
96                              const char *base_relpath,
97                              svn_delta_fetch_props_func_t fetch_props_func,
98                              void *fetch_props_baton,
99                              svn_delta_fetch_base_func_t fetch_base_func,
100                              void *fetch_base_baton,
101                              struct svn_delta__extra_baton *exb,
102                              apr_pool_t *pool);
103
104 /** Read the txdelta window header from @a stream and return the total
105     length of the unparsed window data in @a *window_len. */
106 svn_error_t *
107 svn_txdelta__read_raw_window_len(apr_size_t *window_len,
108                                  svn_stream_t *stream,
109                                  apr_pool_t *pool);
110
111 #ifdef __cplusplus
112 }
113 #endif /* __cplusplus */
114
115 #endif /* SVN_DELTA_PRIVATE_H */