GME
13
|
00001 00027 /* ==================================================================== */ 00028 00029 #ifndef SVN_PROPS_H 00030 #define SVN_PROPS_H 00031 00032 #include <apr_pools.h> /* for apr_pool_t */ 00033 #include <apr_tables.h> /* for apr_array_header_t */ 00034 #include <apr_hash.h> /* for apr_hash_t */ 00035 00036 #include "svn_types.h" /* for svn_boolean_t, svn_error_t */ 00037 #include "svn_string.h" /* for svn_string_t */ 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif /* __cplusplus */ 00042 00048 00049 00060 typedef struct svn_prop_t 00061 { 00062 const char *name; 00063 const svn_string_t *value; 00064 } svn_prop_t; 00065 00066 00073 svn_prop_t * 00074 svn_prop_dup(const svn_prop_t *prop, 00075 apr_pool_t *pool); 00076 00077 00083 apr_array_header_t * 00084 svn_prop_array_dup(const apr_array_header_t *array, 00085 apr_pool_t *pool); 00086 00087 00092 typedef struct svn_prop_inherited_item_t 00093 { 00099 const char *path_or_url; 00100 00103 apr_hash_t *prop_hash; 00104 00105 } svn_prop_inherited_item_t; 00106 00107 00115 apr_array_header_t * 00116 svn_prop_hash_to_array(const apr_hash_t *hash, 00117 apr_pool_t *pool); 00118 00128 apr_hash_t * 00129 svn_prop_array_to_hash(const apr_array_header_t *properties, 00130 apr_pool_t *result); 00131 00138 apr_hash_t * 00139 svn_prop_hash_dup(const apr_hash_t *hash, 00140 apr_pool_t *pool); 00141 00149 const char * 00150 svn_prop_get_value(const apr_hash_t *properties, 00151 const char *prop_name); 00152 00159 typedef enum svn_prop_kind 00160 { 00162 svn_prop_entry_kind, 00163 00165 svn_prop_wc_kind, 00166 00170 svn_prop_regular_kind 00171 } svn_prop_kind_t; 00172 00177 svn_prop_kind_t 00178 svn_property_kind2(const char *prop_name); 00179 00186 SVN_DEPRECATED 00187 svn_prop_kind_t 00188 svn_property_kind(int *prefix_len, 00189 const char *prop_name); 00190 00191 00197 svn_boolean_t 00198 svn_prop_is_svn_prop(const char *prop_name); 00199 00200 00207 svn_boolean_t 00208 svn_prop_has_svn_prop(const apr_hash_t *props, 00209 apr_pool_t *pool); 00210 00216 svn_boolean_t 00217 svn_prop_is_boolean(const char *prop_name); 00218 00228 svn_boolean_t 00229 svn_prop_is_known_svn_rev_prop(const char *prop_name); 00230 00241 svn_boolean_t 00242 svn_prop_is_known_svn_node_prop(const char *prop_name); 00243 00254 svn_boolean_t 00255 svn_prop_is_known_svn_file_prop(const char *prop_name); 00256 00267 svn_boolean_t 00268 svn_prop_is_known_svn_dir_prop(const char *prop_name); 00269 00277 svn_boolean_t 00278 svn_prop_needs_translation(const char *prop_name); 00279 00280 00292 svn_error_t * 00293 svn_categorize_props(const apr_array_header_t *proplist, 00294 apr_array_header_t **entry_props, 00295 apr_array_header_t **wc_props, 00296 apr_array_header_t **regular_props, 00297 apr_pool_t *pool); 00298 00299 00321 svn_error_t * 00322 svn_prop_diffs(apr_array_header_t **propdiffs, 00323 const apr_hash_t *target_props, 00324 const apr_hash_t *source_props, 00325 apr_pool_t *pool); 00326 00327 00336 svn_boolean_t 00337 svn_prop_name_is_valid(const char *prop_name); 00338 00339 00340 00341 /* Defines for reserved ("svn:") property names. */ 00342 00344 #define SVN_PROP_PREFIX "svn:" 00345 00346 00370 #define SVN_PROP_BOOLEAN_TRUE "*" 00371 00373 #define SVN_PROP_MIME_TYPE SVN_PROP_PREFIX "mime-type" 00374 00376 #define SVN_PROP_IGNORE SVN_PROP_PREFIX "ignore" 00377 00379 #define SVN_PROP_EOL_STYLE SVN_PROP_PREFIX "eol-style" 00380 00382 #define SVN_PROP_KEYWORDS SVN_PROP_PREFIX "keywords" 00383 00385 #define SVN_PROP_EXECUTABLE SVN_PROP_PREFIX "executable" 00386 00392 #define SVN_PROP_EXECUTABLE_VALUE SVN_PROP_BOOLEAN_TRUE 00393 00396 #define SVN_PROP_NEEDS_LOCK SVN_PROP_PREFIX "needs-lock" 00397 00403 #define SVN_PROP_NEEDS_LOCK_VALUE SVN_PROP_BOOLEAN_TRUE 00404 00406 #define SVN_PROP_SPECIAL SVN_PROP_PREFIX "special" 00407 00413 #define SVN_PROP_SPECIAL_VALUE SVN_PROP_BOOLEAN_TRUE 00414 00433 #define SVN_PROP_EXTERNALS SVN_PROP_PREFIX "externals" 00434 00444 #define SVN_PROP_MERGEINFO SVN_PROP_PREFIX "mergeinfo" 00445 00447 #define SVN_PROP_INHERITABLE_AUTO_PROPS SVN_PROP_PREFIX "auto-props" 00448 00450 #define SVN_PROP_INHERITABLE_IGNORES SVN_PROP_PREFIX "global-ignores" 00451 00472 #define SVN_PROP_TEXT_TIME SVN_PROP_PREFIX "text-time" 00473 00478 #define SVN_PROP_OWNER SVN_PROP_PREFIX "owner" 00479 00482 #define SVN_PROP_GROUP SVN_PROP_PREFIX "group" 00483 00487 #define SVN_PROP_UNIX_MODE SVN_PROP_PREFIX "unix-mode" 00488 /* Meta-data properties */ 00490 00497 #define SVN_PROP_NODE_ALL_PROPS SVN_PROP_MIME_TYPE, \ 00498 SVN_PROP_IGNORE, \ 00499 SVN_PROP_EOL_STYLE, \ 00500 SVN_PROP_KEYWORDS, \ 00501 SVN_PROP_EXECUTABLE, \ 00502 SVN_PROP_NEEDS_LOCK, \ 00503 SVN_PROP_SPECIAL, \ 00504 SVN_PROP_EXTERNALS, \ 00505 SVN_PROP_MERGEINFO, \ 00506 SVN_PROP_INHERITABLE_AUTO_PROPS, \ 00507 SVN_PROP_INHERITABLE_IGNORES, \ 00508 \ 00509 SVN_PROP_TEXT_TIME, \ 00510 SVN_PROP_OWNER, \ 00511 SVN_PROP_GROUP, \ 00512 SVN_PROP_UNIX_MODE, 00513 00537 #define SVN_PROP_WC_PREFIX SVN_PROP_PREFIX "wc:" 00538 00542 #define SVN_PROP_ENTRY_PREFIX SVN_PROP_PREFIX "entry:" 00543 00545 #define SVN_PROP_ENTRY_COMMITTED_REV SVN_PROP_ENTRY_PREFIX "committed-rev" 00546 00548 #define SVN_PROP_ENTRY_COMMITTED_DATE SVN_PROP_ENTRY_PREFIX "committed-date" 00549 00551 #define SVN_PROP_ENTRY_LAST_AUTHOR SVN_PROP_ENTRY_PREFIX "last-author" 00552 00554 #define SVN_PROP_ENTRY_UUID SVN_PROP_ENTRY_PREFIX "uuid" 00555 00558 #define SVN_PROP_ENTRY_LOCK_TOKEN SVN_PROP_ENTRY_PREFIX "lock-token" 00559 00563 #define SVN_PROP_CUSTOM_PREFIX SVN_PROP_PREFIX "custom:" 00564 00577 #define SVN_PROP_REVISION_AUTHOR SVN_PROP_PREFIX "author" 00578 00580 #define SVN_PROP_REVISION_LOG SVN_PROP_PREFIX "log" 00581 00583 #define SVN_PROP_REVISION_DATE SVN_PROP_PREFIX "date" 00584 00596 #define SVN_PROP_REVISION_ORIG_DATE SVN_PROP_PREFIX "original-date" 00597 00602 #define SVN_PROP_REVISION_AUTOVERSIONED SVN_PROP_PREFIX "autoversioned" 00603 00604 00605 /* More reserved revision props in the 'svn:' namespace, used by the 00606 svnsync tool: */ 00607 00611 #define SVNSYNC_PROP_PREFIX SVN_PROP_PREFIX "sync-" 00612 00613 /* The following revision properties are set on revision 0 of 00614 * destination repositories by svnsync: 00615 */ 00616 00620 #define SVNSYNC_PROP_LOCK SVNSYNC_PROP_PREFIX "lock" 00621 00625 #define SVNSYNC_PROP_FROM_URL SVNSYNC_PROP_PREFIX "from-url" 00626 00629 #define SVNSYNC_PROP_FROM_UUID SVNSYNC_PROP_PREFIX "from-uuid" 00630 00634 #define SVNSYNC_PROP_LAST_MERGED_REV SVNSYNC_PROP_PREFIX "last-merged-rev" 00635 00639 #define SVNSYNC_PROP_CURRENTLY_COPYING SVNSYNC_PROP_PREFIX "currently-copying" 00640 00641 00645 #define SVN_PROP_REVISION_ALL_PROPS SVN_PROP_REVISION_AUTHOR, \ 00646 SVN_PROP_REVISION_LOG, \ 00647 SVN_PROP_REVISION_DATE, \ 00648 SVN_PROP_REVISION_AUTOVERSIONED, \ 00649 SVN_PROP_REVISION_ORIG_DATE, \ 00650 SVNSYNC_PROP_LOCK, \ 00651 SVNSYNC_PROP_FROM_URL, \ 00652 SVNSYNC_PROP_FROM_UUID, \ 00653 SVNSYNC_PROP_LAST_MERGED_REV, \ 00654 SVNSYNC_PROP_CURRENTLY_COPYING, 00655 00672 #define SVN_PROP_TXN_PREFIX SVN_PROP_PREFIX "txn-" 00673 00681 #define SVN_PROP_TXN_CLIENT_COMPAT_VERSION \ 00682 SVN_PROP_TXN_PREFIX "client-compat-version" 00683 00688 #define SVN_PROP_TXN_USER_AGENT \ 00689 SVN_PROP_TXN_PREFIX "user-agent" 00690 00701 #define SVN_PROP_REVISION_PREFIX SVN_PROP_PREFIX "revision-" 00702 00703 00708 00709 00710 #ifdef __cplusplus 00711 } 00712 #endif /* __cplusplus */ 00713 00714 #endif /* SVN_PROPS_H */