Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/libsvn_ra_serf/ra_serf.h view on Meta::CPAN
/** PROPFIND-related functions **/
/*
* This function will deliver a PROP_CTX PROPFIND request in the SESS
* serf context for the properties listed in LOOKUP_PROPS at URL for
* DEPTH ("0","1","infinity").
*
* This function will not block waiting for the response. Callers are
* expected to call svn_ra_serf__wait_for_props().
*/
svn_error_t *
svn_ra_serf__deliver_props(svn_ra_serf__handler_t **propfind_handler,
apr_hash_t *prop_vals,
svn_ra_serf__session_t *sess,
svn_ra_serf__connection_t *conn,
const char *url,
svn_revnum_t rev,
const char *depth,
const svn_ra_serf__dav_props_t *lookup_props,
svn_ra_serf__list_t **done_list,
apr_pool_t *pool);
/*
* This helper function will block until PROPFIND_HANDLER indicates that is
* done or another error is returned.
*/
svn_error_t *
svn_ra_serf__wait_for_props(svn_ra_serf__handler_t *handler,
apr_pool_t *scratch_pool);
/* This is a blocking version of deliver_props.
The properties are fetched and placed into RESULTS, allocated in
RESULT_POOL.
### more docco about the other params.
Temporary allocations are made in SCRATCH_POOL.
*/
svn_error_t *
svn_ra_serf__retrieve_props(apr_hash_t **results,
svn_ra_serf__session_t *sess,
svn_ra_serf__connection_t *conn,
const char *url,
svn_revnum_t rev,
const char *depth,
const svn_ra_serf__dav_props_t *props,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Using CONN, fetch the properties specified by WHICH_PROPS using CONN
for URL at REVISION. The resulting properties are placed into a 2-level
hash in RESULTS, mapping NAMESPACE -> hash<PROPNAME, PROPVALUE>, which
is allocated in RESULT_POOL.
If REVISION is SVN_INVALID_REVNUM, then the properties are fetched
from HEAD for URL.
This function performs the request synchronously.
Temporary allocations are made in SCRATCH_POOL. */
svn_error_t *
svn_ra_serf__fetch_node_props(apr_hash_t **results,
svn_ra_serf__connection_t *conn,
const char *url,
svn_revnum_t revision,
const svn_ra_serf__dav_props_t *which_props,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Using CONN, fetch a DAV: property from the resource identified by URL
within REVISION. The PROPNAME may be one of:
"checked-in"
"href"
The resulting value will be allocated in RESULT_POOL, and may be NULL
if the property does not exist (note: "href" always exists).
This function performs the request synchronously.
Temporary allocations are made in SCRATCH_POOL. */
svn_error_t *
svn_ra_serf__fetch_dav_prop(const char **value,
svn_ra_serf__connection_t *conn,
const char *url,
svn_revnum_t revision,
const char *propname,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Set PROPS for PATH at REV revision with a NS:NAME VAL.
*
* The POOL governs allocation.
*/
void
svn_ra_serf__set_ver_prop(apr_hash_t *props,
const char *path, svn_revnum_t rev,
const char *ns, const char *name,
const svn_string_t *val, apr_pool_t *pool);
#define svn_ra_serf__set_rev_prop svn_ra_serf__set_ver_prop
/** Property walker functions **/
typedef svn_error_t *
(*svn_ra_serf__walker_visitor_t)(void *baton,
const char *ns,
const char *name,
const svn_string_t *val,
apr_pool_t *pool);
svn_error_t *
svn_ra_serf__walk_all_props(apr_hash_t *props,
const char *name,
svn_revnum_t rev,
svn_ra_serf__walker_visitor_t walker,
void *baton,
apr_pool_t *pool);
/* Like walk_all_props(), but a 2-level hash. */
svn_error_t *
svn_ra_serf__walk_node_props(apr_hash_t *props,
svn_ra_serf__walker_visitor_t walker,
void *baton,
apr_pool_t *scratch_pool);
typedef svn_error_t *
(*svn_ra_serf__path_rev_walker_t)(void *baton,
const char *path, apr_ssize_t path_len,
const char *ns, apr_ssize_t ns_len,
const char *name, apr_ssize_t name_len,
const svn_string_t *val,
apr_pool_t *pool);
svn_error_t *
svn_ra_serf__walk_all_paths(apr_hash_t *props,
svn_revnum_t rev,
svn_ra_serf__path_rev_walker_t walker,
src/subversion/subversion/libsvn_ra_serf/ra_serf.h view on Meta::CPAN
/* Same as svn_ra_serf__get_ver_prop(), but for the unknown revision. */
const char *
svn_ra_serf__get_prop(apr_hash_t *props,
const char *path,
const char *ns,
const char *name);
/* Same as svn_ra_serf__set_rev_prop(), but for the unknown revision. */
void
svn_ra_serf__set_prop(apr_hash_t *props, const char *path,
const char *ns, const char *name,
const svn_string_t *val, apr_pool_t *pool);
svn_error_t *
svn_ra_serf__get_resource_type(svn_node_kind_t *kind,
apr_hash_t *props);
/** MERGE-related functions **/
void
svn_ra_serf__merge_lock_token_list(apr_hash_t *lock_tokens,
const char *parent,
serf_bucket_t *body,
serf_bucket_alloc_t *alloc,
apr_pool_t *pool);
/* Create an MERGE request aimed at the SESSION url, requesting the
merge of the resource identified by MERGE_RESOURCE_URL.
LOCK_TOKENS is a hash mapping paths to lock tokens owned by the
client. If KEEP_LOCKS is set, instruct the server to not release
locks set on the paths included in this commit. */
svn_error_t *
svn_ra_serf__run_merge(const svn_commit_info_t **commit_info,
int *response_code,
svn_ra_serf__session_t *session,
svn_ra_serf__connection_t *conn,
const char *merge_resource_url,
apr_hash_t *lock_tokens,
svn_boolean_t keep_locks,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** OPTIONS-related functions **/
/* When running with a proxy, we may need to detect and correct for problems.
This probing function will send a simple OPTIONS request to detect problems
with the connection. */
svn_error_t *
svn_ra_serf__probe_proxy(svn_ra_serf__session_t *serf_sess,
apr_pool_t *scratch_pool);
/* On HTTPv2 connections, run an OPTIONS request over CONN to fetch the
current youngest revnum, returning it in *YOUNGEST.
(the revnum is headers of the OPTIONS response)
This function performs the request synchronously.
All temporary allocations will be made in SCRATCH_POOL. */
svn_error_t *
svn_ra_serf__v2_get_youngest_revnum(svn_revnum_t *youngest,
svn_ra_serf__connection_t *conn,
apr_pool_t *scratch_pool);
/* On HTTPv1 connections, run an OPTIONS request over CONN to fetch the
activity collection set and return it in *ACTIVITY_URL, allocated
from RESULT_POOL.
(the activity-collection-set is in the body of the OPTIONS response)
This function performs the request synchronously.
All temporary allocations will be made in SCRATCH_POOL. */
svn_error_t *
svn_ra_serf__v1_get_activity_collection(const char **activity_url,
svn_ra_serf__connection_t *conn,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Set @a VCC_URL to the default VCC for our repository based on @a
* ORIG_PATH for the session @a SESSION, ensuring that the VCC URL and
* repository root URLs are cached in @a SESSION. Use @a CONN for any
* required network communications if it is non-NULL; otherwise use the
* default connection.
*
* All temporary allocations will be made in @a POOL. */
svn_error_t *
svn_ra_serf__discover_vcc(const char **vcc_url,
svn_ra_serf__session_t *session,
svn_ra_serf__connection_t *conn,
apr_pool_t *pool);
/* Set @a REPORT_TARGET to the URI of the resource at which generic
* (path-agnostic) REPORTs should be aimed for @a SESSION. Use @a
* CONN for any required network communications if it is non-NULL;
* otherwise use the default connection.
*
* All temporary allocations will be made in @a POOL.
*/
svn_error_t *
svn_ra_serf__report_resource(const char **report_target,
svn_ra_serf__session_t *session,
svn_ra_serf__connection_t *conn,
apr_pool_t *pool);
/* Set @a REL_PATH to a path (not URI-encoded) relative to the root of
* the repository pointed to by @a SESSION, based on original path
* (URI-encoded) @a ORIG_PATH. Use @a CONN for any required network
* communications if it is non-NULL; otherwise use the default
* connection. Use POOL for allocations. */
svn_error_t *
svn_ra_serf__get_relative_path(const char **rel_path,
const char *orig_path,
svn_ra_serf__session_t *session,
svn_ra_serf__connection_t *conn,
apr_pool_t *pool);
/* Using the default connection in SESSION (conns[0]), get the youngest
revnum from the server, returning it in *YOUNGEST.
This function operates synchronously.
All temporary allocations are performed in SCRATCH_POOL. */
svn_error_t *
svn_ra_serf__get_youngest_revnum(svn_revnum_t *youngest,
svn_ra_serf__session_t *session,
apr_pool_t *scratch_pool);
/* Generate a revision-stable URL.
The RA APIs all refer to user/public URLs that float along with the
youngest revision. In many cases, we do NOT want to work with that URL
since it can change from one moment to the next. Especially if we
attempt to operation against multiple floating URLs -- we could end up
referring to two separate revisions.
The DAV RA provider(s) solve this by generating a URL that is specific
to a revision by using a URL into a "baseline collection".
For a specified SESSION, with an optional CONN (if NULL, then the
session's default connection will be used; specifically SESSION->conns[0]),
generate a revision-stable URL for URL at REVISION. If REVISION is
SVN_INVALID_REVNUM, then the stable URL will refer to the youngest
revision at the time this function was called.
If URL is NULL, then the session root will be used.
The stable URL will be placed into *STABLE_URL, allocated from RESULT_POOL.
If LATEST_REVNUM is not NULL, then the revision used will be placed into
*LATEST_REVNUM. That will be equal to youngest, or the given REVISION.
This function operates synchronously, if any communication to the server
is required. Communication is needed if REVISION is SVN_INVALID_REVNUM
(to get the current youngest revnum), or if the specified REVISION is not
(yet) in our cache of baseline collections.
All temporary allocations are performed in SCRATCH_POOL. */
svn_error_t *
svn_ra_serf__get_stable_url(const char **stable_url,
svn_revnum_t *latest_revnum,
svn_ra_serf__session_t *session,
svn_ra_serf__connection_t *conn,
const char *url,
svn_revnum_t revision,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** RA functions **/
/* Implements svn_ra__vtable_t.get_log(). */
svn_error_t *
svn_ra_serf__get_log(svn_ra_session_t *session,
const apr_array_header_t *paths,
svn_revnum_t start,
svn_revnum_t end,
int limit,
svn_boolean_t discover_changed_paths,
svn_boolean_t strict_node_history,
svn_boolean_t include_merged_revisions,
const apr_array_header_t *revprops,
svn_log_entry_receiver_t receiver,
void *receiver_baton,
apr_pool_t *pool);
/* Implements svn_ra__vtable_t.get_locations(). */
svn_error_t *
svn_ra_serf__get_locations(svn_ra_session_t *session,
apr_hash_t **locations,
const char *path,
svn_revnum_t peg_revision,
const apr_array_header_t *location_revisions,
apr_pool_t *pool);
/* Implements svn_ra__vtable_t.get_location_segments(). */
svn_error_t *
svn_ra_serf__get_location_segments(svn_ra_session_t *session,
const char *path,
svn_revnum_t peg_revision,
svn_revnum_t start_rev,
svn_revnum_t end_rev,
svn_location_segment_receiver_t receiver,
void *receiver_baton,
apr_pool_t *pool);
/* Implements svn_ra__vtable_t.do_diff(). */
svn_error_t *
svn_ra_serf__do_diff(svn_ra_session_t *session,
const svn_ra_reporter3_t **reporter,
void **report_baton,
svn_revnum_t revision,
const char *diff_target,
( run in 0.323 second using v1.01-cache-2.11-cpan-d7f47b0818f )