1 /*
2  *      rsvndump - remote svn repository dump
3  *      Copyright (C) 2008-2012 Jonas Gehring
4  *
5  *      This program is free software: you can redistribute it and/or modify
6  *      it under the terms of the GNU General Public License as published by
7  *      the Free Software Foundation, either version 3 of the License, or
8  *      (at your option) any later version.
9  *
10  *      This program is distributed in the hope that it will be useful,
11  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *      GNU General Public License for more details.
14  *
15  *      You should have received a copy of the GNU General Public License
16  *      along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  *
19  *      file: delta.h
20  *      desc: The delta editor
21  */
22 
23 
24 #ifndef DELTA_H_
25 #define DELTA_H_
26 
27 
28 #include <svn_types.h>
29 
30 #include <apr_tables.h>
31 
32 #include "dump.h"
33 #include "log.h"
34 #include "session.h"
35 
36 
37 /* Bundles information passed to delta_setup_editor() */
38 typedef struct {
39 	session_t *session;
40 	dump_options_t *options;
41 	struct path_repo_t *path_repo;
42 	struct property_storage_t *property_storage;
43 	apr_array_header_t *logs;
44 } delta_editor_info_t;
45 
46 
47 /* Determines the local copyfrom_path (returns NULL if it can't be reached) */
48 const char *delta_get_local_copyfrom_path(const char *prefix, const char *path);
49 
50 /* Determines the local copyfrom_revision number */
51 svn_revnum_t delta_get_local_copyfrom_rev(svn_revnum_t original, dump_options_t *opts, apr_array_header_t *logs, svn_revnum_t local_revnum);
52 
53 /* Sets up a delta editor for dumping a revision */
54 extern void delta_setup_editor(delta_editor_info_t *info, log_revision_t *log_revision, svn_revnum_t local_revnum, svn_delta_editor_t **editor, void **editor_baton, apr_pool_t *pool);
55 
56 /* Cleans up global resources */
57 extern void delta_cleanup();
58 
59 
60 #endif
61