svn_types.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_types.h
00024  * @brief Subversion's data types
00025  */
00026 
00027 #ifndef SVN_TYPES_H
00028 #define SVN_TYPES_H
00029 
00030 /* ### this should go away, but it causes too much breakage right now */
00031 #include <stdlib.h>
00032 #include <limits.h> /* for ULONG_MAX */
00033 
00034 #include <apr.h>         /* for apr_size_t, apr_int64_t, ... */
00035 #include <apr_version.h>
00036 #include <apr_errno.h>   /* for apr_status_t */
00037 #include <apr_pools.h>   /* for apr_pool_t */
00038 #include <apr_hash.h>    /* for apr_hash_t */
00039 #include <apr_tables.h>  /* for apr_array_push() */
00040 #include <apr_time.h>    /* for apr_time_t */
00041 #include <apr_strings.h> /* for apr_atoi64() */
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif /* __cplusplus */
00046 
00047 
00048 
00049 /** Macro used to mark deprecated functions.
00050  *
00051  * @since New in 1.6.
00052  */
00053 #ifndef SVN_DEPRECATED
00054 # if !defined(SWIGPERL) && !defined(SWIGPYTHON) && !defined(SWIGRUBY)
00055 #  if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
00056 #   define SVN_DEPRECATED __attribute__((deprecated))
00057 #  elif defined(_MSC_VER) && _MSC_VER >= 1300
00058 #   define SVN_DEPRECATED __declspec(deprecated)
00059 #  else
00060 #   define SVN_DEPRECATED
00061 #  endif
00062 # else
00063 #  define SVN_DEPRECATED
00064 # endif
00065 #endif
00066 
00067 
00068 /** Macro used to mark experimental functions.
00069  *
00070  * @since New in 1.9.
00071  */
00072 #ifndef SVN_EXPERIMENTAL
00073 # if !defined(SWIGPERL) && !defined(SWIGPYTHON) && !defined(SWIGRUBY)
00074 #  if defined(__has_attribute)
00075 #    if __has_attribute(__warning__)
00076 #      define SVN_EXPERIMENTAL __attribute__((warning("experimental function used")))
00077 #    else
00078 #      define SVN_EXPERIMENTAL
00079 #    endif
00080 #  elif !defined(__llvm__) && defined(__GNUC__) \
00081       && (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
00082 #   define SVN_EXPERIMENTAL __attribute__((warning("experimental function used")))
00083 #  elif defined(_MSC_VER) && _MSC_VER >= 1300
00084 #   define SVN_EXPERIMENTAL __declspec(deprecated("experimental function used"))
00085 #  else
00086 #   define SVN_EXPERIMENTAL
00087 #  endif
00088 # else
00089 #  define SVN_EXPERIMENTAL
00090 # endif
00091 #endif
00092 
00093 /** Macro used to mark functions that require a final null sentinel argument.
00094  *
00095  * @since New in 1.9.
00096  */
00097 #ifndef SVN_NEEDS_SENTINEL_NULL
00098 #  if defined(__has_attribute)
00099 #    if __has_attribute(__sentinel__)
00100 #      define SVN_NEEDS_SENTINEL_NULL __attribute__((sentinel))
00101 #    else
00102 #      define SVN_NEEDS_SENTINEL_NULL
00103 #    endif
00104 #  elif defined(__GNUC__) && (__GNUC__ >= 4)
00105 #    define SVN_NEEDS_SENTINEL_NULL __attribute__((sentinel))
00106 #  else
00107 #    define SVN_NEEDS_SENTINEL_NULL
00108 #  endif
00109 #endif
00110 
00111 
00112 /** Indicate whether the current platform supports unaligned data access.
00113  *
00114  * On the majority of machines running SVN (x86 / x64), unaligned access
00115  * is much cheaper than repeated aligned access. Define this macro to 1
00116  * on those machines.
00117  * Unaligned access on other machines (e.g. IA64) will trigger memory
00118  * access faults or simply misbehave.
00119  *
00120  * Note: Some platforms may only support unaligned access for integers
00121  * (PowerPC).  As a result this macro should only be used to determine
00122  * if unaligned access is supported for integers.
00123  *
00124  * @since New in 1.7.
00125  */
00126 #ifndef SVN_UNALIGNED_ACCESS_IS_OK
00127 # if defined(_M_IX86) || defined(i386) \
00128      || defined(_M_X64) || defined(__x86_64) \
00129      || defined(__powerpc__) || defined(__ppc__)
00130 #  define SVN_UNALIGNED_ACCESS_IS_OK 1
00131 # else
00132 #  define SVN_UNALIGNED_ACCESS_IS_OK 0
00133 # endif
00134 #endif
00135 
00136 
00137 
00138 /** YABT:  Yet Another Boolean Type */
00139 typedef int svn_boolean_t;
00140 
00141 #ifndef TRUE
00142 /** uhh... true */
00143 #define TRUE 1
00144 #endif /* TRUE */
00145 
00146 #ifndef FALSE
00147 /** uhh... false */
00148 #define FALSE 0
00149 #endif /* FALSE */
00150 
00151 
00152 
00153 /* Declaration of a unique type, never defined, for the SVN_VA_NULL macro.
00154  *
00155  * NOTE: Private. Not for direct use by third-party code.
00156  */
00157 struct svn__null_pointer_constant_stdarg_sentinel_t;
00158 
00159 /** Null pointer constant used as a sentinel in variable argument lists.
00160  *
00161  * Use of this macro ensures that the argument is of the correct size when a
00162  * pointer is expected. (The macro @c NULL is not defined as a pointer on
00163  * all systems, and the arguments to variadic functions are not converted
00164  * automatically to the expected type.)
00165  *
00166  * @since New in 1.9.
00167  */
00168 #define SVN_VA_NULL ((struct svn__null_pointer_constant_stdarg_sentinel_t*)0)
00169 /* See? (char*)NULL -- They have the same length, but the cast looks ugly. */
00170 
00171 
00172 
00173 /** Subversion error object.
00174  *
00175  * Defined here, rather than in svn_error.h, to avoid a recursive @#include
00176  * situation.
00177  */
00178 typedef struct svn_error_t
00179 {
00180   /** APR error value; possibly an SVN_ custom error code (see
00181    * `svn_error_codes.h' for a full listing).
00182    */
00183   apr_status_t apr_err;
00184 
00185   /** Details from the producer of error.
00186    *
00187    * Note that if this error was generated by Subversion's API, you'll
00188    * probably want to use svn_err_best_message() to get a single
00189    * descriptive string for this error chain (see the @a child member)
00190    * or svn_handle_error2() to print the error chain in full.  This is
00191    * because Subversion's API functions sometimes add many links to
00192    * the error chain that lack details (used only to produce virtual
00193    * stack traces).  (Use svn_error_purge_tracing() to remove those
00194    * trace-only links from the error chain.)
00195    */
00196   const char *message;
00197 
00198   /** Pointer to the error we "wrap" (may be @c NULL).  Via this
00199    * member, individual error object can be strung together into an
00200    * "error chain".
00201    */
00202   struct svn_error_t *child;
00203 
00204   /** The pool in which this error object is allocated.  (If
00205    * Subversion's APIs are used to manage error chains, then this pool
00206    * will contain the whole error chain of which this object is a
00207    * member.) */
00208   apr_pool_t *pool;
00209 
00210   /** Source file where the error originated (iff @c SVN_DEBUG;
00211    * undefined otherwise).
00212    */
00213   const char *file;
00214 
00215   /** Source line where the error originated (iff @c SVN_DEBUG;
00216    * undefined otherwise).
00217    */
00218   long line;
00219 
00220 } svn_error_t;
00221 
00222 
00223 
00224 /* See svn_version.h.
00225    Defined here to avoid including svn_version.h from all public headers. */
00226 typedef struct svn_version_t svn_version_t;
00227 
00228 
00229 
00230 /** @defgroup APR_ARRAY_compat_macros APR Array Compatibility Helper Macros
00231  * These macros are provided by APR itself from version 1.3.
00232  * Definitions are provided here for when using older versions of APR.
00233  * @{
00234  */
00235 
00236 /** index into an apr_array_header_t */
00237 #ifndef APR_ARRAY_IDX
00238 #define APR_ARRAY_IDX(ary,i,type) (((type *)(ary)->elts)[i])
00239 #endif
00240 
00241 /** easier array-pushing syntax */
00242 #ifndef APR_ARRAY_PUSH
00243 #define APR_ARRAY_PUSH(ary,type) (*((type *)apr_array_push(ary)))
00244 #endif
00245 
00246 /** @} */
00247 
00248 
00249 
00250 /** @defgroup apr_hash_utilities APR Hash Table Helpers
00251  * These functions enable the caller to dereference an APR hash table index
00252  * without type casts or temporary variables.
00253  *
00254  * These functions are provided by APR itself from version 1.5.
00255  * Definitions are provided here for when using older versions of APR.
00256  * @{
00257  */
00258 
00259 #if !APR_VERSION_AT_LEAST(1, 5, 0)
00260 
00261 /** Return the key of the hash table entry indexed by @a hi. */
00262 const void *
00263 apr_hash_this_key(apr_hash_index_t *hi);
00264 
00265 /** Return the key length of the hash table entry indexed by @a hi. */
00266 apr_ssize_t
00267 apr_hash_this_key_len(apr_hash_index_t *hi);
00268 
00269 /** Return the value of the hash table entry indexed by @a hi. */
00270 void *
00271 apr_hash_this_val(apr_hash_index_t *hi);
00272 
00273 #endif
00274 
00275 /** @} */
00276 
00277 
00278 
00279 /** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of
00280  * invalid-pathname error but not ERROR_INVALID_NAME, so we include it.
00281  * We also include ERROR_DIRECTORY as that was not included in apr versions
00282  * before 1.4.0 and this fix is not backported */
00283 /* ### These fixes should go into APR. */
00284 #ifndef WIN32
00285 #define SVN__APR_STATUS_IS_ENOTDIR(s)  APR_STATUS_IS_ENOTDIR(s)
00286 #else
00287 #define SVN__APR_STATUS_IS_ENOTDIR(s)  (APR_STATUS_IS_ENOTDIR(s) \
00288                       || ((s) == APR_OS_START_SYSERR + ERROR_DIRECTORY) \
00289                       || ((s) == APR_OS_START_SYSERR + ERROR_INVALID_NAME))
00290 #endif
00291 
00292 /** On Windows, APR_STATUS_IS_EPIPE does not include ERROR_NO_DATA error.
00293  * So we include it.*/
00294 /* ### These fixes should go into APR. */
00295 #ifndef WIN32
00296 #define SVN__APR_STATUS_IS_EPIPE(s)  APR_STATUS_IS_EPIPE(s)
00297 #else
00298 #define SVN__APR_STATUS_IS_EPIPE(s)  (APR_STATUS_IS_EPIPE(s) \
00299                       || ((s) == APR_OS_START_SYSERR + ERROR_NO_DATA))
00300 #endif
00301 
00302 /** @} */
00303 
00304 
00305 
00306 /** The various types of nodes in the Subversion filesystem. */
00307 typedef enum svn_node_kind_t
00308 {
00309   /** absent */
00310   svn_node_none,
00311 
00312   /** regular file */
00313   svn_node_file,
00314 
00315   /** directory */
00316   svn_node_dir,
00317 
00318   /** something's here, but we don't know what */
00319   svn_node_unknown,
00320 
00321   /**
00322    * symbolic link
00323    * @note This value is not currently used by the public API.
00324    * @since New in 1.8.
00325    */
00326   svn_node_symlink
00327 } svn_node_kind_t;
00328 
00329 /** Return a constant string expressing @a kind as an English word, e.g.,
00330  * "file", "dir", etc.  The string is not localized, as it may be used for
00331  * client<->server communications.  If the kind is not recognized, return
00332  * "unknown".
00333  *
00334  * @since New in 1.6.
00335  */
00336 const char *
00337 svn_node_kind_to_word(svn_node_kind_t kind);
00338 
00339 /** Return the appropriate node_kind for @a word.  @a word is as
00340  * returned from svn_node_kind_to_word().  If @a word does not
00341  * represent a recognized kind or is @c NULL, return #svn_node_unknown.
00342  *
00343  * @since New in 1.6.
00344  */
00345 svn_node_kind_t
00346 svn_node_kind_from_word(const char *word);
00347 
00348 
00349 /** Generic three-state property to represent an unknown value for values
00350  * that are just like booleans.  The values have been set deliberately to
00351  * make tristates disjoint from #svn_boolean_t.
00352  *
00353  * @note It is unsafe to use apr_pcalloc() to allocate these, since '0' is
00354  * not a valid value.
00355  *
00356  * @since New in 1.7. */
00357 typedef enum svn_tristate_t
00358 {
00359   /** state known to be false (the constant does not evaulate to false) */
00360   svn_tristate_false = 2,
00361   /** state known to be true */
00362   svn_tristate_true,
00363   /** state could be true or false */
00364   svn_tristate_unknown
00365 } svn_tristate_t;
00366 
00367 /** Return a constant string "true", "false" or NULL representing the value of
00368  * @a tristate.
00369  *
00370  * @since New in 1.7.
00371  */
00372 const char *
00373 svn_tristate__to_word(svn_tristate_t tristate);
00374 
00375 /** Return the appropriate tristate for @a word. If @a word is "true", returns
00376  * #svn_tristate_true; if @a word is "false", returns #svn_tristate_false,
00377  * for all other values (including NULL) returns #svn_tristate_unknown.
00378  *
00379  * @since New in 1.7.
00380  */
00381 svn_tristate_t
00382 svn_tristate__from_word(const char * word);
00383 
00384 
00385 
00386 /** About Special Files in Subversion
00387  *
00388  * Subversion denotes files that cannot be portably created or
00389  * modified as "special" files (svn_node_special).  It stores these
00390  * files in the repository as a plain text file with the svn:special
00391  * property set.  The file contents contain: a platform-specific type
00392  * string, a space character, then any information necessary to create
00393  * the file on a supported platform.  For example, if a symbolic link
00394  * were being represented, the repository file would have the
00395  * following contents:
00396  *
00397  * "link /path/to/link/target"
00398  *
00399  * Where 'link' is the identifier string showing that this special
00400  * file should be a symbolic link and '/path/to/link/target' is the
00401  * destination of the symbolic link.
00402  *
00403  * Special files are stored in the text-base exactly as they are
00404  * stored in the repository.  The platform specific files are created
00405  * in the working copy at EOL/keyword translation time using
00406  * svn_subst_copy_and_translate2().  If the current platform does not
00407  * support a specific special file type, the file is copied into the
00408  * working copy as it is seen in the repository.  Because of this,
00409  * users of other platforms can still view and modify the special
00410  * files, even if they do not have their unique properties.
00411  *
00412  * New types of special files can be added by:
00413  *  1. Implementing a platform-dependent routine to create a uniquely
00414  *     named special file and one to read the special file in
00415  *     libsvn_subr/io.c.
00416  *  2. Creating a new textual name similar to
00417  *     SVN_SUBST__SPECIAL_LINK_STR in libsvn_subr/subst.c.
00418  *  3. Handling the translation/detranslation case for the new type in
00419  *     create_special_file and detranslate_special_file, using the
00420  *     routines from 1.
00421  */
00422 
00423 
00424 
00425 /** A revision number. */
00426 typedef long int svn_revnum_t;
00427 
00428 /** Valid revision numbers begin at 0 */
00429 #define SVN_IS_VALID_REVNUM(n) ((n) >= 0)
00430 
00431 /** The 'official' invalid revision num */
00432 #define SVN_INVALID_REVNUM ((svn_revnum_t) -1)
00433 
00434 /** Not really invalid...just unimportant -- one day, this can be its
00435  * own unique value, for now, just make it the same as
00436  * #SVN_INVALID_REVNUM.
00437  */
00438 #define SVN_IGNORED_REVNUM ((svn_revnum_t) -1)
00439 
00440 /** Convert NULL-terminated C string @a str to a revision number. */
00441 #define SVN_STR_TO_REV(str) ((svn_revnum_t) atol(str))
00442 
00443 /**
00444  * Parse NULL-terminated C string @a str as a revision number and
00445  * store its value in @a rev.  If @a endptr is non-NULL, then the
00446  * address of the first non-numeric character in @a str is stored in
00447  * it.  If there are no digits in @a str, then @a endptr is set (if
00448  * non-NULL), and the error #SVN_ERR_REVNUM_PARSE_FAILURE error is
00449  * returned.  Negative numbers parsed from @a str are considered
00450  * invalid, and result in the same error.
00451  *
00452  * @since New in 1.5.
00453  */
00454 svn_error_t *
00455 svn_revnum_parse(svn_revnum_t *rev,
00456                  const char *str,
00457                  const char **endptr);
00458 
00459 /** Originally intended to be used in printf()-style functions to format
00460  * revision numbers.  Deprecated due to incompatibilities with language
00461  * translation tools (e.g. gettext).
00462  *
00463  * New code should use a bare "%ld" format specifier for formatting revision
00464  * numbers.
00465  *
00466  * @deprecated Provided for backward compatibility with the 1.0 API.
00467  */
00468 #define SVN_REVNUM_T_FMT "ld"
00469 
00470 
00471 
00472 /** The size of a file in the Subversion FS. */
00473 typedef apr_int64_t svn_filesize_t;
00474 
00475 /** The 'official' invalid file size constant. */
00476 #define SVN_INVALID_FILESIZE ((svn_filesize_t) -1)
00477 
00478 /** In printf()-style functions, format file sizes using this. */
00479 #define SVN_FILESIZE_T_FMT APR_INT64_T_FMT
00480 
00481 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00482 /* Parse a base-10 numeric string into a 64-bit unsigned numeric value. */
00483 /* NOTE: Private. For use by Subversion's own code only. See issue #1644. */
00484 /* FIXME: APR should supply a function to do this, such as "apr_atoui64". */
00485 #define svn__atoui64(X) ((apr_uint64_t) apr_atoi64(X))
00486 #endif
00487 
00488 
00489 
00490 /** An enum to indicate whether recursion is needed. */
00491 enum svn_recurse_kind
00492 {
00493   svn_nonrecursive = 1,
00494   svn_recursive
00495 };
00496 
00497 /** The concept of depth for directories.
00498  *
00499  * @note This is similar to, but not exactly the same as, the WebDAV
00500  * and LDAP concepts of depth.
00501  *
00502  * @since New in 1.5.
00503  */
00504 typedef enum svn_depth_t
00505 {
00506   /* The order of these depths is important: the higher the number,
00507      the deeper it descends.  This allows us to compare two depths
00508      numerically to decide which should govern. */
00509 
00510   /** Depth undetermined or ignored.  In some contexts, this means the
00511       client should choose an appropriate default depth.  The server
00512       will generally treat it as #svn_depth_infinity. */
00513   svn_depth_unknown    = -2,
00514 
00515   /** Exclude (i.e., don't descend into) directory D.
00516       @note In Subversion 1.5, svn_depth_exclude is *not* supported
00517       anywhere in the client-side (libsvn_wc/libsvn_client/etc) code;
00518       it is only supported as an argument to set_path functions in the
00519       ra and repos reporters.  (This will enable future versions of
00520       Subversion to run updates, etc, against 1.5 servers with proper
00521       svn_depth_exclude behavior, once we get a chance to implement
00522       client-side support for svn_depth_exclude.)
00523   */
00524   svn_depth_exclude    = -1,
00525 
00526   /** Just the named directory D, no entries.  Updates will not pull in
00527       any files or subdirectories not already present. */
00528   svn_depth_empty      =  0,
00529 
00530   /** D + its file children, but not subdirs.  Updates will pull in any
00531       files not already present, but not subdirectories. */
00532   svn_depth_files      =  1,
00533 
00534   /** D + immediate children (D and its entries).  Updates will pull in
00535       any files or subdirectories not already present; those
00536       subdirectories' this_dir entries will have depth-empty. */
00537   svn_depth_immediates =  2,
00538 
00539   /** D + all descendants (full recursion from D).  Updates will pull
00540       in any files or subdirectories not already present; those
00541       subdirectories' this_dir entries will have depth-infinity.
00542       Equivalent to the pre-1.5 default update behavior. */
00543   svn_depth_infinity   =  3
00544 
00545 } svn_depth_t;
00546 
00547 /** Return a constant string expressing @a depth as an English word,
00548  * e.g., "infinity", "immediates", etc.  The string is not localized,
00549  * as it may be used for client<->server communications.
00550  *
00551  * @since New in 1.5.
00552  */
00553 const char *
00554 svn_depth_to_word(svn_depth_t depth);
00555 
00556 /** Return the appropriate depth for @a depth_str.  @a word is as
00557  * returned from svn_depth_to_word().  If @a depth_str does not
00558  * represent a recognized depth, return #svn_depth_unknown.
00559  *
00560  * @since New in 1.5.
00561  */
00562 svn_depth_t
00563 svn_depth_from_word(const char *word);
00564 
00565 /** Return #svn_depth_infinity if boolean @a recurse is TRUE, else
00566  * return #svn_depth_files.
00567  *
00568  * @note New code should never need to use this, it is called only
00569  * from pre-depth APIs, for compatibility.
00570  *
00571  * @since New in 1.5.
00572  */
00573 #define SVN_DEPTH_INFINITY_OR_FILES(recurse) \
00574   ((recurse) ? svn_depth_infinity : svn_depth_files)
00575 
00576 /** Return #svn_depth_infinity if boolean @a recurse is TRUE, else
00577  * return #svn_depth_immediates.
00578  *
00579  * @note New code should never need to use this, it is called only
00580  * from pre-depth APIs, for compatibility.
00581  *
00582  * @since New in 1.5.
00583  */
00584 #define SVN_DEPTH_INFINITY_OR_IMMEDIATES(recurse) \
00585   ((recurse) ? svn_depth_infinity : svn_depth_immediates)
00586 
00587 /** Return #svn_depth_infinity if boolean @a recurse is TRUE, else
00588  * return #svn_depth_empty.
00589  *
00590  * @note New code should never need to use this, it is called only
00591  * from pre-depth APIs, for compatibility.
00592  *
00593  * @since New in 1.5.
00594  */
00595 #define SVN_DEPTH_INFINITY_OR_EMPTY(recurse) \
00596   ((recurse) ? svn_depth_infinity : svn_depth_empty)
00597 
00598 /** Return a recursion boolean based on @a depth.
00599  *
00600  * Although much code has been converted to use depth, some code still
00601  * takes a recurse boolean.  In most cases, it makes sense to treat
00602  * unknown or infinite depth as recursive, and any other depth as
00603  * non-recursive (which in turn usually translates to #svn_depth_files).
00604  */
00605 #define SVN_DEPTH_IS_RECURSIVE(depth)                              \
00606   ((depth) == svn_depth_infinity || (depth) == svn_depth_unknown)
00607 
00608 
00609 
00610 /**
00611  * It is sometimes convenient to indicate which parts of an #svn_dirent_t
00612  * object you are actually interested in, so that calculating and sending
00613  * the data corresponding to the other fields can be avoided.  These values
00614  * can be used for that purpose.
00615  *
00616  * @defgroup svn_dirent_fields Dirent fields
00617  * @{
00618  */
00619 
00620 /** An indication that you are interested in the @c kind field */
00621 #define SVN_DIRENT_KIND        0x00001
00622 
00623 /** An indication that you are interested in the @c size field */
00624 #define SVN_DIRENT_SIZE        0x00002
00625 
00626 /** An indication that you are interested in the @c has_props field */
00627 #define SVN_DIRENT_HAS_PROPS   0x00004
00628 
00629 /** An indication that you are interested in the @c created_rev field */
00630 #define SVN_DIRENT_CREATED_REV 0x00008
00631 
00632 /** An indication that you are interested in the @c time field */
00633 #define SVN_DIRENT_TIME        0x00010
00634 
00635 /** An indication that you are interested in the @c last_author field */
00636 #define SVN_DIRENT_LAST_AUTHOR 0x00020
00637 
00638 /** A combination of all the dirent fields */
00639 #define SVN_DIRENT_ALL ~((apr_uint32_t ) 0)
00640 
00641 /** @} */
00642 
00643 /** A general subversion directory entry.
00644  *
00645  * @note To allow for extending the #svn_dirent_t structure in future
00646  * releases, always use svn_dirent_create() to allocate the stucture.
00647  *
00648  * @since New in 1.6.
00649  */
00650 typedef struct svn_dirent_t
00651 {
00652   /** node kind */
00653   svn_node_kind_t kind;
00654 
00655   /** length of file text, or 0 for directories */
00656   svn_filesize_t size;
00657 
00658   /** does the node have props? */
00659   svn_boolean_t has_props;
00660 
00661   /** last rev in which this node changed */
00662   svn_revnum_t created_rev;
00663 
00664   /** time of created_rev (mod-time) */
00665   apr_time_t time;
00666 
00667   /** author of created_rev */
00668   const char *last_author;
00669 
00670   /* IMPORTANT: If you extend this struct, check svn_dirent_dup(). */
00671 } svn_dirent_t;
00672 
00673 /** Return a deep copy of @a dirent, allocated in @a pool.
00674  *
00675  * @since New in 1.4.
00676  */
00677 svn_dirent_t *
00678 svn_dirent_dup(const svn_dirent_t *dirent,
00679                apr_pool_t *pool);
00680 
00681 /**
00682  * Create a new svn_dirent_t instance with all values initialized to their
00683  * not-available values.
00684  *
00685  * @since New in 1.8.
00686  */
00687 svn_dirent_t *
00688 svn_dirent_create(apr_pool_t *result_pool);
00689 
00690 
00691 /** Keyword substitution.
00692  *
00693  * All the keywords Subversion recognizes.
00694  *
00695  * Note that there is a better, more general proposal out there, which
00696  * would take care of both internationalization issues and custom
00697  * keywords (e.g., $NetBSD$).  See
00698  *
00699  * @verbatim
00700       http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=8921
00701       =====
00702       From: "Jonathan M. Manning" <jmanning@alisa-jon.net>
00703       To: dev@subversion.tigris.org
00704       Date: Fri, 14 Dec 2001 11:56:54 -0500
00705       Message-ID: <87970000.1008349014@bdldevel.bl.bdx.com>
00706       Subject: Re: keywords @endverbatim
00707  *
00708  * and Eric Gillespie's support of same:
00709  *
00710  * @verbatim
00711       http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=8757
00712       =====
00713       From: "Eric Gillespie, Jr." <epg@pretzelnet.org>
00714       To: dev@subversion.tigris.org
00715       Date: Wed, 12 Dec 2001 09:48:42 -0500
00716       Message-ID: <87k7vsebp1.fsf@vger.pretzelnet.org>
00717       Subject: Re: Customizable Keywords @endverbatim
00718  *
00719  * However, it is considerably more complex than the scheme below.
00720  * For now we're going with simplicity, hopefully the more general
00721  * solution can be done post-1.0.
00722  *
00723  * @defgroup svn_types_keywords Keyword definitions
00724  * @{
00725  */
00726 
00727 /** The maximum size of an expanded or un-expanded keyword. */
00728 #define SVN_KEYWORD_MAX_LEN    255
00729 
00730 /** The most recent revision in which this file was changed. */
00731 #define SVN_KEYWORD_REVISION_LONG    "LastChangedRevision"
00732 
00733 /** Short version of LastChangedRevision */
00734 #define SVN_KEYWORD_REVISION_SHORT   "Rev"
00735 
00736 /** Medium version of LastChangedRevision, matching the one CVS uses.
00737  * @since New in 1.1. */
00738 #define SVN_KEYWORD_REVISION_MEDIUM  "Revision"
00739 
00740 /** The most recent date (repository time) when this file was changed. */
00741 #define SVN_KEYWORD_DATE_LONG        "LastChangedDate"
00742 
00743 /** Short version of LastChangedDate */
00744 #define SVN_KEYWORD_DATE_SHORT       "Date"
00745 
00746 /** Who most recently committed to this file. */
00747 #define SVN_KEYWORD_AUTHOR_LONG      "LastChangedBy"
00748 
00749 /** Short version of LastChangedBy */
00750 #define SVN_KEYWORD_AUTHOR_SHORT     "Author"
00751 
00752 /** The URL for the head revision of this file. */
00753 #define SVN_KEYWORD_URL_LONG         "HeadURL"
00754 
00755 /** Short version of HeadURL */
00756 #define SVN_KEYWORD_URL_SHORT        "URL"
00757 
00758 /** A compressed combination of the other four keywords. */
00759 #define SVN_KEYWORD_ID               "Id"
00760 
00761 /** A full combination of the first four keywords.
00762  * @since New in 1.6. */
00763 #define SVN_KEYWORD_HEADER           "Header"
00764 
00765 /** @} */
00766 
00767 
00768 
00769 /** All information about a commit.
00770  *
00771  * @note Objects of this type should always be created using the
00772  * svn_create_commit_info() function.
00773  *
00774  * @since New in 1.3.
00775  */
00776 typedef struct svn_commit_info_t
00777 {
00778   /** just-committed revision. */
00779   svn_revnum_t revision;
00780 
00781   /** server-side date of the commit. */
00782   const char *date;
00783 
00784   /** author of the commit. */
00785   const char *author;
00786 
00787   /** error message from post-commit hook, or NULL. */
00788   const char *post_commit_err;
00789 
00790   /** repository root, may be @c NULL if unknown.
00791       @since New in 1.7. */
00792   const char *repos_root;
00793 
00794 } svn_commit_info_t;
00795 
00796 /**
00797  * Allocate an object of type #svn_commit_info_t in @a pool and
00798  * return it.
00799  *
00800  * The @c revision field of the new struct is set to #SVN_INVALID_REVNUM.
00801  * All other fields are initialized to @c NULL.
00802  *
00803  * @note Any object of the type #svn_commit_info_t should
00804  * be created using this function.
00805  * This is to provide for extending the svn_commit_info_t in
00806  * the future.
00807  *
00808  * @since New in 1.3.
00809  */
00810 svn_commit_info_t *
00811 svn_create_commit_info(apr_pool_t *pool);
00812 
00813 /**
00814  * Return a deep copy @a src_commit_info allocated in @a pool.
00815  *
00816  * @since New in 1.4.
00817  */
00818 svn_commit_info_t *
00819 svn_commit_info_dup(const svn_commit_info_t *src_commit_info,
00820                     apr_pool_t *pool);
00821 
00822 
00823 
00824 /**
00825  * A structure to represent a path that changed for a log entry.
00826  *
00827  * @note To allow for extending the #svn_log_changed_path2_t structure in
00828  * future releases, always use svn_log_changed_path2_create() to allocate
00829  * the structure.
00830  *
00831  * @since New in 1.6.
00832  */
00833 typedef struct svn_log_changed_path2_t
00834 {
00835   /** 'A'dd, 'D'elete, 'R'eplace, 'M'odify */
00836   char action;
00837 
00838   /** Source path of copy (if any). */
00839   const char *copyfrom_path;
00840 
00841   /** Source revision of copy (if any). */
00842   svn_revnum_t copyfrom_rev;
00843 
00844   /** The type of the node, may be svn_node_unknown. */
00845   svn_node_kind_t node_kind;
00846 
00847   /** Is the text modified, may be svn_tristate_unknown.
00848    * @since New in 1.7. */
00849   svn_tristate_t text_modified;
00850 
00851   /** Are properties modified, may be svn_tristate_unknown.
00852    * @since New in 1.7. */
00853   svn_tristate_t props_modified;
00854 
00855   /* NOTE: Add new fields at the end to preserve binary compatibility.
00856      Also, if you add fields here, you have to update
00857      svn_log_changed_path2_dup(). */
00858 } svn_log_changed_path2_t;
00859 
00860 /**
00861  * Returns an #svn_log_changed_path2_t, allocated in @a pool with all fields
00862  * initialized to NULL, None or empty values.
00863  *
00864  * @note To allow for extending the #svn_log_changed_path2_t structure in
00865  * future releases, this function should always be used to allocate the
00866  * structure.
00867  *
00868  * @since New in 1.6.
00869  */
00870 svn_log_changed_path2_t *
00871 svn_log_changed_path2_create(apr_pool_t *pool);
00872 
00873 /**
00874  * Return a deep copy of @a changed_path, allocated in @a pool.
00875  *
00876  * @since New in 1.6.
00877  */
00878 svn_log_changed_path2_t *
00879 svn_log_changed_path2_dup(const svn_log_changed_path2_t *changed_path,
00880                           apr_pool_t *pool);
00881 
00882 /**
00883  * A structure to represent a path that changed for a log entry.  Same as
00884  * the first three fields of #svn_log_changed_path2_t.
00885  *
00886  * @deprecated Provided for backward compatibility with the 1.5 API.
00887  */
00888 typedef struct svn_log_changed_path_t
00889 {
00890   /** 'A'dd, 'D'elete, 'R'eplace, 'M'odify */
00891   char action;
00892 
00893   /** Source path of copy (if any). */
00894   const char *copyfrom_path;
00895 
00896   /** Source revision of copy (if any). */
00897   svn_revnum_t copyfrom_rev;
00898 
00899 } svn_log_changed_path_t;
00900 
00901 /**
00902  * Return a deep copy of @a changed_path, allocated in @a pool.
00903  *
00904  * @since New in 1.3.
00905  * @deprecated Provided for backward compatibility with the 1.5 API.
00906  */
00907 SVN_DEPRECATED
00908 svn_log_changed_path_t *
00909 svn_log_changed_path_dup(const svn_log_changed_path_t *changed_path,
00910                          apr_pool_t *pool);
00911 
00912 /**
00913  * A structure to represent all the information about a particular log entry.
00914  *
00915  * @note To allow for extending the #svn_log_entry_t structure in future
00916  * releases, always use svn_log_entry_create() to allocate the structure.
00917  *
00918  * @since New in 1.5.
00919  */
00920 typedef struct svn_log_entry_t
00921 {
00922   /** A hash containing as keys every path committed in @a revision; the
00923    * values are (#svn_log_changed_path_t *) structures.
00924    *
00925    * The subversion core libraries will always set this field to the same
00926    * value as changed_paths2 for compatibility reasons.
00927    *
00928    * @deprecated Provided for backward compatibility with the 1.5 API.
00929    */
00930   apr_hash_t *changed_paths;
00931 
00932   /** The revision of the commit. */
00933   svn_revnum_t revision;
00934 
00935   /** The hash of requested revision properties, which may be NULL if it
00936    * would contain no revprops.  Maps (const char *) property name to
00937    * (svn_string_t *) property value. */
00938   apr_hash_t *revprops;
00939 
00940   /**
00941    * Whether or not this message has children.
00942    *
00943    * When a log operation requests additional merge information, extra log
00944    * entries may be returned as a result of this entry.  The new entries, are
00945    * considered children of the original entry, and will follow it.  When
00946    * the HAS_CHILDREN flag is set, the receiver should increment its stack
00947    * depth, and wait until an entry is provided with SVN_INVALID_REVNUM which
00948    * indicates the end of the children.
00949    *
00950    * For log operations which do not request additional merge information, the
00951    * HAS_CHILDREN flag is always FALSE.
00952    *
00953    * For more information see:
00954    * https://svn.apache.org/repos/asf/subversion/trunk/notes/merge-tracking/design.html#commutative-reporting
00955    */
00956   svn_boolean_t has_children;
00957 
00958   /** A hash containing as keys every path committed in @a revision; the
00959    * values are (#svn_log_changed_path2_t *) structures.
00960    *
00961    * If this value is not @c NULL, it MUST have the same value as
00962    * changed_paths or svn_log_entry_dup() will not create an identical copy.
00963    *
00964    * The subversion core libraries will always set this field to the same
00965    * value as changed_paths for compatibility with users assuming an older
00966    * version.
00967    *
00968    * @note See http://svn.haxx.se/dev/archive-2010-08/0362.shtml for
00969    * further explanation.
00970    *
00971    * @since New in 1.6.
00972    */
00973   apr_hash_t *changed_paths2;
00974 
00975   /**
00976    * Whether @a revision should be interpreted as non-inheritable in the
00977    * same sense of #svn_merge_range_t.
00978    *
00979    * Only set when this #svn_log_entry_t instance is returned by the
00980    * libsvn_client mergeinfo apis. Currently always FALSE when the
00981    * #svn_log_entry_t instance is reported by the ra layer.
00982    *
00983    * @since New in 1.7.
00984    */
00985   svn_boolean_t non_inheritable;
00986 
00987   /**
00988    * Whether @a revision is a merged revision resulting from a reverse merge.
00989    *
00990    * @since New in 1.7.
00991    */
00992   svn_boolean_t subtractive_merge;
00993 
00994   /* NOTE: Add new fields at the end to preserve binary compatibility.
00995      Also, if you add fields here, you have to update
00996      svn_log_entry_dup(). */
00997 } svn_log_entry_t;
00998 
00999 /**
01000  * Returns an #svn_log_entry_t, allocated in @a pool with all fields
01001  * initialized to NULL values.
01002  *
01003  * @note To allow for extending the #svn_log_entry_t structure in future
01004  * releases, this function should always be used to allocate the structure.
01005  *
01006  * @since New in 1.5.
01007  */
01008 svn_log_entry_t *
01009 svn_log_entry_create(apr_pool_t *pool);
01010 
01011 /** Return a deep copy of @a log_entry, allocated in @a pool.
01012  *
01013  * The resulting svn_log_entry_t has @c changed_paths set to the same
01014  * value as @c changed_path2. @c changed_paths will be @c NULL if
01015  * @c changed_paths2 was @c NULL.
01016  *
01017  * @since New in 1.6.
01018  */
01019 svn_log_entry_t *
01020 svn_log_entry_dup(const svn_log_entry_t *log_entry, apr_pool_t *pool);
01021 
01022 /** The callback invoked by log message loopers, such as
01023  * #svn_ra_plugin_t.get_log() and svn_repos_get_logs().
01024  *
01025  * This function is invoked once on each log message, in the order
01026  * determined by the caller (see above-mentioned functions).
01027  *
01028  * @a baton is what you think it is, and @a log_entry contains relevant
01029  * information for the log message.  Any of @a log_entry->author,
01030  * @a log_entry->date, or @a log_entry->message may be @c NULL.
01031  *
01032  * If @a log_entry->date is neither NULL nor the empty string, it was
01033  * generated by svn_time_to_cstring() and can be converted to
01034  * @c apr_time_t with svn_time_from_cstring().
01035  *
01036  * If @a log_entry->changed_paths is non-@c NULL, then it contains as keys
01037  * every path committed in @a log_entry->revision; the values are
01038  * (#svn_log_changed_path_t *) structures.
01039  *
01040  * If @a log_entry->has_children is @c TRUE, the message will be followed
01041  * immediately by any number of merged revisions (child messages), which are
01042  * terminated by an invocation with SVN_INVALID_REVNUM.  This usage may
01043  * be recursive.
01044  *
01045  * Use @a pool for temporary allocation.  If the caller is iterating
01046  * over log messages, invoking this receiver on each, we recommend the
01047  * standard pool loop recipe: create a subpool, pass it as @a pool to
01048  * each call, clear it after each iteration, destroy it after the loop
01049  * is done.  (For allocation that must last beyond the lifetime of a
01050  * given receiver call, use a pool in @a baton.)
01051  *
01052  * @since New in 1.5.
01053  */
01054 typedef svn_error_t *(*svn_log_entry_receiver_t)(
01055   void *baton,
01056   svn_log_entry_t *log_entry,
01057   apr_pool_t *pool);
01058 
01059 /**
01060  * Similar to #svn_log_entry_receiver_t, except this uses separate
01061  * parameters for each part of the log entry.
01062  *
01063  * @deprecated Provided for backward compatibility with the 1.4 API.
01064  */
01065 typedef svn_error_t *(*svn_log_message_receiver_t)(
01066   void *baton,
01067   apr_hash_t *changed_paths,
01068   svn_revnum_t revision,
01069   const char *author,
01070   const char *date,  /* use svn_time_from_cstring() if need apr_time_t */
01071   const char *message,
01072   apr_pool_t *pool);
01073 
01074 
01075 /** Callback function type for commits.
01076  *
01077  * When a commit succeeds, an instance of this is invoked with the
01078  * @a commit_info, along with the @a baton closure.
01079  * @a pool can be used for temporary allocations.
01080  *
01081  * @since New in 1.4.
01082  */
01083 typedef svn_error_t *(*svn_commit_callback2_t)(
01084   const svn_commit_info_t *commit_info,
01085   void *baton,
01086   apr_pool_t *pool);
01087 
01088 /** Same as #svn_commit_callback2_t, but uses individual
01089  * data elements instead of the #svn_commit_info_t structure
01090  *
01091  * @deprecated Provided for backward compatibility with the 1.3 API.
01092  */
01093 typedef svn_error_t *(*svn_commit_callback_t)(
01094   svn_revnum_t new_revision,
01095   const char *date,
01096   const char *author,
01097   void *baton);
01098 
01099 
01100 
01101 /** A buffer size that may be used when processing a stream of data.
01102  *
01103  * @note We don't use this constant any longer, since it is considered to be
01104  * unnecessarily large.
01105  *
01106  * @deprecated Provided for backwards compatibility with the 1.3 API.
01107  */
01108 #define SVN_STREAM_CHUNK_SIZE 102400
01109 
01110 #ifndef DOXYGEN_SHOULD_SKIP_THIS
01111 /*
01112  * The maximum amount we (ideally) hold in memory at a time when
01113  * processing a stream of data.
01114  *
01115  * For example, when copying data from one stream to another, do it in
01116  * blocks of this size.
01117  *
01118  * NOTE: This is an internal macro, put here for convenience.
01119  * No public API may depend on the particular value of this macro.
01120  */
01121 #define SVN__STREAM_CHUNK_SIZE 16384
01122 #endif
01123 
01124 /** The maximum amount we can ever hold in memory. */
01125 /* FIXME: Should this be the same as SVN_STREAM_CHUNK_SIZE? */
01126 #define SVN_MAX_OBJECT_SIZE (((apr_size_t) -1) / 2)
01127 
01128 
01129 
01130 /* ### Note: despite being about mime-TYPES, these probably don't
01131  * ### belong in svn_types.h.  However, no other header is more
01132  * ### appropriate, and didn't feel like creating svn_validate.h for
01133  * ### so little.
01134  */
01135 
01136 /** Validate @a mime_type.
01137  *
01138  * If @a mime_type does not contain a "/", or ends with non-alphanumeric
01139  * data, return #SVN_ERR_BAD_MIME_TYPE, else return success.
01140  *
01141  * Use @a pool only to find error allocation.
01142  *
01143  * Goal: to match both "foo/bar" and "foo/bar; charset=blah", without
01144  * being too strict about it, but to disallow mime types that have
01145  * quotes, newlines, or other garbage on the end, such as might be
01146  * unsafe in an HTTP header.
01147  */
01148 svn_error_t *
01149 svn_mime_type_validate(const char *mime_type,
01150                        apr_pool_t *pool);
01151 
01152 /** Return FALSE iff @a mime_type is a textual type.
01153  *
01154  * All mime types that start with "text/" are textual, plus some special
01155  * cases (for example, "image/x-xbitmap").
01156  */
01157 svn_boolean_t
01158 svn_mime_type_is_binary(const char *mime_type);
01159 
01160 
01161 
01162 /** A user defined callback that subversion will call with a user defined
01163  * baton to see if the current operation should be continued.  If the operation
01164  * should continue, the function should return #SVN_NO_ERROR, if not, it
01165  * should return #SVN_ERR_CANCELLED.
01166  */
01167 typedef svn_error_t *(*svn_cancel_func_t)(void *cancel_baton);
01168 
01169 
01170 
01171 /**
01172  * A lock object, for client & server to share.
01173  *
01174  * A lock represents the exclusive right to add, delete, or modify a
01175  * path.  A lock is created in a repository, wholly controlled by the
01176  * repository.  A "lock-token" is the lock's UUID, and can be used to
01177  * learn more about a lock's fields, and or/make use of the lock.
01178  * Because a lock is immutable, a client is free to not only cache the
01179  * lock-token, but the lock's fields too, for convenience.
01180  *
01181  * Note that the 'is_dav_comment' field is wholly ignored by every
01182  * library except for mod_dav_svn.  The field isn't even marshalled
01183  * over the network to the client.  Assuming lock structures are
01184  * created with apr_pcalloc(), a default value of 0 is universally safe.
01185  *
01186  * @note in the current implementation, only files are lockable.
01187  *
01188  * @since New in 1.2.
01189  */
01190 typedef struct svn_lock_t
01191 {
01192   const char *path;              /**< the path this lock applies to */
01193   const char *token;             /**< unique URI representing lock */
01194   const char *owner;             /**< the username which owns the lock */
01195   const char *comment;           /**< (optional) description of lock  */
01196   svn_boolean_t is_dav_comment;  /**< was comment made by generic DAV client? */
01197   apr_time_t creation_date;      /**< when lock was made */
01198   apr_time_t expiration_date;    /**< (optional) when lock will expire;
01199                                       If value is 0, lock will never expire. */
01200 } svn_lock_t;
01201 
01202 /**
01203  * Returns an #svn_lock_t, allocated in @a pool with all fields initialized
01204  * to NULL values.
01205  *
01206  * @note To allow for extending the #svn_lock_t structure in the future
01207  * releases, this function should always be used to allocate the structure.
01208  *
01209  * @since New in 1.2.
01210  */
01211 svn_lock_t *
01212 svn_lock_create(apr_pool_t *pool);
01213 
01214 /**
01215  * Return a deep copy of @a lock, allocated in @a pool.
01216  *
01217  * @since New in 1.2.
01218  */
01219 svn_lock_t *
01220 svn_lock_dup(const svn_lock_t *lock, apr_pool_t *pool);
01221 
01222 
01223 
01224 /**
01225  * Return a formatted Universal Unique IDentifier (UUID) string.
01226  *
01227  * @since New in 1.4.
01228  */
01229 const char *
01230 svn_uuid_generate(apr_pool_t *pool);
01231 
01232 
01233 
01234 /**
01235  * Mergeinfo representing a merge of a range of revisions.
01236  *
01237  * @since New in 1.5
01238  */
01239 typedef struct svn_merge_range_t
01240 {
01241   /**
01242    * If the 'start' field is less than the 'end' field then 'start' is
01243    * exclusive and 'end' inclusive of the range described.  This is termed
01244    * a forward merge range.  If 'start' is greater than 'end' then the
01245    * opposite is true.  This is termed a reverse merge range.  If 'start'
01246    * equals 'end' the meaning of the range is not defined.
01247    */
01248   svn_revnum_t start;
01249   svn_revnum_t end;
01250 
01251   /**
01252    * Whether this merge range should be inherited by treewise
01253    * descendants of the path to which the range applies. */
01254   svn_boolean_t inheritable;
01255 } svn_merge_range_t;
01256 
01257 /**
01258  * Return a copy of @a range, allocated in @a pool.
01259  *
01260  * @since New in 1.5.
01261  */
01262 svn_merge_range_t *
01263 svn_merge_range_dup(const svn_merge_range_t *range, apr_pool_t *pool);
01264 
01265 /**
01266  * Returns true if the changeset committed in revision @a rev is one
01267  * of the changesets in the range @a range.
01268  *
01269  * @since New in 1.5.
01270  */
01271 svn_boolean_t
01272 svn_merge_range_contains_rev(const svn_merge_range_t *range, svn_revnum_t rev);
01273 
01274 
01275 
01276 /** @defgroup node_location_seg_reporting Node location segment reporting.
01277  *  @{ */
01278 
01279 /**
01280  * A representation of a segment of an object's version history with an
01281  * emphasis on the object's location in the repository as of various
01282  * revisions.
01283  *
01284  * @since New in 1.5.
01285  */
01286 typedef struct svn_location_segment_t
01287 {
01288   /** The beginning (oldest) and ending (youngest) revisions for this
01289       segment, both inclusive. */
01290   svn_revnum_t range_start;
01291   svn_revnum_t range_end;
01292 
01293   /** The absolute (sans leading slash) path for this segment.  May be
01294       NULL to indicate gaps in an object's history.  */
01295   const char *path;
01296 
01297 } svn_location_segment_t;
01298 
01299 /**
01300  * A callback invoked by generators of #svn_location_segment_t
01301  * objects, used to report information about a versioned object's
01302  * history in terms of its location in the repository filesystem over
01303  * time.
01304  */
01305 typedef svn_error_t *(*svn_location_segment_receiver_t)(
01306   svn_location_segment_t *segment,
01307   void *baton,
01308   apr_pool_t *pool);
01309 
01310 /**
01311  * Return a deep copy of @a segment, allocated in @a pool.
01312  *
01313  * @since New in 1.5.
01314  */
01315 svn_location_segment_t *
01316 svn_location_segment_dup(const svn_location_segment_t *segment,
01317                          apr_pool_t *pool);
01318 
01319 /** @} */
01320 
01321 
01322 
01323 /** A line number, such as in a file or a stream.
01324  *
01325  * @since New in 1.7.
01326  */
01327 typedef unsigned long svn_linenum_t;
01328 
01329 /** The maximum value of an svn_linenum_t.
01330  *
01331  * @since New in 1.7.
01332  */
01333 #define SVN_LINENUM_MAX_VALUE ULONG_MAX
01334 
01335 
01336 
01337 #ifdef __cplusplus
01338 }
01339 #endif /* __cplusplus */
01340 
01341 
01342 /*
01343  * Everybody and their brother needs to deal with svn_error_t, the error
01344  * codes, and whatever else. While they *should* go and include svn_error.h
01345  * in order to do that... bah. Let's just help everybody out and include
01346  * that header whenever somebody grabs svn_types.h.
01347  *
01348  * Note that we do this at the END of this header so that its contents
01349  * are available to svn_error.h (our guards will prevent the circular
01350  * include). We also need to do the include *outside* of the cplusplus
01351  * guard.
01352  */
01353 #include "svn_error.h"
01354 
01355 
01356 /*
01357  * Subversion developers may want to use some additional debugging facilities
01358  * while working on the code. We'll pull that in here, so individual source
01359  * files don't have to include this header manually.
01360  */
01361 #ifdef SVN_DEBUG
01362 #include "private/svn_debug.h"
01363 #endif
01364 
01365 
01366 #endif /* SVN_TYPES_H */

Generated on Tue Aug 4 16:57:47 2015 for Subversion by  doxygen 1.4.7