1 /* reps-table.h : internal interface to `representations' table
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 #ifndef SVN_LIBSVN_FS_REPS_TABLE_H
24 #define SVN_LIBSVN_FS_REPS_TABLE_H
27 #include "svn_private_config.h"
36 #endif /* __cplusplus */
39 /*** Creating the `representations' table. ***/
41 /* Open a `representations' table in ENV. If CREATE is non-zero,
42 create one if it doesn't exist. Set *REPS_P to the new table.
43 Return a Berkeley DB error code. */
44 int svn_fs_bdb__open_reps_table(DB **reps_p,
46 svn_boolean_t create);
50 /*** Storing and retrieving reps. ***/
52 /* Set *REP_P to point to the representation for the key KEY in
53 FS, as part of TRAIL. Perform all allocations in POOL.
55 If KEY is not a representation in FS, the error
56 SVN_ERR_FS_NO_SUCH_REPRESENTATION is returned. */
57 svn_error_t *svn_fs_bdb__read_rep(representation_t **rep_p,
64 /* Store REP as the representation for KEY in FS, as part of
65 TRAIL. Do any necessary temporary allocation in POOL. */
66 svn_error_t *svn_fs_bdb__write_rep(svn_fs_t *fs,
68 const representation_t *rep,
73 /* Store REP as a new representation in FS, and the new rep's key in
74 *KEY, as part of trail. The new key is allocated in POOL. */
75 svn_error_t *svn_fs_bdb__write_new_rep(const char **key,
77 const representation_t *rep,
81 /* Delete representation KEY from FS, as part of TRAIL.
82 WARNING: This does not ensure that no one references this
83 representation! Callers should ensure that themselves. */
84 svn_error_t *svn_fs_bdb__delete_rep(svn_fs_t *fs,
92 #endif /* __cplusplus */
94 #endif /* SVN_LIBSVN_FS_REPS_TABLE_H */