Subversion 1.6.16
|
00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Copyright (c) 2000-2007 CollabNet. All rights reserved. 00005 * 00006 * This software is licensed as described in the file COPYING, which 00007 * you should have received as part of this distribution. The terms 00008 * are also available at http://subversion.tigris.org/license-1.html. 00009 * If newer versions of this license are posted there, you may use a 00010 * newer version instead, at your option. 00011 * 00012 * This software consists of voluntary contributions made by many 00013 * individuals. For exact contribution history, see the revision 00014 * history and logs, available at http://subversion.tigris.org/. 00015 * ==================================================================== 00016 * @endcopyright 00017 * 00018 * @file mod_dav_svn.h 00019 * @brief Subversion's backend for Apache's mod_dav module 00020 */ 00021 00022 00023 #ifndef MOD_DAV_SVN_H 00024 #define MOD_DAV_SVN_H 00025 00026 #include <httpd.h> 00027 #include <mod_dav.h> 00028 00029 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif /* __cplusplus */ 00033 00034 00035 /* Given an apache request R, a URI, and a ROOT_PATH to the svn 00036 location block, process URI and return many things, allocated in 00037 r->pool: 00038 00039 * CLEANED_URI: The uri with duplicate and trailing slashes removed. 00040 00041 * TRAILING_SLASH: Whether the uri had a trailing slash on it. 00042 00043 Three special substrings of the uri are returned for convenience: 00044 00045 * REPOS_NAME: The single path component that is the directory 00046 which contains the repository. 00047 00048 * RELATIVE_PATH: The remaining imaginary path components. 00049 00050 * REPOS_PATH: The actual path within the repository filesystem, or 00051 NULL if no part of the uri refers to a path in 00052 the repository (e.g. "!svn/vcc/default" or 00053 "!svn/bln/25"). 00054 00055 00056 For example, consider the uri 00057 00058 /svn/repos/proj1/!svn/blah/13//A/B/alpha 00059 00060 In the SVNPath case, this function would receive a ROOT_PATH of 00061 '/svn/repos/proj1', and in the SVNParentPath case would receive a 00062 ROOT_PATH of '/svn/repos'. But either way, we would get back: 00063 00064 * CLEANED_URI: /svn/repos/proj1/!svn/blah/13/A/B/alpha 00065 * REPOS_NAME: proj1 00066 * RELATIVE_PATH: /!svn/blah/13/A/B/alpha 00067 * REPOS_PATH: A/B/alpha 00068 * TRAILING_SLASH: FALSE 00069 */ 00070 AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r, 00071 const char *uri, 00072 const char *root_path, 00073 const char **cleaned_uri, 00074 int *trailing_slash, 00075 const char **repos_name, 00076 const char **relative_path, 00077 const char **repos_path); 00078 00079 00080 /* Given an apache request R and a ROOT_PATH to the svn location 00081 block sets *REPOS_PATH to the path of the repository on disk. 00082 */ 00083 AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r, 00084 const char *root_path, 00085 const char **repos_path); 00086 00087 #ifdef __cplusplus 00088 } 00089 #endif /* __cplusplus */ 00090 00091 #endif /* MOD_DAV_SVN_H */