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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
20 * ====================================================================
23 * @file svn_delta_private.h
24 * @brief The Subversion delta/diff/editor library - Internal routines
27 #ifndef SVN_DELTA_PRIVATE_H
28 #define SVN_DELTA_PRIVATE_H
30 #include <apr_pools.h>
32 #include "svn_types.h"
33 #include "svn_error.h"
34 #include "svn_delta.h"
35 #include "svn_editor.h"
39 #endif /* __cplusplus */
42 typedef svn_error_t *(*svn_delta__start_edit_func_t)(
44 svn_revnum_t base_revision);
46 typedef svn_error_t *(*svn_delta__target_revision_func_t)(
48 svn_revnum_t target_revision,
49 apr_pool_t *scratch_pool);
51 typedef svn_error_t *(*svn_delta__unlock_func_t)(
54 apr_pool_t *scratch_pool);
57 /* See svn_editor__insert_shims() for more information. */
58 struct svn_delta__extra_baton
60 svn_delta__start_edit_func_t start_edit;
61 svn_delta__target_revision_func_t target_revision;
66 /** A temporary API to convert from a delta editor to an Ev2 editor. */
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,
72 const svn_delta_editor_t *deditor,
74 svn_boolean_t *send_abs_paths,
75 const char *repos_root,
76 const char *base_relpath,
77 svn_cancel_func_t cancel_func,
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);
87 /** A temporary API to convert from an Ev2 editor to a delta editor. */
89 svn_delta__delta_from_editor(const svn_delta_editor_t **deditor,
92 svn_delta__unlock_func_t unlock_func,
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,
104 /** Read the txdelta window header from @a stream and return the total
105 length of the unparsed window data in @a *window_len. */
107 svn_txdelta__read_raw_window_len(apr_size_t *window_len,
108 svn_stream_t *stream,
111 /* Return a debug editor that wraps @a wrapped_editor.
113 * The debug editor simply prints an indication of what callbacks are being
114 * called to @c stdout, and is only intended for use in debugging subversion
117 * @a prefix, if non-null, is printed between "DBG: " and each indication.
119 * Note: Our test suite generally ignores stdout lines starting with "DBG:".
122 svn_delta__get_debug_editor(const svn_delta_editor_t **editor,
124 const svn_delta_editor_t *wrapped_editor,
132 #endif /* __cplusplus */
134 #endif /* SVN_DELTA_PRIVATE_H */