svn_ra_svn.h

Go to the documentation of this file.
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 void
00292 svn_ra_svn_get_editor(const svn_delta_editor_t **editor,
00293                       void **edit_baton,
00294                       svn_ra_svn_conn_t *conn,
00295                       apr_pool_t *pool,
00296                       svn_ra_svn_edit_callback callback,
00297                       void *callback_baton);
00298 
00299 /** Receive edit commands over the network and use them to drive @a editor
00300  * with @a edit_baton.  On return, @a *aborted will be set if the edit was
00301  * aborted.  The drive can be terminated with a finish-replay command only
00302  * if @a for_replay is TRUE.
00303  *
00304  * @since New in 1.4.
00305  */
00306 svn_error_t *
00307 svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn,
00308                          apr_pool_t *pool,
00309                          const svn_delta_editor_t *editor,
00310                          void *edit_baton,
00311                          svn_boolean_t *aborted,
00312                          svn_boolean_t for_replay);
00313 
00314 /** Like svn_ra_svn_drive_editor2, but with @a for_replay always FALSE.
00315  *
00316  * @deprecated Provided for backward compatibility with the 1.3 API.
00317  */
00318 SVN_DEPRECATED
00319 svn_error_t *
00320 svn_ra_svn_drive_editor(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 
00326 /** This function is only intended for use by svnserve.
00327  *
00328  * Perform CRAM-MD5 password authentication.  On success, return
00329  * SVN_NO_ERROR with *user set to the username and *success set to
00330  * TRUE.  On an error which can be reported to the client, report the
00331  * error and return SVN_NO_ERROR with *success set to FALSE.  On
00332  * communications failure, return an error.
00333  */
00334 svn_error_t *
00335 svn_ra_svn_cram_server(svn_ra_svn_conn_t *conn,
00336                        apr_pool_t *pool,
00337                        svn_config_t *pwdb,
00338                        const char **user,
00339                        svn_boolean_t *success);
00340 
00341 /**
00342  * Get libsvn_ra_svn version information.
00343  * @since New in 1.1.
00344  */
00345 const svn_version_t *
00346 svn_ra_svn_version(void);
00347 
00348 /**
00349  * @defgroup ra_svn_deprecated ra_svn low-level functions
00350  * @{
00351  */
00352 
00353 /** Write a number over the net.
00354  *
00355  * Writes will be buffered until the next read or flush.
00356  *
00357  * @deprecated Provided for backward compatibility with the 1.7 API.
00358  *             RA_SVN low-level functions are no longer considered public.
00359  */
00360 SVN_DEPRECATED
00361 svn_error_t *
00362 svn_ra_svn_write_number(svn_ra_svn_conn_t *conn,
00363                         apr_pool_t *pool,
00364                         apr_uint64_t number);
00365 
00366 /** Write a string 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_string(svn_ra_svn_conn_t *conn,
00376                         apr_pool_t *pool,
00377                         const svn_string_t *str);
00378 
00379 /** Write a cstring 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_cstring(svn_ra_svn_conn_t *conn,
00389                          apr_pool_t *pool,
00390                          const char *s);
00391 
00392 /** Write a word 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_word(svn_ra_svn_conn_t *conn,
00402                       apr_pool_t *pool,
00403                       const char *word);
00404 
00405 /** Write a list of properties over the net.  @a props is allowed to be NULL,
00406  * in which case an empty list will be written out.
00407  *
00408  * @since New in 1.5.
00409  *
00410  * @deprecated Provided for backward compatibility with the 1.7 API.
00411  *             RA_SVN low-level functions are no longer considered public.
00412  */
00413 SVN_DEPRECATED
00414 svn_error_t *
00415 svn_ra_svn_write_proplist(svn_ra_svn_conn_t *conn,
00416                           apr_pool_t *pool,
00417                           apr_hash_t *props);
00418 
00419 /** Begin a list.  Writes will be buffered until the next read or flush.
00420  *
00421  * @deprecated Provided for backward compatibility with the 1.7 API.
00422  *             RA_SVN low-level functions are no longer considered public.
00423  */
00424 SVN_DEPRECATED
00425 svn_error_t *
00426 svn_ra_svn_start_list(svn_ra_svn_conn_t *conn,
00427                       apr_pool_t *pool);
00428 
00429 /** End a list.  Writes will be buffered until the next read or flush.
00430  *
00431  * @deprecated Provided for backward compatibility with the 1.7 API.
00432  *             RA_SVN low-level functions are no longer considered public.
00433  */
00434 SVN_DEPRECATED
00435 svn_error_t *
00436 svn_ra_svn_end_list(svn_ra_svn_conn_t *conn,
00437                     apr_pool_t *pool);
00438 
00439 /** Flush the write buffer.
00440  *
00441  * Normally this shouldn't be necessary, since the write buffer is flushed
00442  * when a read is attempted.
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_flush(svn_ra_svn_conn_t *conn,
00450                  apr_pool_t *pool);
00451 
00452 /** Write a tuple, using a printf-like interface.
00453  *
00454  * The format string @a fmt may contain:
00455  *
00456  *@verbatim
00457      Spec  Argument type         Item type
00458      ----  --------------------  ---------
00459      n     apr_uint64_t          Number
00460      r     svn_revnum_t          Number
00461      s     const svn_string_t *  String
00462      c     const char *          String
00463      w     const char *          Word
00464      b     svn_boolean_t         Word ("true" or "false")
00465      (                           Begin tuple
00466      )                           End tuple
00467      ?                           Remaining elements optional
00468      ! (at beginning or end)     Suppress opening or closing of tuple
00469   @endverbatim
00470  *
00471  * Inside the optional part of a tuple, 'r' values may be @c
00472  * SVN_INVALID_REVNUM, 'n' values may be
00473  * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', and 'w' values may be
00474  * @c NULL; in these cases no data will be written.  'b' and '(' may
00475  * not appear in the optional part of a tuple.  Either all or none of
00476  * the optional values should be valid.
00477  *
00478  * (If we ever have a need for an optional boolean value, we should
00479  * invent a 'B' specifier which stores a boolean into an int, using -1
00480  * for unspecified.  Right now there is no need for such a thing.)
00481  *
00482  * Use the '!' format specifier to write partial tuples when you have
00483  * to transmit an array or other unusual data.  For example, to write
00484  * a tuple containing a revision, an array of words, and a boolean:
00485  * @code
00486      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "r(!", rev));
00487      for (i = 0; i < n; i++)
00488        SVN_ERR(svn_ra_svn_write_word(conn, pool, words[i]));
00489      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endcode
00490  *
00491  * @deprecated Provided for backward compatibility with the 1.7 API.
00492  *             RA_SVN low-level functions are no longer considered public.
00493  */
00494 SVN_DEPRECATED
00495 svn_error_t *
00496 svn_ra_svn_write_tuple(svn_ra_svn_conn_t *conn,
00497                        apr_pool_t *pool,
00498                        const char *fmt, ...);
00499 
00500 /** Read an item from the network into @a *item.
00501  *
00502  * @deprecated Provided for backward compatibility with the 1.7 API.
00503  *             RA_SVN low-level functions are no longer considered public.
00504  */
00505 SVN_DEPRECATED
00506 svn_error_t *
00507 svn_ra_svn_read_item(svn_ra_svn_conn_t *conn,
00508                      apr_pool_t *pool,
00509                      svn_ra_svn_item_t **item);
00510 
00511 /** Scan data on @a conn until we find something which looks like the
00512  * beginning of an svn server greeting (an open paren followed by a
00513  * whitespace character).  This function is appropriate for beginning
00514  * a client connection opened in tunnel mode, since people's dotfiles
00515  * sometimes write output to stdout.  It may only be called at the
00516  * beginning of a client connection.
00517  *
00518  * @deprecated Provided for backward compatibility with the 1.7 API.
00519  *             RA_SVN low-level functions are no longer considered public.
00520  */
00521 SVN_DEPRECATED
00522 svn_error_t *
00523 svn_ra_svn_skip_leading_garbage(svn_ra_svn_conn_t *conn,
00524                                 apr_pool_t *pool);
00525 
00526 /** Parse an array of @c svn_sort__item_t structures as a tuple, using a
00527  * printf-like interface.  The format string @a fmt may contain:
00528  *
00529  *@verbatim
00530      Spec  Argument type          Item type
00531      ----  --------------------   ---------
00532      n     apr_uint64_t *         Number
00533      r     svn_revnum_t *         Number
00534      s     svn_string_t **        String
00535      c     const char **          String
00536      w     const char **          Word
00537      b     svn_boolean_t *        Word ("true" or "false")
00538      B     apr_uint64_t *         Word ("true" or "false")
00539      l     apr_array_header_t **  List
00540      (                            Begin tuple
00541      )                            End tuple
00542      ?                            Tuple is allowed to end here
00543   @endverbatim
00544  *
00545  * Note that a tuple is only allowed to end precisely at a '?', or at
00546  * the end of the specification.  So if @a fmt is "c?cc" and @a list
00547  * contains two elements, an error will result.
00548  *
00549  * 'B' is similar to 'b', but may be used in the optional tuple specification.
00550  * It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER.
00551  *
00552  * If an optional part of a tuple contains no data, 'r' values will be
00553  * set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to
00554  * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
00555  * will be set to @c NULL.  'b' may not appear inside an optional
00556  * tuple specification; use 'B' instead.
00557  *
00558  * @deprecated Provided for backward compatibility with the 1.7 API.
00559  *             RA_SVN low-level functions are no longer considered public.
00560  */
00561 SVN_DEPRECATED
00562 svn_error_t *
00563 svn_ra_svn_parse_tuple(const apr_array_header_t *list,
00564                        apr_pool_t *pool,
00565                        const char *fmt, ...);
00566 
00567 /** Read a tuple from the network and parse it as a tuple, using the
00568  * format string notation from svn_ra_svn_parse_tuple().
00569  *
00570  * @deprecated Provided for backward compatibility with the 1.7 API.
00571  *             RA_SVN low-level functions are no longer considered public.
00572  */
00573 SVN_DEPRECATED
00574 svn_error_t *
00575 svn_ra_svn_read_tuple(svn_ra_svn_conn_t *conn,
00576                       apr_pool_t *pool,
00577                       const char *fmt, ...);
00578 
00579 /** Parse an array of @c svn_ra_svn_item_t structures as a list of
00580  * properties, storing the properties in a hash table.
00581  *
00582  * @since New in 1.5.
00583  *
00584  * @deprecated Provided for backward compatibility with the 1.7 API.
00585  *             RA_SVN low-level functions are no longer considered public.
00586  */
00587 SVN_DEPRECATED
00588 svn_error_t *
00589 svn_ra_svn_parse_proplist(const apr_array_header_t *list,
00590                           apr_pool_t *pool,
00591                           apr_hash_t **props);
00592 
00593 /** Read a command response from the network and parse it as a tuple, using
00594  * the format string notation from svn_ra_svn_parse_tuple().
00595  *
00596  * @deprecated Provided for backward compatibility with the 1.7 API.
00597  *             RA_SVN low-level functions are no longer considered public.
00598  */
00599 SVN_DEPRECATED
00600 svn_error_t *
00601 svn_ra_svn_read_cmd_response(svn_ra_svn_conn_t *conn,
00602                              apr_pool_t *pool,
00603                              const char *fmt, ...);
00604 
00605 /** Accept commands over the network and handle them according to @a
00606  * commands.  Command handlers will be passed @a conn, a subpool of @a
00607  * pool (cleared after each command is handled), the parameters of the
00608  * command, and @a baton.  Commands will be accepted until a
00609  * terminating command is received (a command with "terminate" set in
00610  * the command table).  If a command handler returns an error wrapped
00611  * in SVN_RA_SVN_CMD_ERR (see the @c SVN_CMD_ERR macro), the error
00612  * will be reported to the other side of the connection and the
00613  * command loop will continue; any other kind of error (typically a
00614  * network or protocol error) is passed through to the caller.
00615  *
00616  * @since New in 1.6.
00617  *
00618  * @deprecated Provided for backward compatibility with the 1.7 API.
00619  *             RA_SVN low-level functions are no longer considered public.
00620  */
00621 SVN_DEPRECATED
00622 svn_error_t *
00623 svn_ra_svn_handle_commands2(svn_ra_svn_conn_t *conn,
00624                             apr_pool_t *pool,
00625                             const svn_ra_svn_cmd_entry_t *commands,
00626                             void *baton,
00627                             svn_boolean_t error_on_disconnect);
00628 
00629 /** Similar to svn_ra_svn_handle_commands2 but @a error_on_disconnect
00630  * is always @c FALSE.
00631  *
00632  * @deprecated Provided for backward compatibility with the 1.5 API.
00633  */
00634 SVN_DEPRECATED
00635 svn_error_t *
00636 svn_ra_svn_handle_commands(svn_ra_svn_conn_t *conn,
00637                            apr_pool_t *pool,
00638                            const svn_ra_svn_cmd_entry_t *commands,
00639                            void *baton);
00640 
00641 /** Write a command over the network, using the same format string notation
00642  * as svn_ra_svn_write_tuple().
00643  *
00644  * @deprecated Provided for backward compatibility with the 1.7 API.
00645  *             RA_SVN low-level functions are no longer considered public.
00646  */
00647 SVN_DEPRECATED
00648 svn_error_t *
00649 svn_ra_svn_write_cmd(svn_ra_svn_conn_t *conn,
00650                      apr_pool_t *pool,
00651                      const char *cmdname,
00652                      const char *fmt, ...);
00653 
00654 /** Write a successful command response over the network, using the
00655  * same format string notation as svn_ra_svn_write_tuple().  Do not use
00656  * partial tuples with this function; if you need to use partial
00657  * tuples, just write out the "success" and argument tuple by hand.
00658  *
00659  * @deprecated Provided for backward compatibility with the 1.7 API.
00660  *             RA_SVN low-level functions are no longer considered public.
00661  */
00662 SVN_DEPRECATED
00663 svn_error_t *
00664 svn_ra_svn_write_cmd_response(svn_ra_svn_conn_t *conn,
00665                               apr_pool_t *pool,
00666                               const char *fmt, ...);
00667 
00668 /** Write an unsuccessful command response over the network.
00669  *
00670  * @deprecated Provided for backward compatibility with the 1.7 API.
00671  *             RA_SVN low-level functions are no longer considered public.
00672  */
00673 SVN_DEPRECATED
00674 svn_error_t *
00675 svn_ra_svn_write_cmd_failure(svn_ra_svn_conn_t *conn,
00676                              apr_pool_t *pool,
00677                              svn_error_t *err);
00678 
00679 /**
00680  * @}
00681  */
00682 
00683 #ifdef __cplusplus
00684 }
00685 #endif /* __cplusplus */
00686 
00687 #endif  /* SVN_RA_SVN_H */

Generated on Mon Mar 17 15:46:33 2014 for Subversion by  doxygen 1.4.7