1 /*
2  * ====================================================================
3  *    Licensed to the Apache Software Foundation (ASF) under one
4  *    or more contributor license agreements.  See the NOTICE file
5  *    distributed with this work for additional information
6  *    regarding copyright ownership.  The ASF licenses this file
7  *    to you under the Apache License, Version 2.0 (the
8  *    "License"); you may not use this file except in compliance
9  *    with the License.  You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  *    Unless required by applicable law or agreed to in writing,
14  *    software distributed under the License is distributed on an
15  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  *    KIND, either express or implied.  See the License for the
17  *    specific language governing permissions and limitations
18  *    under the License.
19  * ====================================================================
20  *
21  * svn_ra.i: SWIG interface file for svn_ra.h
22  */
23 
24 %include svn_global.swg
25 
26 #if defined(SWIGPYTHON)
27 %module(package="libsvn", moduleimport=SVN_PYTHON_MODULEIMPORT) ra
28 #elif defined(SWIGPERL)
29 %module "SVN::_Ra"
30 #elif defined(SWIGRUBY)
31 %module "svn::ext::ra"
32 #endif
33 
34 %import core.i
35 %import svn_delta.i
36 
37 /* Bad pool convention, also these are not public interfaces, they were
38    simply placed in the public header by mistake. */
39 %ignore svn_ra_svn_init;
40 %ignore svn_ra_local_init;
41 %ignore svn_ra_dav_init;
42 %ignore svn_ra_serf_init;
43 
44 %apply Pointer NONNULL { svn_ra_callbacks2_t *callbacks };
45 
46 /* -----------------------------------------------------------------------
47    %apply-ing of typemaps defined elsewhere
48 */
49 %apply const char *MAY_BE_NULL {
50     const char *comment,
51     const char *lock_token
52 };
53 
54 #ifdef SWIGPYTHON
55 %apply svn_stream_t *WRAPPED_STREAM { svn_stream_t * };
56 #endif
57 
58 /* ----------------------------------------------------------------------- */
59 
60 #ifdef SWIGPYTHON
61 %typemap(in) (const svn_ra_callbacks2_t *callbacks, void *callback_baton) {
62   svn_swig_py_setup_ra_callbacks(&$1, &$2, $input, _global_pool);
63 }
64 /* FIXME: svn_ra_callbacks_t ? */
65 #endif
66 #ifdef SWIGPERL
67 /* FIXME: svn_ra_callbacks2_t ? */
68 %typemap(in) (const svn_ra_callbacks_t *callbacks, void *callback_baton) {
69   svn_swig_pl_make_callbacks(&$1, &$2, $input, _global_pool);
70 }
71 #endif
72 #ifdef SWIGRUBY
73 %typemap(in) (const svn_ra_callbacks2_t *callbacks, void *callback_baton) {
74   svn_swig_rb_setup_ra_callbacks(&$1, &$2, $input, _global_pool);
75 }
76 /* FIXME: svn_ra_callbacks_t ? */
77 #endif
78 
79 #ifdef SWIGPYTHON
80 %callback_typemap(const svn_ra_reporter2_t *reporter, void *report_baton,
81                   svn_swig_py_get_ra_reporter2(),
82                   ,
83                   )
84 %callback_typemap(svn_location_segment_receiver_t receiver, void *receiver_baton,
85                   svn_swig_py_location_segment_receiver_func,
86                   ,
87                   )
88 #endif
89 
90 #ifdef SWIGRUBY
91 %callback_typemap(const svn_ra_reporter3_t *reporter, void *report_baton,
92                   ,
93                   ,
94                   svn_swig_rb_get_ra_reporter3())
95 #endif
96 
97 #ifndef SWIGPERL
98 %callback_typemap(svn_ra_file_rev_handler_t handler, void *handler_baton,
99                   svn_swig_py_ra_file_rev_handler_func,
100                   ,
101                   svn_swig_rb_ra_file_rev_handler)
102 #endif
103 
104 %callback_typemap(svn_ra_lock_callback_t lock_func, void *lock_baton,
105                   svn_swig_py_ra_lock_callback,
106                   svn_swig_pl_ra_lock_callback,
107                   svn_swig_rb_ra_lock_callback)
108 
109 /* ----------------------------------------------------------------------- */
110 
111 %include svn_ra_h.swg
112