Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_path.h view on Meta::CPAN
svn_path_uri_decode(const char *path, apr_pool_t *pool);
/** Extend @a url by @a component, URI-encoding that @a component
* before adding it to the @a url; return the new @a url, allocated in
* @a pool. If @a component is @c NULL, just return a copy of @a url,
* allocated in @a pool.
*
* @a component need not be a single path segment, but if it contains
* multiple segments, they must be separated by '/'. @a component
* should not begin with '/', however; if it does, the behavior is
* undefined.
*
* @a url must be in canonical format; it may not have a trailing '/'.
*
* @note To add a component that is already URI-encoded, use
* <tt>svn_path_join(url, component, pool)</tt> instead.
*
* @note gstein suggests this for when @a component begins with '/':
*
* "replace the path entirely
* https://example.com:4444/base/path joined with /leading/slash,
* should return: https://example.com:4444/leading/slash
* per the RFCs on combining URIs"
*
* We may implement that someday, which is why leading '/' is
* merely undefined right now.
*
* @since New in 1.6.
*/
const char *
svn_path_url_add_component2(const char *url,
const char *component,
apr_pool_t *pool);
/** Like svn_path_url_add_component2(), but allows path components that
* end with a trailing '/'
*
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
const char *
svn_path_url_add_component(const char *url,
const char *component,
apr_pool_t *pool);
/**
* Convert @a iri (Internationalized URI) to an URI.
* The return value may be the same as @a iri if it was already
* a URI. Else, allocate the return value in @a pool.
*
* @since New in 1.1.
*/
const char *
svn_path_uri_from_iri(const char *iri, apr_pool_t *pool);
/**
* URI-encode certain characters in @a uri that are not valid in an URI, but
* doesn't have any special meaning in @a uri at their positions. If no
* characters need escaping, just return @a uri.
*
* @note Currently, this function escapes <, >, ", space, {, }, |, \, ^, and `.
* This may be extended in the future to do context-dependent escaping.
*
* @since New in 1.1.
*/
const char *
svn_path_uri_autoescape(const char *uri, apr_pool_t *pool);
/** @} */
/** Charset conversion stuff
*
* @defgroup svn_path_charset_stuff Charset conversion
* @{
*/
/** Convert @a path_utf8 from UTF-8 to the internal encoding used by APR. */
svn_error_t *
svn_path_cstring_from_utf8(const char **path_apr,
const char *path_utf8,
apr_pool_t *pool);
/** Convert @a path_apr from the internal encoding used by APR to UTF-8. */
svn_error_t *
svn_path_cstring_to_utf8(const char **path_utf8,
const char *path_apr,
apr_pool_t *pool);
/** @} */
/** Repository relative URLs
*
* @defgroup svn_path_repos_relative_urls Repository relative URLs
* @{
*/
/**
* Return @c TRUE iff @a path is a repository-relative URL: specifically
* that it starts with the characters "^/"
*
* @a path is in UTF-8 encoding.
*
* Does not check whether @a path is a properly URI-encoded, canonical, or
* valid in any other way.
*
* @since New in 1.8.
*/
svn_boolean_t
svn_path_is_repos_relative_url(const char *path);
/**
* Set @a absolute_url to the absolute URL represented by @a relative_url
* relative to @a repos_root_url, preserving any peg revision
* specifier present in @a relative_url. Allocate @a absolute_url
* from @a pool.
*
* @a relative_url is in repository-relative syntax: "^/[REL-URL][@PEG]"
*
* @a repos_root_url is the absolute URL of the repository root.
*
* All strings are in UTF-8 encoding.
*
* @a repos_root_url and @a relative_url do not have to be properly
* URI-encoded, canonical, or valid in any other way. The caller is
* expected to perform canonicalization on @a absolute_url after the
* call to the function.
*
* @since New in 1.8.
*/
svn_error_t *
svn_path_resolve_repos_relative_url(const char **absolute_url,
const char *relative_url,
const char *repos_root_url,
apr_pool_t *pool);
/* Return a copy of @a path, allocated from @a pool, for which control
* characters have been escaped using the form \NNN (where NNN is the
* octal representation of the byte's ordinal value).
*
* @since New in 1.8. */
const char *
svn_path_illegal_path_escape(const char *path, apr_pool_t *pool);
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_PATH_H */
( run in 1.212 second using v1.01-cache-2.11-cpan-5623c5533a1 )