2 * ra_local.h : shared internal declarations for ra_local module
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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
21 * ====================================================================
24 #ifndef SVN_LIBSVN_RA_LOCAL_H
25 #define SVN_LIBSVN_RA_LOCAL_H
27 #include <apr_pools.h>
28 #include <apr_tables.h>
30 #include "svn_types.h"
32 #include "svn_repos.h"
37 #endif /* __cplusplus */
42 /* A baton which represents a single ra_local session. */
43 typedef struct svn_ra_local__session_baton_t
45 /* The user accessing the repository. */
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. */
52 /* A repository object. */
55 /* The filesystem object associated with REPOS above (for
59 /* The UUID associated with REPOS above (cached) */
62 /* Callbacks/baton passed to svn_ra_open. */
63 const svn_ra_callbacks2_t *callbacks;
66 /* Slave auth baton */
67 svn_auth_baton_t *auth_baton;
69 const char *useragent;
70 } svn_ra_local__session_baton_t;
75 /** Private routines **/
80 /* Given a `file://' URL, figure out which portion specifies a
81 repository on local disk, and return that in REPOS_URL (if not
82 NULL); URI-decode and return the remainder (the path *within* the
83 repository's filesystem) in FS_PATH. Open REPOS to the repository
84 root (if not NULL). Allocate the return values in POOL.
85 Currently, we are not expecting to handle `file://hostname/'-type
86 URLs; hostname, in this case, is expected to be the empty string or
89 svn_ra_local__split_URL(svn_repos_t **repos,
90 const char **repos_url,
100 #endif /* __cplusplus */
102 #endif /* SVN_LIBSVN_RA_LOCAL_H */