Fix compiler warning due to missing function prototype.
[svn.git] / subversion / libsvn_fs_base / bdb / txn-table.h
blobe0cf534f7c26510f62e1d9cacf1ae8b22977ec2b
1 /* txn-table.h : internal interface to ops on `transactions' table
3 * ====================================================================
4 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
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.
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 * ====================================================================
18 #ifndef SVN_LIBSVN_FS_TXN_TABLE_H
19 #define SVN_LIBSVN_FS_TXN_TABLE_H
21 #include "svn_fs.h"
22 #include "svn_error.h"
23 #include "../trail.h"
24 #include "../fs.h"
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
31 /* Open a `transactions' table in ENV. If CREATE is non-zero, create
32 one if it doesn't exist. Set *TRANSACTIONS_P to the new table.
33 Return a Berkeley DB error code. */
34 int svn_fs_bdb__open_transactions_table(DB **transactions_p,
35 DB_ENV *env,
36 svn_boolean_t create);
39 /* Create a new transaction in FS as part of TRAIL, with an initial
40 root and base root ID of ROOT_ID. Set *TXN_NAME_P to the name of the
41 new transaction, allocated in POOL. */
42 svn_error_t *svn_fs_bdb__create_txn(const char **txn_name_p,
43 svn_fs_t *fs,
44 const svn_fs_id_t *root_id,
45 trail_t *trail,
46 apr_pool_t *pool);
49 /* Remove the transaction whose name is TXN_NAME from the `transactions'
50 table of FS, as part of TRAIL.
52 Returns SVN_ERR_FS_TRANSACTION_NOT_MUTABLE if TXN_NAME refers to a
53 transaction that has already been committed. */
54 svn_error_t *svn_fs_bdb__delete_txn(svn_fs_t *fs,
55 const char *txn_name,
56 trail_t *trail,
57 apr_pool_t *pool);
60 /* Retrieve the transaction *TXN_P for the Subversion transaction
61 named TXN_NAME from the `transactions' table of FS, as part of
62 TRAIL. Perform all allocations in POOL.
64 If there is no such transaction, SVN_ERR_FS_NO_SUCH_TRANSACTION is
65 the error returned. */
66 svn_error_t *svn_fs_bdb__get_txn(transaction_t **txn_p,
67 svn_fs_t *fs,
68 const char *txn_name,
69 trail_t *trail,
70 apr_pool_t *pool);
73 /* Store the Suversion transaction TXN in FS with an ID of TXN_NAME as
74 part of TRAIL. */
75 svn_error_t *svn_fs_bdb__put_txn(svn_fs_t *fs,
76 const transaction_t *txn,
77 const char *txn_name,
78 trail_t *trail,
79 apr_pool_t *pool);
82 /* Set *NAMES_P to an array of const char * IDs (unfinished
83 transactions in FS) as part of TRAIL. Allocate the array and the
84 names in POOL, and use POOL for any temporary allocations. */
85 svn_error_t *svn_fs_bdb__get_txn_list(apr_array_header_t **names_p,
86 svn_fs_t *fs,
87 trail_t *trail,
88 apr_pool_t *pool);
91 #ifdef __cplusplus
93 #endif /* __cplusplus */
95 #endif /* SVN_LIBSVN_FS_TXN_TABLE_H */