Mark many merge tests as skip-against-old-server.
[svn.git] / subversion / libsvn_fs_base / id.h
blob1afc0233a80c1e931814b70d34f0fe7cff3a0f6d
1 /* id.h : interface to node ID functions, private to libsvn_fs_base
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_BASE_ID_H
19 #define SVN_LIBSVN_FS_BASE_ID_H
21 #include "svn_fs.h"
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
28 /*** ID accessor functions. ***/
30 /* Get the "node id" portion of ID. */
31 const char *svn_fs_base__id_node_id(const svn_fs_id_t *id);
33 /* Get the "copy id" portion of ID. */
34 const char *svn_fs_base__id_copy_id(const svn_fs_id_t *id);
36 /* Get the "txn id" portion of ID. */
37 const char *svn_fs_base__id_txn_id(const svn_fs_id_t *id);
39 /* Convert ID into string form, allocated in POOL. */
40 svn_string_t *svn_fs_base__id_unparse(const svn_fs_id_t *id,
41 apr_pool_t *pool);
43 /* Return true if A and B are equal. */
44 svn_boolean_t svn_fs_base__id_eq(const svn_fs_id_t *a,
45 const svn_fs_id_t *b);
47 /* Return true if A and B are related. */
48 svn_boolean_t svn_fs_base__id_check_related(const svn_fs_id_t *a,
49 const svn_fs_id_t *b);
51 /* Return 0 if A and B are equal, 1 if they are related, -1 otherwise. */
52 int svn_fs_base__id_compare(const svn_fs_id_t *a,
53 const svn_fs_id_t *b);
55 /* Create an ID based on NODE_ID, COPY_ID, and TXN_ID, allocated in
56 POOL. */
57 svn_fs_id_t *svn_fs_base__id_create(const char *node_id,
58 const char *copy_id,
59 const char *txn_id,
60 apr_pool_t *pool);
62 /* Return a copy of ID, allocated from POOL. */
63 svn_fs_id_t *svn_fs_base__id_copy(const svn_fs_id_t *id,
64 apr_pool_t *pool);
66 /* Return an ID resulting from parsing the string DATA (with length
67 LEN), or NULL if DATA is an invalid ID string. */
68 svn_fs_id_t *svn_fs_base__id_parse(const char *data,
69 apr_size_t len,
70 apr_pool_t *pool);
72 #ifdef __cplusplus
74 #endif /* __cplusplus */
76 #endif /* SVN_LIBSVN_FS_ID_H */