aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_ra_serf/ra_serf.h
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2018-05-08 03:44:38 +0000
committerPeter Wemm <peter@FreeBSD.org>2018-05-08 03:44:38 +0000
commit3faf8d6bffc5d0fb2525ba37bb504c53366caf9d (patch)
tree7e47911263e75034b767fe34b2f8d3d17e91f66d /subversion/libsvn_ra_serf/ra_serf.h
parenta55fb3c0d5eca7d887798125d5b95942b1f01d4b (diff)
downloadsrc-3faf8d6bffc5d0fb2525ba37bb504c53366caf9d.tar.gz
src-3faf8d6bffc5d0fb2525ba37bb504c53366caf9d.zip
Import Subversion-1.10.0vendor/subversion/subversion-1.10.0
Notes
Notes: svn path=/vendor/subversion/dist/; revision=333347 svn path=/vendor/subversion/subversion-1.10.0/; revision=333348; tag=vendor/subversion/subversion-1.10.0
Diffstat (limited to 'subversion/libsvn_ra_serf/ra_serf.h')
-rw-r--r--subversion/libsvn_ra_serf/ra_serf.h106
1 files changed, 103 insertions, 3 deletions
diff --git a/subversion/libsvn_ra_serf/ra_serf.h b/subversion/libsvn_ra_serf/ra_serf.h
index fcef73777a03..9191d073bbc4 100644
--- a/subversion/libsvn_ra_serf/ra_serf.h
+++ b/subversion/libsvn_ra_serf/ra_serf.h
@@ -26,7 +26,6 @@
#include <serf.h>
-#include <expat.h> /* for XML_Parser */
#include <apr_uri.h>
#include "svn_types.h"
@@ -114,8 +113,12 @@ struct svn_ra_serf__session_t {
/* Are we using ssl */
svn_boolean_t using_ssl;
- /* Should we ask for compressed responses? */
- svn_boolean_t using_compression;
+ /* Tristate flag that indicates if we should use compression for
+ network transmissions. If svn_tristate_true or svn_tristate_false,
+ the compression should be enabled and disabled, respectively.
+ If svn_tristate_unknown, determine this automatically based
+ on network parameters. */
+ svn_tristate_t using_compression;
/* The user agent string */
const char *useragent;
@@ -137,6 +140,10 @@ struct svn_ra_serf__session_t {
HTTP/1.0. Thus, we cannot send chunked requests. */
svn_boolean_t http10;
+ /* We are talking to the server via http/2. Responses of scheduled
+ requests may come in any order */
+ svn_boolean_t http20;
+
/* Should we use Transfer-Encoding: chunked for HTTP/1.1 servers. */
svn_boolean_t using_chunked_requests;
@@ -255,6 +262,18 @@ struct svn_ra_serf__session_t {
/* Indicates whether the server supports issuing replay REPORTs
against rev resources (children of `rev_stub', elsestruct). */
svn_boolean_t supports_rev_rsrc_replay;
+
+ /* Indicates whether the server can understand svndiff version 1. */
+ svn_boolean_t supports_svndiff1;
+
+ /* Indicates whether the server can understand svndiff version 2. */
+ svn_boolean_t supports_svndiff2;
+
+ /* Indicates whether the server sends the result checksum in the response
+ * to a successful PUT request. */
+ svn_boolean_t supports_put_result_checksum;
+
+ apr_interval_time_t conn_latency;
};
#define SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(sess) ((sess)->me_resource != NULL)
@@ -1412,6 +1431,18 @@ svn_ra_serf__get_locks(svn_ra_session_t *ra_session,
svn_depth_t depth,
apr_pool_t *pool);
+/* Implements svn_ra__vtable_t.list(). */
+svn_error_t *
+svn_ra_serf__list(svn_ra_session_t *ra_session,
+ const char *path,
+ svn_revnum_t revision,
+ const apr_array_header_t *patterns,
+ svn_depth_t depth,
+ apr_uint32_t dirent_fields,
+ svn_ra_dirent_receiver_t receiver,
+ void *receiver_baton,
+ apr_pool_t *scratch_pool);
+
/* Request a mergeinfo-report from the URL attached to SESSION,
and fill in the MERGEINFO hash with the results.
@@ -1515,6 +1546,11 @@ svn_ra_serf__error_on_status(serf_status_line sline,
svn_error_t *
svn_ra_serf__unexpected_status(svn_ra_serf__handler_t *handler);
+/* Make sure handler is no longer scheduled on its connection. Resetting
+ the connection if necessary */
+void
+svn_ra_serf__unschedule_handler(svn_ra_serf__handler_t *handler);
+
/* ###? */
svn_error_t *
@@ -1557,6 +1593,70 @@ svn_ra_serf__uri_parse(apr_uri_t *uri,
const char *url_str,
apr_pool_t *result_pool);
+/* Setup the "Accept-Encoding" header value for requests that expect
+ svndiff-encoded deltas, depending on the SESSION state. */
+void
+svn_ra_serf__setup_svndiff_accept_encoding(serf_bucket_t *headers,
+ svn_ra_serf__session_t *session);
+
+svn_boolean_t
+svn_ra_serf__is_low_latency_connection(svn_ra_serf__session_t *session);
+
+/* Return an APR array of svn_ra_serf__dav_props_t containing the
+ * properties (names and namespaces) corresponding to the flegs set
+ * in DIRENT_FIELDS. If SESSION does not support deadprops, only
+ * the generic "DAV:allprop" will be returned. Allocate the result
+ * in RESULT_POOL. */
+apr_array_header_t *
+svn_ra_serf__get_dirent_props(apr_uint32_t dirent_fields,
+ svn_ra_serf__session_t *session,
+ apr_pool_t *result_pool);
+
+/* Default limit for in-memory size of a request body. */
+#define SVN_RA_SERF__REQUEST_BODY_IN_MEM_SIZE 256 * 1024
+
+/* An opaque structure used to prepare a request body. */
+typedef struct svn_ra_serf__request_body_t svn_ra_serf__request_body_t;
+
+/* Constructor for svn_ra_serf__request_body_t. Creates a new writable
+ buffer for the request body. Request bodies under IN_MEMORY_SIZE
+ bytes will be held in memory, otherwise, the body content will be
+ spilled to a temporary file. */
+svn_ra_serf__request_body_t *
+svn_ra_serf__request_body_create(apr_size_t in_memory_size,
+ apr_pool_t *result_pool);
+
+/* Get the writable stream associated with BODY. */
+svn_stream_t *
+svn_ra_serf__request_body_get_stream(svn_ra_serf__request_body_t *body);
+
+/* Get a svn_ra_serf__request_body_delegate_t and baton for BODY. */
+void
+svn_ra_serf__request_body_get_delegate(svn_ra_serf__request_body_delegate_t *del,
+ void **baton,
+ svn_ra_serf__request_body_t *body);
+
+/* Release intermediate resources associated with BODY. These resources
+ (such as open file handles) will be automatically released when the
+ pool used to construct BODY is cleared or destroyed, but this optional
+ function allows doing that explicitly. */
+svn_error_t *
+svn_ra_serf__request_body_cleanup(svn_ra_serf__request_body_t *body,
+ apr_pool_t *scratch_pool);
+
+/* Callback used in svn_ra_serf__create_stream_bucket(). ERR will be
+ will be cleared and becomes invalid after the callback returns,
+ use svn_error_dup() to preserve it. */
+typedef void
+(*svn_ra_serf__stream_bucket_errfunc_t)(void *baton, svn_error_t *err);
+
+/* Create a bucket that wraps a generic readable STREAM. This function
+ takes ownership of the passed-in stream, and will close it. */
+serf_bucket_t *
+svn_ra_serf__create_stream_bucket(svn_stream_t *stream,
+ serf_bucket_alloc_t *allocator,
+ svn_ra_serf__stream_bucket_errfunc_t errfunc,
+ void *errfunc_baton);
#if defined(SVN_DEBUG)
/* Wrapper macros to collect file and line information */