Mark many merge tests as skip-against-old-server.
[svn.git] / subversion / libsvn_fs_base / util / fs_skels.h
blobe1a956a1fa0faf0291343f8afb443be0b6fb03c8
1 /* fs_skels.h : headers for conversion between fs native types and
2 * skeletons
4 * ====================================================================
5 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
19 #ifndef SVN_LIBSVN_FS_FS_SKELS_H
20 #define SVN_LIBSVN_FS_FS_SKELS_H
22 #define APU_WANT_DB
23 #include <apu_want.h>
25 #include <apr_pools.h>
26 #include <apr_hash.h>
28 #include "svn_fs.h"
29 #include "../fs.h"
30 #include "skel.h"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
37 /*** Parsing (conversion from skeleton to native FS type) ***/
40 /* Parse a `PROPLIST' SKEL into a regular hash of properties,
41 *PROPLIST_P, which has const char * property names, and
42 svn_string_t * values, or NULL if SKEL contains no properties. Use
43 POOL for all allocations. */
44 svn_error_t *
45 svn_fs_base__parse_proplist_skel(apr_hash_t **proplist_p,
46 skel_t *skel,
47 apr_pool_t *pool);
49 /* Parse a `REVISION' SKEL into *REVISION_P. Use POOL for all
50 allocations. */
51 svn_error_t *
52 svn_fs_base__parse_revision_skel(revision_t **revision_p,
53 skel_t *skel,
54 apr_pool_t *pool);
56 /* Parse a `TRANSACTION' SKEL into *TRANSACTION_P. Use POOL for all
57 allocations. */
58 svn_error_t *
59 svn_fs_base__parse_transaction_skel(transaction_t **transaction_p,
60 skel_t *skel,
61 apr_pool_t *pool);
63 /* Parse a `REPRESENTATION' SKEL into *REP_P. Use POOL for all
64 allocations. */
66 svn_error_t *
67 svn_fs_base__parse_representation_skel(representation_t **rep_p,
68 skel_t *skel,
69 apr_pool_t *pool);
71 /* Parse a `NODE-REVISION' SKEL into *NODEREV_P. Use POOL for all
72 allocations. */
73 svn_error_t *
74 svn_fs_base__parse_node_revision_skel(node_revision_t **noderev_p,
75 skel_t *skel,
76 apr_pool_t *pool);
78 /* Parse a `COPY' SKEL into *COPY_P. Use POOL for all allocations. */
79 svn_error_t *
80 svn_fs_base__parse_copy_skel(copy_t **copy_p,
81 skel_t *skel,
82 apr_pool_t *pool);
84 /* Parse an `ENTRIES' SKEL into *ENTRIES_P, which is a hash with const
85 char * names (the directory entry name) and svn_fs_id_t * values
86 (the node-id of the entry), or NULL if SKEL contains no entries.
87 Use POOL for all allocations. */
88 svn_error_t *
89 svn_fs_base__parse_entries_skel(apr_hash_t **entries_p,
90 skel_t *skel,
91 apr_pool_t *pool);
93 /* Parse a `CHANGE' SKEL into *CHANGE_P. Use POOL for all allocations. */
94 svn_error_t *
95 svn_fs_base__parse_change_skel(change_t **change_p,
96 skel_t *skel,
97 apr_pool_t *pool);
99 /* Parse a `LOCK' SKEL into *LOCK_P. Use POOL for all allocations. */
100 svn_error_t *
101 svn_fs_base__parse_lock_skel(svn_lock_t **lock_p,
102 skel_t *skel,
103 apr_pool_t *pool);
107 /*** Unparsing (conversion from native FS type to skeleton) ***/
110 /* Unparse a PROPLIST hash (which has const char * property names and
111 svn_stringbuf_t * values) into a `PROPLIST' skel *SKEL_P. Use POOL
112 for all allocations. */
113 svn_error_t *
114 svn_fs_base__unparse_proplist_skel(skel_t **skel_p,
115 apr_hash_t *proplist,
116 apr_pool_t *pool);
118 /* Unparse REVISION into a `REVISION' skel *SKEL_P. Use POOL for all
119 allocations. */
120 svn_error_t *
121 svn_fs_base__unparse_revision_skel(skel_t **skel_p,
122 const revision_t *revision,
123 apr_pool_t *pool);
125 /* Unparse TRANSACTION into a `TRANSACTION' skel *SKEL_P. Use POOL
126 for all allocations. */
127 svn_error_t *
128 svn_fs_base__unparse_transaction_skel(skel_t **skel_p,
129 const transaction_t *transaction,
130 apr_pool_t *pool);
132 /* Unparse REP into a `REPRESENTATION' skel *SKEL_P. Use POOL for all
133 allocations. */
134 svn_error_t *
135 svn_fs_base__unparse_representation_skel(skel_t **skel_p,
136 const representation_t *rep,
137 apr_pool_t *pool);
140 /* Unparse NODEREV into a `NODE-REVISION' skel *SKEL_P. Use POOL for
141 all allocations. FORMAT is the format version of the filesystem. */
142 svn_error_t *
143 svn_fs_base__unparse_node_revision_skel(skel_t **skel_p,
144 const node_revision_t *noderev,
145 int format,
146 apr_pool_t *pool);
148 /* Unparse COPY into a `COPY' skel *SKEL_P. Use POOL for all
149 allocations. */
150 svn_error_t *
151 svn_fs_base__unparse_copy_skel(skel_t **skel_p,
152 const copy_t *copy,
153 apr_pool_t *pool);
155 /* Unparse an ENTRIES hash, which has const char * names (the entry
156 name) and svn_fs_id_t * values (the node-id of the entry) into an
157 `ENTRIES' skel *SKEL_P. Use POOL for all allocations. */
158 svn_error_t *
159 svn_fs_base__unparse_entries_skel(skel_t **skel_p,
160 apr_hash_t *entries,
161 apr_pool_t *pool);
163 /* Unparse CHANGE into a `CHANGE' skel *SKEL_P. Use POOL for all
164 allocations. */
165 svn_error_t *
166 svn_fs_base__unparse_change_skel(skel_t **skel_p,
167 const change_t *change,
168 apr_pool_t *pool);
170 /* Unparse LOCK into a `LOCK' skel *SKEL_P. Use POOL for all
171 allocations. */
172 svn_error_t *
173 svn_fs_base__unparse_lock_skel(skel_t **skel_p,
174 const svn_lock_t *lock,
175 apr_pool_t *pool);
179 #ifdef __cplusplus
181 #endif /* __cplusplus */
183 #endif /* SVN_LIBSVN_FS_FS_SKELS_H */