1251881Speter/* tree.h : internal interface to tree node functions 2251881Speter * 3251881Speter * ==================================================================== 4251881Speter * Licensed to the Apache Software Foundation (ASF) under one 5251881Speter * or more contributor license agreements. See the NOTICE file 6251881Speter * distributed with this work for additional information 7251881Speter * regarding copyright ownership. The ASF licenses this file 8251881Speter * to you under the Apache License, Version 2.0 (the 9251881Speter * "License"); you may not use this file except in compliance 10251881Speter * with the License. You may obtain a copy of the License at 11251881Speter * 12251881Speter * http://www.apache.org/licenses/LICENSE-2.0 13251881Speter * 14251881Speter * Unless required by applicable law or agreed to in writing, 15251881Speter * software distributed under the License is distributed on an 16251881Speter * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17251881Speter * KIND, either express or implied. See the License for the 18251881Speter * specific language governing permissions and limitations 19251881Speter * under the License. 20251881Speter * ==================================================================== 21251881Speter */ 22251881Speter 23251881Speter#ifndef SVN_LIBSVN_FS_TREE_H 24251881Speter#define SVN_LIBSVN_FS_TREE_H 25251881Speter 26251881Speter#ifdef __cplusplus 27251881Speterextern "C" { 28251881Speter#endif /* __cplusplus */ 29251881Speter 30251881Speter#include "svn_props.h" 31251881Speter 32251881Speter 33251881Speter 34251881Speter/* These functions implement some of the calls in the FS loader 35251881Speter library's fs and txn vtables. */ 36251881Speter 37251881Spetersvn_error_t *svn_fs_base__revision_root(svn_fs_root_t **root_p, svn_fs_t *fs, 38251881Speter svn_revnum_t rev, apr_pool_t *pool); 39251881Speter 40251881Spetersvn_error_t *svn_fs_base__deltify(svn_fs_t *fs, svn_revnum_t rev, 41251881Speter apr_pool_t *pool); 42251881Speter 43251881Spetersvn_error_t *svn_fs_base__commit_txn(const char **conflict_p, 44251881Speter svn_revnum_t *new_rev, svn_fs_txn_t *txn, 45251881Speter apr_pool_t *pool); 46251881Speter 47251881Spetersvn_error_t *svn_fs_base__txn_root(svn_fs_root_t **root_p, svn_fs_txn_t *txn, 48251881Speter apr_pool_t *pool); 49251881Speter 50251881Speter 51251881Speter 52251881Speter/* Inserting and retrieving miscellany records in the fs */ 53251881Speter 54251881Speter/* Set the value of miscellaneous records KEY to VAL in FS. To remove 55251881Speter a value altogether, pass NULL for VAL. 56251881Speter 57251881Speter KEY and VAL should be NULL-terminated strings. */ 58251881Spetersvn_error_t * 59251881Spetersvn_fs_base__miscellaneous_set(svn_fs_t *fs, 60251881Speter const char *key, 61251881Speter const char *val, 62251881Speter apr_pool_t *pool); 63251881Speter 64251881Speter/* Retrieve the miscellany records for KEY into *VAL for FS, allocated 65251881Speter in POOL. If the fs doesn't support miscellany storage, or the value 66251881Speter does not exist, *VAL is set to NULL. 67251881Speter 68251881Speter KEY should be a NULL-terminated string. */ 69251881Spetersvn_error_t * 70251881Spetersvn_fs_base__miscellaneous_get(const char **val, 71251881Speter svn_fs_t *fs, 72251881Speter const char *key, 73251881Speter apr_pool_t *pool); 74251881Speter 75251881Speter 76251881Speter 77251881Speter 78251881Speter 79251881Speter/* Helper func: in the context of TRAIL, return the KIND of PATH in 80251881Speter head revision. If PATH doesn't exist, set *KIND to svn_node_none.*/ 81251881Spetersvn_error_t *svn_fs_base__get_path_kind(svn_node_kind_t *kind, 82251881Speter const char *path, 83251881Speter trail_t *trail, 84251881Speter apr_pool_t *pool); 85251881Speter 86251881Speter/* Helper func: in the context of TRAIL, set *REV to the created-rev 87251881Speter of PATH in head revision. If PATH doesn't exist, set *REV to 88251881Speter SVN_INVALID_REVNUM. */ 89251881Spetersvn_error_t *svn_fs_base__get_path_created_rev(svn_revnum_t *rev, 90251881Speter const char *path, 91251881Speter trail_t *trail, 92251881Speter apr_pool_t *pool); 93251881Speter 94251881Speter 95251881Speter#ifdef __cplusplus 96251881Speter} 97251881Speter#endif /* __cplusplus */ 98251881Speter 99251881Speter#endif /* SVN_LIBSVN_FS_TREE_H */ 100