GME  13
svn_ra.h
Go to the documentation of this file.
00001 
00027 #ifndef SVN_RA_H
00028 #define SVN_RA_H
00029 
00030 #include <apr.h>
00031 #include <apr_pools.h>
00032 #include <apr_hash.h>
00033 #include <apr_tables.h>
00034 #include <apr_time.h>
00035 #include <apr_file_io.h>  /* for apr_file_t */
00036 
00037 #include "svn_types.h"
00038 #include "svn_string.h"
00039 #include "svn_delta.h"
00040 #include "svn_auth.h"
00041 #include "svn_mergeinfo.h"
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif /* __cplusplus */
00046 
00047 
00048 
00049 /* Misc. declarations */
00050 
00056 const svn_version_t *
00057 svn_ra_version(void);
00058 
00059 
00073 typedef svn_error_t *(*svn_ra_get_wc_prop_func_t)(void *baton,
00074                                                   const char *path,
00075                                                   const char *name,
00076                                                   const svn_string_t **value,
00077                                                   apr_pool_t *pool);
00078 
00085 typedef svn_error_t *(*svn_ra_set_wc_prop_func_t)(void *baton,
00086                                                   const char *path,
00087                                                   const char *name,
00088                                                   const svn_string_t *value,
00089                                                   apr_pool_t *pool);
00090 
00105 typedef svn_error_t *(*svn_ra_push_wc_prop_func_t)(void *baton,
00106                                                    const char *path,
00107                                                    const char *name,
00108                                                    const svn_string_t *value,
00109                                                    apr_pool_t *pool);
00110 
00118 typedef svn_error_t *(*svn_ra_invalidate_wc_props_func_t)(void *baton,
00119                                                           const char *path,
00120                                                           const char *name,
00121                                                           apr_pool_t *pool);
00122 
00130 typedef svn_error_t *
00131 (*svn_ra_get_wc_contents_func_t)(void *baton,
00132                                  svn_stream_t **contents,
00133                                  const svn_checksum_t *checksum,
00134                                  apr_pool_t *pool);
00135 
00136 
00138 typedef svn_error_t *(*svn_ra_get_latest_revnum_func_t)(
00139   void *session_baton,
00140   svn_revnum_t *latest_revnum);
00141 
00149 typedef svn_error_t *(*svn_ra_get_client_string_func_t)(void *baton,
00150                                                         const char **name,
00151                                                         apr_pool_t *pool);
00152 
00153 
00154 
00171 typedef svn_error_t *(*svn_ra_file_rev_handler_t)(
00172   void *baton,
00173   const char *path,
00174   svn_revnum_t rev,
00175   apr_hash_t *rev_props,
00176   svn_txdelta_window_handler_t *delta_handler,
00177   void **delta_baton,
00178   apr_array_header_t *prop_diffs,
00179   apr_pool_t *pool);
00180 
00200 typedef svn_error_t *(*svn_ra_lock_callback_t)(void *baton,
00201                                                const char *path,
00202                                                svn_boolean_t do_lock,
00203                                                const svn_lock_t *lock,
00204                                                svn_error_t *ra_err,
00205                                                apr_pool_t *pool);
00206 
00216 typedef void (*svn_ra_progress_notify_func_t)(apr_off_t progress,
00217                                               apr_off_t total,
00218                                               void *baton,
00219                                               apr_pool_t *pool);
00220 
00238 typedef svn_error_t *(*svn_ra_replay_revstart_callback_t)(
00239   svn_revnum_t revision,
00240   void *replay_baton,
00241   const svn_delta_editor_t **editor,
00242   void **edit_baton,
00243   apr_hash_t *rev_props,
00244   apr_pool_t *pool);
00245 
00262 typedef svn_error_t *(*svn_ra_replay_revfinish_callback_t)(
00263   svn_revnum_t revision,
00264   void *replay_baton,
00265   const svn_delta_editor_t *editor,
00266   void *edit_baton,
00267   apr_hash_t *rev_props,
00268   apr_pool_t *pool);
00269 
00270 
00295 typedef struct svn_ra_reporter3_t
00296 {
00317   svn_error_t *(*set_path)(void *report_baton,
00318                            const char *path,
00319                            svn_revnum_t revision,
00320                            svn_depth_t depth,
00321                            svn_boolean_t start_empty,
00322                            const char *lock_token,
00323                            apr_pool_t *pool);
00324 
00332   svn_error_t *(*delete_path)(void *report_baton,
00333                               const char *path,
00334                               apr_pool_t *pool);
00335 
00352   svn_error_t *(*link_path)(void *report_baton,
00353                             const char *path,
00354                             const char *url,
00355                             svn_revnum_t revision,
00356                             svn_depth_t depth,
00357                             svn_boolean_t start_empty,
00358                             const char *lock_token,
00359                             apr_pool_t *pool);
00360 
00367   svn_error_t *(*finish_report)(void *report_baton,
00368                                 apr_pool_t *pool);
00369 
00374   svn_error_t *(*abort_report)(void *report_baton,
00375                                apr_pool_t *pool);
00376 
00377 } svn_ra_reporter3_t;
00378 
00384 typedef struct svn_ra_reporter2_t
00385 {
00388   svn_error_t *(*set_path)(void *report_baton,
00389                            const char *path,
00390                            svn_revnum_t revision,
00391                            svn_boolean_t start_empty,
00392                            const char *lock_token,
00393                            apr_pool_t *pool);
00394 
00396   svn_error_t *(*delete_path)(void *report_baton,
00397                               const char *path,
00398                               apr_pool_t *pool);
00399 
00402   svn_error_t *(*link_path)(void *report_baton,
00403                             const char *path,
00404                             const char *url,
00405                             svn_revnum_t revision,
00406                             svn_boolean_t start_empty,
00407                             const char *lock_token,
00408                             apr_pool_t *pool);
00409 
00411   svn_error_t *(*finish_report)(void *report_baton,
00412                                 apr_pool_t *pool);
00413 
00415   svn_error_t *(*abort_report)(void *report_baton,
00416                                apr_pool_t *pool);
00417 
00418 } svn_ra_reporter2_t;
00419 
00425 typedef struct svn_ra_reporter_t
00426 {
00429   svn_error_t *(*set_path)(void *report_baton,
00430                            const char *path,
00431                            svn_revnum_t revision,
00432                            svn_boolean_t start_empty,
00433                            apr_pool_t *pool);
00434 
00436   svn_error_t *(*delete_path)(void *report_baton,
00437                               const char *path,
00438                               apr_pool_t *pool);
00439 
00442   svn_error_t *(*link_path)(void *report_baton,
00443                             const char *path,
00444                             const char *url,
00445                             svn_revnum_t revision,
00446                             svn_boolean_t start_empty,
00447                             apr_pool_t *pool);
00448 
00450   svn_error_t *(*finish_report)(void *report_baton,
00451                                 apr_pool_t *pool);
00452 
00454   svn_error_t *(*abort_report)(void *report_baton,
00455                                apr_pool_t *pool);
00456 } svn_ra_reporter_t;
00457 
00458 
00472 typedef struct svn_ra_callbacks2_t
00473 {
00479   svn_error_t *(*open_tmp_file)(apr_file_t **fp,
00480                                 void *callback_baton,
00481                                 apr_pool_t *pool);
00482 
00486   svn_auth_baton_t *auth_baton;
00487 
00488   /*** The following items may be set to NULL to disallow the RA layer
00489        to perform the respective operations of the vtable functions.
00490        Perhaps WC props are not defined or are in invalid for this
00491        session, or perhaps the commit operation this RA session will
00492        perform is a server-side only one that shouldn't do post-commit
00493        processing on a working copy path.  ***/
00494 
00501   svn_ra_get_wc_prop_func_t get_wc_prop;
00502 
00504   svn_ra_set_wc_prop_func_t set_wc_prop;
00505 
00507   svn_ra_push_wc_prop_func_t push_wc_prop;
00508 
00510   svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
00511 
00515   svn_ra_progress_notify_func_t progress_func;
00516 
00518   void *progress_baton;
00519 
00526   svn_cancel_func_t cancel_func;
00527 
00531   svn_ra_get_client_string_func_t get_client_string;
00532 
00536   svn_ra_get_wc_contents_func_t get_wc_contents;
00537 
00538 } svn_ra_callbacks2_t;
00539 
00545 typedef struct svn_ra_callbacks_t
00546 {
00547   svn_error_t *(*open_tmp_file)(apr_file_t **fp,
00548                                 void *callback_baton,
00549                                 apr_pool_t *pool);
00550 
00551   svn_auth_baton_t *auth_baton;
00552 
00553   svn_ra_get_wc_prop_func_t get_wc_prop;
00554 
00555   svn_ra_set_wc_prop_func_t set_wc_prop;
00556 
00557   svn_ra_push_wc_prop_func_t push_wc_prop;
00558 
00559   svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
00560 
00561 } svn_ra_callbacks_t;
00562 
00563 
00564 
00565 /*----------------------------------------------------------------------*/
00566 
00567 /* Public Interfaces. */
00568 
00578 svn_error_t *
00579 svn_ra_initialize(apr_pool_t *pool);
00580 
00589 svn_error_t *
00590 svn_ra_create_callbacks(svn_ra_callbacks2_t **callbacks,
00591                         apr_pool_t *pool);
00592 
00599 typedef struct svn_ra_session_t svn_ra_session_t;
00600 
00647 svn_error_t *
00648 svn_ra_open4(svn_ra_session_t **session_p,
00649              const char **corrected_url,
00650              const char *repos_URL,
00651              const char *uuid,
00652              const svn_ra_callbacks2_t *callbacks,
00653              void *callback_baton,
00654              apr_hash_t *config,
00655              apr_pool_t *pool);
00656 
00663 SVN_DEPRECATED
00664 svn_error_t *
00665 svn_ra_open3(svn_ra_session_t **session_p,
00666              const char *repos_URL,
00667              const char *uuid,
00668              const svn_ra_callbacks2_t *callbacks,
00669              void *callback_baton,
00670              apr_hash_t *config,
00671              apr_pool_t *pool);
00672 
00679 SVN_DEPRECATED
00680 svn_error_t *
00681 svn_ra_open2(svn_ra_session_t **session_p,
00682              const char *repos_URL,
00683              const svn_ra_callbacks2_t *callbacks,
00684              void *callback_baton,
00685              apr_hash_t *config,
00686              apr_pool_t *pool);
00687 
00693 SVN_DEPRECATED
00694 svn_error_t *
00695 svn_ra_open(svn_ra_session_t **session_p,
00696             const char *repos_URL,
00697             const svn_ra_callbacks_t *callbacks,
00698             void *callback_baton,
00699             apr_hash_t *config,
00700             apr_pool_t *pool);
00701 
00711 svn_error_t *
00712 svn_ra_reparent(svn_ra_session_t *ra_session,
00713                 const char *url,
00714                 apr_pool_t *pool);
00715 
00721 svn_error_t *
00722 svn_ra_get_session_url(svn_ra_session_t *ra_session,
00723                        const char **url,
00724                        apr_pool_t *pool);
00725 
00726 
00736 svn_error_t *
00737 svn_ra_get_path_relative_to_session(svn_ra_session_t *ra_session,
00738                                     const char **rel_path,
00739                                     const char *url,
00740                                     apr_pool_t *pool);
00741 
00752 svn_error_t *
00753 svn_ra_get_path_relative_to_root(svn_ra_session_t *ra_session,
00754                                  const char **rel_path,
00755                                  const char *url,
00756                                  apr_pool_t *pool);
00757 
00765 svn_error_t *
00766 svn_ra_get_latest_revnum(svn_ra_session_t *session,
00767                          svn_revnum_t *latest_revnum,
00768                          apr_pool_t *pool);
00769 
00778 svn_error_t *
00779 svn_ra_get_dated_revision(svn_ra_session_t *session,
00780                           svn_revnum_t *revision,
00781                           apr_time_t tm,
00782                           apr_pool_t *pool);
00783 
00808 svn_error_t *
00809 svn_ra_change_rev_prop2(svn_ra_session_t *session,
00810                         svn_revnum_t rev,
00811                         const char *name,
00812                         const svn_string_t *const *old_value_p,
00813                         const svn_string_t *value,
00814                         apr_pool_t *pool);
00815 
00823 SVN_DEPRECATED
00824 svn_error_t *
00825 svn_ra_change_rev_prop(svn_ra_session_t *session,
00826                        svn_revnum_t rev,
00827                        const char *name,
00828                        const svn_string_t *value,
00829                        apr_pool_t *pool);
00830 
00840 svn_error_t *
00841 svn_ra_rev_proplist(svn_ra_session_t *session,
00842                     svn_revnum_t rev,
00843                     apr_hash_t **props,
00844                     apr_pool_t *pool);
00845 
00855 svn_error_t *
00856 svn_ra_rev_prop(svn_ra_session_t *session,
00857                 svn_revnum_t rev,
00858                 const char *name,
00859                 svn_string_t **value,
00860                 apr_pool_t *pool);
00861 
00903 svn_error_t *
00904 svn_ra_get_commit_editor3(svn_ra_session_t *session,
00905                           const svn_delta_editor_t **editor,
00906                           void **edit_baton,
00907                           apr_hash_t *revprop_table,
00908                           svn_commit_callback2_t commit_callback,
00909                           void *commit_baton,
00910                           apr_hash_t *lock_tokens,
00911                           svn_boolean_t keep_locks,
00912                           apr_pool_t *pool);
00913 
00923 SVN_DEPRECATED
00924 svn_error_t *
00925 svn_ra_get_commit_editor2(svn_ra_session_t *session,
00926                           const svn_delta_editor_t **editor,
00927                           void **edit_baton,
00928                           const char *log_msg,
00929                           svn_commit_callback2_t commit_callback,
00930                           void *commit_baton,
00931                           apr_hash_t *lock_tokens,
00932                           svn_boolean_t keep_locks,
00933                           apr_pool_t *pool);
00934 
00942 SVN_DEPRECATED
00943 svn_error_t *
00944 svn_ra_get_commit_editor(svn_ra_session_t *session,
00945                          const svn_delta_editor_t **editor,
00946                          void **edit_baton,
00947                          const char *log_msg,
00948                          svn_commit_callback_t callback,
00949                          void *callback_baton,
00950                          apr_hash_t *lock_tokens,
00951                          svn_boolean_t keep_locks,
00952                          apr_pool_t *pool);
00953 
00979 svn_error_t *
00980 svn_ra_get_file(svn_ra_session_t *session,
00981                 const char *path,
00982                 svn_revnum_t revision,
00983                 svn_stream_t *stream,
00984                 svn_revnum_t *fetched_rev,
00985                 apr_hash_t **props,
00986                 apr_pool_t *pool);
00987 
01015 svn_error_t *
01016 svn_ra_get_dir2(svn_ra_session_t *session,
01017                 apr_hash_t **dirents,
01018                 svn_revnum_t *fetched_rev,
01019                 apr_hash_t **props,
01020                 const char *path,
01021                 svn_revnum_t revision,
01022                 apr_uint32_t dirent_fields,
01023                 apr_pool_t *pool);
01024 
01033 SVN_DEPRECATED
01034 svn_error_t *
01035 svn_ra_get_dir(svn_ra_session_t *session,
01036                const char *path,
01037                svn_revnum_t revision,
01038                apr_hash_t **dirents,
01039                svn_revnum_t *fetched_rev,
01040                apr_hash_t **props,
01041                apr_pool_t *pool);
01042 
01071 svn_error_t *
01072 svn_ra_get_mergeinfo(svn_ra_session_t *session,
01073                      svn_mergeinfo_catalog_t *catalog,
01074                      const apr_array_header_t *paths,
01075                      svn_revnum_t revision,
01076                      svn_mergeinfo_inheritance_t inherit,
01077                      svn_boolean_t include_descendants,
01078                      apr_pool_t *pool);
01079 
01139 svn_error_t *
01140 svn_ra_do_update3(svn_ra_session_t *session,
01141                   const svn_ra_reporter3_t **reporter,
01142                   void **report_baton,
01143                   svn_revnum_t revision_to_update_to,
01144                   const char *update_target,
01145                   svn_depth_t depth,
01146                   svn_boolean_t send_copyfrom_args,
01147                   svn_boolean_t ignore_ancestry,
01148                   const svn_delta_editor_t *update_editor,
01149                   void *update_baton,
01150                   apr_pool_t *result_pool,
01151                   apr_pool_t *scratch_pool);
01152 
01159 SVN_DEPRECATED
01160 svn_error_t *
01161 svn_ra_do_update2(svn_ra_session_t *session,
01162                   const svn_ra_reporter3_t **reporter,
01163                   void **report_baton,
01164                   svn_revnum_t revision_to_update_to,
01165                   const char *update_target,
01166                   svn_depth_t depth,
01167                   svn_boolean_t send_copyfrom_args,
01168                   const svn_delta_editor_t *update_editor,
01169                   void *update_baton,
01170                   apr_pool_t *pool);
01171 
01180 SVN_DEPRECATED
01181 svn_error_t *
01182 svn_ra_do_update(svn_ra_session_t *session,
01183                  const svn_ra_reporter2_t **reporter,
01184                  void **report_baton,
01185                  svn_revnum_t revision_to_update_to,
01186                  const char *update_target,
01187                  svn_boolean_t recurse,
01188                  const svn_delta_editor_t *update_editor,
01189                  void *update_baton,
01190                  apr_pool_t *pool);
01191 
01192 
01206 svn_error_t *
01207 svn_ra_do_switch3(svn_ra_session_t *session,
01208                   const svn_ra_reporter3_t **reporter,
01209                   void **report_baton,
01210                   svn_revnum_t revision_to_switch_to,
01211                   const char *switch_target,
01212                   svn_depth_t depth,
01213                   const char *switch_url,
01214                   svn_boolean_t send_copyfrom_args,
01215                   svn_boolean_t ignore_ancestry,
01216                   const svn_delta_editor_t *switch_editor,
01217                   void *switch_baton,
01218                   apr_pool_t *result_pool,
01219                   apr_pool_t *scratch_pool);
01220 
01228 SVN_DEPRECATED
01229 svn_error_t *
01230 svn_ra_do_switch2(svn_ra_session_t *session,
01231                   const svn_ra_reporter3_t **reporter,
01232                   void **report_baton,
01233                   svn_revnum_t revision_to_switch_to,
01234                   const char *switch_target,
01235                   svn_depth_t depth,
01236                   const char *switch_url,
01237                   const svn_delta_editor_t *switch_editor,
01238                   void *switch_baton,
01239                   apr_pool_t *pool);
01240 
01250 SVN_DEPRECATED
01251 svn_error_t *
01252 svn_ra_do_switch(svn_ra_session_t *session,
01253                  const svn_ra_reporter2_t **reporter,
01254                  void **report_baton,
01255                  svn_revnum_t revision_to_switch_to,
01256                  const char *switch_target,
01257                  svn_boolean_t recurse,
01258                  const char *switch_url,
01259                  const svn_delta_editor_t *switch_editor,
01260                  void *switch_baton,
01261                  apr_pool_t *pool);
01262 
01304 svn_error_t *
01305 svn_ra_do_status2(svn_ra_session_t *session,
01306                   const svn_ra_reporter3_t **reporter,
01307                   void **report_baton,
01308                   const char *status_target,
01309                   svn_revnum_t revision,
01310                   svn_depth_t depth,
01311                   const svn_delta_editor_t *status_editor,
01312                   void *status_baton,
01313                   apr_pool_t *pool);
01314 
01315 
01325 SVN_DEPRECATED
01326 svn_error_t *
01327 svn_ra_do_status(svn_ra_session_t *session,
01328                  const svn_ra_reporter2_t **reporter,
01329                  void **report_baton,
01330                  const char *status_target,
01331                  svn_revnum_t revision,
01332                  svn_boolean_t recurse,
01333                  const svn_delta_editor_t *status_editor,
01334                  void *status_baton,
01335                  apr_pool_t *pool);
01336 
01394 svn_error_t *
01395 svn_ra_do_diff3(svn_ra_session_t *session,
01396                 const svn_ra_reporter3_t **reporter,
01397                 void **report_baton,
01398                 svn_revnum_t revision,
01399                 const char *diff_target,
01400                 svn_depth_t depth,
01401                 svn_boolean_t ignore_ancestry,
01402                 svn_boolean_t text_deltas,
01403                 const char *versus_url,
01404                 const svn_delta_editor_t *diff_editor,
01405                 void *diff_baton,
01406                 apr_pool_t *pool);
01407 
01417 SVN_DEPRECATED
01418 svn_error_t *
01419 svn_ra_do_diff2(svn_ra_session_t *session,
01420                 const svn_ra_reporter2_t **reporter,
01421                 void **report_baton,
01422                 svn_revnum_t revision,
01423                 const char *diff_target,
01424                 svn_boolean_t recurse,
01425                 svn_boolean_t ignore_ancestry,
01426                 svn_boolean_t text_deltas,
01427                 const char *versus_url,
01428                 const svn_delta_editor_t *diff_editor,
01429                 void *diff_baton,
01430                 apr_pool_t *pool);
01431 
01432 
01438 SVN_DEPRECATED
01439 svn_error_t *
01440 svn_ra_do_diff(svn_ra_session_t *session,
01441                const svn_ra_reporter2_t **reporter,
01442                void **report_baton,
01443                svn_revnum_t revision,
01444                const char *diff_target,
01445                svn_boolean_t recurse,
01446                svn_boolean_t ignore_ancestry,
01447                const char *versus_url,
01448                const svn_delta_editor_t *diff_editor,
01449                void *diff_baton,
01450                apr_pool_t *pool);
01451 
01511 svn_error_t *
01512 svn_ra_get_log2(svn_ra_session_t *session,
01513                 const apr_array_header_t *paths,
01514                 svn_revnum_t start,
01515                 svn_revnum_t end,
01516                 int limit,
01517                 svn_boolean_t discover_changed_paths,
01518                 svn_boolean_t strict_node_history,
01519                 svn_boolean_t include_merged_revisions,
01520                 const apr_array_header_t *revprops,
01521                 svn_log_entry_receiver_t receiver,
01522                 void *receiver_baton,
01523                 apr_pool_t *pool);
01524 
01534 SVN_DEPRECATED
01535 svn_error_t *
01536 svn_ra_get_log(svn_ra_session_t *session,
01537                const apr_array_header_t *paths,
01538                svn_revnum_t start,
01539                svn_revnum_t end,
01540                int limit,
01541                svn_boolean_t discover_changed_paths,
01542                svn_boolean_t strict_node_history,
01543                svn_log_message_receiver_t receiver,
01544                void *receiver_baton,
01545                apr_pool_t *pool);
01546 
01556 svn_error_t *
01557 svn_ra_check_path(svn_ra_session_t *session,
01558                   const char *path,
01559                   svn_revnum_t revision,
01560                   svn_node_kind_t *kind,
01561                   apr_pool_t *pool);
01562 
01572 svn_error_t *
01573 svn_ra_stat(svn_ra_session_t *session,
01574             const char *path,
01575             svn_revnum_t revision,
01576             svn_dirent_t **dirent,
01577             apr_pool_t *pool);
01578 
01579 
01585 svn_error_t *
01586 svn_ra_get_uuid2(svn_ra_session_t *session,
01587                  const char **uuid,
01588                  apr_pool_t *pool);
01589 
01597 SVN_DEPRECATED
01598 svn_error_t *
01599 svn_ra_get_uuid(svn_ra_session_t *session,
01600                 const char **uuid,
01601                 apr_pool_t *pool);
01602 
01610 svn_error_t *
01611 svn_ra_get_repos_root2(svn_ra_session_t *session,
01612                        const char **url,
01613                        apr_pool_t *pool);
01614 
01615 
01623 SVN_DEPRECATED
01624 svn_error_t *
01625 svn_ra_get_repos_root(svn_ra_session_t *session,
01626                       const char **url,
01627                       apr_pool_t *pool);
01628 
01642 svn_error_t *
01643 svn_ra_get_locations(svn_ra_session_t *session,
01644                      apr_hash_t **locations,
01645                      const char *path,
01646                      svn_revnum_t peg_revision,
01647                      const apr_array_header_t *location_revisions,
01648                      apr_pool_t *pool);
01649 
01650 
01670 svn_error_t *
01671 svn_ra_get_location_segments(svn_ra_session_t *session,
01672                              const char *path,
01673                              svn_revnum_t peg_revision,
01674                              svn_revnum_t start_rev,
01675                              svn_revnum_t end_rev,
01676                              svn_location_segment_receiver_t receiver,
01677                              void *receiver_baton,
01678                              apr_pool_t *pool);
01679 
01713 svn_error_t *
01714 svn_ra_get_file_revs2(svn_ra_session_t *session,
01715                       const char *path,
01716                       svn_revnum_t start,
01717                       svn_revnum_t end,
01718                       svn_boolean_t include_merged_revisions,
01719                       svn_file_rev_handler_t handler,
01720                       void *handler_baton,
01721                       apr_pool_t *pool);
01722 
01730 SVN_DEPRECATED
01731 svn_error_t *
01732 svn_ra_get_file_revs(svn_ra_session_t *session,
01733                      const char *path,
01734                      svn_revnum_t start,
01735                      svn_revnum_t end,
01736                      svn_ra_file_rev_handler_t handler,
01737                      void *handler_baton,
01738                      apr_pool_t *pool);
01739 
01772 svn_error_t *
01773 svn_ra_lock(svn_ra_session_t *session,
01774             apr_hash_t *path_revs,
01775             const char *comment,
01776             svn_boolean_t steal_lock,
01777             svn_ra_lock_callback_t lock_func,
01778             void *lock_baton,
01779             apr_pool_t *pool);
01780 
01804 svn_error_t *
01805 svn_ra_unlock(svn_ra_session_t *session,
01806               apr_hash_t *path_tokens,
01807               svn_boolean_t break_lock,
01808               svn_ra_lock_callback_t lock_func,
01809               void *lock_baton,
01810               apr_pool_t *pool);
01811 
01819 svn_error_t *
01820 svn_ra_get_lock(svn_ra_session_t *session,
01821                 svn_lock_t **lock,
01822                 const char *path,
01823                 apr_pool_t *pool);
01824 
01847 svn_error_t *
01848 svn_ra_get_locks2(svn_ra_session_t *session,
01849                   apr_hash_t **locks,
01850                   const char *path,
01851                   svn_depth_t depth,
01852                   apr_pool_t *pool);
01853 
01861 SVN_DEPRECATED
01862 svn_error_t *
01863 svn_ra_get_locks(svn_ra_session_t *session,
01864                  apr_hash_t **locks,
01865                  const char *path,
01866                  apr_pool_t *pool);
01867 
01868 
01895 svn_error_t *
01896 svn_ra_replay_range(svn_ra_session_t *session,
01897                     svn_revnum_t start_revision,
01898                     svn_revnum_t end_revision,
01899                     svn_revnum_t low_water_mark,
01900                     svn_boolean_t send_deltas,
01901                     svn_ra_replay_revstart_callback_t revstart_func,
01902                     svn_ra_replay_revfinish_callback_t revfinish_func,
01903                     void *replay_baton,
01904                     apr_pool_t *pool);
01905 
01925 svn_error_t *
01926 svn_ra_replay(svn_ra_session_t *session,
01927               svn_revnum_t revision,
01928               svn_revnum_t low_water_mark,
01929               svn_boolean_t send_deltas,
01930               const svn_delta_editor_t *editor,
01931               void *edit_baton,
01932               apr_pool_t *pool);
01933 
01949 svn_error_t *
01950 svn_ra_get_deleted_rev(svn_ra_session_t *session,
01951                        const char *path,
01952                        svn_revnum_t peg_revision,
01953                        svn_revnum_t end_revision,
01954                        svn_revnum_t *revision_deleted,
01955                        apr_pool_t *pool);
01956 
01976 svn_error_t *
01977 svn_ra_get_inherited_props(svn_ra_session_t *session,
01978                            apr_array_header_t **inherited_props,
01979                            const char *path,
01980                            svn_revnum_t revision,
01981                            apr_pool_t *result_pool,
01982                            apr_pool_t *scratch_pool);
01983 
02002 svn_error_t *
02003 svn_ra_has_capability(svn_ra_session_t *session,
02004                       svn_boolean_t *has,
02005                       const char *capability,
02006                       apr_pool_t *pool);
02007 
02015 #define SVN_RA_CAPABILITY_DEPTH "depth"
02016 
02025 #define SVN_RA_CAPABILITY_MERGEINFO "mergeinfo"
02026 
02032 #define SVN_RA_CAPABILITY_LOG_REVPROPS "log-revprops"
02033 
02039 #define SVN_RA_CAPABILITY_PARTIAL_REPLAY "partial-replay"
02040 
02046 #define SVN_RA_CAPABILITY_COMMIT_REVPROPS "commit-revprops"
02047 
02054 #define SVN_RA_CAPABILITY_ATOMIC_REVPROPS "atomic-revprops"
02055 
02061 #define SVN_RA_CAPABILITY_INHERITED_PROPS "inherited-props"
02062 
02069 #define SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
02070 
02077 #define SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE "get-file-revs-reversed"
02078 
02079 
02080 /*       *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
02081  *
02082  * RA layers generally fetch all capabilities when asked about any
02083  * capability, to save future round trips.  So if you add a new
02084  * capability here, make sure to update the RA layers to remember
02085  * it after any capabilities query.
02086  *
02087  * Also note that capability strings should not include colons,
02088  * because we pass a list of client capabilities to the start-commit
02089  * hook as a single, colon-separated string.
02090  */
02091 
02101 svn_error_t *
02102 svn_ra_print_modules(svn_stringbuf_t *output,
02103                      apr_pool_t *pool);
02104 
02105 
02112 SVN_DEPRECATED
02113 svn_error_t *
02114 svn_ra_print_ra_libraries(svn_stringbuf_t **descriptions,
02115                           void *ra_baton,
02116                           apr_pool_t *pool);
02117 
02118 
02119 
02126 typedef struct svn_ra_plugin_t
02127 {
02129   const char *name;
02130 
02132   const char *description;
02133 
02134   /* The vtable hooks */
02135 
02139   svn_error_t *(*open)(void **session_baton,
02140                        const char *repos_URL,
02141                        const svn_ra_callbacks_t *callbacks,
02142                        void *callback_baton,
02143                        apr_hash_t *config,
02144                        apr_pool_t *pool);
02145 
02149   svn_error_t *(*get_latest_revnum)(void *session_baton,
02150                                     svn_revnum_t *latest_revnum,
02151                                     apr_pool_t *pool);
02152 
02156   svn_error_t *(*get_dated_revision)(void *session_baton,
02157                                      svn_revnum_t *revision,
02158                                      apr_time_t tm,
02159                                      apr_pool_t *pool);
02160 
02164   svn_error_t *(*change_rev_prop)(void *session_baton,
02165                                   svn_revnum_t rev,
02166                                   const char *name,
02167                                   const svn_string_t *value,
02168                                   apr_pool_t *pool);
02169 
02173   svn_error_t *(*rev_proplist)(void *session_baton,
02174                                svn_revnum_t rev,
02175                                apr_hash_t **props,
02176                                apr_pool_t *pool);
02177 
02181   svn_error_t *(*rev_prop)(void *session_baton,
02182                            svn_revnum_t rev,
02183                            const char *name,
02184                            svn_string_t **value,
02185                            apr_pool_t *pool);
02186 
02191   svn_error_t *(*get_commit_editor)(void *session_baton,
02192                                     const svn_delta_editor_t **editor,
02193                                     void **edit_baton,
02194                                     const char *log_msg,
02195                                     svn_commit_callback_t callback,
02196                                     void *callback_baton,
02197                                     apr_pool_t *pool);
02198 
02202   svn_error_t *(*get_file)(void *session_baton,
02203                            const char *path,
02204                            svn_revnum_t revision,
02205                            svn_stream_t *stream,
02206                            svn_revnum_t *fetched_rev,
02207                            apr_hash_t **props,
02208                            apr_pool_t *pool);
02209 
02213   svn_error_t *(*get_dir)(void *session_baton,
02214                           const char *path,
02215                           svn_revnum_t revision,
02216                           apr_hash_t **dirents,
02217                           svn_revnum_t *fetched_rev,
02218                           apr_hash_t **props,
02219                           apr_pool_t *pool);
02220 
02224   svn_error_t *(*do_update)(void *session_baton,
02225                             const svn_ra_reporter_t **reporter,
02226                             void **report_baton,
02227                             svn_revnum_t revision_to_update_to,
02228                             const char *update_target,
02229                             svn_boolean_t recurse,
02230                             const svn_delta_editor_t *update_editor,
02231                             void *update_baton,
02232                             apr_pool_t *pool);
02233 
02237   svn_error_t *(*do_switch)(void *session_baton,
02238                             const svn_ra_reporter_t **reporter,
02239                             void **report_baton,
02240                             svn_revnum_t revision_to_switch_to,
02241                             const char *switch_target,
02242                             svn_boolean_t recurse,
02243                             const char *switch_url,
02244                             const svn_delta_editor_t *switch_editor,
02245                             void *switch_baton,
02246                             apr_pool_t *pool);
02247 
02251   svn_error_t *(*do_status)(void *session_baton,
02252                             const svn_ra_reporter_t **reporter,
02253                             void **report_baton,
02254                             const char *status_target,
02255                             svn_revnum_t revision,
02256                             svn_boolean_t recurse,
02257                             const svn_delta_editor_t *status_editor,
02258                             void *status_baton,
02259                             apr_pool_t *pool);
02260 
02264   svn_error_t *(*do_diff)(void *session_baton,
02265                           const svn_ra_reporter_t **reporter,
02266                           void **report_baton,
02267                           svn_revnum_t revision,
02268                           const char *diff_target,
02269                           svn_boolean_t recurse,
02270                           svn_boolean_t ignore_ancestry,
02271                           const char *versus_url,
02272                           const svn_delta_editor_t *diff_editor,
02273                           void *diff_baton,
02274                           apr_pool_t *pool);
02275 
02279   svn_error_t *(*get_log)(void *session_baton,
02280                           const apr_array_header_t *paths,
02281                           svn_revnum_t start,
02282                           svn_revnum_t end,
02283                           svn_boolean_t discover_changed_paths,
02284                           svn_boolean_t strict_node_history,
02285                           svn_log_message_receiver_t receiver,
02286                           void *receiver_baton,
02287                           apr_pool_t *pool);
02288 
02292   svn_error_t *(*check_path)(void *session_baton,
02293                              const char *path,
02294                              svn_revnum_t revision,
02295                              svn_node_kind_t *kind,
02296                              apr_pool_t *pool);
02297 
02301   svn_error_t *(*get_uuid)(void *session_baton,
02302                            const char **uuid,
02303                            apr_pool_t *pool);
02304 
02308   svn_error_t *(*get_repos_root)(void *session_baton,
02309                                  const char **url,
02310                                  apr_pool_t *pool);
02311 
02318   svn_error_t *(*get_locations)(void *session_baton,
02319                                 apr_hash_t **locations,
02320                                 const char *path,
02321                                 svn_revnum_t peg_revision,
02322                                 apr_array_header_t *location_revisions,
02323                                 apr_pool_t *pool);
02324 
02331   svn_error_t *(*get_file_revs)(void *session_baton,
02332                                 const char *path,
02333                                 svn_revnum_t start,
02334                                 svn_revnum_t end,
02335                                 svn_ra_file_rev_handler_t handler,
02336                                 void *handler_baton,
02337                                 apr_pool_t *pool);
02338 
02344   const svn_version_t *(*get_version)(void);
02345 
02346 
02347 } svn_ra_plugin_t;
02348 
02366 typedef svn_error_t *(*svn_ra_init_func_t)(int abi_version,
02367                                            apr_pool_t *pool,
02368                                            apr_hash_t *hash);
02369 
02395 #define SVN_RA_ABI_VERSION      2
02396 
02397 /* Public RA implementations. */
02398 
02402 SVN_DEPRECATED
02403 svn_error_t *
02404 svn_ra_dav_init(int abi_version,
02405                 apr_pool_t *pool,
02406                 apr_hash_t *hash);
02407 
02411 SVN_DEPRECATED
02412 svn_error_t *
02413 svn_ra_local_init(int abi_version,
02414                   apr_pool_t *pool,
02415                   apr_hash_t *hash);
02416 
02420 SVN_DEPRECATED
02421 svn_error_t *
02422 svn_ra_svn_init(int abi_version,
02423                 apr_pool_t *pool,
02424                 apr_hash_t *hash);
02425 
02430 SVN_DEPRECATED
02431 svn_error_t *
02432 svn_ra_serf_init(int abi_version,
02433                  apr_pool_t *pool,
02434                  apr_hash_t *hash);
02435 
02436 
02443 SVN_DEPRECATED
02444 svn_error_t *
02445 svn_ra_init_ra_libs(void **ra_baton,
02446                     apr_pool_t *pool);
02447 
02456 SVN_DEPRECATED
02457 svn_error_t *
02458 svn_ra_get_ra_library(svn_ra_plugin_t **library,
02459                       void *ra_baton,
02460                       const char *url,
02461                       apr_pool_t *pool);
02462 
02463 #ifdef __cplusplus
02464 }
02465 #endif /* __cplusplus */
02466 
02467 #endif  /* SVN_RA_H */
02468