1 | /* tree.h : internal interface to tree node functions |
---|
2 | * |
---|
3 | * ==================================================================== |
---|
4 | * Copyright (c) 2000-2006 CollabNet. All rights reserved. |
---|
5 | * |
---|
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. |
---|
11 | * |
---|
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 | */ |
---|
17 | |
---|
18 | #ifndef SVN_LIBSVN_FS_TREE_H |
---|
19 | #define SVN_LIBSVN_FS_TREE_H |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif /* __cplusplus */ |
---|
24 | |
---|
25 | #include "svn_props.h" |
---|
26 | |
---|
27 | |
---|
28 | |
---|
29 | /* These functions implement some of the calls in the FS loader |
---|
30 | library's fs and txn vtables. */ |
---|
31 | |
---|
32 | svn_error_t *svn_fs_base__revision_root(svn_fs_root_t **root_p, svn_fs_t *fs, |
---|
33 | svn_revnum_t rev, apr_pool_t *pool); |
---|
34 | |
---|
35 | svn_error_t *svn_fs_base__deltify(svn_fs_t *fs, svn_revnum_t rev, |
---|
36 | apr_pool_t *pool); |
---|
37 | |
---|
38 | svn_error_t *svn_fs_base__commit_txn(const char **conflict_p, |
---|
39 | svn_revnum_t *new_rev, svn_fs_txn_t *txn, |
---|
40 | apr_pool_t *pool); |
---|
41 | |
---|
42 | svn_error_t *svn_fs_base__txn_root(svn_fs_root_t **root_p, svn_fs_txn_t *txn, |
---|
43 | apr_pool_t *pool); |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | /* Inserting and retrieving miscellany records in the fs */ |
---|
48 | |
---|
49 | /* Set the value of miscellaneous records KEY to VAL in FS. To remove |
---|
50 | a value altogether, pass NULL for VAL. |
---|
51 | |
---|
52 | KEY and VAL should be NULL-terminated strings. */ |
---|
53 | svn_error_t * |
---|
54 | svn_fs_base__miscellaneous_set(svn_fs_t *fs, |
---|
55 | const char *key, |
---|
56 | const char *val, |
---|
57 | apr_pool_t *pool); |
---|
58 | |
---|
59 | /* Retrieve the miscellany records for KEY into *VAL for FS, allocated |
---|
60 | in POOL. If the fs doesn't support miscellany storage, or the value |
---|
61 | does not exist, *VAL is set to NULL. |
---|
62 | |
---|
63 | KEY should be a NULL-terminated string. */ |
---|
64 | svn_error_t * |
---|
65 | svn_fs_base__miscellaneous_get(const char **val, |
---|
66 | svn_fs_t *fs, |
---|
67 | const char *key, |
---|
68 | apr_pool_t *pool); |
---|
69 | |
---|
70 | |
---|
71 | |
---|
72 | |
---|
73 | |
---|
74 | /* Helper func: in the context of TRAIL, return the KIND of PATH in |
---|
75 | head revision. If PATH doesn't exist, set *KIND to svn_node_none.*/ |
---|
76 | svn_error_t *svn_fs_base__get_path_kind(svn_node_kind_t *kind, |
---|
77 | const char *path, |
---|
78 | trail_t *trail, |
---|
79 | apr_pool_t *pool); |
---|
80 | |
---|
81 | /* Helper func: in the context of TRAIL, set *REV to the created-rev |
---|
82 | of PATH in head revision. If PATH doesn't exist, set *REV to |
---|
83 | SVN_INVALID_REVNUM. */ |
---|
84 | svn_error_t *svn_fs_base__get_path_created_rev(svn_revnum_t *rev, |
---|
85 | const char *path, |
---|
86 | trail_t *trail, |
---|
87 | apr_pool_t *pool); |
---|
88 | |
---|
89 | |
---|
90 | #ifdef __cplusplus |
---|
91 | } |
---|
92 | #endif /* __cplusplus */ |
---|
93 | |
---|
94 | #endif /* SVN_LIBSVN_FS_TREE_H */ |
---|