]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/subversion/subversion/libsvn_ra_local/ra_local.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / subversion / subversion / libsvn_ra_local / ra_local.h
1 /*
2  * ra_local.h : shared internal declarations for ra_local module
3  *
4  * ====================================================================
5  *    Licensed to the Apache Software Foundation (ASF) under one
6  *    or more contributor license agreements.  See the NOTICE file
7  *    distributed with this work for additional information
8  *    regarding copyright ownership.  The ASF licenses this file
9  *    to you under the Apache License, Version 2.0 (the
10  *    "License"); you may not use this file except in compliance
11  *    with the License.  You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  *    Unless required by applicable law or agreed to in writing,
16  *    software distributed under the License is distributed on an
17  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  *    KIND, either express or implied.  See the License for the
19  *    specific language governing permissions and limitations
20  *    under the License.
21  * ====================================================================
22  */
23
24 #ifndef SVN_LIBSVN_RA_LOCAL_H
25 #define SVN_LIBSVN_RA_LOCAL_H
26
27 #include <apr_pools.h>
28 #include <apr_tables.h>
29
30 #include "svn_types.h"
31 #include "svn_fs.h"
32 #include "svn_repos.h"
33 #include "svn_ra.h"
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38
39 \f
40 /** Structures **/
41
42 /* A baton which represents a single ra_local session. */
43 typedef struct svn_ra_local__session_baton_t
44 {
45   /* The user accessing the repository. */
46   const char *username;
47
48   /* The URL of the session, split into two components. */
49   const char *repos_url;
50   svn_stringbuf_t *fs_path;  /* URI-decoded, always with a leading slash. */
51
52   /* A repository object. */
53   svn_repos_t *repos;
54
55   /* The filesystem object associated with REPOS above (for
56      convenience). */
57   svn_fs_t *fs;
58
59   /* The UUID associated with REPOS above (cached) */
60   const char *uuid;
61
62   /* Callbacks/baton passed to svn_ra_open. */
63   const svn_ra_callbacks2_t *callbacks;
64   void *callback_baton;
65 } svn_ra_local__session_baton_t;
66
67
68
69 \f
70 /** Private routines **/
71
72
73
74
75 /* Given a `file://' URL, figure out which portion specifies a
76    repository on local disk, and return that in REPOS_URL (if not
77    NULL); URI-decode and return the remainder (the path *within* the
78    repository's filesystem) in FS_PATH.  Open REPOS to the repository
79    root (if not NULL).  Allocate the return values in POOL.
80    Currently, we are not expecting to handle `file://hostname/'-type
81    URLs; hostname, in this case, is expected to be the empty string or
82    "localhost". */
83 svn_error_t *
84 svn_ra_local__split_URL(svn_repos_t **repos,
85                         const char **repos_url,
86                         const char **fs_path,
87                         const char *URL,
88                         apr_pool_t *pool);
89
90
91
92
93 #ifdef __cplusplus
94 }
95 #endif /* __cplusplus */
96
97 #endif /* SVN_LIBSVN_RA_LOCAL_H */