In the command-line client, forbid
[svn.git] / subversion / include / mod_dav_svn.h
blobaeaa0d861ccc63700ec6cfe634aa59efec2563d7
1 /**
2 * @copyright
3 * ====================================================================
4 * Copyright (c) 2000-2007 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 * ====================================================================
16 * @endcopyright
18 * @file mod_dav_svn.h
19 * @brief Subversion's backend for Apache's mod_dav module
23 #ifndef MOD_DAV_SVN_H
24 #define MOD_DAV_SVN_H
26 #include <httpd.h>
27 #include <mod_dav.h>
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
35 /* Given an apache request R, a URI, and a ROOT_PATH to the svn
36 location block, process URI and return many things, allocated in
37 r->pool:
39 * CLEANED_URI: The uri with duplicate and trailing slashes removed.
41 * TRAILING_SLASH: Whether the uri had a trailing slash on it.
43 Three special substrings of the uri are returned for convenience:
45 * REPOS_NAME: The single path component that is the directory
46 which contains the repository.
48 * RELATIVE_PATH: The remaining imaginary path components.
50 * REPOS_PATH: The actual path within the repository filesystem, or
51 NULL if no part of the uri refers to a path in
52 the repository (e.g. "!svn/vcc/default" or
53 "!svn/bln/25").
56 For example, consider the uri
58 /svn/repos/proj1/!svn/blah/13//A/B/alpha
60 In the SVNPath case, this function would receive a ROOT_PATH of
61 '/svn/repos/proj1', and in the SVNParentPath case would receive a
62 ROOT_PATH of '/svn/repos'. But either way, we would get back:
64 * CLEANED_URI: /svn/repos/proj1/!svn/blah/13/A/B/alpha
65 * REPOS_NAME: proj1
66 * RELATIVE_PATH: /!svn/blah/13/A/B/alpha
67 * REPOS_PATH: A/B/alpha
68 * TRAILING_SLASH: FALSE
70 AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
71 const char *uri,
72 const char *root_path,
73 const char **cleaned_uri,
74 int *trailing_slash,
75 const char **repos_name,
76 const char **relative_path,
77 const char **repos_path);
80 /* Given an apache request R and a ROOT_PATH to the svn location
81 block sets *REPOS_PATH to the path of the repository on disk.
83 AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
84 const char *root_path,
85 const char **repos_path);
87 #ifdef __cplusplus
89 #endif /* __cplusplus */
91 #endif /* MOD_DAV_SVN_H */