00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Licensed to the Apache Software Foundation (ASF) under one 00005 * or more contributor license agreements. See the NOTICE file 00006 * distributed with this work for additional information 00007 * regarding copyright ownership. The ASF licenses this file 00008 * to you under the Apache License, Version 2.0 (the 00009 * "License"); you may not use this file except in compliance 00010 * with the License. You may obtain a copy of the License at 00011 * 00012 * http://www.apache.org/licenses/LICENSE-2.0 00013 * 00014 * Unless required by applicable law or agreed to in writing, 00015 * software distributed under the License is distributed on an 00016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00017 * KIND, either express or implied. See the License for the 00018 * specific language governing permissions and limitations 00019 * under the License. 00020 * ==================================================================== 00021 * @endcopyright 00022 * 00023 * @file svn_ra_svn.h 00024 * @brief libsvn_ra_svn functions used by the server 00025 */ 00026 00027 #ifndef SVN_RA_SVN_H 00028 #define SVN_RA_SVN_H 00029 00030 #include <apr.h> 00031 #include <apr_pools.h> 00032 #include <apr_hash.h> 00033 #include <apr_tables.h> 00034 #include <apr_file_io.h> /* for apr_file_t */ 00035 #include <apr_network_io.h> /* for apr_socket_t */ 00036 00037 #include "svn_types.h" 00038 #include "svn_string.h" 00039 #include "svn_config.h" 00040 #include "svn_delta.h" 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif /* __cplusplus */ 00045 00046 /** The well-known svn port number. */ 00047 #define SVN_RA_SVN_PORT 3690 00048 00049 /** Currently-defined capabilities. */ 00050 #define SVN_RA_SVN_CAP_EDIT_PIPELINE "edit-pipeline" 00051 #define SVN_RA_SVN_CAP_SVNDIFF1 "svndiff1" 00052 #define SVN_RA_SVN_CAP_ABSENT_ENTRIES "absent-entries" 00053 /* maps to SVN_RA_CAPABILITY_COMMIT_REVPROPS: */ 00054 #define SVN_RA_SVN_CAP_COMMIT_REVPROPS "commit-revprops" 00055 /* maps to SVN_RA_CAPABILITY_MERGEINFO: */ 00056 #define SVN_RA_SVN_CAP_MERGEINFO "mergeinfo" 00057 /* maps to SVN_RA_CAPABILITY_DEPTH: */ 00058 #define SVN_RA_SVN_CAP_DEPTH "depth" 00059 /* maps to SVN_RA_CAPABILITY_LOG_REVPROPS */ 00060 #define SVN_RA_SVN_CAP_LOG_REVPROPS "log-revprops" 00061 /* maps to SVN_RA_CAPABILITY_PARTIAL_REPLAY */ 00062 #define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay" 00063 /* maps to SVN_RA_CAPABILITY_ATOMIC_REVPROPS */ 00064 #define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops" 00065 /* maps to SVN_RA_CAPABILITY_INHERITED_PROPERTIES: */ 00066 #define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props" 00067 /* maps to SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS */ 00068 #define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS "ephemeral-txnprops" 00069 /* maps to SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE */ 00070 #define SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE "file-revs-reverse" 00071 00072 00073 /** ra_svn passes @c svn_dirent_t fields over the wire as a list of 00074 * words, these are the values used to represent each field. 00075 * 00076 * @defgroup ra_svn_dirent_fields Definitions of ra_svn dirent fields 00077 * @{ 00078 */ 00079 00080 /** The ra_svn way of saying @c SVN_DIRENT_KIND. */ 00081 #define SVN_RA_SVN_DIRENT_KIND "kind" 00082 00083 /** The ra_svn way of saying @c SVN_DIRENT_SIZE. */ 00084 #define SVN_RA_SVN_DIRENT_SIZE "size" 00085 00086 /** The ra_svn way of saying @c SVN_DIRENT_HAS_PROPS. */ 00087 #define SVN_RA_SVN_DIRENT_HAS_PROPS "has-props" 00088 00089 /** The ra_svn way of saying @c SVN_DIRENT_CREATED_REV. */ 00090 #define SVN_RA_SVN_DIRENT_CREATED_REV "created-rev" 00091 00092 /** The ra_svn way of saying @c SVN_DIRENT_TIME. */ 00093 #define SVN_RA_SVN_DIRENT_TIME "time" 00094 00095 /** The ra_svn way of saying @c SVN_DIRENT_LAST_AUTHOR. */ 00096 #define SVN_RA_SVN_DIRENT_LAST_AUTHOR "last-author" 00097 00098 /** @} */ 00099 00100 /** A value used to indicate an optional number element in a tuple that was 00101 * not received. 00102 */ 00103 #define SVN_RA_SVN_UNSPECIFIED_NUMBER ~((apr_uint64_t) 0) 00104 00105 /** A specialized form of @c SVN_ERR to deal with errors which occur in an 00106 * svn_ra_svn_command_handler(). 00107 * 00108 * An error returned with this macro will be passed back to the other side 00109 * of the connection. Use this macro when performing the requested operation; 00110 * use the regular @c SVN_ERR when performing I/O with the client. 00111 */ 00112 #define SVN_CMD_ERR(expr) \ 00113 do { \ 00114 svn_error_t *svn_err__temp = (expr); \ 00115 if (svn_err__temp) \ 00116 return svn_error_create(SVN_ERR_RA_SVN_CMD_ERR, \ 00117 svn_err__temp, NULL); \ 00118 } while (0) 00119 00120 /** an ra_svn connection. */ 00121 typedef struct svn_ra_svn_conn_st svn_ra_svn_conn_t; 00122 00123 /** Command handler, used by svn_ra_svn_handle_commands(). */ 00124 typedef svn_error_t *(*svn_ra_svn_command_handler)(svn_ra_svn_conn_t *conn, 00125 apr_pool_t *pool, 00126 apr_array_header_t *params, 00127 void *baton); 00128 00129 /** Command table, used by svn_ra_svn_handle_commands(). 00130 */ 00131 typedef struct svn_ra_svn_cmd_entry_t 00132 { 00133 /** Name of the command */ 00134 const char *cmdname; 00135 00136 /** Handler for the command */ 00137 svn_ra_svn_command_handler handler; 00138 00139 /** Termination flag. If set, command-handling will cease after 00140 * command is processed. */ 00141 svn_boolean_t terminate; 00142 } svn_ra_svn_cmd_entry_t; 00143 00144 /** Memory representation of an on-the-wire data item. */ 00145 typedef struct svn_ra_svn_item_t 00146 { 00147 /** Variant indicator. */ 00148 enum { 00149 SVN_RA_SVN_NUMBER, 00150 SVN_RA_SVN_STRING, 00151 SVN_RA_SVN_WORD, 00152 SVN_RA_SVN_LIST 00153 } kind; 00154 /** Variant data. */ 00155 union { 00156 apr_uint64_t number; 00157 svn_string_t *string; 00158 const char *word; 00159 00160 /** Contains @c svn_ra_svn_item_t's. */ 00161 apr_array_header_t *list; 00162 } u; 00163 } svn_ra_svn_item_t; 00164 00165 typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton); 00166 00167 /** Initialize a connection structure for the given socket or 00168 * input/output streams. 00169 * 00170 * Either @a sock or @a in_stream/@a out_stream must be set, not both. 00171 * @a compression_level specifies the desired network data compression 00172 * level (zlib) from 0 (no compression) to 9 (best but slowest). 00173 * 00174 * If @a zero_copy_limit is not 0, cached file contents smaller than the 00175 * given limit may be sent directly to the network socket. Otherwise, 00176 * it will be copied into a temporary buffer before being forwarded to 00177 * the network stack. Since the zero-copy code path has to enforce strict 00178 * time-outs, the receiver must be able to process @a zero_copy_limit 00179 * bytes within one second. Even temporary failure to do so may cause 00180 * the server to cancel the respective operation with a time-out error. 00181 * 00182 * To reduce the overhead of checking for cancellation requests from the 00183 * data receiver, set @a error_check_interval to some non-zero value. 00184 * It defines the number of bytes that must have been sent since the last 00185 * check before the next check will be made. 00186 * 00187 * @note If @a out_stream is an wrapped apr_file_t* the backing file will be 00188 * used for some operations. 00189 * 00190 * Allocate the result in @a pool. 00191 * 00192 * @since New in 1.9 00193 */ 00194 svn_ra_svn_conn_t *svn_ra_svn_create_conn4(apr_socket_t *sock, 00195 svn_stream_t *in_stream, 00196 svn_stream_t *out_stream, 00197 int compression_level, 00198 apr_size_t zero_copy_limit, 00199 apr_size_t error_check_interval, 00200 apr_pool_t *result_pool); 00201 00202 00203 /** Similar to svn_ra_svn_create_conn4() but only supports apr_file_t handles 00204 * instead of the more generic streams. 00205 * 00206 * @since New in 1.8 00207 * @deprecated Provided for backward compatibility with the 1.8 API. 00208 */ 00209 SVN_DEPRECATED 00210 svn_ra_svn_conn_t *svn_ra_svn_create_conn3(apr_socket_t *sock, 00211 apr_file_t *in_file, 00212 apr_file_t *out_file, 00213 int compression_level, 00214 apr_size_t zero_copy_limit, 00215 apr_size_t error_check_interval, 00216 apr_pool_t *pool); 00217 00218 /** Similar to svn_ra_svn_create_conn3() but disables the zero copy code 00219 * path and sets the error checking interval to 0. 00220 * 00221 * @since New in 1.7. 00222 * 00223 * @deprecated Provided for backward compatibility with the 1.7 API. 00224 */ 00225 SVN_DEPRECATED 00226 svn_ra_svn_conn_t * 00227 svn_ra_svn_create_conn2(apr_socket_t *sock, 00228 apr_file_t *in_file, 00229 apr_file_t *out_file, 00230 int compression_level, 00231 apr_pool_t *pool); 00232 00233 /** Similar to svn_ra_svn_create_conn2() but uses the default 00234 * compression level (#SVN_DELTA_COMPRESSION_LEVEL_DEFAULT) for network 00235 * transmissions. 00236 * 00237 * @deprecated Provided for backward compatibility with the 1.6 API. 00238 */ 00239 SVN_DEPRECATED 00240 svn_ra_svn_conn_t * 00241 svn_ra_svn_create_conn(apr_socket_t *sock, 00242 apr_file_t *in_file, 00243 apr_file_t *out_file, 00244 apr_pool_t *pool); 00245 00246 /** Add the capabilities in @a list to @a conn's capabilities. 00247 * @a list contains svn_ra_svn_item_t entries (which should be of type 00248 * SVN_RA_SVN_WORD; a malformed data error will result if any are not). 00249 * 00250 * This is idempotent: if a given capability was already set for 00251 * @a conn, it remains set. 00252 */ 00253 svn_error_t * 00254 svn_ra_svn_set_capabilities(svn_ra_svn_conn_t *conn, 00255 const apr_array_header_t *list); 00256 00257 /** Return @c TRUE if @a conn has the capability @a capability, or 00258 * @c FALSE if it does not. */ 00259 svn_boolean_t 00260 svn_ra_svn_has_capability(svn_ra_svn_conn_t *conn, 00261 const char *capability); 00262 00263 /** Return the data compression level to use for network transmissions. 00264 * 00265 * @since New in 1.7. 00266 */ 00267 int 00268 svn_ra_svn_compression_level(svn_ra_svn_conn_t *conn); 00269 00270 /** Return the zero-copy data block limit to use for network 00271 * transmissions. 00272 * 00273 * @see http://en.wikipedia.org/wiki/Zero-copy 00274 * 00275 * @since New in 1.8. 00276 */ 00277 apr_size_t 00278 svn_ra_svn_zero_copy_limit(svn_ra_svn_conn_t *conn); 00279 00280 /** Returns the remote address of the connection as a string, if known, 00281 * or NULL if inapplicable. */ 00282 const char * 00283 svn_ra_svn_conn_remote_host(svn_ra_svn_conn_t *conn); 00284 00285 /** Set @a *editor and @a *edit_baton to an editor which will pass editing 00286 * operations over the network, using @a conn and @a pool. 00287 * 00288 * Upon successful completion of the edit, the editor will invoke @a callback 00289 * with @a callback_baton as an argument. 00290 * 00291 * @note The @c copyfrom_path parameter passed to the @c add_file and 00292 * @c add_directory methods of the returned editor may be either a URL or a 00293 * relative path, and is transferred verbatim to the receiving end of the 00294 * connection. See svn_ra_svn_drive_editor2() for information on the 00295 * receiving end of the connection. 00296 */ 00297 void 00298 svn_ra_svn_get_editor(const svn_delta_editor_t **editor, 00299 void **edit_baton, 00300 svn_ra_svn_conn_t *conn, 00301 apr_pool_t *pool, 00302 svn_ra_svn_edit_callback callback, 00303 void *callback_baton); 00304 00305 /** Receive edit commands over the network and use them to drive @a editor 00306 * with @a edit_baton. On return, @a *aborted will be set if the edit was 00307 * aborted. The drive can be terminated with a finish-replay command only 00308 * if @a for_replay is TRUE. 00309 * 00310 * @since New in 1.4. 00311 * 00312 * @note The @c copyfrom_path parameter passed to the @c add_file and 00313 * @c add_directory methods of the receiving editor will be canonicalized 00314 * either as a URL or as a relative path (starting with a slash) according 00315 * to which kind was sent by the driving end of the connection. See 00316 * svn_ra_svn_get_editor() for information on the driving end of the 00317 * connection. 00318 */ 00319 svn_error_t * 00320 svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn, 00321 apr_pool_t *pool, 00322 const svn_delta_editor_t *editor, 00323 void *edit_baton, 00324 svn_boolean_t *aborted, 00325 svn_boolean_t for_replay); 00326 00327 /** Like svn_ra_svn_drive_editor2, but with @a for_replay always FALSE. 00328 * 00329 * @deprecated Provided for backward compatibility with the 1.3 API. 00330 */ 00331 SVN_DEPRECATED 00332 svn_error_t * 00333 svn_ra_svn_drive_editor(svn_ra_svn_conn_t *conn, 00334 apr_pool_t *pool, 00335 const svn_delta_editor_t *editor, 00336 void *edit_baton, 00337 svn_boolean_t *aborted); 00338 00339 /** This function is only intended for use by svnserve. 00340 * 00341 * Perform CRAM-MD5 password authentication. On success, return 00342 * SVN_NO_ERROR with *user set to the username and *success set to 00343 * TRUE. On an error which can be reported to the client, report the 00344 * error and return SVN_NO_ERROR with *success set to FALSE. On 00345 * communications failure, return an error. 00346 */ 00347 svn_error_t * 00348 svn_ra_svn_cram_server(svn_ra_svn_conn_t *conn, 00349 apr_pool_t *pool, 00350 svn_config_t *pwdb, 00351 const char **user, 00352 svn_boolean_t *success); 00353 00354 /** 00355 * Get libsvn_ra_svn version information. 00356 * @since New in 1.1. 00357 */ 00358 const svn_version_t * 00359 svn_ra_svn_version(void); 00360 00361 /** 00362 * @defgroup ra_svn_deprecated ra_svn low-level functions 00363 * @{ 00364 */ 00365 00366 /** Write a number over the net. 00367 * 00368 * Writes will be buffered until the next read or flush. 00369 * 00370 * @deprecated Provided for backward compatibility with the 1.7 API. 00371 * RA_SVN low-level functions are no longer considered public. 00372 */ 00373 SVN_DEPRECATED 00374 svn_error_t * 00375 svn_ra_svn_write_number(svn_ra_svn_conn_t *conn, 00376 apr_pool_t *pool, 00377 apr_uint64_t number); 00378 00379 /** Write a string over the net. 00380 * 00381 * Writes will be buffered until the next read or flush. 00382 * 00383 * @deprecated Provided for backward compatibility with the 1.7 API. 00384 * RA_SVN low-level functions are no longer considered public. 00385 */ 00386 SVN_DEPRECATED 00387 svn_error_t * 00388 svn_ra_svn_write_string(svn_ra_svn_conn_t *conn, 00389 apr_pool_t *pool, 00390 const svn_string_t *str); 00391 00392 /** Write a cstring over the net. 00393 * 00394 * Writes will be buffered until the next read or flush. 00395 * 00396 * @deprecated Provided for backward compatibility with the 1.7 API. 00397 * RA_SVN low-level functions are no longer considered public. 00398 */ 00399 SVN_DEPRECATED 00400 svn_error_t * 00401 svn_ra_svn_write_cstring(svn_ra_svn_conn_t *conn, 00402 apr_pool_t *pool, 00403 const char *s); 00404 00405 /** Write a word over the net. 00406 * 00407 * Writes will be buffered until the next read or flush. 00408 * 00409 * @deprecated Provided for backward compatibility with the 1.7 API. 00410 * RA_SVN low-level functions are no longer considered public. 00411 */ 00412 SVN_DEPRECATED 00413 svn_error_t * 00414 svn_ra_svn_write_word(svn_ra_svn_conn_t *conn, 00415 apr_pool_t *pool, 00416 const char *word); 00417 00418 /** Write a list of properties over the net. @a props is allowed to be NULL, 00419 * in which case an empty list will be written out. 00420 * 00421 * @since New in 1.5. 00422 * 00423 * @deprecated Provided for backward compatibility with the 1.7 API. 00424 * RA_SVN low-level functions are no longer considered public. 00425 */ 00426 SVN_DEPRECATED 00427 svn_error_t * 00428 svn_ra_svn_write_proplist(svn_ra_svn_conn_t *conn, 00429 apr_pool_t *pool, 00430 apr_hash_t *props); 00431 00432 /** Begin a list. Writes will be buffered until the next read or flush. 00433 * 00434 * @deprecated Provided for backward compatibility with the 1.7 API. 00435 * RA_SVN low-level functions are no longer considered public. 00436 */ 00437 SVN_DEPRECATED 00438 svn_error_t * 00439 svn_ra_svn_start_list(svn_ra_svn_conn_t *conn, 00440 apr_pool_t *pool); 00441 00442 /** End a list. Writes will be buffered until the next read or flush. 00443 * 00444 * @deprecated Provided for backward compatibility with the 1.7 API. 00445 * RA_SVN low-level functions are no longer considered public. 00446 */ 00447 SVN_DEPRECATED 00448 svn_error_t * 00449 svn_ra_svn_end_list(svn_ra_svn_conn_t *conn, 00450 apr_pool_t *pool); 00451 00452 /** Flush the write buffer. 00453 * 00454 * Normally this shouldn't be necessary, since the write buffer is flushed 00455 * when a read is attempted. 00456 * 00457 * @deprecated Provided for backward compatibility with the 1.7 API. 00458 * RA_SVN low-level functions are no longer considered public. 00459 */ 00460 SVN_DEPRECATED 00461 svn_error_t * 00462 svn_ra_svn_flush(svn_ra_svn_conn_t *conn, 00463 apr_pool_t *pool); 00464 00465 /** Write a tuple, using a printf-like interface. 00466 * 00467 * The format string @a fmt may contain: 00468 * 00469 *@verbatim 00470 Spec Argument type Item type 00471 ---- -------------------- --------- 00472 n apr_uint64_t Number 00473 r svn_revnum_t Number 00474 s const svn_string_t * String 00475 c const char * String 00476 w const char * Word 00477 b svn_boolean_t Word ("true" or "false") 00478 ( Begin tuple 00479 ) End tuple 00480 ? Remaining elements optional 00481 ! (at beginning or end) Suppress opening or closing of tuple 00482 @endverbatim 00483 * 00484 * Inside the optional part of a tuple, 'r' values may be @c 00485 * SVN_INVALID_REVNUM, 'n' values may be 00486 * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', and 'w' values may be 00487 * @c NULL; in these cases no data will be written. 'b' and '(' may 00488 * not appear in the optional part of a tuple. Either all or none of 00489 * the optional values should be valid. 00490 * 00491 * (If we ever have a need for an optional boolean value, we should 00492 * invent a 'B' specifier which stores a boolean into an int, using -1 00493 * for unspecified. Right now there is no need for such a thing.) 00494 * 00495 * Use the '!' format specifier to write partial tuples when you have 00496 * to transmit an array or other unusual data. For example, to write 00497 * a tuple containing a revision, an array of words, and a boolean: 00498 * @code 00499 SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "r(!", rev)); 00500 for (i = 0; i < n; i++) 00501 SVN_ERR(svn_ra_svn_write_word(conn, pool, words[i])); 00502 SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endcode 00503 * 00504 * @deprecated Provided for backward compatibility with the 1.7 API. 00505 * RA_SVN low-level functions are no longer considered public. 00506 */ 00507 SVN_DEPRECATED 00508 svn_error_t * 00509 svn_ra_svn_write_tuple(svn_ra_svn_conn_t *conn, 00510 apr_pool_t *pool, 00511 const char *fmt, ...); 00512 00513 /** Read an item from the network into @a *item. 00514 * 00515 * @deprecated Provided for backward compatibility with the 1.7 API. 00516 * RA_SVN low-level functions are no longer considered public. 00517 */ 00518 SVN_DEPRECATED 00519 svn_error_t * 00520 svn_ra_svn_read_item(svn_ra_svn_conn_t *conn, 00521 apr_pool_t *pool, 00522 svn_ra_svn_item_t **item); 00523 00524 /** Scan data on @a conn until we find something which looks like the 00525 * beginning of an svn server greeting (an open paren followed by a 00526 * whitespace character). This function is appropriate for beginning 00527 * a client connection opened in tunnel mode, since people's dotfiles 00528 * sometimes write output to stdout. It may only be called at the 00529 * beginning of a client connection. 00530 * 00531 * @deprecated Provided for backward compatibility with the 1.7 API. 00532 * RA_SVN low-level functions are no longer considered public. 00533 */ 00534 SVN_DEPRECATED 00535 svn_error_t * 00536 svn_ra_svn_skip_leading_garbage(svn_ra_svn_conn_t *conn, 00537 apr_pool_t *pool); 00538 00539 /** Parse an array of @c svn_sort__item_t structures as a tuple, using a 00540 * printf-like interface. The format string @a fmt may contain: 00541 * 00542 *@verbatim 00543 Spec Argument type Item type 00544 ---- -------------------- --------- 00545 n apr_uint64_t * Number 00546 r svn_revnum_t * Number 00547 s svn_string_t ** String 00548 c const char ** String 00549 w const char ** Word 00550 b svn_boolean_t * Word ("true" or "false") 00551 B apr_uint64_t * Word ("true" or "false") 00552 l apr_array_header_t ** List 00553 ( Begin tuple 00554 ) End tuple 00555 ? Tuple is allowed to end here 00556 @endverbatim 00557 * 00558 * Note that a tuple is only allowed to end precisely at a '?', or at 00559 * the end of the specification. So if @a fmt is "c?cc" and @a list 00560 * contains two elements, an error will result. 00561 * 00562 * 'B' is similar to 'b', but may be used in the optional tuple specification. 00563 * It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER. 00564 * 00565 * If an optional part of a tuple contains no data, 'r' values will be 00566 * set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to 00567 * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values 00568 * will be set to @c NULL. 'b' may not appear inside an optional 00569 * tuple specification; use 'B' instead. 00570 * 00571 * @deprecated Provided for backward compatibility with the 1.7 API. 00572 * RA_SVN low-level functions are no longer considered public. 00573 */ 00574 SVN_DEPRECATED 00575 svn_error_t * 00576 svn_ra_svn_parse_tuple(const apr_array_header_t *list, 00577 apr_pool_t *pool, 00578 const char *fmt, ...); 00579 00580 /** Read a tuple from the network and parse it as a tuple, using the 00581 * format string notation from svn_ra_svn_parse_tuple(). 00582 * 00583 * @deprecated Provided for backward compatibility with the 1.7 API. 00584 * RA_SVN low-level functions are no longer considered public. 00585 */ 00586 SVN_DEPRECATED 00587 svn_error_t * 00588 svn_ra_svn_read_tuple(svn_ra_svn_conn_t *conn, 00589 apr_pool_t *pool, 00590 const char *fmt, ...); 00591 00592 /** Parse an array of @c svn_ra_svn_item_t structures as a list of 00593 * properties, storing the properties in a hash table. 00594 * 00595 * @since New in 1.5. 00596 * 00597 * @deprecated Provided for backward compatibility with the 1.7 API. 00598 * RA_SVN low-level functions are no longer considered public. 00599 */ 00600 SVN_DEPRECATED 00601 svn_error_t * 00602 svn_ra_svn_parse_proplist(const apr_array_header_t *list, 00603 apr_pool_t *pool, 00604 apr_hash_t **props); 00605 00606 /** Read a command response from the network and parse it as a tuple, using 00607 * the format string notation from svn_ra_svn_parse_tuple(). 00608 * 00609 * @deprecated Provided for backward compatibility with the 1.7 API. 00610 * RA_SVN low-level functions are no longer considered public. 00611 */ 00612 SVN_DEPRECATED 00613 svn_error_t * 00614 svn_ra_svn_read_cmd_response(svn_ra_svn_conn_t *conn, 00615 apr_pool_t *pool, 00616 const char *fmt, ...); 00617 00618 /** Accept commands over the network and handle them according to @a 00619 * commands. Command handlers will be passed @a conn, a subpool of @a 00620 * pool (cleared after each command is handled), the parameters of the 00621 * command, and @a baton. Commands will be accepted until a 00622 * terminating command is received (a command with "terminate" set in 00623 * the command table). If a command handler returns an error wrapped 00624 * in SVN_RA_SVN_CMD_ERR (see the @c SVN_CMD_ERR macro), the error 00625 * will be reported to the other side of the connection and the 00626 * command loop will continue; any other kind of error (typically a 00627 * network or protocol error) is passed through to the caller. 00628 * 00629 * @since New in 1.6. 00630 * 00631 * @deprecated Provided for backward compatibility with the 1.7 API. 00632 * RA_SVN low-level functions are no longer considered public. 00633 */ 00634 SVN_DEPRECATED 00635 svn_error_t * 00636 svn_ra_svn_handle_commands2(svn_ra_svn_conn_t *conn, 00637 apr_pool_t *pool, 00638 const svn_ra_svn_cmd_entry_t *commands, 00639 void *baton, 00640 svn_boolean_t error_on_disconnect); 00641 00642 /** Similar to svn_ra_svn_handle_commands2 but @a error_on_disconnect 00643 * is always @c FALSE. 00644 * 00645 * @deprecated Provided for backward compatibility with the 1.5 API. 00646 */ 00647 SVN_DEPRECATED 00648 svn_error_t * 00649 svn_ra_svn_handle_commands(svn_ra_svn_conn_t *conn, 00650 apr_pool_t *pool, 00651 const svn_ra_svn_cmd_entry_t *commands, 00652 void *baton); 00653 00654 /** Write a command over the network, using the same format string notation 00655 * as svn_ra_svn_write_tuple(). 00656 * 00657 * @deprecated Provided for backward compatibility with the 1.7 API. 00658 * RA_SVN low-level functions are no longer considered public. 00659 */ 00660 SVN_DEPRECATED 00661 svn_error_t * 00662 svn_ra_svn_write_cmd(svn_ra_svn_conn_t *conn, 00663 apr_pool_t *pool, 00664 const char *cmdname, 00665 const char *fmt, ...); 00666 00667 /** Write a successful command response over the network, using the 00668 * same format string notation as svn_ra_svn_write_tuple(). Do not use 00669 * partial tuples with this function; if you need to use partial 00670 * tuples, just write out the "success" and argument tuple by hand. 00671 * 00672 * @deprecated Provided for backward compatibility with the 1.7 API. 00673 * RA_SVN low-level functions are no longer considered public. 00674 */ 00675 SVN_DEPRECATED 00676 svn_error_t * 00677 svn_ra_svn_write_cmd_response(svn_ra_svn_conn_t *conn, 00678 apr_pool_t *pool, 00679 const char *fmt, ...); 00680 00681 /** Write an unsuccessful command response over the network. 00682 * 00683 * @deprecated Provided for backward compatibility with the 1.7 API. 00684 * RA_SVN low-level functions are no longer considered public. 00685 */ 00686 SVN_DEPRECATED 00687 svn_error_t * 00688 svn_ra_svn_write_cmd_failure(svn_ra_svn_conn_t *conn, 00689 apr_pool_t *pool, 00690 svn_error_t *err); 00691 00692 /** 00693 * @} 00694 */ 00695 00696 #ifdef __cplusplus 00697 } 00698 #endif /* __cplusplus */ 00699 00700 #endif /* SVN_RA_SVN_H */
1.6.1