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 files.
00169  *
00170  * Either @a sock or @a in_file/@a out_file 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  * Allocate the result in @a pool.
00188  *
00189  * @since New in 1.8
00190  */
00191 svn_ra_svn_conn_t *svn_ra_svn_create_conn3(apr_socket_t *sock,
00192                                            apr_file_t *in_file,
00193                                            apr_file_t *out_file,
00194                                            int compression_level,
00195                                            apr_size_t zero_copy_limit,
00196                                            apr_size_t error_check_interval,
00197                                            apr_pool_t *pool);
00198 
00199 /** Similar to svn_ra_svn_create_conn3() but disables the zero copy code
00200  * path and sets the error checking interval to 0.
00201  *
00202  * @since New in 1.7.
00203  *
00204  * @deprecated Provided for backward compatibility with the 1.7 API.
00205  */
00206 SVN_DEPRECATED
00207 svn_ra_svn_conn_t *
00208 svn_ra_svn_create_conn2(apr_socket_t *sock,
00209                         apr_file_t *in_file,
00210                         apr_file_t *out_file,
00211                         int compression_level,
00212                         apr_pool_t *pool);
00213 
00214 /** Similar to svn_ra_svn_create_conn2() but uses the default
00215  * compression level (#SVN_DELTA_COMPRESSION_LEVEL_DEFAULT) for network
00216  * transmissions.
00217  *
00218  * @deprecated Provided for backward compatibility with the 1.6 API.
00219  */
00220 SVN_DEPRECATED
00221 svn_ra_svn_conn_t *
00222 svn_ra_svn_create_conn(apr_socket_t *sock,
00223                        apr_file_t *in_file,
00224                        apr_file_t *out_file,
00225                        apr_pool_t *pool);
00226 
00227 /** Add the capabilities in @a list to @a conn's capabilities.
00228  * @a list contains svn_ra_svn_item_t entries (which should be of type
00229  * SVN_RA_SVN_WORD; a malformed data error will result if any are not).
00230  *
00231  * This is idempotent: if a given capability was already set for
00232  * @a conn, it remains set.
00233  */
00234 svn_error_t *
00235 svn_ra_svn_set_capabilities(svn_ra_svn_conn_t *conn,
00236                             const apr_array_header_t *list);
00237 
00238 /** Return @c TRUE if @a conn has the capability @a capability, or
00239  * @c FALSE if it does not. */
00240 svn_boolean_t
00241 svn_ra_svn_has_capability(svn_ra_svn_conn_t *conn,
00242                           const char *capability);
00243 
00244 /** Return the data compression level to use for network transmissions.
00245  *
00246  * @since New in 1.7.
00247  */
00248 int
00249 svn_ra_svn_compression_level(svn_ra_svn_conn_t *conn);
00250 
00251 /** Return the zero-copy data block limit to use for network
00252  * transmissions.
00253  *
00254  * @see http://en.wikipedia.org/wiki/Zero-copy
00255  *
00256  * @since New in 1.8.
00257  */
00258 apr_size_t
00259 svn_ra_svn_zero_copy_limit(svn_ra_svn_conn_t *conn);
00260 
00261 /** Returns the remote address of the connection as a string, if known,
00262  *  or NULL if inapplicable. */
00263 const char *
00264 svn_ra_svn_conn_remote_host(svn_ra_svn_conn_t *conn);
00265 
00266 /** Set @a *editor and @a *edit_baton to an editor which will pass editing
00267  * operations over the network, using @a conn and @a pool.
00268  *
00269  * Upon successful completion of the edit, the editor will invoke @a callback
00270  * with @a callback_baton as an argument.
00271  */
00272 void
00273 svn_ra_svn_get_editor(const svn_delta_editor_t **editor,
00274                       void **edit_baton,
00275                       svn_ra_svn_conn_t *conn,
00276                       apr_pool_t *pool,
00277                       svn_ra_svn_edit_callback callback,
00278                       void *callback_baton);
00279 
00280 /** Receive edit commands over the network and use them to drive @a editor
00281  * with @a edit_baton.  On return, @a *aborted will be set if the edit was
00282  * aborted.  The drive can be terminated with a finish-replay command only
00283  * if @a for_replay is TRUE.
00284  *
00285  * @since New in 1.4.
00286  */
00287 svn_error_t *
00288 svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn,
00289                          apr_pool_t *pool,
00290                          const svn_delta_editor_t *editor,
00291                          void *edit_baton,
00292                          svn_boolean_t *aborted,
00293                          svn_boolean_t for_replay);
00294 
00295 /** Like svn_ra_svn_drive_editor2, but with @a for_replay always FALSE.
00296  *
00297  * @deprecated Provided for backward compatibility with the 1.3 API.
00298  */
00299 SVN_DEPRECATED
00300 svn_error_t *
00301 svn_ra_svn_drive_editor(svn_ra_svn_conn_t *conn,
00302                         apr_pool_t *pool,
00303                         const svn_delta_editor_t *editor,
00304                         void *edit_baton,
00305                         svn_boolean_t *aborted);
00306 
00307 /** This function is only intended for use by svnserve.
00308  *
00309  * Perform CRAM-MD5 password authentication.  On success, return
00310  * SVN_NO_ERROR with *user set to the username and *success set to
00311  * TRUE.  On an error which can be reported to the client, report the
00312  * error and return SVN_NO_ERROR with *success set to FALSE.  On
00313  * communications failure, return an error.
00314  */
00315 svn_error_t *
00316 svn_ra_svn_cram_server(svn_ra_svn_conn_t *conn,
00317                        apr_pool_t *pool,
00318                        svn_config_t *pwdb,
00319                        const char **user,
00320                        svn_boolean_t *success);
00321 
00322 /**
00323  * Get libsvn_ra_svn version information.
00324  * @since New in 1.1.
00325  */
00326 const svn_version_t *
00327 svn_ra_svn_version(void);
00328 
00329 /**
00330  * @defgroup ra_svn_deprecated ra_svn low-level functions
00331  * @{
00332  */
00333 
00334 /** Write a number over the net.
00335  *
00336  * Writes will be buffered until the next read or flush.
00337  *
00338  * @deprecated Provided for backward compatibility with the 1.7 API.
00339  *             RA_SVN low-level functions are no longer considered public.
00340  */
00341 SVN_DEPRECATED
00342 svn_error_t *
00343 svn_ra_svn_write_number(svn_ra_svn_conn_t *conn,
00344                         apr_pool_t *pool,
00345                         apr_uint64_t number);
00346 
00347 /** Write a string over the net.
00348  *
00349  * Writes will be buffered until the next read or flush.
00350  *
00351  * @deprecated Provided for backward compatibility with the 1.7 API.
00352  *             RA_SVN low-level functions are no longer considered public.
00353  */
00354 SVN_DEPRECATED
00355 svn_error_t *
00356 svn_ra_svn_write_string(svn_ra_svn_conn_t *conn,
00357                         apr_pool_t *pool,
00358                         const svn_string_t *str);
00359 
00360 /** Write a cstring over the net.
00361  *
00362  * Writes will be buffered until the next read or flush.
00363  *
00364  * @deprecated Provided for backward compatibility with the 1.7 API.
00365  *             RA_SVN low-level functions are no longer considered public.
00366  */
00367 SVN_DEPRECATED
00368 svn_error_t *
00369 svn_ra_svn_write_cstring(svn_ra_svn_conn_t *conn,
00370                          apr_pool_t *pool,
00371                          const char *s);
00372 
00373 /** Write a word over the net.
00374  *
00375  * Writes will be buffered until the next read or flush.
00376  *
00377  * @deprecated Provided for backward compatibility with the 1.7 API.
00378  *             RA_SVN low-level functions are no longer considered public.
00379  */
00380 SVN_DEPRECATED
00381 svn_error_t *
00382 svn_ra_svn_write_word(svn_ra_svn_conn_t *conn,
00383                       apr_pool_t *pool,
00384                       const char *word);
00385 
00386 /** Write a list of properties over the net.  @a props is allowed to be NULL,
00387  * in which case an empty list will be written out.
00388  *
00389  * @since New in 1.5.
00390  *
00391  * @deprecated Provided for backward compatibility with the 1.7 API.
00392  *             RA_SVN low-level functions are no longer considered public.
00393  */
00394 SVN_DEPRECATED
00395 svn_error_t *
00396 svn_ra_svn_write_proplist(svn_ra_svn_conn_t *conn,
00397                           apr_pool_t *pool,
00398                           apr_hash_t *props);
00399 
00400 /** Begin a list.  Writes will be buffered until the next read or flush.
00401  *
00402  * @deprecated Provided for backward compatibility with the 1.7 API.
00403  *             RA_SVN low-level functions are no longer considered public.
00404  */
00405 SVN_DEPRECATED
00406 svn_error_t *
00407 svn_ra_svn_start_list(svn_ra_svn_conn_t *conn,
00408                       apr_pool_t *pool);
00409 
00410 /** End a list.  Writes will be buffered until the next read or flush.
00411  *
00412  * @deprecated Provided for backward compatibility with the 1.7 API.
00413  *             RA_SVN low-level functions are no longer considered public.
00414  */
00415 SVN_DEPRECATED
00416 svn_error_t *
00417 svn_ra_svn_end_list(svn_ra_svn_conn_t *conn,
00418                     apr_pool_t *pool);
00419 
00420 /** Flush the write buffer.
00421  *
00422  * Normally this shouldn't be necessary, since the write buffer is flushed
00423  * when a read is attempted.
00424  *
00425  * @deprecated Provided for backward compatibility with the 1.7 API.
00426  *             RA_SVN low-level functions are no longer considered public.
00427  */
00428 SVN_DEPRECATED
00429 svn_error_t *
00430 svn_ra_svn_flush(svn_ra_svn_conn_t *conn,
00431                  apr_pool_t *pool);
00432 
00433 /** Write a tuple, using a printf-like interface.
00434  *
00435  * The format string @a fmt may contain:
00436  *
00437  *@verbatim
00438      Spec  Argument type         Item type
00439      ----  --------------------  ---------
00440      n     apr_uint64_t          Number
00441      r     svn_revnum_t          Number
00442      s     const svn_string_t *  String
00443      c     const char *          String
00444      w     const char *          Word
00445      b     svn_boolean_t         Word ("true" or "false")
00446      (                           Begin tuple
00447      )                           End tuple
00448      ?                           Remaining elements optional
00449      ! (at beginning or end)     Suppress opening or closing of tuple
00450   @endverbatim
00451  *
00452  * Inside the optional part of a tuple, 'r' values may be @c
00453  * SVN_INVALID_REVNUM, 'n' values may be
00454  * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', and 'w' values may be
00455  * @c NULL; in these cases no data will be written.  'b' and '(' may
00456  * not appear in the optional part of a tuple.  Either all or none of
00457  * the optional values should be valid.
00458  *
00459  * (If we ever have a need for an optional boolean value, we should
00460  * invent a 'B' specifier which stores a boolean into an int, using -1
00461  * for unspecified.  Right now there is no need for such a thing.)
00462  *
00463  * Use the '!' format specifier to write partial tuples when you have
00464  * to transmit an array or other unusual data.  For example, to write
00465  * a tuple containing a revision, an array of words, and a boolean:
00466  * @code
00467      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "r(!", rev));
00468      for (i = 0; i < n; i++)
00469        SVN_ERR(svn_ra_svn_write_word(conn, pool, words[i]));
00470      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endcode
00471  *
00472  * @deprecated Provided for backward compatibility with the 1.7 API.
00473  *             RA_SVN low-level functions are no longer considered public.
00474  */
00475 SVN_DEPRECATED
00476 svn_error_t *
00477 svn_ra_svn_write_tuple(svn_ra_svn_conn_t *conn,
00478                        apr_pool_t *pool,
00479                        const char *fmt, ...);
00480 
00481 /** Read an item from the network into @a *item.
00482  *
00483  * @deprecated Provided for backward compatibility with the 1.7 API.
00484  *             RA_SVN low-level functions are no longer considered public.
00485  */
00486 SVN_DEPRECATED
00487 svn_error_t *
00488 svn_ra_svn_read_item(svn_ra_svn_conn_t *conn,
00489                      apr_pool_t *pool,
00490                      svn_ra_svn_item_t **item);
00491 
00492 /** Scan data on @a conn until we find something which looks like the
00493  * beginning of an svn server greeting (an open paren followed by a
00494  * whitespace character).  This function is appropriate for beginning
00495  * a client connection opened in tunnel mode, since people's dotfiles
00496  * sometimes write output to stdout.  It may only be called at the
00497  * beginning of a client connection.
00498  *
00499  * @deprecated Provided for backward compatibility with the 1.7 API.
00500  *             RA_SVN low-level functions are no longer considered public.
00501  */
00502 SVN_DEPRECATED
00503 svn_error_t *
00504 svn_ra_svn_skip_leading_garbage(svn_ra_svn_conn_t *conn,
00505                                 apr_pool_t *pool);
00506 
00507 /** Parse an array of @c svn_sort__item_t structures as a tuple, using a
00508  * printf-like interface.  The format string @a fmt may contain:
00509  *
00510  *@verbatim
00511      Spec  Argument type          Item type
00512      ----  --------------------   ---------
00513      n     apr_uint64_t *         Number
00514      r     svn_revnum_t *         Number
00515      s     svn_string_t **        String
00516      c     const char **          String
00517      w     const char **          Word
00518      b     svn_boolean_t *        Word ("true" or "false")
00519      B     apr_uint64_t *         Word ("true" or "false")
00520      l     apr_array_header_t **  List
00521      (                            Begin tuple
00522      )                            End tuple
00523      ?                            Tuple is allowed to end here
00524   @endverbatim
00525  *
00526  * Note that a tuple is only allowed to end precisely at a '?', or at
00527  * the end of the specification.  So if @a fmt is "c?cc" and @a list
00528  * contains two elements, an error will result.
00529  *
00530  * 'B' is similar to 'b', but may be used in the optional tuple specification.
00531  * It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER.
00532  *
00533  * If an optional part of a tuple contains no data, 'r' values will be
00534  * set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to
00535  * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
00536  * will be set to @c NULL.  'b' may not appear inside an optional
00537  * tuple specification; use 'B' instead.
00538  *
00539  * @deprecated Provided for backward compatibility with the 1.7 API.
00540  *             RA_SVN low-level functions are no longer considered public.
00541  */
00542 SVN_DEPRECATED
00543 svn_error_t *
00544 svn_ra_svn_parse_tuple(const apr_array_header_t *list,
00545                        apr_pool_t *pool,
00546                        const char *fmt, ...);
00547 
00548 /** Read a tuple from the network and parse it as a tuple, using the
00549  * format string notation from svn_ra_svn_parse_tuple().
00550  *
00551  * @deprecated Provided for backward compatibility with the 1.7 API.
00552  *             RA_SVN low-level functions are no longer considered public.
00553  */
00554 SVN_DEPRECATED
00555 svn_error_t *
00556 svn_ra_svn_read_tuple(svn_ra_svn_conn_t *conn,
00557                       apr_pool_t *pool,
00558                       const char *fmt, ...);
00559 
00560 /** Parse an array of @c svn_ra_svn_item_t structures as a list of
00561  * properties, storing the properties in a hash table.
00562  *
00563  * @since New in 1.5.
00564  *
00565  * @deprecated Provided for backward compatibility with the 1.7 API.
00566  *             RA_SVN low-level functions are no longer considered public.
00567  */
00568 SVN_DEPRECATED
00569 svn_error_t *
00570 svn_ra_svn_parse_proplist(const apr_array_header_t *list,
00571                           apr_pool_t *pool,
00572                           apr_hash_t **props);
00573 
00574 /** Read a command response from the network and parse it as a tuple, using
00575  * the format string notation from svn_ra_svn_parse_tuple().
00576  *
00577  * @deprecated Provided for backward compatibility with the 1.7 API.
00578  *             RA_SVN low-level functions are no longer considered public.
00579  */
00580 SVN_DEPRECATED
00581 svn_error_t *
00582 svn_ra_svn_read_cmd_response(svn_ra_svn_conn_t *conn,
00583                              apr_pool_t *pool,
00584                              const char *fmt, ...);
00585 
00586 /** Accept commands over the network and handle them according to @a
00587  * commands.  Command handlers will be passed @a conn, a subpool of @a
00588  * pool (cleared after each command is handled), the parameters of the
00589  * command, and @a baton.  Commands will be accepted until a
00590  * terminating command is received (a command with "terminate" set in
00591  * the command table).  If a command handler returns an error wrapped
00592  * in SVN_RA_SVN_CMD_ERR (see the @c SVN_CMD_ERR macro), the error
00593  * will be reported to the other side of the connection and the
00594  * command loop will continue; any other kind of error (typically a
00595  * network or protocol error) is passed through to the caller.
00596  *
00597  * @since New in 1.6.
00598  *
00599  * @deprecated Provided for backward compatibility with the 1.7 API.
00600  *             RA_SVN low-level functions are no longer considered public.
00601  */
00602 SVN_DEPRECATED
00603 svn_error_t *
00604 svn_ra_svn_handle_commands2(svn_ra_svn_conn_t *conn,
00605                             apr_pool_t *pool,
00606                             const svn_ra_svn_cmd_entry_t *commands,
00607                             void *baton,
00608                             svn_boolean_t error_on_disconnect);
00609 
00610 /** Similar to svn_ra_svn_handle_commands2 but @a error_on_disconnect
00611  * is always @c FALSE.
00612  *
00613  * @deprecated Provided for backward compatibility with the 1.5 API.
00614  */
00615 SVN_DEPRECATED
00616 svn_error_t *
00617 svn_ra_svn_handle_commands(svn_ra_svn_conn_t *conn,
00618                            apr_pool_t *pool,
00619                            const svn_ra_svn_cmd_entry_t *commands,
00620                            void *baton);
00621 
00622 /** Write a command over the network, using the same format string notation
00623  * as svn_ra_svn_write_tuple().
00624  *
00625  * @deprecated Provided for backward compatibility with the 1.7 API.
00626  *             RA_SVN low-level functions are no longer considered public.
00627  */
00628 SVN_DEPRECATED
00629 svn_error_t *
00630 svn_ra_svn_write_cmd(svn_ra_svn_conn_t *conn,
00631                      apr_pool_t *pool,
00632                      const char *cmdname,
00633                      const char *fmt, ...);
00634 
00635 /** Write a successful command response over the network, using the
00636  * same format string notation as svn_ra_svn_write_tuple().  Do not use
00637  * partial tuples with this function; if you need to use partial
00638  * tuples, just write out the "success" and argument tuple by hand.
00639  *
00640  * @deprecated Provided for backward compatibility with the 1.7 API.
00641  *             RA_SVN low-level functions are no longer considered public.
00642  */
00643 SVN_DEPRECATED
00644 svn_error_t *
00645 svn_ra_svn_write_cmd_response(svn_ra_svn_conn_t *conn,
00646                               apr_pool_t *pool,
00647                               const char *fmt, ...);
00648 
00649 /** Write an unsuccessful command response over the network.
00650  *
00651  * @deprecated Provided for backward compatibility with the 1.7 API.
00652  *             RA_SVN low-level functions are no longer considered public.
00653  */
00654 SVN_DEPRECATED
00655 svn_error_t *
00656 svn_ra_svn_write_cmd_failure(svn_ra_svn_conn_t *conn,
00657                              apr_pool_t *pool,
00658                              svn_error_t *err);
00659 
00660 /**
00661  * @}
00662  */
00663 
00664 #ifdef __cplusplus
00665 }
00666 #endif /* __cplusplus */
00667 
00668 #endif  /* SVN_RA_SVN_H */

Generated on Thu Aug 10 22:21:59 2017 for Subversion by  doxygen 1.4.7