* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
[svn.git] / subversion / bindings / swig / svn_repos.i
blobf0f9c5efe6c1b4f4b92843e4d1e16f7f743b76fe
1 /*
2 * ====================================================================
3 * Copyright (c) 2000-2006 CollabNet. All rights reserved.
5 * This software is licensed as described in the file COPYING, which
6 * you should have received as part of this distribution. The terms
7 * are also available at http://subversion.tigris.org/license-1.html.
8 * If newer versions of this license are posted there, you may use a
9 * newer version instead, at your option.
11 * This software consists of voluntary contributions made by many
12 * individuals. For exact contribution history, see the revision
13 * history and logs, available at http://subversion.tigris.org/.
14 * ====================================================================
16 * svn_repos.i: SWIG interface file for svn_repos.h
19 #if defined(SWIGPYTHON)
20 %module(package="libsvn") repos
21 #elif defined(SWIGPERL)
22 %module "SVN::_Repos"
23 #elif defined(SWIGRUBY)
24 %module "svn::ext::repos"
25 #endif
27 %include svn_global.swg
28 %import core.i
29 %import svn_delta.i
30 %import svn_fs.i
32 /* -----------------------------------------------------------------------
33 %apply-ing of typemaps defined elsewhere
35 %apply const char *MAY_BE_NULL {
36 const char *src_entry,
37 const char *unused_1,
38 const char *unused_2,
39 const char *token,
40 const char *user,
41 const char *log_msg,
42 const char *lock_token,
43 const char *tgt_path,
44 const char *parent_dir
47 #ifdef SWIGPYTHON
48 %apply svn_stream_t *WRAPPED_STREAM { svn_stream_t * };
49 #endif
51 #ifdef SWIGRUBY
52 %apply const char *NOT_NULL {
53 const char *path
56 %apply svn_stream_t *MAY_BE_NULL {
57 svn_stream_t *dumpstream_may_be_null,
58 svn_stream_t *feedback_stream
60 #endif
62 %callback_typemap(svn_repos_history_func_t history_func, void *history_baton,
63 svn_swig_py_repos_history_func,
64 svn_swig_pl_thunk_history_func,
65 svn_swig_rb_repos_history_func)
67 %callback_typemap_maybenull(svn_repos_authz_func_t authz_read_func,
68 void *authz_read_baton,
69 svn_swig_py_repos_authz_func,
70 svn_swig_pl_thunk_authz_func,
71 svn_swig_rb_repos_authz_func)
73 #ifdef SWIGRUBY
74 %typemap(in) (svn_error_t *(*start_callback)(void *), void *start_callback_baton)
76 $1 = svn_swig_rb_just_call;
77 $2 = (void *)svn_swig_rb_make_baton($input, _global_svn_swig_rb_pool);
79 #endif
81 #ifdef SWIGRUBY
82 %callback_typemap(svn_repos_file_rev_handler_t handler, void *handler_baton,
85 svn_swig_rb_repos_file_rev_handler)
87 %callback_typemap(svn_repos_authz_func_t authz_read_func,
88 void *authz_read_baton,
91 svn_swig_rb_repos_authz_func)
93 %callback_typemap(svn_repos_authz_callback_t authz_callback, void *authz_baton,
96 svn_swig_rb_repos_authz_callback)
97 #endif
99 /* -----------------------------------------------------------------------
100 handle svn_repos_get_committed_info().
102 #ifdef SWIGRUBY
103 %typemap(argout) const char **committed_date {
104 %append_output(svn_swig_rb_svn_date_string_to_time(*$1));
106 #endif
109 /* ----------------------------------------------------------------------- */
110 /* Ruby fixups for functions not following the pool convention. */
111 #ifdef SWIGRUBY
112 %ignore svn_repos_fs;
113 %inline %{
114 static svn_fs_t *
115 svn_repos_fs_wrapper(svn_repos_t *fs, apr_pool_t *pool)
117 return svn_repos_fs(fs);
120 #endif
122 /* ----------------------------------------------------------------------- */
124 #ifdef SWIGRUBY
125 svn_error_t *svn_repos_dump_fs2(svn_repos_t *repos,
126 svn_stream_t *dumpstream_may_be_null,
127 svn_stream_t *feedback_stream,
128 svn_revnum_t start_rev,
129 svn_revnum_t end_rev,
130 svn_boolean_t incremental,
131 svn_boolean_t use_deltas,
132 svn_cancel_func_t cancel_func,
133 void *cancel_baton,
134 apr_pool_t *pool);
135 %ignore svn_repos_dump_fs2;
136 #endif
138 %include svn_repos_h.swg
140 #ifdef SWIGRUBY
141 %define_close_related_methods(repos)
142 #endif