1 #ifndef SVN_SWIG_SWIGUTIL_RB_H
2 #define SVN_SWIG_SWIGUTIL_RB_H
7 #if SIZEOF_VOIDP == SIZEOF_LONG
8 # define PTR2NUM(x) (ULONG2NUM((unsigned long)(x)))
9 # define NUM2PTR(x) ((void *)(NUM2ULONG(x)))
11 # define PTR2NUM(x) (ULL2NUM((unsigned long long)(x)))
12 # define NUM2PTR(x) ((void *)(NUM2ULL(x)))
16 #include <apr_pools.h>
18 #include <apr_portable.h>
19 #include <apr_file_io.h>
21 #include "svn_types.h"
22 #include "svn_string.h"
23 #include "svn_delta.h"
24 #include "svn_client.h"
25 #include "svn_repos.h"
27 /* Define DLL export magic on Windows. */
29 # ifdef SVN_SWIG_SWIGUTIL_RB_C
30 # define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllexport)
32 # define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllimport)
35 # define SVN_RB_SWIG_SWIGUTIL_EXPORT
40 #endif /* __cplusplus */
44 typedef struct apr_pool_wrapper_t
47 svn_boolean_t destroyed
;
48 struct apr_pool_wrapper_t
*parent
;
49 apr_array_header_t
*children
;
52 SVN_RB_SWIG_SWIGUTIL_EXPORT
53 void svn_swig_rb_initialize(void);
55 SVN_RB_SWIG_SWIGUTIL_EXPORT
56 VALUE
svn_swig_rb_svn_delta_editor(void);
57 SVN_RB_SWIG_SWIGUTIL_EXPORT
58 VALUE
svn_swig_rb_svn_delta_text_delta_window_handler(void);
60 SVN_RB_SWIG_SWIGUTIL_EXPORT
61 void svn_swig_rb_raise_svn_fs_already_close(void);
62 SVN_RB_SWIG_SWIGUTIL_EXPORT
63 void svn_swig_rb_raise_svn_repos_already_close(void);
65 SVN_RB_SWIG_SWIGUTIL_EXPORT
66 VALUE
svn_swig_rb_svn_error_new(VALUE code
, VALUE message
,
67 VALUE file
, VALUE line
);
68 SVN_RB_SWIG_SWIGUTIL_EXPORT
69 VALUE
svn_swig_rb_svn_error_to_rb_error(svn_error_t
*error
);
70 SVN_RB_SWIG_SWIGUTIL_EXPORT
71 void svn_swig_rb_handle_svn_error(svn_error_t
*error
);
73 SVN_RB_SWIG_SWIGUTIL_EXPORT
74 void *svn_swig_rb_to_swig_type(VALUE value
, void *ctx
, apr_pool_t
*pool
);
75 SVN_RB_SWIG_SWIGUTIL_EXPORT
76 VALUE
svn_swig_rb_from_swig_type(void *value
, void *ctx
);
78 SVN_RB_SWIG_SWIGUTIL_EXPORT
79 svn_depth_t
svn_swig_rb_to_depth(VALUE value
);
81 SVN_RB_SWIG_SWIGUTIL_EXPORT
82 svn_mergeinfo_inheritance_t
svn_swig_rb_to_mergeinfo_inheritance(VALUE value
);
84 SVN_RB_SWIG_SWIGUTIL_EXPORT
85 VALUE
svn_swig_rb_svn_date_string_to_time(const char *date
);
87 SVN_RB_SWIG_SWIGUTIL_EXPORT
88 VALUE
svn_swig_rb_apr_hash_to_hash_string(apr_hash_t
*hash
);
89 SVN_RB_SWIG_SWIGUTIL_EXPORT
90 VALUE
svn_swig_rb_apr_hash_to_hash_svn_string(apr_hash_t
*hash
);
91 SVN_RB_SWIG_SWIGUTIL_EXPORT
92 VALUE
svn_swig_rb_apr_hash_to_hash_swig_type(apr_hash_t
*hash
,
93 const char *type_name
);
94 SVN_RB_SWIG_SWIGUTIL_EXPORT
95 VALUE
svn_swig_rb_apr_hash_to_hash_merge_range(apr_hash_t
*hash
);
96 SVN_RB_SWIG_SWIGUTIL_EXPORT
97 VALUE
svn_swig_rb_apr_hash_to_hash_merge_range_hash(apr_hash_t
*hash
);
99 SVN_RB_SWIG_SWIGUTIL_EXPORT
100 VALUE
svn_swig_rb_prop_hash_to_hash(apr_hash_t
*prop_hash
);
101 SVN_RB_SWIG_SWIGUTIL_EXPORT
102 VALUE
svn_swig_rb_apr_revnum_key_hash_to_hash_string(apr_hash_t
*hash
);
104 SVN_RB_SWIG_SWIGUTIL_EXPORT
105 VALUE
svn_swig_rb_apr_array_to_array_string(const apr_array_header_t
*ary
);
106 SVN_RB_SWIG_SWIGUTIL_EXPORT
107 VALUE
svn_swig_rb_apr_array_to_array_svn_string(const apr_array_header_t
*ary
);
108 SVN_RB_SWIG_SWIGUTIL_EXPORT
109 VALUE
svn_swig_rb_apr_array_to_array_svn_rev(const apr_array_header_t
*ary
);
110 SVN_RB_SWIG_SWIGUTIL_EXPORT
111 VALUE
svn_swig_rb_apr_array_to_array_proplist_item(const apr_array_header_t
*ary
);
112 SVN_RB_SWIG_SWIGUTIL_EXPORT
113 VALUE
svn_swig_rb_apr_array_to_array_external_item2(const apr_array_header_t
*ary
);
114 SVN_RB_SWIG_SWIGUTIL_EXPORT
115 VALUE
svn_swig_rb_apr_array_to_array_merge_range(const apr_array_header_t
*ary
);
117 SVN_RB_SWIG_SWIGUTIL_EXPORT
118 VALUE
svn_swig_rb_prop_apr_array_to_hash_prop(const apr_array_header_t
*ary
);
120 SVN_RB_SWIG_SWIGUTIL_EXPORT
121 apr_hash_t
*svn_swig_rb_hash_to_apr_hash_string(VALUE hash
, apr_pool_t
*pool
);
122 SVN_RB_SWIG_SWIGUTIL_EXPORT
123 apr_hash_t
*svn_swig_rb_hash_to_apr_hash_svn_string(VALUE hash
,
125 SVN_RB_SWIG_SWIGUTIL_EXPORT
126 apr_hash_t
*svn_swig_rb_hash_to_apr_hash_swig_type(VALUE hash
,
127 const char *typename
,
129 SVN_RB_SWIG_SWIGUTIL_EXPORT
130 apr_hash_t
*svn_swig_rb_hash_to_apr_hash_revnum(VALUE hash
,
132 SVN_RB_SWIG_SWIGUTIL_EXPORT
133 apr_hash_t
*svn_swig_rb_hash_to_apr_hash_merge_range(VALUE hash
,
136 SVN_RB_SWIG_SWIGUTIL_EXPORT
137 apr_array_header_t
*svn_swig_rb_strings_to_apr_array(VALUE strings
,
139 SVN_RB_SWIG_SWIGUTIL_EXPORT
141 svn_swig_rb_array_to_auth_provider_object_apr_array(VALUE array
,
143 SVN_RB_SWIG_SWIGUTIL_EXPORT
144 apr_array_header_t
*svn_swig_rb_array_to_apr_array_revnum(VALUE array
,
146 SVN_RB_SWIG_SWIGUTIL_EXPORT
147 apr_array_header_t
*svn_swig_rb_array_to_apr_array_merge_range(VALUE array
,
149 SVN_RB_SWIG_SWIGUTIL_EXPORT
150 apr_array_header_t
*svn_swig_rb_array_to_apr_array_copy_source(VALUE array
,
152 SVN_RB_SWIG_SWIGUTIL_EXPORT
153 apr_array_header_t
*svn_swig_rb_array_to_apr_array_revision_range(VALUE array
,
156 SVN_RB_SWIG_SWIGUTIL_EXPORT
157 apr_array_header_t
*svn_swig_rb_to_apr_array_prop(VALUE array_or_hash
,
159 SVN_RB_SWIG_SWIGUTIL_EXPORT
160 apr_array_header_t
*svn_swig_rb_to_apr_array_row_prop(VALUE array_or_hash
,
163 SVN_RB_SWIG_SWIGUTIL_EXPORT
164 void svn_swig_rb_get_pool(int argc
, VALUE
*argv
, VALUE self
, VALUE
*rb_pool
, apr_pool_t
**pool
);
165 SVN_RB_SWIG_SWIGUTIL_EXPORT
166 svn_boolean_t
svn_swig_rb_set_pool(VALUE target
, VALUE pool
);
167 SVN_RB_SWIG_SWIGUTIL_EXPORT
168 void svn_swig_rb_set_pool_for_no_swig_type(VALUE target
, VALUE pool
);
169 SVN_RB_SWIG_SWIGUTIL_EXPORT
170 void svn_swig_rb_push_pool(VALUE pool
);
171 SVN_RB_SWIG_SWIGUTIL_EXPORT
172 void svn_swig_rb_pop_pool(VALUE pool
);
173 SVN_RB_SWIG_SWIGUTIL_EXPORT
174 void svn_swig_rb_destroy_pool(VALUE pool
);
175 SVN_RB_SWIG_SWIGUTIL_EXPORT
176 void svn_swig_rb_destroy_internal_pool(VALUE pool
);
178 SVN_RB_SWIG_SWIGUTIL_EXPORT
179 void svn_swig_rb_make_delta_editor(svn_delta_editor_t
**editor
,
184 SVN_RB_SWIG_SWIGUTIL_EXPORT
185 VALUE
svn_swig_rb_make_baton(VALUE proc
, VALUE pool
);
186 SVN_RB_SWIG_SWIGUTIL_EXPORT
187 void svn_swig_rb_set_baton(VALUE target
, VALUE baton
);
189 SVN_RB_SWIG_SWIGUTIL_EXPORT
190 svn_error_t
*svn_swig_rb_log_receiver(void *baton
,
191 apr_hash_t
*changed_paths
,
192 svn_revnum_t revision
,
198 SVN_RB_SWIG_SWIGUTIL_EXPORT
199 svn_error_t
*svn_swig_rb_repos_authz_func(svn_boolean_t
*allowed
,
205 SVN_RB_SWIG_SWIGUTIL_EXPORT
206 svn_error_t
*svn_swig_rb_repos_authz_callback(svn_repos_authz_access_t required
,
207 svn_boolean_t
*allowed
,
213 /* Implements the svn_client_get_commit_log3_t API. */
214 SVN_RB_SWIG_SWIGUTIL_EXPORT
215 svn_error_t
*svn_swig_rb_get_commit_log_func(const char **log_msg
,
216 const char **tmp_file
,
217 const apr_array_header_t
*
222 SVN_RB_SWIG_SWIGUTIL_EXPORT
223 void svn_swig_rb_notify_func2(void *baton
,
224 const svn_wc_notify_t
*notify
,
226 SVN_RB_SWIG_SWIGUTIL_EXPORT
227 svn_error_t
*svn_swig_rb_conflict_resolver_func
228 (svn_wc_conflict_result_t
**result
,
229 const svn_wc_conflict_description_t
*description
,
232 SVN_RB_SWIG_SWIGUTIL_EXPORT
233 svn_error_t
*svn_swig_rb_commit_callback(svn_revnum_t new_revision
,
237 SVN_RB_SWIG_SWIGUTIL_EXPORT
238 svn_error_t
*svn_swig_rb_commit_callback2(const svn_commit_info_t
*commit_info
,
241 SVN_RB_SWIG_SWIGUTIL_EXPORT
242 svn_error_t
*svn_swig_rb_cancel_func(void *cancel_baton
);
244 SVN_RB_SWIG_SWIGUTIL_EXPORT
245 svn_error_t
*svn_swig_rb_info_receiver(void *baton
,
247 const svn_info_t
*info
,
250 SVN_RB_SWIG_SWIGUTIL_EXPORT
251 svn_boolean_t
svn_swig_rb_config_enumerator(const char *name
,
255 SVN_RB_SWIG_SWIGUTIL_EXPORT
256 svn_boolean_t
svn_swig_rb_config_section_enumerator(const char *name
,
260 SVN_RB_SWIG_SWIGUTIL_EXPORT
261 svn_error_t
*svn_swig_rb_delta_path_driver_cb_func(void **dir_baton
,
263 void *callback_baton
,
267 SVN_RB_SWIG_SWIGUTIL_EXPORT
268 svn_error_t
*svn_swig_rb_txdelta_window_handler(svn_txdelta_window_t
*window
,
271 SVN_RB_SWIG_SWIGUTIL_EXPORT
272 void svn_swig_rb_fs_warning_callback(void *baton
, svn_error_t
*err
);
273 SVN_RB_SWIG_SWIGUTIL_EXPORT
274 void svn_swig_rb_fs_warning_callback_baton_register(VALUE baton
,
277 SVN_RB_SWIG_SWIGUTIL_EXPORT
278 svn_error_t
*svn_swig_rb_fs_get_locks_callback(void *baton
,
282 SVN_RB_SWIG_SWIGUTIL_EXPORT
283 svn_error_t
*svn_swig_rb_just_call(void *baton
);
285 SVN_RB_SWIG_SWIGUTIL_EXPORT
286 void svn_swig_rb_setup_ra_callbacks(svn_ra_callbacks2_t
**callbacks
,
291 SVN_RB_SWIG_SWIGUTIL_EXPORT
292 svn_error_t
*svn_swig_rb_ra_lock_callback(void *baton
,
294 svn_boolean_t do_lock
,
295 const svn_lock_t
*lock
,
299 SVN_RB_SWIG_SWIGUTIL_EXPORT
300 svn_error_t
*svn_swig_rb_ra_file_rev_handler(void *baton
,
303 apr_hash_t
*rev_props
,
304 svn_txdelta_window_handler_t
*delta_handler
,
306 apr_array_header_t
*prop_diffs
,
309 SVN_RB_SWIG_SWIGUTIL_EXPORT
310 svn_error_t
*svn_swig_rb_repos_history_func(void *baton
,
312 svn_revnum_t revision
,
315 SVN_RB_SWIG_SWIGUTIL_EXPORT
316 svn_error_t
*svn_swig_rb_repos_file_rev_handler(void *baton
,
319 apr_hash_t
*rev_props
,
320 svn_txdelta_window_handler_t
*delta_handler
,
322 apr_array_header_t
*prop_diffs
,
325 SVN_RB_SWIG_SWIGUTIL_EXPORT
326 svn_error_t
*svn_swig_rb_wc_relocation_validator3(void *baton
,
329 const char *root_url
,
333 /* auth provider callbacks */
334 SVN_RB_SWIG_SWIGUTIL_EXPORT
335 svn_error_t
*svn_swig_rb_auth_simple_prompt_func(
336 svn_auth_cred_simple_t
**cred
,
339 const char *username
,
340 svn_boolean_t may_save
,
343 SVN_RB_SWIG_SWIGUTIL_EXPORT
344 svn_error_t
*svn_swig_rb_auth_username_prompt_func(
345 svn_auth_cred_username_t
**cred
,
348 svn_boolean_t may_save
,
351 SVN_RB_SWIG_SWIGUTIL_EXPORT
352 svn_error_t
*svn_swig_rb_auth_ssl_server_trust_prompt_func(
353 svn_auth_cred_ssl_server_trust_t
**cred
,
356 apr_uint32_t failures
,
357 const svn_auth_ssl_server_cert_info_t
*cert_info
,
358 svn_boolean_t may_save
,
361 SVN_RB_SWIG_SWIGUTIL_EXPORT
362 svn_error_t
*svn_swig_rb_auth_ssl_client_cert_prompt_func(
363 svn_auth_cred_ssl_client_cert_t
**cred
,
366 svn_boolean_t may_save
,
369 SVN_RB_SWIG_SWIGUTIL_EXPORT
370 svn_error_t
*svn_swig_rb_auth_ssl_client_cert_pw_prompt_func(
371 svn_auth_cred_ssl_client_cert_pw_t
**cred
,
374 svn_boolean_t may_save
,
377 SVN_RB_SWIG_SWIGUTIL_EXPORT
378 apr_file_t
*svn_swig_rb_make_file(VALUE file
, apr_pool_t
*pool
);
379 SVN_RB_SWIG_SWIGUTIL_EXPORT
380 svn_stream_t
*svn_swig_rb_make_stream(VALUE io
);
382 SVN_RB_SWIG_SWIGUTIL_EXPORT
383 VALUE
svn_swig_rb_filename_to_temp_file(const char *file_name
);
385 SVN_RB_SWIG_SWIGUTIL_EXPORT
386 void svn_swig_rb_set_revision(svn_opt_revision_t
*rev
, VALUE value
);
388 SVN_RB_SWIG_SWIGUTIL_EXPORT
389 void svn_swig_rb_adjust_arg_for_client_ctx_and_pool(int *argc
, VALUE
**argv
);
392 SVN_RB_SWIG_SWIGUTIL_EXPORT
393 void svn_swig_rb_wc_status_func(void *baton
,
395 svn_wc_status2_t
*status
);
397 SVN_RB_SWIG_SWIGUTIL_EXPORT
398 svn_error_t
*svn_swig_rb_client_blame_receiver_func(void *baton
,
400 svn_revnum_t revision
,
407 SVN_RB_SWIG_SWIGUTIL_EXPORT
408 svn_wc_entry_callbacks2_t
*svn_swig_rb_wc_entry_callbacks2(void);
409 SVN_RB_SWIG_SWIGUTIL_EXPORT
410 svn_wc_diff_callbacks2_t
*svn_swig_rb_wc_diff_callbacks2(void);
413 SVN_RB_SWIG_SWIGUTIL_EXPORT
414 VALUE
svn_swig_rb_make_txdelta_window_handler_wrapper(VALUE
*rb_handler_pool
,
415 apr_pool_t
**handler_pool
,
416 svn_txdelta_window_handler_t
**handler
,
417 void ***handler_baton
);
418 SVN_RB_SWIG_SWIGUTIL_EXPORT
419 VALUE
svn_swig_rb_setup_txdelta_window_handler_wrapper(VALUE obj
,
420 svn_txdelta_window_handler_t handler
,
421 void *handler_baton
);
422 SVN_RB_SWIG_SWIGUTIL_EXPORT
423 svn_error_t
*svn_swig_rb_invoke_txdelta_window_handler(VALUE window_handler
,
424 svn_txdelta_window_t
*window
,
426 SVN_RB_SWIG_SWIGUTIL_EXPORT
427 svn_error_t
*svn_swig_rb_invoke_txdelta_window_handler_wrapper(VALUE obj
,
428 svn_txdelta_window_t
*window
,
431 SVN_RB_SWIG_SWIGUTIL_EXPORT
432 VALUE
svn_swig_rb_txdelta_window_t_ops_get(svn_txdelta_window_t
*window
);
435 SVN_RB_SWIG_SWIGUTIL_EXPORT
436 svn_error_t
*svn_swig_rb_client_diff_summarize_func(const svn_client_diff_summarize_t
*diff
,
439 SVN_RB_SWIG_SWIGUTIL_EXPORT
440 svn_error_t
*svn_swig_rb_client_list_func(void *baton
,
442 const svn_dirent_t
*dirent
,
443 const svn_lock_t
*lock
,
444 const char *abs_path
,
447 SVN_RB_SWIG_SWIGUTIL_EXPORT
448 svn_error_t
*svn_swig_rb_proplist_receiver(void *baton
,
450 apr_hash_t
*prop_hash
,
453 SVN_RB_SWIG_SWIGUTIL_EXPORT
454 svn_error_t
*svn_swig_rb_changelist_receiver(void *baton
,
456 const char *changelist
,
459 SVN_RB_SWIG_SWIGUTIL_EXPORT
460 extern svn_ra_reporter3_t
*svn_swig_rb_ra_reporter3
;
464 #endif /* __cplusplus */
466 #endif /* SVN_SWIG_SWIGUTIL_RB_H */