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_log_entry_receiver(void *baton
,
200 svn_log_entry_t
*entry
,
203 SVN_RB_SWIG_SWIGUTIL_EXPORT
204 svn_error_t
*svn_swig_rb_repos_authz_func(svn_boolean_t
*allowed
,
210 SVN_RB_SWIG_SWIGUTIL_EXPORT
211 svn_error_t
*svn_swig_rb_repos_authz_callback(svn_repos_authz_access_t required
,
212 svn_boolean_t
*allowed
,
218 /* Implements the svn_client_get_commit_log3_t API. */
219 SVN_RB_SWIG_SWIGUTIL_EXPORT
220 svn_error_t
*svn_swig_rb_get_commit_log_func(const char **log_msg
,
221 const char **tmp_file
,
222 const apr_array_header_t
*
227 SVN_RB_SWIG_SWIGUTIL_EXPORT
228 void svn_swig_rb_notify_func2(void *baton
,
229 const svn_wc_notify_t
*notify
,
231 SVN_RB_SWIG_SWIGUTIL_EXPORT
232 svn_error_t
*svn_swig_rb_conflict_resolver_func
233 (svn_wc_conflict_result_t
**result
,
234 const svn_wc_conflict_description_t
*description
,
237 SVN_RB_SWIG_SWIGUTIL_EXPORT
238 svn_error_t
*svn_swig_rb_commit_callback(svn_revnum_t new_revision
,
242 SVN_RB_SWIG_SWIGUTIL_EXPORT
243 svn_error_t
*svn_swig_rb_commit_callback2(const svn_commit_info_t
*commit_info
,
246 SVN_RB_SWIG_SWIGUTIL_EXPORT
247 svn_error_t
*svn_swig_rb_cancel_func(void *cancel_baton
);
249 SVN_RB_SWIG_SWIGUTIL_EXPORT
250 svn_error_t
*svn_swig_rb_info_receiver(void *baton
,
252 const svn_info_t
*info
,
255 SVN_RB_SWIG_SWIGUTIL_EXPORT
256 svn_boolean_t
svn_swig_rb_config_enumerator(const char *name
,
260 SVN_RB_SWIG_SWIGUTIL_EXPORT
261 svn_boolean_t
svn_swig_rb_config_section_enumerator(const char *name
,
265 SVN_RB_SWIG_SWIGUTIL_EXPORT
266 svn_error_t
*svn_swig_rb_delta_path_driver_cb_func(void **dir_baton
,
268 void *callback_baton
,
272 SVN_RB_SWIG_SWIGUTIL_EXPORT
273 svn_error_t
*svn_swig_rb_txdelta_window_handler(svn_txdelta_window_t
*window
,
276 SVN_RB_SWIG_SWIGUTIL_EXPORT
277 void svn_swig_rb_fs_warning_callback(void *baton
, svn_error_t
*err
);
278 SVN_RB_SWIG_SWIGUTIL_EXPORT
279 void svn_swig_rb_fs_warning_callback_baton_register(VALUE baton
,
282 SVN_RB_SWIG_SWIGUTIL_EXPORT
283 svn_error_t
*svn_swig_rb_fs_get_locks_callback(void *baton
,
287 SVN_RB_SWIG_SWIGUTIL_EXPORT
288 svn_error_t
*svn_swig_rb_just_call(void *baton
);
290 SVN_RB_SWIG_SWIGUTIL_EXPORT
291 void svn_swig_rb_setup_ra_callbacks(svn_ra_callbacks2_t
**callbacks
,
296 SVN_RB_SWIG_SWIGUTIL_EXPORT
297 svn_error_t
*svn_swig_rb_ra_lock_callback(void *baton
,
299 svn_boolean_t do_lock
,
300 const svn_lock_t
*lock
,
304 SVN_RB_SWIG_SWIGUTIL_EXPORT
305 svn_error_t
*svn_swig_rb_ra_file_rev_handler(void *baton
,
308 apr_hash_t
*rev_props
,
309 svn_txdelta_window_handler_t
*delta_handler
,
311 apr_array_header_t
*prop_diffs
,
314 SVN_RB_SWIG_SWIGUTIL_EXPORT
315 svn_error_t
*svn_swig_rb_repos_history_func(void *baton
,
317 svn_revnum_t revision
,
320 SVN_RB_SWIG_SWIGUTIL_EXPORT
321 svn_error_t
*svn_swig_rb_repos_file_rev_handler(void *baton
,
324 apr_hash_t
*rev_props
,
325 svn_txdelta_window_handler_t
*delta_handler
,
327 apr_array_header_t
*prop_diffs
,
330 SVN_RB_SWIG_SWIGUTIL_EXPORT
331 svn_error_t
*svn_swig_rb_wc_relocation_validator3(void *baton
,
334 const char *root_url
,
338 /* auth provider callbacks */
339 SVN_RB_SWIG_SWIGUTIL_EXPORT
340 svn_error_t
*svn_swig_rb_auth_simple_prompt_func(
341 svn_auth_cred_simple_t
**cred
,
344 const char *username
,
345 svn_boolean_t may_save
,
348 SVN_RB_SWIG_SWIGUTIL_EXPORT
349 svn_error_t
*svn_swig_rb_auth_username_prompt_func(
350 svn_auth_cred_username_t
**cred
,
353 svn_boolean_t may_save
,
356 SVN_RB_SWIG_SWIGUTIL_EXPORT
357 svn_error_t
*svn_swig_rb_auth_ssl_server_trust_prompt_func(
358 svn_auth_cred_ssl_server_trust_t
**cred
,
361 apr_uint32_t failures
,
362 const svn_auth_ssl_server_cert_info_t
*cert_info
,
363 svn_boolean_t may_save
,
366 SVN_RB_SWIG_SWIGUTIL_EXPORT
367 svn_error_t
*svn_swig_rb_auth_ssl_client_cert_prompt_func(
368 svn_auth_cred_ssl_client_cert_t
**cred
,
371 svn_boolean_t may_save
,
374 SVN_RB_SWIG_SWIGUTIL_EXPORT
375 svn_error_t
*svn_swig_rb_auth_ssl_client_cert_pw_prompt_func(
376 svn_auth_cred_ssl_client_cert_pw_t
**cred
,
379 svn_boolean_t may_save
,
382 SVN_RB_SWIG_SWIGUTIL_EXPORT
383 apr_file_t
*svn_swig_rb_make_file(VALUE file
, apr_pool_t
*pool
);
384 SVN_RB_SWIG_SWIGUTIL_EXPORT
385 svn_stream_t
*svn_swig_rb_make_stream(VALUE io
);
387 SVN_RB_SWIG_SWIGUTIL_EXPORT
388 VALUE
svn_swig_rb_filename_to_temp_file(const char *file_name
);
390 SVN_RB_SWIG_SWIGUTIL_EXPORT
391 void svn_swig_rb_set_revision(svn_opt_revision_t
*rev
, VALUE value
);
393 SVN_RB_SWIG_SWIGUTIL_EXPORT
394 void svn_swig_rb_adjust_arg_for_client_ctx_and_pool(int *argc
, VALUE
**argv
);
397 SVN_RB_SWIG_SWIGUTIL_EXPORT
398 void svn_swig_rb_wc_status_func(void *baton
,
400 svn_wc_status2_t
*status
);
402 SVN_RB_SWIG_SWIGUTIL_EXPORT
403 svn_error_t
*svn_swig_rb_client_blame_receiver_func(void *baton
,
405 svn_revnum_t revision
,
412 SVN_RB_SWIG_SWIGUTIL_EXPORT
413 svn_wc_entry_callbacks2_t
*svn_swig_rb_wc_entry_callbacks2(void);
414 SVN_RB_SWIG_SWIGUTIL_EXPORT
415 svn_wc_diff_callbacks2_t
*svn_swig_rb_wc_diff_callbacks2(void);
418 SVN_RB_SWIG_SWIGUTIL_EXPORT
419 VALUE
svn_swig_rb_make_txdelta_window_handler_wrapper(VALUE
*rb_handler_pool
,
420 apr_pool_t
**handler_pool
,
421 svn_txdelta_window_handler_t
**handler
,
422 void ***handler_baton
);
423 SVN_RB_SWIG_SWIGUTIL_EXPORT
424 VALUE
svn_swig_rb_setup_txdelta_window_handler_wrapper(VALUE obj
,
425 svn_txdelta_window_handler_t handler
,
426 void *handler_baton
);
427 SVN_RB_SWIG_SWIGUTIL_EXPORT
428 svn_error_t
*svn_swig_rb_invoke_txdelta_window_handler(VALUE window_handler
,
429 svn_txdelta_window_t
*window
,
431 SVN_RB_SWIG_SWIGUTIL_EXPORT
432 svn_error_t
*svn_swig_rb_invoke_txdelta_window_handler_wrapper(VALUE obj
,
433 svn_txdelta_window_t
*window
,
436 SVN_RB_SWIG_SWIGUTIL_EXPORT
437 VALUE
svn_swig_rb_txdelta_window_t_ops_get(svn_txdelta_window_t
*window
);
440 SVN_RB_SWIG_SWIGUTIL_EXPORT
441 svn_error_t
*svn_swig_rb_client_diff_summarize_func(const svn_client_diff_summarize_t
*diff
,
444 SVN_RB_SWIG_SWIGUTIL_EXPORT
445 svn_error_t
*svn_swig_rb_client_list_func(void *baton
,
447 const svn_dirent_t
*dirent
,
448 const svn_lock_t
*lock
,
449 const char *abs_path
,
452 SVN_RB_SWIG_SWIGUTIL_EXPORT
453 svn_error_t
*svn_swig_rb_proplist_receiver(void *baton
,
455 apr_hash_t
*prop_hash
,
458 SVN_RB_SWIG_SWIGUTIL_EXPORT
459 svn_error_t
*svn_swig_rb_changelist_receiver(void *baton
,
461 const char *changelist
,
464 SVN_RB_SWIG_SWIGUTIL_EXPORT
465 extern svn_ra_reporter3_t
*svn_swig_rb_ra_reporter3
;
469 #endif /* __cplusplus */
471 #endif /* SVN_SWIG_SWIGUTIL_RB_H */