1 /* fs_id.h : FSX's implementation of svn_fs_id_t
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_X_FS_ID_H
24 #define SVN_LIBSVN_FS_X_FS_ID_H
25 
26 #include "id.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
32 /* Transparent FS access object to be used with FSX's implementation for
33    svn_fs_id_t.  It allows the ID object query data from the respective FS
34    to check for node relationships etc.  It also allows to re-open the repo
35    after the original svn_fs_t object got cleaned up, i.e. the ID object's
36    functionality does not depend on any other object's lifetime.
37 
38    For efficiency, multiple svn_fs_id_t should share the same context.
39  */
40 typedef struct svn_fs_x__id_context_t svn_fs_x__id_context_t;
41 
42 /* Return a context object for filesystem FS; construct it in RESULT_POOL. */
43 svn_fs_x__id_context_t *
44 svn_fs_x__id_create_context(svn_fs_t *fs,
45                             apr_pool_t *result_pool);
46 
47 /* Create a permanent ID based on NODEREV_ID, allocated in RESULT_POOL.
48    For complex requests, access the filesystem provided with CONTEXT.
49 
50    For efficiency, CONTEXT should have been created in RESULT_POOL and be
51    shared between multiple ID instances allocated in the same pool.
52  */
53 svn_fs_id_t *
54 svn_fs_x__id_create(svn_fs_x__id_context_t *context,
55                     const svn_fs_x__id_t *noderev_id,
56                     apr_pool_t *result_pool);
57 
58 #ifdef __cplusplus
59 }
60 #endif /* __cplusplus */
61 
62 #endif /* SVN_LIBSVN_FS_X_FS_ID_H */
63