Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/core.i view on Meta::CPAN
%ignore svn_io_dir_make_hidden;
%ignore svn_io_dir_make_sgid;
%ignore svn_io_dir_open;
%ignore svn_io_dir_remove_nonrecursive;
%ignore svn_io_dir_read;
%ignore svn_io_read_version_file;
%ignore svn_io_write_version_file;
/* svn_path.h: We cherry-pick certain functions from this file. To aid in this,
* EVERY function in the file is listed in the order it appears, and is either
* %ignore-d, or present as a comment, explicitly documenting that we wrap it.
*/
// svn_path_internal_style;
// svn_path_local_style;
%ignore svn_path_join;
%ignore svn_path_join_many;
%ignore svn_path_basename;
%ignore svn_path_dirname;
%ignore svn_path_component_count;
%ignore svn_path_add_component;
%ignore svn_path_remove_component;
%ignore svn_path_remove_components;
%ignore svn_path_split;
// svn_path_is_empty;
// svn_path_canonicalize;
// svn_path_compare_paths;
// svn_path_get_longest_ancestor;
%ignore svn_path_get_absolute;
%ignore svn_path_split_if_file;
%ignore svn_path_condense_targets;
%ignore svn_path_remove_redundancies;
%ignore svn_path_decompose;
%ignore svn_path_compose;
%ignore svn_path_is_single_path_component;
%ignore svn_path_is_backpath_present;
%ignore svn_path_is_child;
%ignore svn_path_is_ancestor;
%ignore svn_path_check_valid;
// svn_path_is_url;
// svn_path_is_uri_safe;
%ignore svn_path_uri_encode;
%ignore svn_path_uri_decode;
%ignore svn_path_url_add_component;
%ignore svn_path_uri_from_iri;
%ignore svn_path_uri_autoescape;
%ignore svn_path_cstring_from_utf8;
%ignore svn_path_cstring_to_utf8;
/* svn_dirent_uri.h: SWIG can't digest these functions yet, so ignore them
* for now. TODO: make them work.
*/
%ignore svn_dirent_join_many;
%ignore svn_dirent_condense_targets;
%ignore svn_uri_condense_targets;
%ignore svn_dirent_is_under_root;
/* Other files */
/* Ignore platform-specific auth functions */
%ignore svn_auth_get_keychain_simple_provider;
%ignore svn_auth_get_keychain_ssl_client_cert_pw_provider;
%ignore svn_auth_get_windows_simple_provider;
%ignore svn_auth_get_windows_ssl_server_trust_provider;
%ignore svn_auth_gnome_keyring_version;
%ignore svn_auth_get_gnome_keyring_simple_provider;
%ignore svn_auth_get_gnome_keyring_ssl_client_cert_pw_provider;
%ignore svn_auth_kwallet_version;
%ignore svn_auth_get_kwallet_simple_provider;
%ignore svn_auth_get_kwallet_ssl_client_cert_pw_provider;
%ignore svn_auth_get_gpg_agent_simple_provider;
/* bad pool convention */
%ignore svn_opt_print_generic_help;
%ignore svn_opt_args_to_target_array;
/* svn_cmdline.h */
%ignore svn_cmdline_auth_plaintext_passphrase_prompt;
%ignore svn_cmdline_auth_plaintext_prompt;
%ignore svn_cmdline_auth_simple_prompt;
%ignore svn_cmdline_auth_ssl_client_cert_prompt;
%ignore svn_cmdline_auth_ssl_client_cert_pw_prompt;
%ignore svn_cmdline_auth_ssl_server_trust_prompt;
%ignore svn_cmdline_auth_username_prompt;
%ignore svn_cmdline_cstring_from_utf8;
%ignore svn_cmdline_cstring_from_utf8_fuzzy;
%ignore svn_cmdline_cstring_to_utf8;
%ignore svn_cmdline_fflush;
%ignore svn_cmdline_fprintf;
%ignore svn_cmdline_fputs;
%ignore svn_cmdline_handle_exit_error;
%ignore svn_cmdline_output_encoding;
%ignore svn_cmdline_path_local_style_from_utf8;
%ignore svn_cmdline_printf;
%ignore svn_cmdline_prompt_baton2_t;
%ignore svn_cmdline_prompt_baton_t;
%ignore svn_cmdline_prompt_user2;
%ignore svn_cmdline_prompt_user;
%ignore svn_cmdline_setup_auth_baton;
/* Ugliness because the constants are typedefed and SWIG ignores them
as a result. */
%constant svn_revnum_t SWIG_SVN_INVALID_REVNUM = -1;
%constant svn_revnum_t SWIG_SVN_IGNORED_REVNUM = -1;
/* -----------------------------------------------------------------------
input rangelist
*/
%apply svn_rangelist_t *RANGELIST {
svn_rangelist_t *rangeinput,
const svn_rangelist_t *rangelist,
svn_rangelist_t *from,
svn_rangelist_t *to,
svn_rangelist_t *changes,
svn_rangelist_t *eraser,
svn_rangelist_t *whiteboard,
svn_rangelist_t *rangelist1,
svn_rangelist_t *rangelist2
}
/* -----------------------------------------------------------------------
output rangelist
*/
%apply svn_rangelist_t **RANGELIST {
svn_rangelist_t **rangelist,
svn_rangelist_t **inheritable_rangelist,
svn_rangelist_t **deleted,
svn_rangelist_t **added,
svn_rangelist_t **output
}
/* -----------------------------------------------------------------------
input and output rangelist
*/
%apply svn_rangelist_t **RANGELIST_INOUT {
svn_rangelist_t **rangelist_inout
}
/* -----------------------------------------------------------------------
input mergeinfo hash
*/
%apply apr_hash_t *MERGEINFO {
apr_hash_t *mergefrom,
src/subversion/subversion/bindings/swig/core.i view on Meta::CPAN
}
#endif
#ifdef SWIGRUBY
%typemap(in) (const char *data, apr_size_t *len) ($*2_type temp)
{
$1 = StringValuePtr($input);
temp = RSTRING_LEN($input);
$2 = ($2_ltype)&temp;
}
#endif
#ifdef SWIGPYTHON
%typemap(argout) (const char *data, apr_size_t *len) {
%append_output(PyInt_FromLong(*$2));
}
#endif
#ifdef SWIGPERL
%typemap(argout) (const char *data, apr_size_t *len) {
%append_output(sv_2mortal(newSViv(*$2)));
}
#endif
#ifdef SWIGRUBY
%typemap(argout) (const char *data, apr_size_t *len) {
%append_output(LONG2NUM(*$2));
}
#endif
/* -----------------------------------------------------------------------
auth parameter set/get
*/
/* set */
#ifdef SWIGPYTHON
%typemap(in) const void *value
(apr_pool_t *_global_pool = NULL, PyObject *_global_py_pool = NULL)
{
if (_global_pool == NULL)
{
if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
&_global_py_pool, &_global_pool))
SWIG_fail;
}
if (PyString_Check($input)) {
char *value = PyString_AS_STRING($input);
$1 = apr_pstrdup(_global_pool, value);
}
else if (PyLong_Check($input)) {
$1 = apr_palloc(_global_pool, sizeof(apr_uint32_t));
*((apr_uint32_t *)$1) = PyLong_AsLong($input);
}
else if (PyInt_Check($input)) {
$1 = apr_palloc(_global_pool, sizeof(apr_uint32_t));
*((apr_uint32_t *)$1) = PyInt_AsLong($input);
}
else if ($input == Py_None) {
$1 = NULL;
}
else if (svn_swig_ConvertPtr($input, (void **)&$1, $descriptor(svn_auth_ssl_server_cert_info_t *)) == 0) {
}
else {
PyErr_SetString(PyExc_TypeError, "not a known type");
SWIG_fail;
}
}
#endif
/*
- all values are converted to char*
- assume the first argument is Ruby object for svn_auth_baton_t*
*/
#ifdef SWIGRUBY
%typemap(in) const void *value
{
if (NIL_P($input)) {
$1 = (void *)NULL;
} else {
VALUE _rb_pool;
apr_pool_t *_global_pool;
char *value = StringValuePtr($input);
svn_swig_rb_get_pool(1, argv, Qnil, &_rb_pool, &_global_pool);
$1 = (void *)apr_pstrdup(_global_pool, value);
}
}
#endif
/* get */
/* assume the value is char* */
#ifdef SWIGRUBY
%typemap(out) const void *
{
char *value = $1;
if (value) {
$result = rb_str_new2(value);
} else {
$result = Qnil;
}
}
#endif
#ifndef SWIGRUBY
%ignore svn_auth_get_parameter;
#endif
/* -----------------------------------------------------------------------
svn_io_parse_mimetypes_file()
*/
#ifdef SWIGRUBY
%apply apr_hash_t **HASH_CSTRING {
apr_hash_t **type_map
}
#endif
/* -----------------------------------------------------------------------
svn_io_detect_mimetype2()
*/
src/subversion/subversion/bindings/swig/core.i view on Meta::CPAN
current_pool = pool;
}
%}
#endif
/* -----------------------------------------------------------------------
wrap config functions
*/
#ifdef SWIGPERL
%callback_typemap(svn_config_enumerator_t callback, void *baton,
,
svn_swig_pl_thunk_config_enumerator,
)
#endif
#ifndef SWIGPERL
%callback_typemap(svn_config_enumerator2_t callback, void *baton,
svn_swig_py_config_enumerator2,
,
svn_swig_rb_config_enumerator)
%callback_typemap(svn_config_section_enumerator2_t callback, void *baton,
svn_swig_py_config_section_enumerator2,
,
svn_swig_rb_config_section_enumerator)
#endif
/* Allow None to be passed as config_dir argument */
#ifdef SWIGPYTHON
%typemap(in,parse="z") const char *config_dir "";
#endif
/* -----------------------------------------------------------------------
thunk the various authentication prompt functions.
PERL NOTE: store the inputed SV in _global_callback for use in the
later argout typemap
*/
#ifdef SWIGPERL
%define %authprompt_callback_typemap(AuthType)
%typemap(in) (svn_auth_ ## AuthType ## _prompt_func_t prompt_func,
void *prompt_baton) {
$1 = svn_swig_pl_thunk_ ## AuthType ## _prompt;
$2 = $input;
_global_callback = $input;
}
%enddef
#else
%define %authprompt_callback_typemap(AuthType)
%callback_typemap(svn_auth_ ## AuthType ## _prompt_func_t prompt_func,
void *prompt_baton,
svn_swig_py_auth_ ## AuthType ## _prompt_func,,
svn_swig_rb_auth_ ## AuthType ## _prompt_func)
%enddef
#endif
%authprompt_callback_typemap(simple)
%authprompt_callback_typemap(username)
%authprompt_callback_typemap(ssl_server_trust)
%authprompt_callback_typemap(ssl_client_cert)
%authprompt_callback_typemap(ssl_client_cert_pw)
%authprompt_callback_typemap(gnome_keyring_unlock)
#ifdef SWIGPYTHON
/* pl and rb aren't yet implemented */
%callback_typemap_maybenull(svn_config_auth_walk_func_t walk_func,
void *walk_baton,
svn_swig_py_config_auth_walk_func,
svn_swig_pl_config_auth_walk_func,
svn_swig_rb_config_auth_walk_func)
#endif
/* -----------------------------------------------------------------------
* For all the various functions that set a callback baton create a reference
* for the baton (which in this case is an SV pointing to the callback)
* and make that a return from the function. The perl side should
* then store the return in the object the baton is attached to.
* If the function already returns a value then this value is follows that
* function. In the case of the prompt functions auth_open_helper in Core.pm
* is used to split up these values.
*/
#ifdef SWIGPERL
%typemap(argout) void *CALLBACK_BATON (SV * _global_callback) {
/* callback baton */
%append_output(sv_2mortal(newRV_inc(_global_callback)));
}
%typemap(in) void *CALLBACK_BATON (SV * _global_callback) {
_global_callback = $input;
$1 = (void *) _global_callback;
}
%apply void *CALLBACK_BATON {
void *prompt_baton
};
#endif
/* -----------------------------------------------------------------------
These APIs take an "inout" parameter that necessitates more careful
definition.
*/
%ignore svn_mergeinfo_merge;
%ignore svn_mergeinfo_sort;
%ignore svn_rangelist_merge;
%ignore svn_rangelist_reverse;
#ifdef SWIGRUBY
%ignore svn_auth_open;
%ignore svn_diff_file_options_create;
%ignore svn_create_commit_info;
%ignore svn_commit_info_dup;
%ignore svn_opt_args_to_target_array2;
%ignore svn_opt_args_to_target_array3;
%ignore svn_opt_parse_num_args;
%ignore svn_opt_parse_all_args;
#endif
#ifdef SWIGPYTHON
# The auth baton depends on the providers, so we preserve a
src/subversion/subversion/bindings/swig/core.i view on Meta::CPAN
};
~svn_commit_info_t() {
};
svn_commit_info_t *dup(apr_pool_t *pool) {
return svn_commit_info_dup(self, pool);
};
}
%extend svn_merge_range_t
{
svn_merge_range_t(svn_revnum_t start, svn_revnum_t end,
svn_boolean_t inheritable, apr_pool_t *pool) {
svn_merge_range_t *self;
self = apr_palloc(pool, sizeof(svn_merge_range_t));
self->start = start;
self->end = end;
self->inheritable = inheritable;
return self;
};
~svn_merge_range_t() {
};
svn_merge_range_t *dup(apr_pool_t *pool) {
return svn_merge_range_dup(self, pool);
};
}
%include svn_diff_h.swg
%inline %{
static VALUE
svn_default_charset(void)
{
return PTR2NUM(APR_DEFAULT_CHARSET);
}
static VALUE
svn_locale_charset(void)
{
return PTR2NUM(APR_LOCALE_CHARSET);
}
/* prompt providers return baton for protecting GC */
static VALUE
svn_swig_rb_auth_get_simple_prompt_provider(
svn_auth_provider_object_t **provider,
svn_auth_simple_prompt_func_t prompt_func,
void *prompt_baton,
int retry_limit,
apr_pool_t *pool)
{
svn_auth_get_simple_prompt_provider(provider, prompt_func, prompt_baton,
retry_limit, pool);
return rb_ary_new3(1, (VALUE)prompt_baton);
}
static VALUE
svn_swig_rb_auth_get_ssl_client_cert_prompt_provider(
svn_auth_provider_object_t **provider,
svn_auth_ssl_client_cert_prompt_func_t prompt_func,
void *prompt_baton,
int retry_limit,
apr_pool_t *pool)
{
svn_auth_get_ssl_client_cert_prompt_provider(provider, prompt_func,
prompt_baton, retry_limit,
pool);
return rb_ary_new3(1, (VALUE)prompt_baton);
}
static VALUE
svn_swig_rb_auth_get_ssl_client_cert_pw_prompt_provider(
svn_auth_provider_object_t **provider,
svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func,
void *prompt_baton,
int retry_limit,
apr_pool_t *pool)
{
svn_auth_get_ssl_client_cert_pw_prompt_provider(provider, prompt_func,
prompt_baton, retry_limit,
pool);
return rb_ary_new3(1, (VALUE)prompt_baton);
}
static VALUE
svn_swig_rb_auth_get_ssl_server_trust_prompt_provider(
svn_auth_provider_object_t **provider,
svn_auth_ssl_server_trust_prompt_func_t prompt_func,
void *prompt_baton,
apr_pool_t *pool)
{
svn_auth_get_ssl_server_trust_prompt_provider(provider, prompt_func,
prompt_baton, pool);
return rb_ary_new3(1, (VALUE)prompt_baton);
}
static VALUE
svn_swig_rb_auth_get_username_prompt_provider(
svn_auth_provider_object_t **provider,
svn_auth_username_prompt_func_t prompt_func,
void *prompt_baton,
int retry_limit,
apr_pool_t *pool)
{
svn_auth_get_username_prompt_provider(provider, prompt_func, prompt_baton,
retry_limit, pool);
return rb_ary_new3(1, (VALUE)prompt_baton);
}
%}
#endif
#if defined(SWIGPYTHON) || defined(SWIGRUBY)
%inline %{
static svn_error_t *
svn_swig_mergeinfo_merge(apr_hash_t **mergeinfo_inout,
apr_hash_t *changes,
apr_pool_t *pool)
{
return svn_mergeinfo_merge(*mergeinfo_inout, changes, pool);
}
static svn_error_t *
svn_swig_mergeinfo_sort(apr_hash_t **mergeinfo_inout, apr_pool_t *pool)
{
return svn_mergeinfo_sort(*mergeinfo_inout, pool);
}
static svn_error_t *
svn_swig_rangelist_merge(svn_rangelist_t **rangelist_inout,
svn_rangelist_t *changes,
apr_pool_t *pool)
{
return svn_rangelist_merge(rangelist_inout, changes, pool);
}
static svn_error_t *
svn_swig_rangelist_reverse(svn_rangelist_t **rangelist_inout,
apr_pool_t *pool)
{
return svn_rangelist_reverse(*rangelist_inout, pool);
}
%}
#endif
( run in 0.501 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )