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