1/* uuids-table.h : internal interface to `uuids' table
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_UUIDS_TABLE_H
24#define SVN_LIBSVN_FS_UUIDS_TABLE_H
25
26#define SVN_WANT_BDB
27#include "svn_private_config.h"
28
29#include "svn_io.h"
30#include "svn_fs.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
36
37/* Open a `uuids' table in @a env.
38 *
39 * Open a `uuids' table in @a env.  If @a create is non-zero, create
40 * one if it doesn't exist.  Set @a *uuids_p to the new table.
41 * Return a Berkeley DB error code.
42 */
43int svn_fs_bdb__open_uuids_table(DB **uuids_p,
44                                 DB_ENV *env,
45                                 svn_boolean_t create);
46
47/* Get the UUID at index @a idx in the uuids table within @a fs,
48 * storing the result in @a *uuid.
49 */
50svn_error_t *svn_fs_bdb__get_uuid(svn_fs_t *fs,
51                                  int idx,
52                                  const char **uuid,
53                                  trail_t *trail,
54                                  apr_pool_t *pool);
55
56/* Set the UUID at index @a idx in the uuids table within @a fs
57 * to @a uuid.
58 */
59svn_error_t *svn_fs_bdb__set_uuid(svn_fs_t *fs,
60                                  int idx,
61                                  const char *uuid,
62                                  trail_t *trail,
63                                  apr_pool_t *pool);
64
65#ifdef __cplusplus
66}
67#endif /* __cplusplus */
68
69#endif /* SVN_LIBSVN_FS_UUIDS_TABLE_H */
70