Fix compiler warning due to missing function prototype.
[svn.git] / subversion / bindings / swig / ruby / libsvn_swig_ruby / swigutil_rb.h
blobf2989cf9fe874b5ccf0f50da739282e28d71d578
1 #ifndef SVN_SWIG_SWIGUTIL_RB_H
2 #define SVN_SWIG_SWIGUTIL_RB_H
4 #include <ruby.h>
5 #include <regex.h>
7 #if SIZEOF_VOIDP == SIZEOF_LONG
8 # define PTR2NUM(x) (ULONG2NUM((unsigned long)(x)))
9 # define NUM2PTR(x) ((void *)(NUM2ULONG(x)))
10 #else
11 # define PTR2NUM(x) (ULL2NUM((unsigned long long)(x)))
12 # define NUM2PTR(x) ((void *)(NUM2ULL(x)))
13 #endif
15 #include <apr.h>
16 #include <apr_pools.h>
17 #include <apr_hash.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. */
28 #ifdef WIN32
29 # ifdef SVN_SWIG_SWIGUTIL_RB_C
30 # define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllexport)
31 # else
32 # define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllimport)
33 # endif
34 #else
35 # define SVN_RB_SWIG_SWIGUTIL_EXPORT
36 #endif
38 #ifdef __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
42 #include <rubyio.h>
44 typedef struct apr_pool_wrapper_t
46 apr_pool_t *pool;
47 svn_boolean_t destroyed;
48 struct apr_pool_wrapper_t *parent;
49 apr_array_header_t *children;
50 } apr_pool_wrapper_t;
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,
124 apr_pool_t *pool);
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,
128 apr_pool_t *pool);
129 SVN_RB_SWIG_SWIGUTIL_EXPORT
130 apr_hash_t *svn_swig_rb_hash_to_apr_hash_revnum(VALUE hash,
131 apr_pool_t *pool);
132 SVN_RB_SWIG_SWIGUTIL_EXPORT
133 apr_hash_t *svn_swig_rb_hash_to_apr_hash_merge_range(VALUE hash,
134 apr_pool_t *pool);
136 SVN_RB_SWIG_SWIGUTIL_EXPORT
137 apr_array_header_t *svn_swig_rb_strings_to_apr_array(VALUE strings,
138 apr_pool_t *pool);
139 SVN_RB_SWIG_SWIGUTIL_EXPORT
140 apr_array_header_t *
141 svn_swig_rb_array_to_auth_provider_object_apr_array(VALUE array,
142 apr_pool_t *pool);
143 SVN_RB_SWIG_SWIGUTIL_EXPORT
144 apr_array_header_t *svn_swig_rb_array_to_apr_array_revnum(VALUE array,
145 apr_pool_t *pool);
146 SVN_RB_SWIG_SWIGUTIL_EXPORT
147 apr_array_header_t *svn_swig_rb_array_to_apr_array_merge_range(VALUE array,
148 apr_pool_t *pool);
149 SVN_RB_SWIG_SWIGUTIL_EXPORT
150 apr_array_header_t *svn_swig_rb_array_to_apr_array_copy_source(VALUE array,
151 apr_pool_t *pool);
152 SVN_RB_SWIG_SWIGUTIL_EXPORT
153 apr_array_header_t *svn_swig_rb_array_to_apr_array_revision_range(VALUE array,
154 apr_pool_t *pool);
156 SVN_RB_SWIG_SWIGUTIL_EXPORT
157 apr_array_header_t *svn_swig_rb_to_apr_array_prop(VALUE array_or_hash,
158 apr_pool_t *pool);
159 SVN_RB_SWIG_SWIGUTIL_EXPORT
160 apr_array_header_t *svn_swig_rb_to_apr_array_row_prop(VALUE array_or_hash,
161 apr_pool_t *pool);
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,
180 void **edit_baton,
181 VALUE rb_editor,
182 apr_pool_t *pool);
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,
193 const char *author,
194 const char *date,
195 const char *message,
196 apr_pool_t *pool);
198 SVN_RB_SWIG_SWIGUTIL_EXPORT
199 svn_error_t *svn_swig_rb_log_entry_receiver(void *baton,
200 svn_log_entry_t *entry,
201 apr_pool_t *pool);
203 SVN_RB_SWIG_SWIGUTIL_EXPORT
204 svn_error_t *svn_swig_rb_repos_authz_func(svn_boolean_t *allowed,
205 svn_fs_root_t *root,
206 const char *path,
207 void *baton,
208 apr_pool_t *pool);
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,
213 svn_fs_root_t *root,
214 const char *path,
215 void *baton,
216 apr_pool_t *pool);
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 *
223 commit_items,
224 void *baton,
225 apr_pool_t *pool);
227 SVN_RB_SWIG_SWIGUTIL_EXPORT
228 void svn_swig_rb_notify_func2(void *baton,
229 const svn_wc_notify_t *notify,
230 apr_pool_t *pool);
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,
235 void *baton,
236 apr_pool_t *pool);
237 SVN_RB_SWIG_SWIGUTIL_EXPORT
238 svn_error_t *svn_swig_rb_commit_callback(svn_revnum_t new_revision,
239 const char *date,
240 const char *author,
241 void *baton);
242 SVN_RB_SWIG_SWIGUTIL_EXPORT
243 svn_error_t *svn_swig_rb_commit_callback2(const svn_commit_info_t *commit_info,
244 void *baton,
245 apr_pool_t *pool);
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,
251 const char *path,
252 const svn_info_t *info,
253 apr_pool_t *pool);
255 SVN_RB_SWIG_SWIGUTIL_EXPORT
256 svn_boolean_t svn_swig_rb_config_enumerator(const char *name,
257 const char *value,
258 void *baton,
259 apr_pool_t *pool);
260 SVN_RB_SWIG_SWIGUTIL_EXPORT
261 svn_boolean_t svn_swig_rb_config_section_enumerator(const char *name,
262 void *baton,
263 apr_pool_t *pool);
265 SVN_RB_SWIG_SWIGUTIL_EXPORT
266 svn_error_t *svn_swig_rb_delta_path_driver_cb_func(void **dir_baton,
267 void *parent_baton,
268 void *callback_baton,
269 const char *path,
270 apr_pool_t *pool);
272 SVN_RB_SWIG_SWIGUTIL_EXPORT
273 svn_error_t *svn_swig_rb_txdelta_window_handler(svn_txdelta_window_t *window,
274 void *baton);
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,
280 apr_pool_t *pool);
282 SVN_RB_SWIG_SWIGUTIL_EXPORT
283 svn_error_t *svn_swig_rb_fs_get_locks_callback(void *baton,
284 svn_lock_t *lock,
285 apr_pool_t *pool);
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,
292 void **baton,
293 VALUE rb_callbacks,
294 apr_pool_t *pool);
296 SVN_RB_SWIG_SWIGUTIL_EXPORT
297 svn_error_t *svn_swig_rb_ra_lock_callback(void *baton,
298 const char *path,
299 svn_boolean_t do_lock,
300 const svn_lock_t *lock,
301 svn_error_t *ra_err,
302 apr_pool_t *pool);
304 SVN_RB_SWIG_SWIGUTIL_EXPORT
305 svn_error_t *svn_swig_rb_ra_file_rev_handler(void *baton,
306 const char *path,
307 svn_revnum_t rev,
308 apr_hash_t *rev_props,
309 svn_txdelta_window_handler_t *delta_handler,
310 void **delta_baton,
311 apr_array_header_t *prop_diffs,
312 apr_pool_t *pool);
314 SVN_RB_SWIG_SWIGUTIL_EXPORT
315 svn_error_t *svn_swig_rb_repos_history_func(void *baton,
316 const char *path,
317 svn_revnum_t revision,
318 apr_pool_t *pool);
320 SVN_RB_SWIG_SWIGUTIL_EXPORT
321 svn_error_t *svn_swig_rb_repos_file_rev_handler(void *baton,
322 const char *path,
323 svn_revnum_t rev,
324 apr_hash_t *rev_props,
325 svn_txdelta_window_handler_t *delta_handler,
326 void **delta_baton,
327 apr_array_header_t *prop_diffs,
328 apr_pool_t *pool);
330 SVN_RB_SWIG_SWIGUTIL_EXPORT
331 svn_error_t *svn_swig_rb_wc_relocation_validator3(void *baton,
332 const char *uuid,
333 const char *url,
334 const char *root_url,
335 apr_pool_t *pool);
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,
342 void *baton,
343 const char *realm,
344 const char *username,
345 svn_boolean_t may_save,
346 apr_pool_t *pool);
348 SVN_RB_SWIG_SWIGUTIL_EXPORT
349 svn_error_t *svn_swig_rb_auth_username_prompt_func(
350 svn_auth_cred_username_t **cred,
351 void *baton,
352 const char *realm,
353 svn_boolean_t may_save,
354 apr_pool_t *pool);
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,
359 void *baton,
360 const char *realm,
361 apr_uint32_t failures,
362 const svn_auth_ssl_server_cert_info_t *cert_info,
363 svn_boolean_t may_save,
364 apr_pool_t *pool);
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,
369 void *baton,
370 const char *realm,
371 svn_boolean_t may_save,
372 apr_pool_t *pool);
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,
377 void *baton,
378 const char *realm,
379 svn_boolean_t may_save,
380 apr_pool_t *pool);
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,
399 const char *path,
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,
404 apr_int64_t line_no,
405 svn_revnum_t revision,
406 const char *author,
407 const char *date,
408 const char *line,
409 apr_pool_t *pool);
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,
430 apr_pool_t *pool);
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,
434 apr_pool_t *pool);
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,
442 void *baton,
443 apr_pool_t *pool);
444 SVN_RB_SWIG_SWIGUTIL_EXPORT
445 svn_error_t *svn_swig_rb_client_list_func(void *baton,
446 const char *path,
447 const svn_dirent_t *dirent,
448 const svn_lock_t *lock,
449 const char *abs_path,
450 apr_pool_t *pool);
452 SVN_RB_SWIG_SWIGUTIL_EXPORT
453 svn_error_t *svn_swig_rb_proplist_receiver(void *baton,
454 const char *path,
455 apr_hash_t *prop_hash,
456 apr_pool_t *pool);
458 SVN_RB_SWIG_SWIGUTIL_EXPORT
459 svn_error_t *svn_swig_rb_changelist_receiver(void *baton,
460 const char *path,
461 const char *changelist,
462 apr_pool_t *pool);
464 SVN_RB_SWIG_SWIGUTIL_EXPORT
465 extern svn_ra_reporter3_t *svn_swig_rb_ra_reporter3;
467 #ifdef __cplusplus
469 #endif /* __cplusplus */
471 #endif /* SVN_SWIG_SWIGUTIL_RB_H */