1 /* lock-tokens-table.h : internal interface to ops on `lock-tokens' 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_LOCK_TOKENS_TABLE_H
19 #define SVN_LIBSVN_FS_LOCK_TOKENS_TABLE_H
22 #include "svn_error.h"
28 #endif /* __cplusplus */
31 /* Open a `lock-tokens' table in ENV. If CREATE is non-zero, create
32 one if it doesn't exist. Set *LOCK_TOKENS_P to the new table.
33 Return a Berkeley DB error code. */
34 int svn_fs_bdb__open_lock_tokens_table(DB
**locks_tokens_p
,
36 svn_boolean_t create
);
39 /* Add a lock-token to the `lock-tokens' table in FS, as part of TRAIL.
40 Use PATH as the key and LOCK_TOKEN as the value.
42 Warning: if PATH already exists as a key, then its value will be
45 svn_fs_bdb__lock_token_add(svn_fs_t
*fs
,
47 const char *lock_token
,
52 /* Remove the lock-token whose key is PATH from the `lock-tokens'
53 table of FS, as part of TRAIL.
55 If PATH doesn't exist as a key, return SVN_ERR_FS_NO_SUCH_LOCK.
58 svn_fs_bdb__lock_token_delete(svn_fs_t
*fs
,
64 /* Retrieve the lock-token *LOCK_TOKEN_P pointed to by PATH from the
65 `lock-tokens' table of FS, as part of TRAIL. Perform all
68 If PATH doesn't exist as a key, return SVN_ERR_FS_NO_SUCH_LOCK.
70 If PATH points to a token which points to an expired lock, return
71 SVN_ERR_FS_LOCK_EXPIRED. (After this, both the token and lock are
72 gone from their respective tables.)
74 If PATH points to a token which points to a non-existent lock,
75 return SVN_ERR_FS_BAD_LOCK_TOKEN. (After this, the token is also
76 removed from the `lock-tokens' table.)
79 svn_fs_bdb__lock_token_get(const char **lock_token_p
,
89 #endif /* __cplusplus */
91 #endif /* SVN_LIBSVN_FS_LOCK_TOKENS_TABLE_H */