Deleted Added
full compact
svn_ra_svn.h (302408) svn_ra_svn.h (362181)
1/**
2 * @copyright
3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 35 unchanged lines hidden (view full) ---

44#endif /* __cplusplus */
45
46/** The well-known svn port number. */
47#define SVN_RA_SVN_PORT 3690
48
49/** Currently-defined capabilities. */
50#define SVN_RA_SVN_CAP_EDIT_PIPELINE "edit-pipeline"
51#define SVN_RA_SVN_CAP_SVNDIFF1 "svndiff1"
1/**
2 * @copyright
3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 35 unchanged lines hidden (view full) ---

44#endif /* __cplusplus */
45
46/** The well-known svn port number. */
47#define SVN_RA_SVN_PORT 3690
48
49/** Currently-defined capabilities. */
50#define SVN_RA_SVN_CAP_EDIT_PIPELINE "edit-pipeline"
51#define SVN_RA_SVN_CAP_SVNDIFF1 "svndiff1"
52#define SVN_RA_SVN_CAP_SVNDIFF2_ACCEPTED "accepts-svndiff2"
52#define SVN_RA_SVN_CAP_ABSENT_ENTRIES "absent-entries"
53/* maps to SVN_RA_CAPABILITY_COMMIT_REVPROPS: */
54#define SVN_RA_SVN_CAP_COMMIT_REVPROPS "commit-revprops"
55/* maps to SVN_RA_CAPABILITY_MERGEINFO: */
56#define SVN_RA_SVN_CAP_MERGEINFO "mergeinfo"
57/* maps to SVN_RA_CAPABILITY_DEPTH: */
58#define SVN_RA_SVN_CAP_DEPTH "depth"
59/* maps to SVN_RA_CAPABILITY_LOG_REVPROPS */
60#define SVN_RA_SVN_CAP_LOG_REVPROPS "log-revprops"
61/* maps to SVN_RA_CAPABILITY_PARTIAL_REPLAY */
62#define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay"
63/* maps to SVN_RA_CAPABILITY_ATOMIC_REVPROPS */
64#define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops"
65/* maps to SVN_RA_CAPABILITY_INHERITED_PROPERTIES: */
66#define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props"
67/* maps to SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS */
68#define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
69/* maps to SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE */
70#define SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE "file-revs-reverse"
53#define SVN_RA_SVN_CAP_ABSENT_ENTRIES "absent-entries"
54/* maps to SVN_RA_CAPABILITY_COMMIT_REVPROPS: */
55#define SVN_RA_SVN_CAP_COMMIT_REVPROPS "commit-revprops"
56/* maps to SVN_RA_CAPABILITY_MERGEINFO: */
57#define SVN_RA_SVN_CAP_MERGEINFO "mergeinfo"
58/* maps to SVN_RA_CAPABILITY_DEPTH: */
59#define SVN_RA_SVN_CAP_DEPTH "depth"
60/* maps to SVN_RA_CAPABILITY_LOG_REVPROPS */
61#define SVN_RA_SVN_CAP_LOG_REVPROPS "log-revprops"
62/* maps to SVN_RA_CAPABILITY_PARTIAL_REPLAY */
63#define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay"
64/* maps to SVN_RA_CAPABILITY_ATOMIC_REVPROPS */
65#define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops"
66/* maps to SVN_RA_CAPABILITY_INHERITED_PROPERTIES: */
67#define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props"
68/* maps to SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS */
69#define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
70/* maps to SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE */
71#define SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE "file-revs-reverse"
72/* maps to SVN_RA_CAPABILITY_LIST */
73#define SVN_RA_SVN_CAP_LIST "list"
71
72
73/** ra_svn passes @c svn_dirent_t fields over the wire as a list of
74 * words, these are the values used to represent each field.
75 *
76 * @defgroup ra_svn_dirent_fields Definitions of ra_svn dirent fields
77 * @{
78 */

--- 57 unchanged lines hidden (view full) ---

136 /** Handler for the command */
137 svn_ra_svn_command_handler handler;
138
139 /** Termination flag. If set, command-handling will cease after
140 * command is processed. */
141 svn_boolean_t terminate;
142} svn_ra_svn_cmd_entry_t;
143
74
75
76/** ra_svn passes @c svn_dirent_t fields over the wire as a list of
77 * words, these are the values used to represent each field.
78 *
79 * @defgroup ra_svn_dirent_fields Definitions of ra_svn dirent fields
80 * @{
81 */

--- 57 unchanged lines hidden (view full) ---

139 /** Handler for the command */
140 svn_ra_svn_command_handler handler;
141
142 /** Termination flag. If set, command-handling will cease after
143 * command is processed. */
144 svn_boolean_t terminate;
145} svn_ra_svn_cmd_entry_t;
146
147/** Data types defined by the svn:// protocol.
148 *
149 * @since The typedef name is new in 1.10; the enumerators are not. */
150typedef enum
151{
152 SVN_RA_SVN_NUMBER,
153 SVN_RA_SVN_STRING,
154 SVN_RA_SVN_WORD,
155 SVN_RA_SVN_LIST
156} svn_ra_svn_item_kind_t;
157
144/** Memory representation of an on-the-wire data item. */
145typedef struct svn_ra_svn_item_t
146{
147 /** Variant indicator. */
158/** Memory representation of an on-the-wire data item. */
159typedef struct svn_ra_svn_item_t
160{
161 /** Variant indicator. */
148 enum {
149 SVN_RA_SVN_NUMBER,
150 SVN_RA_SVN_STRING,
151 SVN_RA_SVN_WORD,
152 SVN_RA_SVN_LIST
153 } kind;
162 svn_ra_svn_item_kind_t kind;
163
154 /** Variant data. */
155 union {
156 apr_uint64_t number;
157 svn_string_t *string;
158 const char *word;
159
160 /** Contains @c svn_ra_svn_item_t's. */
161 apr_array_header_t *list;
162 } u;
163} svn_ra_svn_item_t;
164
165typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
166
167/** Initialize a connection structure for the given socket or
168 * input/output streams.
169 *
170 * Either @a sock or @a in_stream/@a out_stream must be set, not both.
171 * @a compression_level specifies the desired network data compression
164 /** Variant data. */
165 union {
166 apr_uint64_t number;
167 svn_string_t *string;
168 const char *word;
169
170 /** Contains @c svn_ra_svn_item_t's. */
171 apr_array_header_t *list;
172 } u;
173} svn_ra_svn_item_t;
174
175typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
176
177/** Initialize a connection structure for the given socket or
178 * input/output streams.
179 *
180 * Either @a sock or @a in_stream/@a out_stream must be set, not both.
181 * @a compression_level specifies the desired network data compression
172 * level (zlib) from 0 (no compression) to 9 (best but slowest).
182 * level from 0 (no compression) to 9 (best but slowest). The effect
183 * of the parameter depends on the compression algorithm; for example,
184 * it is used verbatim by zlib/deflate but ignored by LZ4.
173 *
174 * If @a zero_copy_limit is not 0, cached file contents smaller than the
175 * given limit may be sent directly to the network socket. Otherwise,
176 * it will be copied into a temporary buffer before being forwarded to
177 * the network stack. Since the zero-copy code path has to enforce strict
178 * time-outs, the receiver must be able to process @a zero_copy_limit
179 * bytes within one second. Even temporary failure to do so may cause
180 * the server to cancel the respective operation with a time-out error.
181 *
182 * To reduce the overhead of checking for cancellation requests from the
183 * data receiver, set @a error_check_interval to some non-zero value.
184 * It defines the number of bytes that must have been sent since the last
185 * check before the next check will be made.
186 *
185 *
186 * If @a zero_copy_limit is not 0, cached file contents smaller than the
187 * given limit may be sent directly to the network socket. Otherwise,
188 * it will be copied into a temporary buffer before being forwarded to
189 * the network stack. Since the zero-copy code path has to enforce strict
190 * time-outs, the receiver must be able to process @a zero_copy_limit
191 * bytes within one second. Even temporary failure to do so may cause
192 * the server to cancel the respective operation with a time-out error.
193 *
194 * To reduce the overhead of checking for cancellation requests from the
195 * data receiver, set @a error_check_interval to some non-zero value.
196 * It defines the number of bytes that must have been sent since the last
197 * check before the next check will be made.
198 *
199 * If @a max_in is not 0, error out and close the connection whenever more
200 * than @a max_in bytes are received for a command (e.g. a client request).
201 * If @a max_out is not 0, error out and close the connection whenever more
202 * than @a max_out bytes have been send as response to some command.
203 *
204 * @note The limits enforced may vary slightly by +/- the I/O buffer size.
205 *
187 * @note If @a out_stream is an wrapped apr_file_t* the backing file will be
188 * used for some operations.
189 *
190 * Allocate the result in @a pool.
191 *
206 * @note If @a out_stream is an wrapped apr_file_t* the backing file will be
207 * used for some operations.
208 *
209 * Allocate the result in @a pool.
210 *
211 * @since New in 1.10
212 */
213svn_ra_svn_conn_t *svn_ra_svn_create_conn5(apr_socket_t *sock,
214 svn_stream_t *in_stream,
215 svn_stream_t *out_stream,
216 int compression_level,
217 apr_size_t zero_copy_limit,
218 apr_size_t error_check_interval,
219 apr_uint64_t max_in,
220 apr_uint64_t max_out,
221 apr_pool_t *result_pool);
222
223
224/** Similar to svn_ra_svn_create_conn5() but with @a max_in and @a max_out
225 * set to 0.
226 *
192 * @since New in 1.9
227 * @since New in 1.9
228 * @deprecated Provided for backward compatibility with the 1.9 API.
193 */
229 */
230SVN_DEPRECATED
194svn_ra_svn_conn_t *svn_ra_svn_create_conn4(apr_socket_t *sock,
195 svn_stream_t *in_stream,
196 svn_stream_t *out_stream,
197 int compression_level,
198 apr_size_t zero_copy_limit,
199 apr_size_t error_check_interval,
200 apr_pool_t *result_pool);
201

--- 499 unchanged lines hidden ---
231svn_ra_svn_conn_t *svn_ra_svn_create_conn4(apr_socket_t *sock,
232 svn_stream_t *in_stream,
233 svn_stream_t *out_stream,
234 int compression_level,
235 apr_size_t zero_copy_limit,
236 apr_size_t error_check_interval,
237 apr_pool_t *result_pool);
238

--- 499 unchanged lines hidden ---