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