ext/cproton/cproton.c in qpid_proton-0.14.0 vs ext/cproton/cproton.c in qpid_proton-0.17.0

- old
+ new

@@ -1,17 +1,21 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.7 + * Version 3.0.12 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ + +#ifndef SWIGRUBY #define SWIGRUBY +#endif + /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ @@ -75,13 +79,15 @@ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) @@ -197,13 +203,15 @@ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) @@ -749,20 +757,20 @@ const unsigned char *eu = u + sz; for (; u != eu; ++u) { char d = *(c++); unsigned char uu; if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); + uu = (unsigned char)((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); + uu = (unsigned char)((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); + uu |= (unsigned char)(d - '0'); else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); + uu |= (unsigned char)(d - ('a'-10)); else return (char *) 0; *u = uu; } return c; @@ -1340,11 +1348,11 @@ /* for raw pointers */ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) -#define swig_owntype ruby_owntype +#define swig_owntype swig_ruby_owntype /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) @@ -1564,43 +1572,49 @@ VALUE stype = rb_iv_get(obj, "@__swigtype__"); return StringValuePtr(stype); } /* Acquire a pointer value */ -typedef void (*ruby_owntype)(void*); +typedef struct { + void (*datafree)(void *); + int own; +} swig_ruby_owntype; -SWIGRUNTIME ruby_owntype -SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) { +SWIGRUNTIME swig_ruby_owntype +SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) { + swig_ruby_owntype oldown = {0, 0}; if (obj) { - ruby_owntype oldown = RDATA(obj)->dfree; - RDATA(obj)->dfree = own; - return oldown; - } else { - return 0; + oldown.datafree = RDATA(obj)->dfree; + RDATA(obj)->dfree = own.datafree; } + return oldown; } /* Convert a pointer value */ SWIGRUNTIME int -SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own) +SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own) { char *c; swig_cast_info *tc; void *vptr = 0; /* Grab the pointer */ if (NIL_P(obj)) { - *ptr = 0; + if (ptr) + *ptr = 0; return SWIG_OK; } else { if (TYPE(obj) != T_DATA) { return SWIG_ERROR; } Data_Get_Struct(obj, void, vptr); } - if (own) *own = RDATA(obj)->dfree; + if (own) { + own->datafree = RDATA(obj)->dfree; + own->own = 0; + } /* Check to see if the input object is giving up ownership of the underlying C struct or C++ object. If so then we need to reset the destructor since the Ruby object no longer owns the underlying C++ object.*/ @@ -1631,27 +1645,36 @@ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { if (vptr == 0) { /* The object has already been deleted */ return SWIG_ObjectPreviouslyDeletedError; } - *ptr = vptr; - return SWIG_OK; } } if ((c = SWIG_MangleStr(obj)) == NULL) { return SWIG_ERROR; } tc = SWIG_TypeCheck(c, ty); if (!tc) { return SWIG_ERROR; } else { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc, vptr, &newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ + if (ptr) { + if (tc->type == ty) { + *ptr = vptr; + } else { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc, vptr, &newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + own->own = own->own | SWIG_CAST_NEW_MEMORY; + } + } + } } } else { - *ptr = vptr; + if (ptr) + *ptr = vptr; } return SWIG_OK; } @@ -1803,29 +1826,29 @@ #define SWIGTYPE_p_pn_delivery_t swig_types[23] #define SWIGTYPE_p_pn_disposition_t swig_types[24] #define SWIGTYPE_p_pn_distribution_mode_t swig_types[25] #define SWIGTYPE_p_pn_durability_t swig_types[26] #define SWIGTYPE_p_pn_error_t swig_types[27] -#define SWIGTYPE_p_pn_event_t swig_types[28] -#define SWIGTYPE_p_pn_event_type_t swig_types[29] -#define SWIGTYPE_p_pn_expiry_policy_t swig_types[30] -#define SWIGTYPE_p_pn_handler_t swig_types[31] -#define SWIGTYPE_p_pn_hash_t swig_types[32] -#define SWIGTYPE_p_pn_io_t swig_types[33] +#define SWIGTYPE_p_pn_event_batch_t swig_types[28] +#define SWIGTYPE_p_pn_event_t swig_types[29] +#define SWIGTYPE_p_pn_event_type_t swig_types[30] +#define SWIGTYPE_p_pn_expiry_policy_t swig_types[31] +#define SWIGTYPE_p_pn_handler_t swig_types[32] +#define SWIGTYPE_p_pn_hash_t swig_types[33] #define SWIGTYPE_p_pn_iterator_t swig_types[34] #define SWIGTYPE_p_pn_link_t swig_types[35] #define SWIGTYPE_p_pn_list_t swig_types[36] #define SWIGTYPE_p_pn_map_t swig_types[37] #define SWIGTYPE_p_pn_message_t swig_types[38] #define SWIGTYPE_p_pn_messenger_t swig_types[39] #define SWIGTYPE_p_pn_rcv_settle_mode_t swig_types[40] #define SWIGTYPE_p_pn_reactor_t swig_types[41] #define SWIGTYPE_p_pn_record_t swig_types[42] -#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[43] -#define SWIGTYPE_p_pn_sasl_t swig_types[44] -#define SWIGTYPE_p_pn_selectable_t swig_types[45] -#define SWIGTYPE_p_pn_selector_t swig_types[46] +#define SWIGTYPE_p_pn_rwbytes_t swig_types[43] +#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[44] +#define SWIGTYPE_p_pn_sasl_t swig_types[45] +#define SWIGTYPE_p_pn_selectable_t swig_types[46] #define SWIGTYPE_p_pn_session_t swig_types[47] #define SWIGTYPE_p_pn_snd_settle_mode_t swig_types[48] #define SWIGTYPE_p_pn_ssl_cert_subject_subfield swig_types[49] #define SWIGTYPE_p_pn_ssl_domain_t swig_types[50] #define SWIGTYPE_p_pn_ssl_hash_alg swig_types[51] @@ -1866,11 +1889,11 @@ #define SWIG_RUBY_THREAD_BEGIN_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK -#define SWIGVERSION 0x030007 +#define SWIGVERSION 0x030012 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) (void *)((const void *)(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) @@ -1898,11 +1921,11 @@ { return Qnil; } -/*@SWIG:/usr/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); unsigned long *res = (unsigned long *)(args[1]); @@ -1927,16 +1950,73 @@ } return SWIG_TypeError; } +#include <limits.h> +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/usr/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args) +{ + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + unsigned long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} +#endif + + SWIGINTERNINLINE int SWIG_AsVal_size_t (VALUE obj, size_t *val) { - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + } +#endif return res; } SWIGINTERN swig_type_info* @@ -1959,11 +2039,11 @@ char *cstr = StringValuePtr(obj); size_t size = RSTRING_LEN(obj) + 1; if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { - *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); + *cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } @@ -2004,20 +2084,10 @@ return Qnil; } } -#include <limits.h> -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - #define SWIG_From_long LONG2NUM SWIGINTERNINLINE VALUE SWIG_From_int (int value) @@ -2225,11 +2295,11 @@ return result; } -/*@SWIG:/usr/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long *res = (long *)(args[1]); @@ -2429,21 +2499,32 @@ { return SWIG_From_unsigned_SS_long (value); } +#ifdef SWIG_LONG_LONG_AVAILABLE SWIGINTERNINLINE VALUE -SWIG_From_long_SS_long (long long value) +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) { - return LL2NUM(value); + return ULL2NUM(value); } +#endif SWIGINTERNINLINE VALUE SWIG_From_size_t (size_t value) { - return SWIG_From_unsigned_SS_long ((unsigned long)(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long ((unsigned long)(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value)); + } +#endif } #include <float.h> @@ -2451,12 +2532,29 @@ #include <math.h> /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */ #ifndef SWIG_isfinite +/* isfinite() is a macro for C99 */ # if defined(isfinite) # define SWIG_isfinite(X) (isfinite(X)) +# elif defined __cplusplus && __cplusplus >= 201103L +/* Use a template so that this works whether isfinite() is std::isfinite() or + * in the global namespace. The reality seems to vary between compiler + * versions. + * + * Make sure namespace std exists to avoid compiler warnings. + * + * extern "C++" is required as this fragment can end up inside an extern "C" { } block + */ +namespace std { } +extern "C++" template<typename T> +inline int SWIG_isfinite_func(T x) { + using namespace std; + return isfinite(x); +} +# define SWIG_isfinite(X) (SWIG_isfinite_func(X)) # elif defined(_MSC_VER) # define SWIG_isfinite(X) (_finite(X)) # elif defined(__sun) && defined(__SVR4) # include <ieeefp.h> # define SWIG_isfinite(X) (finite(X)) @@ -2470,11 +2568,11 @@ #else # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX)) #endif -/*@SWIG:/usr/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); double *res = (double *)(args[1]); @@ -2535,46 +2633,10 @@ } return SWIG_TypeError; } -SWIGINTERNINLINE VALUE -SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) -{ - return ULL2NUM(value); -} - - -/*@SWIG:/usr/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ -SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args) -{ - VALUE obj = args[0]; - VALUE type = TYPE(obj); - long long *res = (long long *)(args[1]); - *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj); - return obj; -} -/*@SWIG@*/ - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val) -{ - VALUE type = TYPE(obj); - if ((type == T_FIXNUM) || (type == T_BIGNUM)) { - unsigned long long v; - VALUE a[2]; - a[0] = obj; - a[1] = (VALUE)(&v); - if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { - if (val) *val = v; - return SWIG_OK; - } - } - return SWIG_TypeError; -} - - SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_short (unsigned short value) { return SWIG_From_unsigned_SS_long (value); } @@ -2594,11 +2656,12 @@ } return res; } -/*@SWIG:/usr/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/usr/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long long *res = (long long *)(args[1]); @@ -2621,12 +2684,22 @@ return SWIG_OK; } } return SWIG_TypeError; } +#endif +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE VALUE +SWIG_From_long_SS_long (long long value) +{ + return LL2NUM(value); +} +#endif + + /* assume the binding does the incref in the wrapper */ pn_event_t* pn_event_copy(pn_event_t *evt) { return evt; } SWIGINTERNINLINE VALUE @@ -2741,11 +2814,11 @@ arg1 = (pn_message_t *)(argp1); res2 = SWIG_AsVal_size_t (argv[1], &n2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","pn_message_encode", 2, argv[1] )); } - buff2= (char *)malloc((n2+1)*sizeof(char)); + buff2= (char *)calloc(n2+1, sizeof(char)); arg2 = (char *)(buff2); size2 = (size_t)(n2); arg3 = &size2; result = (int)pn_message_encode(arg1,arg2,arg3); vresult = SWIG_From_int((int)(result)); @@ -2820,11 +2893,11 @@ arg1 = (pn_link_t *)(argp1); res2 = SWIG_AsVal_size_t (argv[1], &n2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_link_recv", 2, argv[1] )); } - buff2= (char *)malloc((n2+1)*sizeof(char)); + buff2= (char *)calloc(n2+1, sizeof(char)); arg2 = (char *)(buff2); size2 = (size_t)(n2); arg3 = &size2; result = (int)wrap_pn_link_recv(arg1,arg2,arg3); vresult = SWIG_From_int((int)(result)); @@ -2899,11 +2972,11 @@ arg1 = (pn_transport_t *)(argp1); res2 = SWIG_AsVal_size_t (argv[1], &n2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_transport_output", 2, argv[1] )); } - buff2= (char *)malloc((n2+1)*sizeof(char)); + buff2= (char *)calloc(n2+1, sizeof(char)); arg2 = (char *)(buff2); size2 = (size_t)(n2); arg3 = &size2; result = (int)wrap_pn_transport_output(arg1,arg2,arg3); vresult = SWIG_From_int((int)(result)); @@ -2940,11 +3013,11 @@ arg1 = (pn_transport_t *)(argp1); res2 = SWIG_AsVal_size_t (argv[1], &n2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_transport_peek", 2, argv[1] )); } - buff2= (char *)malloc((n2+1)*sizeof(char)); + buff2= (char *)calloc(n2+1, sizeof(char)); arg2 = (char *)(buff2); size2 = (size_t)(n2); arg3 = &size2; result = (int)wrap_pn_transport_peek(arg1,arg2,arg3); vresult = SWIG_From_int((int)(result)); @@ -3049,11 +3122,11 @@ arg1 = (pn_ssl_t *)(argp1); res2 = SWIG_AsVal_size_t (argv[1], &size2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t MAX_OUTPUT_SIZE)","pn_ssl_get_cipher_name", 2, argv[1] )); } - buff2= (char *)malloc((size2+1)*sizeof(char)); + buff2= (char *)calloc(size2+1, sizeof(char)); arg3 = (size_t)(size2); arg2 = (char *)(buff2); result = (bool)pn_ssl_get_cipher_name(arg1,arg2,arg3); vresult = SWIG_From_bool((bool)(result)); vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(arg2)); @@ -3088,11 +3161,11 @@ arg1 = (pn_ssl_t *)(argp1); res2 = SWIG_AsVal_size_t (argv[1], &size2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t MAX_OUTPUT_SIZE)","pn_ssl_get_protocol_name", 2, argv[1] )); } - buff2= (char *)malloc((size2+1)*sizeof(char)); + buff2= (char *)calloc(size2+1, sizeof(char)); arg3 = (size_t)(size2); arg2 = (char *)(buff2); result = (bool)pn_ssl_get_protocol_name(arg1,arg2,arg3); vresult = SWIG_From_bool((bool)(result)); vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(arg2)); @@ -3503,11 +3576,11 @@ arg1 = (pn_ssl_t *)(argp1); res2 = SWIG_AsVal_size_t (argv[1], &n2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","pn_ssl_get_peer_hostname", 2, argv[1] )); } - buff2= (char *)malloc((n2+1)*sizeof(char)); + buff2= (char *)calloc(n2+1, sizeof(char)); arg2 = (char *)(buff2); size2 = (size_t)(n2); arg3 = &size2; result = (int)pn_ssl_get_peer_hostname(arg1,arg2,arg3); vresult = SWIG_From_int((int)(result)); @@ -3633,27 +3706,25 @@ fail: return Qnil; } -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE -_wrap_Pni_rbhandler_t_allocate(VALUE self) { +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_Pni_rbhandler_t_allocate(VALUE self) #else - SWIGINTERN VALUE - _wrap_Pni_rbhandler_t_allocate(int argc, VALUE *argv, VALUE self) { +_wrap_Pni_rbhandler_t_allocate(int argc, VALUE *argv, VALUE self) #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Pni_rbhandler_t); +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Pni_rbhandler_t); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; +} + SWIGINTERN VALUE _wrap_new_Pni_rbhandler_t(int argc, VALUE *argv, VALUE self) { Pni_rbhandler_t *result = 0 ; if ((argc < 0) || (argc > 0)) { @@ -3666,11 +3737,12 @@ return Qnil; } SWIGINTERN void -free_Pni_rbhandler_t(Pni_rbhandler_t *arg1) { +free_Pni_rbhandler_t(void *self) { + Pni_rbhandler_t *arg1 = (Pni_rbhandler_t *)self; free((char *) arg1); } SWIGINTERN VALUE _wrap_pni_rbhandler(int argc, VALUE *argv, VALUE self) { @@ -3771,63 +3843,100 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_timestamp_now(int argc, VALUE *argv, VALUE self) { - pn_timestamp_t result; +_wrap_pn_bytes(int argc, VALUE *argv, VALUE self) { + size_t arg1 ; + char *arg2 = (char *) 0 ; + size_t val1 ; + int ecode1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + pn_bytes_t result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - result = (pn_timestamp_t)pn_timestamp_now(); - vresult = SWIG_From_long_SS_long((long long)(result)); + ecode1 = SWIG_AsVal_size_t(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","pn_bytes", 1, argv[0] )); + } + arg1 = (size_t)(val1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_bytes", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = pn_bytes(arg1,(char const *)arg2); + { + vresult = rb_str_new((&result)->start, (&result)->size); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return vresult; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return Qnil; } SWIGINTERN VALUE -_wrap_pn_bytes(int argc, VALUE *argv, VALUE self) { +_wrap_pn_bytes_null_get(VALUE self) { + VALUE _val; + + _val = SWIG_NewPointerObj(SWIG_as_voidptr(&pn_bytes_null), SWIGTYPE_p_pn_bytes_t, 0 ); + return _val; +} + + +SWIGINTERN VALUE +_wrap_pn_rwbytes(int argc, VALUE *argv, VALUE self) { size_t arg1 ; char *arg2 = (char *) 0 ; size_t val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - pn_bytes_t result; + pn_rwbytes_t result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_size_t(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","pn_bytes", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","pn_rwbytes", 1, argv[0] )); } arg1 = (size_t)(val1); res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_bytes", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","pn_rwbytes", 2, argv[1] )); } arg2 = (char *)(buf2); - result = pn_bytes(arg1,(char const *)arg2); - { - vresult = rb_str_new((&result)->start, (&result)->size); - } + result = pn_rwbytes(arg1,arg2); + vresult = SWIG_NewPointerObj((pn_rwbytes_t *)memcpy((pn_rwbytes_t *)calloc(1,sizeof(pn_rwbytes_t)),&result,sizeof(pn_rwbytes_t)), SWIGTYPE_p_pn_rwbytes_t, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return vresult; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return Qnil; } SWIGINTERN VALUE +_wrap_pn_rwbytes_null_get(VALUE self) { + VALUE _val; + + _val = SWIG_NewPointerObj(SWIG_as_voidptr(&pn_rwbytes_null), SWIGTYPE_p_pn_bytes_t, 0 ); + return _val; +} + + +SWIGINTERN VALUE _wrap_PN_OBJECT_get(VALUE self) { VALUE _val; _val = SWIG_NewPointerObj(SWIG_as_voidptr(PN_OBJECT), SWIGTYPE_p_pn_class_t, 0 ); return _val; @@ -3867,11 +3976,11 @@ if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_id", 1, argv[0] )); } arg1 = (pn_class_t *)(argp1); result = pn_class_id((struct pn_class_t const *)arg1); - vresult = SWIG_NewPointerObj((pn_cid_t *)memcpy((pn_cid_t *)malloc(sizeof(pn_cid_t)),&result,sizeof(pn_cid_t)), SWIGTYPE_p_pn_cid_t, SWIG_POINTER_OWN | 0 ); + vresult = SWIG_NewPointerObj((pn_cid_t *)memcpy((pn_cid_t *)calloc(1,sizeof(pn_cid_t)),&result,sizeof(pn_cid_t)), SWIGTYPE_p_pn_cid_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } @@ -4136,11 +4245,11 @@ res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","pn_class_compare", 3, argv[2] )); } result = pn_class_compare((struct pn_class_t const *)arg1,arg2,arg3); - vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)malloc(sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 ); + vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)calloc(1,sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } @@ -4218,10 +4327,102 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_void_new(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_void_new", 1, argv[0] )); + } + arg1 = (pn_class_t *)(argp1); + ecode2 = SWIG_AsVal_size_t(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_void_new", 2, argv[1] )); + } + arg2 = (size_t)(val2); + result = (void *)pn_void_new((struct pn_class_t const *)arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_void_incref(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_void_incref", 1, argv[0] )); + } + pn_void_incref(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_void_decref(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_void_decref", 1, argv[0] )); + } + pn_void_decref(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_void_refcount(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_void_refcount", 1, argv[0] )); + } + result = (int)pn_void_refcount(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_void_hashcode(int argc, VALUE *argv, VALUE self) { void *arg1 = (void *) 0 ; int res1 ; uintptr_t result; VALUE vresult = Qnil; @@ -4260,11 +4461,11 @@ res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_void_compare", 2, argv[1] )); } result = pn_void_compare(arg1,arg2); - vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)malloc(sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 ); + vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)calloc(1,sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } @@ -4580,11 +4781,11 @@ res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_compare", 2, argv[1] )); } result = pn_compare(arg1,arg2); - vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)malloc(sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 ); + vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)calloc(1,sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } @@ -6832,10 +7033,79 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_condition_copy(int argc, VALUE *argv, VALUE self) { + pn_condition_t *arg1 = (pn_condition_t *) 0 ; + pn_condition_t *arg2 = (pn_condition_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_condition_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_condition_t *","pn_condition_copy", 1, argv[0] )); + } + arg1 = (pn_condition_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_condition_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_condition_t *","pn_condition_copy", 2, argv[1] )); + } + arg2 = (pn_condition_t *)(argp2); + result = (int)pn_condition_copy(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_condition(int argc, VALUE *argv, VALUE self) { + pn_condition_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (pn_condition_t *)pn_condition(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_condition_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_condition_free(int argc, VALUE *argv, VALUE self) { + pn_condition_t *arg1 = (pn_condition_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_condition_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_condition_t *","pn_condition_free", 1, argv[0] )); + } + arg1 = (pn_condition_t *)(argp1); + pn_condition_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_connection(int argc, VALUE *argv, VALUE self) { pn_connection_t *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -6949,10 +7219,34 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_connection_collector(int argc, VALUE *argv, VALUE self) { + pn_connection_t *arg1 = (pn_connection_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_collector_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_connection_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_connection_t *","pn_connection_collector", 1, argv[0] )); + } + arg1 = (pn_connection_t *)(argp1); + result = (pn_collector_t *)pn_connection_collector(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_collector_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_connection_get_context(int argc, VALUE *argv, VALUE self) { pn_connection_t *arg1 = (pn_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *result = 0 ; @@ -9308,10 +9602,87 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_link_max_message_size(int argc, VALUE *argv, VALUE self) { + pn_link_t *arg1 = (pn_link_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_link_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_link_t *","pn_link_max_message_size", 1, argv[0] )); + } + arg1 = (pn_link_t *)(argp1); + result = (uint64_t)pn_link_max_message_size(arg1); + vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_link_set_max_message_size(int argc, VALUE *argv, VALUE self) { + pn_link_t *arg1 = (pn_link_t *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long long val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_link_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_link_t *","pn_link_set_max_message_size", 1, argv[0] )); + } + arg1 = (pn_link_t *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","pn_link_set_max_message_size", 2, argv[1] )); + } + arg2 = (uint64_t)(val2); + pn_link_set_max_message_size(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_link_remote_max_message_size(int argc, VALUE *argv, VALUE self) { + pn_link_t *arg1 = (pn_link_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_link_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_link_t *","pn_link_remote_max_message_size", 1, argv[0] )); + } + arg1 = (pn_link_t *)(argp1); + result = (uint64_t)pn_link_remote_max_message_size(arg1); + vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_terminus_get_type(int argc, VALUE *argv, VALUE self) { pn_terminus_t *arg1 = (pn_terminus_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; pn_terminus_type_t result; @@ -12058,10 +12429,58 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_collector_next(int argc, VALUE *argv, VALUE self) { + pn_collector_t *arg1 = (pn_collector_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_event_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_collector_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_collector_t *","pn_collector_next", 1, argv[0] )); + } + arg1 = (pn_collector_t *)(argp1); + result = (pn_event_t *)pn_collector_next(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_event_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_collector_prev(int argc, VALUE *argv, VALUE self) { + pn_collector_t *arg1 = (pn_collector_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_event_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_collector_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_collector_t *","pn_collector_prev", 1, argv[0] )); + } + arg1 = (pn_collector_t *)(argp1); + result = (pn_event_t *)pn_collector_prev(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_event_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_collector_more(int argc, VALUE *argv, VALUE self) { pn_collector_t *arg1 = (pn_collector_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; @@ -12154,34 +12573,10 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_event_root(int argc, VALUE *argv, VALUE self) { - pn_event_t *arg1 = (pn_event_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_handler_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_event_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_event_t *","pn_event_root", 1, argv[0] )); - } - arg1 = (pn_event_t *)(argp1); - result = (pn_handler_t *)pn_event_root(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_handler_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE _wrap_pn_event_connection(int argc, VALUE *argv, VALUE self) { pn_event_t *arg1 = (pn_event_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; pn_connection_t *result = 0 ; @@ -12322,10 +12717,34 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_event_batch_next(int argc, VALUE *argv, VALUE self) { + pn_event_batch_t *arg1 = (pn_event_batch_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_event_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_event_batch_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_event_batch_t *","pn_event_batch_next", 1, argv[0] )); + } + arg1 = (pn_event_batch_t *)(argp1); + result = (pn_event_t *)pn_event_batch_next(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_event_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_event_copy(int argc, VALUE *argv, VALUE self) { pn_event_t *arg1 = (pn_event_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; pn_event_t *result = 0 ; @@ -16116,507 +16535,10 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_io(int argc, VALUE *argv, VALUE self) { - pn_io_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - result = (pn_io_t *)pn_io(); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_io_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_io_free(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_io_free", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - pn_io_free(arg1); - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_io_error(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_error_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_io_error", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - result = (pn_error_t *)pn_io_error(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_error_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_connect(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - pn_socket_t result; - VALUE vresult = Qnil; - - if ((argc < 3) || (argc > 3)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_connect", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_connect", 2, argv[1] )); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","pn_connect", 3, argv[2] )); - } - arg3 = (char *)(buf3); - result = (pn_socket_t)pn_connect(arg1,(char const *)arg2,(char const *)arg3); - vresult = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return vresult; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_listen(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - pn_socket_t result; - VALUE vresult = Qnil; - - if ((argc < 3) || (argc > 3)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_listen", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_listen", 2, argv[1] )); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","pn_listen", 3, argv[2] )); - } - arg3 = (char *)(buf3); - result = (pn_socket_t)pn_listen(arg1,(char const *)arg2,(char const *)arg3); - vresult = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return vresult; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_accept(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - pn_socket_t arg2 ; - char *arg3 = (char *) 0 ; - size_t arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - size_t val4 ; - int ecode4 = 0 ; - pn_socket_t result; - VALUE vresult = Qnil; - - if ((argc < 4) || (argc > 4)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_accept", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_accept", 2, argv[1] )); - } - arg2 = (pn_socket_t)(val2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","pn_accept", 3, argv[2] )); - } - arg3 = (char *)(buf3); - ecode4 = SWIG_AsVal_size_t(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","pn_accept", 4, argv[3] )); - } - arg4 = (size_t)(val4); - result = (pn_socket_t)pn_accept(arg1,arg2,arg3,arg4); - vresult = SWIG_From_int((int)(result)); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return vresult; -fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_close(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - pn_socket_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_close", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_close", 2, argv[1] )); - } - arg2 = (pn_socket_t)(val2); - pn_close(arg1,arg2); - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_send(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - pn_socket_t arg2 ; - void *arg3 = (void *) 0 ; - size_t arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - size_t val4 ; - int ecode4 = 0 ; - ssize_t result; - VALUE vresult = Qnil; - - if ((argc < 4) || (argc > 4)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_send", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_send", 2, argv[1] )); - } - arg2 = (pn_socket_t)(val2); - res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void const *","pn_send", 3, argv[2] )); - } - ecode4 = SWIG_AsVal_size_t(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","pn_send", 4, argv[3] )); - } - arg4 = (size_t)(val4); - result = (ssize_t)pn_send(arg1,arg2,(void const *)arg3,arg4); - vresult = SWIG_From_int((int)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_recv(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - pn_socket_t arg2 ; - void *arg3 = (void *) 0 ; - size_t arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - size_t val4 ; - int ecode4 = 0 ; - ssize_t result; - VALUE vresult = Qnil; - - if ((argc < 4) || (argc > 4)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_recv", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_recv", 2, argv[1] )); - } - arg2 = (pn_socket_t)(val2); - res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","pn_recv", 3, argv[2] )); - } - ecode4 = SWIG_AsVal_size_t(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","pn_recv", 4, argv[3] )); - } - arg4 = (size_t)(val4); - result = (ssize_t)pn_recv(arg1,arg2,arg3,arg4); - vresult = SWIG_From_int((int)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_pipe(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - pn_socket_t *arg2 = (pn_socket_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_pipe", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_int, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_socket_t *","pn_pipe", 2, argv[1] )); - } - arg2 = (pn_socket_t *)(argp2); - result = (int)pn_pipe(arg1,arg2); - vresult = SWIG_From_int((int)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_read(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - pn_socket_t arg2 ; - void *arg3 = (void *) 0 ; - size_t arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - size_t val4 ; - int ecode4 = 0 ; - ssize_t result; - VALUE vresult = Qnil; - - if ((argc < 4) || (argc > 4)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_read", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_read", 2, argv[1] )); - } - arg2 = (pn_socket_t)(val2); - res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","pn_read", 3, argv[2] )); - } - ecode4 = SWIG_AsVal_size_t(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","pn_read", 4, argv[3] )); - } - arg4 = (size_t)(val4); - result = (ssize_t)pn_read(arg1,arg2,arg3,arg4); - vresult = SWIG_From_int((int)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_write(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - pn_socket_t arg2 ; - void *arg3 = (void *) 0 ; - size_t arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - size_t val4 ; - int ecode4 = 0 ; - ssize_t result; - VALUE vresult = Qnil; - - if ((argc < 4) || (argc > 4)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_write", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_write", 2, argv[1] )); - } - arg2 = (pn_socket_t)(val2); - res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void const *","pn_write", 3, argv[2] )); - } - ecode4 = SWIG_AsVal_size_t(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","pn_write", 4, argv[3] )); - } - arg4 = (size_t)(val4); - result = (ssize_t)pn_write(arg1,arg2,(void const *)arg3,arg4); - vresult = SWIG_From_int((int)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_wouldblock(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_wouldblock", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - result = (bool)pn_wouldblock(arg1); - vresult = SWIG_From_bool((bool)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_io_selector(int argc, VALUE *argv, VALUE self) { - pn_io_t *arg1 = (pn_io_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_selector_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_io_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_io_t *","pn_io_selector", 1, argv[0] )); - } - arg1 = (pn_io_t *)(argp1); - result = (pn_selector_t *)pn_io_selector(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_selector_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE _wrap_pn_selectables(int argc, VALUE *argv, VALUE self) { pn_selectables_t *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -21248,34 +21170,10 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_reactor_io(int argc, VALUE *argv, VALUE self) { - pn_reactor_t *arg1 = (pn_reactor_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_io_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_reactor_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_reactor_t *","pn_reactor_io", 1, argv[0] )); - } - arg1 = (pn_reactor_t *)(argp1); - result = (pn_io_t *)pn_reactor_io(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_io_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE _wrap_pn_reactor_children(int argc, VALUE *argv, VALUE self) { pn_reactor_t *arg1 = (pn_reactor_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; pn_list_t *result = 0 ; @@ -21403,10 +21301,34 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_reactor_error(int argc, VALUE *argv, VALUE self) { + pn_reactor_t *arg1 = (pn_reactor_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_error_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_reactor_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_reactor_t *","pn_reactor_error", 1, argv[0] )); + } + arg1 = (pn_reactor_t *)(argp1); + result = (pn_error_t *)pn_reactor_error(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_error_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_reactor_connection_to_host(int argc, VALUE *argv, VALUE self) { pn_reactor_t *arg1 = (pn_reactor_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; pn_handler_t *arg4 = (pn_handler_t *) 0 ; @@ -22128,10 +22050,34 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_event_root(int argc, VALUE *argv, VALUE self) { + pn_event_t *arg1 = (pn_event_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_handler_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_event_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_event_t *","pn_event_root", 1, argv[0] )); + } + arg1 = (pn_event_t *)(argp1); + result = (pn_handler_t *)pn_event_root(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_handler_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_handshaker(int argc, VALUE *argv, VALUE self) { pn_handshaker_t *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -22201,11 +22147,11 @@ static swig_type_info _swigt__p_long = {"_p_long", "int32_t *|long *|pn_sequence_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *|pn_tracker_t *|pn_timestamp_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_acceptor_t = {"_p_pn_acceptor_t", "struct pn_acceptor_t *|pn_acceptor_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_atom_t = {"_p_pn_atom_t", "pn_atom_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_pn_bytes_t = {"_p_pn_bytes_t", "pn_bytes_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_pn_bytes_t = {"_p_pn_bytes_t", "struct pn_bytes_t *|pn_bytes_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_cid_t = {"_p_pn_cid_t", "pn_cid_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_class_t = {"_p_pn_class_t", "struct pn_class_t *|pn_class_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_collector_t = {"_p_pn_collector_t", "struct pn_collector_t *|pn_collector_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_condition_t = {"_p_pn_condition_t", "struct pn_condition_t *|pn_condition_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_connection_t = {"_p_pn_connection_t", "struct pn_connection_t *|pn_connection_t *", 0, 0, (void*)0, 0}; @@ -22214,29 +22160,29 @@ static swig_type_info _swigt__p_pn_delivery_t = {"_p_pn_delivery_t", "struct pn_delivery_t *|pn_delivery_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_disposition_t = {"_p_pn_disposition_t", "struct pn_disposition_t *|pn_disposition_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_distribution_mode_t = {"_p_pn_distribution_mode_t", "enum pn_distribution_mode_t *|pn_distribution_mode_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_durability_t = {"_p_pn_durability_t", "enum pn_durability_t *|pn_durability_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_error_t = {"_p_pn_error_t", "struct pn_error_t *|pn_error_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_pn_event_batch_t = {"_p_pn_event_batch_t", "struct pn_event_batch_t *|pn_event_batch_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_event_t = {"_p_pn_event_t", "struct pn_event_t *|pn_event_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_event_type_t = {"_p_pn_event_type_t", "enum pn_event_type_t *|pn_event_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_expiry_policy_t = {"_p_pn_expiry_policy_t", "enum pn_expiry_policy_t *|pn_expiry_policy_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_handler_t = {"_p_pn_handler_t", "pn_handshaker_t *|struct pn_handler_t *|pn_flowcontroller_t *|pn_handler_t *|pn_iohandler_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_hash_t = {"_p_pn_hash_t", "struct pn_hash_t *|pn_hash_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_pn_io_t = {"_p_pn_io_t", "struct pn_io_t *|pn_io_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_iterator_t = {"_p_pn_iterator_t", "pn_selectables_t *|struct pn_iterator_t *|pn_iterator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_link_t = {"_p_pn_link_t", "struct pn_link_t *|pn_link_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_list_t = {"_p_pn_list_t", "struct pn_list_t *|pn_list_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_map_t = {"_p_pn_map_t", "struct pn_map_t *|pn_map_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_message_t = {"_p_pn_message_t", "struct pn_message_t *|pn_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_messenger_t = {"_p_pn_messenger_t", "struct pn_messenger_t *|pn_messenger_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_rcv_settle_mode_t = {"_p_pn_rcv_settle_mode_t", "enum pn_rcv_settle_mode_t *|pn_rcv_settle_mode_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_reactor_t = {"_p_pn_reactor_t", "struct pn_reactor_t *|pn_reactor_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_record_t = {"_p_pn_record_t", "struct pn_record_t *|pn_record_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_pn_rwbytes_t = {"_p_pn_rwbytes_t", "struct pn_rwbytes_t *|pn_rwbytes_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_sasl_outcome_t = {"_p_pn_sasl_outcome_t", "enum pn_sasl_outcome_t *|pn_sasl_outcome_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_sasl_t = {"_p_pn_sasl_t", "struct pn_sasl_t *|pn_sasl_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_selectable_t = {"_p_pn_selectable_t", "struct pn_selectable_t *|pn_selectable_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_pn_selector_t = {"_p_pn_selector_t", "struct pn_selector_t *|pn_selector_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_session_t = {"_p_pn_session_t", "struct pn_session_t *|pn_session_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_snd_settle_mode_t = {"_p_pn_snd_settle_mode_t", "enum pn_snd_settle_mode_t *|pn_snd_settle_mode_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_ssl_cert_subject_subfield = {"_p_pn_ssl_cert_subject_subfield", "enum pn_ssl_cert_subject_subfield *|pn_ssl_cert_subject_subfield *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_ssl_domain_t = {"_p_pn_ssl_domain_t", "struct pn_ssl_domain_t *|pn_ssl_domain_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_ssl_hash_alg = {"_p_pn_ssl_hash_alg", "enum pn_ssl_hash_alg *|pn_ssl_hash_alg *", 0, 0, (void*)0, 0}; @@ -22291,29 +22237,29 @@ &_swigt__p_pn_delivery_t, &_swigt__p_pn_disposition_t, &_swigt__p_pn_distribution_mode_t, &_swigt__p_pn_durability_t, &_swigt__p_pn_error_t, + &_swigt__p_pn_event_batch_t, &_swigt__p_pn_event_t, &_swigt__p_pn_event_type_t, &_swigt__p_pn_expiry_policy_t, &_swigt__p_pn_handler_t, &_swigt__p_pn_hash_t, - &_swigt__p_pn_io_t, &_swigt__p_pn_iterator_t, &_swigt__p_pn_link_t, &_swigt__p_pn_list_t, &_swigt__p_pn_map_t, &_swigt__p_pn_message_t, &_swigt__p_pn_messenger_t, &_swigt__p_pn_rcv_settle_mode_t, &_swigt__p_pn_reactor_t, &_swigt__p_pn_record_t, + &_swigt__p_pn_rwbytes_t, &_swigt__p_pn_sasl_outcome_t, &_swigt__p_pn_sasl_t, &_swigt__p_pn_selectable_t, - &_swigt__p_pn_selector_t, &_swigt__p_pn_session_t, &_swigt__p_pn_snd_settle_mode_t, &_swigt__p_pn_ssl_cert_subject_subfield, &_swigt__p_pn_ssl_domain_t, &_swigt__p_pn_ssl_hash_alg, @@ -22368,29 +22314,29 @@ static swig_cast_info _swigc__p_pn_delivery_t[] = { {&_swigt__p_pn_delivery_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_disposition_t[] = { {&_swigt__p_pn_disposition_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_distribution_mode_t[] = { {&_swigt__p_pn_distribution_mode_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_durability_t[] = { {&_swigt__p_pn_durability_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_error_t[] = { {&_swigt__p_pn_error_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_pn_event_batch_t[] = { {&_swigt__p_pn_event_batch_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_event_t[] = { {&_swigt__p_pn_event_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_event_type_t[] = { {&_swigt__p_pn_event_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_expiry_policy_t[] = { {&_swigt__p_pn_expiry_policy_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_handler_t[] = { {&_swigt__p_pn_handler_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_hash_t[] = { {&_swigt__p_pn_hash_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_pn_io_t[] = { {&_swigt__p_pn_io_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_iterator_t[] = { {&_swigt__p_pn_iterator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_link_t[] = { {&_swigt__p_pn_link_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_list_t[] = { {&_swigt__p_pn_list_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_map_t[] = { {&_swigt__p_pn_map_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_message_t[] = { {&_swigt__p_pn_message_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_messenger_t[] = { {&_swigt__p_pn_messenger_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_rcv_settle_mode_t[] = { {&_swigt__p_pn_rcv_settle_mode_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_reactor_t[] = { {&_swigt__p_pn_reactor_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_record_t[] = { {&_swigt__p_pn_record_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_pn_rwbytes_t[] = { {&_swigt__p_pn_rwbytes_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_sasl_outcome_t[] = { {&_swigt__p_pn_sasl_outcome_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_sasl_t[] = { {&_swigt__p_pn_sasl_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_selectable_t[] = { {&_swigt__p_pn_selectable_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_pn_selector_t[] = { {&_swigt__p_pn_selector_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_session_t[] = { {&_swigt__p_pn_session_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_snd_settle_mode_t[] = { {&_swigt__p_pn_snd_settle_mode_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_ssl_cert_subject_subfield[] = { {&_swigt__p_pn_ssl_cert_subject_subfield, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_ssl_domain_t[] = { {&_swigt__p_pn_ssl_domain_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_ssl_hash_alg[] = { {&_swigt__p_pn_ssl_hash_alg, 0, 0, 0},{0, 0, 0, 0}}; @@ -22445,29 +22391,29 @@ _swigc__p_pn_delivery_t, _swigc__p_pn_disposition_t, _swigc__p_pn_distribution_mode_t, _swigc__p_pn_durability_t, _swigc__p_pn_error_t, + _swigc__p_pn_event_batch_t, _swigc__p_pn_event_t, _swigc__p_pn_event_type_t, _swigc__p_pn_expiry_policy_t, _swigc__p_pn_handler_t, _swigc__p_pn_hash_t, - _swigc__p_pn_io_t, _swigc__p_pn_iterator_t, _swigc__p_pn_link_t, _swigc__p_pn_list_t, _swigc__p_pn_map_t, _swigc__p_pn_message_t, _swigc__p_pn_messenger_t, _swigc__p_pn_rcv_settle_mode_t, _swigc__p_pn_reactor_t, _swigc__p_pn_record_t, + _swigc__p_pn_rwbytes_t, _swigc__p_pn_sasl_outcome_t, _swigc__p_pn_sasl_t, _swigc__p_pn_selectable_t, - _swigc__p_pn_selector_t, _swigc__p_pn_session_t, _swigc__p_pn_snd_settle_mode_t, _swigc__p_pn_ssl_cert_subject_subfield, _swigc__p_pn_ssl_domain_t, _swigc__p_pn_ssl_hash_alg, @@ -22792,16 +22738,18 @@ rb_define_module_function(mCproton, "pni_rbdispatch", _wrap_pni_rbdispatch, -1); rb_define_module_function(mCproton, "pni_rbhandler_finalize", _wrap_pni_rbhandler_finalize, -1); rb_define_module_function(mCproton, "pn_rbhandler", _wrap_pn_rbhandler, -1); rb_define_const(mCproton, "PROTON_IMPORT_EXPORT_H", SWIG_From_int((int)(1))); rb_define_const(mCproton, "PN_VERSION_MAJOR", SWIG_From_int((int)(0))); - rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(14))); + rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(17))); rb_define_const(mCproton, "PN_VERSION_POINT", SWIG_From_int((int)(0))); rb_define_const(mCproton, "PROTON_TYPES_H", SWIG_From_int((int)(1))); rb_define_const(mCproton, "PN_MILLIS_MAX", SWIG_From_unsigned_SS_int((unsigned int)((~0U)))); - rb_define_module_function(mCproton, "pn_timestamp_now", _wrap_pn_timestamp_now, -1); rb_define_module_function(mCproton, "pn_bytes", _wrap_pn_bytes, -1); + rb_define_singleton_method(mCproton, "pn_bytes_null", _wrap_pn_bytes_null_get, 0); + rb_define_module_function(mCproton, "pn_rwbytes", _wrap_pn_rwbytes, -1); + rb_define_singleton_method(mCproton, "pn_rwbytes_null", _wrap_pn_rwbytes_null_get, 0); rb_define_const(mCproton, "PROTON_OBJECT_H", SWIG_From_int((int)(1))); rb_define_singleton_method(mCproton, "PN_OBJECT", _wrap_PN_OBJECT_get, 0); rb_define_singleton_method(mCproton, "PN_VOID", _wrap_PN_VOID_get, 0); rb_define_singleton_method(mCproton, "PN_WEAKREF", _wrap_PN_WEAKREF_get, 0); rb_define_module_function(mCproton, "pn_class_id", _wrap_pn_class_id, -1); @@ -22814,10 +22762,14 @@ rb_define_module_function(mCproton, "pn_class_reify", _wrap_pn_class_reify, -1); rb_define_module_function(mCproton, "pn_class_hashcode", _wrap_pn_class_hashcode, -1); rb_define_module_function(mCproton, "pn_class_compare", _wrap_pn_class_compare, -1); rb_define_module_function(mCproton, "pn_class_equals", _wrap_pn_class_equals, -1); rb_define_module_function(mCproton, "pn_class_inspect", _wrap_pn_class_inspect, -1); + rb_define_module_function(mCproton, "pn_void_new", _wrap_pn_void_new, -1); + rb_define_module_function(mCproton, "pn_void_incref", _wrap_pn_void_incref, -1); + rb_define_module_function(mCproton, "pn_void_decref", _wrap_pn_void_decref, -1); + rb_define_module_function(mCproton, "pn_void_refcount", _wrap_pn_void_refcount, -1); rb_define_module_function(mCproton, "pn_void_hashcode", _wrap_pn_void_hashcode, -1); rb_define_module_function(mCproton, "pn_void_compare", _wrap_pn_void_compare, -1); rb_define_module_function(mCproton, "pn_void_inspect", _wrap_pn_void_inspect, -1); rb_define_module_function(mCproton, "pn_object_new", _wrap_pn_object_new, -1); rb_define_module_function(mCproton, "pn_object_reify", _wrap_pn_object_reify, -1); @@ -22921,10 +22873,13 @@ rb_define_module_function(mCproton, "pn_condition_set_description", _wrap_pn_condition_set_description, -1); rb_define_module_function(mCproton, "pn_condition_info", _wrap_pn_condition_info, -1); rb_define_module_function(mCproton, "pn_condition_is_redirect", _wrap_pn_condition_is_redirect, -1); rb_define_module_function(mCproton, "pn_condition_redirect_host", _wrap_pn_condition_redirect_host, -1); rb_define_module_function(mCproton, "pn_condition_redirect_port", _wrap_pn_condition_redirect_port, -1); + rb_define_module_function(mCproton, "pn_condition_copy", _wrap_pn_condition_copy, -1); + rb_define_module_function(mCproton, "pn_condition", _wrap_pn_condition, -1); + rb_define_module_function(mCproton, "pn_condition_free", _wrap_pn_condition_free, -1); rb_define_const(mCproton, "PROTON_CONNECTION_H", SWIG_From_int((int)(1))); rb_define_const(mCproton, "PN_LOCAL_UNINIT", SWIG_From_int((int)((1)))); rb_define_const(mCproton, "PN_LOCAL_ACTIVE", SWIG_From_int((int)((2)))); rb_define_const(mCproton, "PN_LOCAL_CLOSED", SWIG_From_int((int)((4)))); rb_define_const(mCproton, "PN_REMOTE_UNINIT", SWIG_From_int((int)((8)))); @@ -22935,10 +22890,11 @@ rb_define_module_function(mCproton, "pn_connection", _wrap_pn_connection, -1); rb_define_module_function(mCproton, "pn_connection_free", _wrap_pn_connection_free, -1); rb_define_module_function(mCproton, "pn_connection_release", _wrap_pn_connection_release, -1); rb_define_module_function(mCproton, "pn_connection_error", _wrap_pn_connection_error, -1); rb_define_module_function(mCproton, "pn_connection_collect", _wrap_pn_connection_collect, -1); + rb_define_module_function(mCproton, "pn_connection_collector", _wrap_pn_connection_collector, -1); rb_define_module_function(mCproton, "pn_connection_get_context", _wrap_pn_connection_get_context, -1); rb_define_module_function(mCproton, "pn_connection_set_context", _wrap_pn_connection_set_context, -1); rb_define_module_function(mCproton, "pn_connection_attachments", _wrap_pn_connection_attachments, -1); rb_define_module_function(mCproton, "pn_connection_state", _wrap_pn_connection_state, -1); rb_define_module_function(mCproton, "pn_connection_open", _wrap_pn_connection_open, -1); @@ -23032,10 +22988,13 @@ rb_define_module_function(mCproton, "pn_link_offered", _wrap_pn_link_offered, -1); rb_define_module_function(mCproton, "pn_link_flow", _wrap_pn_link_flow, -1); rb_define_module_function(mCproton, "pn_link_drain", _wrap_pn_link_drain, -1); rb_define_module_function(mCproton, "pn_link_set_drain", _wrap_pn_link_set_drain, -1); rb_define_module_function(mCproton, "pn_link_draining", _wrap_pn_link_draining, -1); + rb_define_module_function(mCproton, "pn_link_max_message_size", _wrap_pn_link_max_message_size, -1); + rb_define_module_function(mCproton, "pn_link_set_max_message_size", _wrap_pn_link_set_max_message_size, -1); + rb_define_module_function(mCproton, "pn_link_remote_max_message_size", _wrap_pn_link_remote_max_message_size, -1); rb_define_const(mCproton, "PROTON_TERMINUS_H", SWIG_From_int((int)(1))); rb_define_const(mCproton, "PN_UNSPECIFIED", SWIG_From_int((int)(PN_UNSPECIFIED))); rb_define_const(mCproton, "PN_SOURCE", SWIG_From_int((int)(PN_SOURCE))); rb_define_const(mCproton, "PN_TARGET", SWIG_From_int((int)(PN_TARGET))); rb_define_const(mCproton, "PN_COORDINATOR", SWIG_From_int((int)(PN_COORDINATOR))); @@ -23192,37 +23151,47 @@ rb_define_const(mCproton, "PN_DELIVERY", SWIG_From_int((int)(PN_DELIVERY))); rb_define_const(mCproton, "PN_TRANSPORT", SWIG_From_int((int)(PN_TRANSPORT))); rb_define_const(mCproton, "PN_TRANSPORT_AUTHENTICATED", SWIG_From_int((int)(PN_TRANSPORT_AUTHENTICATED))); rb_define_const(mCproton, "PN_TRANSPORT_ERROR", SWIG_From_int((int)(PN_TRANSPORT_ERROR))); rb_define_const(mCproton, "PN_TRANSPORT_HEAD_CLOSED", SWIG_From_int((int)(PN_TRANSPORT_HEAD_CLOSED))); + rb_define_const(mCproton, "PN_TRANSPORT_WRITE_CLOSED", SWIG_From_int((int)(PN_TRANSPORT_WRITE_CLOSED))); rb_define_const(mCproton, "PN_TRANSPORT_TAIL_CLOSED", SWIG_From_int((int)(PN_TRANSPORT_TAIL_CLOSED))); + rb_define_const(mCproton, "PN_TRANSPORT_READ_CLOSED", SWIG_From_int((int)(PN_TRANSPORT_READ_CLOSED))); rb_define_const(mCproton, "PN_TRANSPORT_CLOSED", SWIG_From_int((int)(PN_TRANSPORT_CLOSED))); rb_define_const(mCproton, "PN_SELECTABLE_INIT", SWIG_From_int((int)(PN_SELECTABLE_INIT))); rb_define_const(mCproton, "PN_SELECTABLE_UPDATED", SWIG_From_int((int)(PN_SELECTABLE_UPDATED))); rb_define_const(mCproton, "PN_SELECTABLE_READABLE", SWIG_From_int((int)(PN_SELECTABLE_READABLE))); rb_define_const(mCproton, "PN_SELECTABLE_WRITABLE", SWIG_From_int((int)(PN_SELECTABLE_WRITABLE))); rb_define_const(mCproton, "PN_SELECTABLE_ERROR", SWIG_From_int((int)(PN_SELECTABLE_ERROR))); rb_define_const(mCproton, "PN_SELECTABLE_EXPIRED", SWIG_From_int((int)(PN_SELECTABLE_EXPIRED))); rb_define_const(mCproton, "PN_SELECTABLE_FINAL", SWIG_From_int((int)(PN_SELECTABLE_FINAL))); + rb_define_const(mCproton, "PN_CONNECTION_WAKE", SWIG_From_int((int)(PN_CONNECTION_WAKE))); + rb_define_const(mCproton, "PN_LISTENER_ACCEPT", SWIG_From_int((int)(PN_LISTENER_ACCEPT))); + rb_define_const(mCproton, "PN_LISTENER_CLOSE", SWIG_From_int((int)(PN_LISTENER_CLOSE))); + rb_define_const(mCproton, "PN_PROACTOR_INTERRUPT", SWIG_From_int((int)(PN_PROACTOR_INTERRUPT))); + rb_define_const(mCproton, "PN_PROACTOR_TIMEOUT", SWIG_From_int((int)(PN_PROACTOR_TIMEOUT))); + rb_define_const(mCproton, "PN_PROACTOR_INACTIVE", SWIG_From_int((int)(PN_PROACTOR_INACTIVE))); rb_define_module_function(mCproton, "pn_event_type_name", _wrap_pn_event_type_name, -1); rb_define_module_function(mCproton, "pn_collector", _wrap_pn_collector, -1); rb_define_module_function(mCproton, "pn_collector_free", _wrap_pn_collector_free, -1); rb_define_module_function(mCproton, "pn_collector_release", _wrap_pn_collector_release, -1); rb_define_module_function(mCproton, "pn_collector_put", _wrap_pn_collector_put, -1); rb_define_module_function(mCproton, "pn_collector_peek", _wrap_pn_collector_peek, -1); rb_define_module_function(mCproton, "pn_collector_pop", _wrap_pn_collector_pop, -1); + rb_define_module_function(mCproton, "pn_collector_next", _wrap_pn_collector_next, -1); + rb_define_module_function(mCproton, "pn_collector_prev", _wrap_pn_collector_prev, -1); rb_define_module_function(mCproton, "pn_collector_more", _wrap_pn_collector_more, -1); rb_define_module_function(mCproton, "pn_event_type", _wrap_pn_event_type, -1); rb_define_module_function(mCproton, "pn_event_class", _wrap_pn_event_class, -1); rb_define_module_function(mCproton, "pn_event_context", _wrap_pn_event_context, -1); - rb_define_module_function(mCproton, "pn_event_root", _wrap_pn_event_root, -1); rb_define_module_function(mCproton, "pn_event_connection", _wrap_pn_event_connection, -1); rb_define_module_function(mCproton, "pn_event_session", _wrap_pn_event_session, -1); rb_define_module_function(mCproton, "pn_event_link", _wrap_pn_event_link, -1); rb_define_module_function(mCproton, "pn_event_delivery", _wrap_pn_event_delivery, -1); rb_define_module_function(mCproton, "pn_event_transport", _wrap_pn_event_transport, -1); rb_define_module_function(mCproton, "pn_event_attachments", _wrap_pn_event_attachments, -1); + rb_define_module_function(mCproton, "pn_event_batch_next", _wrap_pn_event_batch_next, -1); rb_define_module_function(mCproton, "pn_event_copy", _wrap_pn_event_copy, -1); rb_define_const(mCproton, "PROTON_MESSAGE_H", SWIG_From_int((int)(1))); rb_define_const(mCproton, "PN_DEFAULT_PRIORITY", SWIG_From_int((int)((4)))); rb_define_module_function(mCproton, "pn_message", _wrap_pn_message, -1); rb_define_module_function(mCproton, "pn_message_free", _wrap_pn_message_free, -1); @@ -23362,27 +23331,12 @@ rb_define_module_function(mCproton, "pn_messenger_set_snd_settle_mode", _wrap_pn_messenger_set_snd_settle_mode, -1); rb_define_module_function(mCproton, "pn_messenger_set_rcv_settle_mode", _wrap_pn_messenger_set_rcv_settle_mode, -1); rb_define_module_function(mCproton, "pn_messenger_set_tracer", _wrap_pn_messenger_set_tracer, -1); rb_define_module_function(mCproton, "pn_messenger_get_remote_idle_timeout", _wrap_pn_messenger_get_remote_idle_timeout, -1); rb_define_module_function(mCproton, "pn_messenger_set_ssl_peer_authentication_mode", _wrap_pn_messenger_set_ssl_peer_authentication_mode, -1); - rb_define_const(mCproton, "PROTON_IO_H", SWIG_From_int((int)(1))); - rb_define_const(mCproton, "PN_INVALID_SOCKET", SWIG_From_int((int)((-1)))); - rb_define_module_function(mCproton, "pn_io", _wrap_pn_io, -1); - rb_define_module_function(mCproton, "pn_io_free", _wrap_pn_io_free, -1); - rb_define_module_function(mCproton, "pn_io_error", _wrap_pn_io_error, -1); - rb_define_module_function(mCproton, "pn_connect", _wrap_pn_connect, -1); - rb_define_module_function(mCproton, "pn_listen", _wrap_pn_listen, -1); - rb_define_module_function(mCproton, "pn_accept", _wrap_pn_accept, -1); - rb_define_module_function(mCproton, "pn_close", _wrap_pn_close, -1); - rb_define_module_function(mCproton, "pn_send", _wrap_pn_send, -1); - rb_define_module_function(mCproton, "pn_recv", _wrap_pn_recv, -1); - rb_define_module_function(mCproton, "pn_pipe", _wrap_pn_pipe, -1); - rb_define_module_function(mCproton, "pn_read", _wrap_pn_read, -1); - rb_define_module_function(mCproton, "pn_write", _wrap_pn_write, -1); - rb_define_module_function(mCproton, "pn_wouldblock", _wrap_pn_wouldblock, -1); - rb_define_module_function(mCproton, "pn_io_selector", _wrap_pn_io_selector, -1); rb_define_const(mCproton, "PROTON_SELECTABLE_H", SWIG_From_int((int)(1))); + rb_define_const(mCproton, "PN_INVALID_SOCKET", SWIG_From_int((int)((-1)))); rb_define_module_function(mCproton, "pn_selectables", _wrap_pn_selectables, -1); rb_define_module_function(mCproton, "pn_selectables_next", _wrap_pn_selectables_next, -1); rb_define_module_function(mCproton, "pn_selectables_free", _wrap_pn_selectables_free, -1); rb_define_module_function(mCproton, "pn_selectable", _wrap_pn_selectable, -1); rb_define_module_function(mCproton, "pn_selectable_on_readable", _wrap_pn_selectable_on_readable, -1); @@ -23561,10 +23515,11 @@ rb_define_module_function(mCproton, "pn_cast_pn_delivery", _wrap_pn_cast_pn_delivery, -1); rb_define_module_function(mCproton, "pn_cast_pn_transport", _wrap_pn_cast_pn_transport, -1); rb_define_module_function(mCproton, "pn_cast_pn_reactor", _wrap_pn_cast_pn_reactor, -1); rb_define_module_function(mCproton, "pn_cast_pn_task", _wrap_pn_cast_pn_task, -1); rb_define_module_function(mCproton, "pn_cast_pn_selectable", _wrap_pn_cast_pn_selectable, -1); + rb_define_const(mCproton, "PROTON_URL_H", SWIG_From_int((int)(1))); rb_define_module_function(mCproton, "pn_url", _wrap_pn_url, -1); rb_define_module_function(mCproton, "pn_url_parse", _wrap_pn_url_parse, -1); rb_define_module_function(mCproton, "pn_url_free", _wrap_pn_url_free, -1); rb_define_module_function(mCproton, "pn_url_clear", _wrap_pn_url_clear, -1); rb_define_module_function(mCproton, "pn_url_str", _wrap_pn_url_str, -1); @@ -23599,15 +23554,15 @@ rb_define_module_function(mCproton, "pn_reactor_collector", _wrap_pn_reactor_collector, -1); rb_define_module_function(mCproton, "pn_reactor_get_global_handler", _wrap_pn_reactor_get_global_handler, -1); rb_define_module_function(mCproton, "pn_reactor_set_global_handler", _wrap_pn_reactor_set_global_handler, -1); rb_define_module_function(mCproton, "pn_reactor_get_handler", _wrap_pn_reactor_get_handler, -1); rb_define_module_function(mCproton, "pn_reactor_set_handler", _wrap_pn_reactor_set_handler, -1); - rb_define_module_function(mCproton, "pn_reactor_io", _wrap_pn_reactor_io, -1); rb_define_module_function(mCproton, "pn_reactor_children", _wrap_pn_reactor_children, -1); rb_define_module_function(mCproton, "pn_reactor_selectable", _wrap_pn_reactor_selectable, -1); rb_define_module_function(mCproton, "pn_reactor_update", _wrap_pn_reactor_update, -1); rb_define_module_function(mCproton, "pn_reactor_acceptor", _wrap_pn_reactor_acceptor, -1); + rb_define_module_function(mCproton, "pn_reactor_error", _wrap_pn_reactor_error, -1); rb_define_module_function(mCproton, "pn_reactor_connection_to_host", _wrap_pn_reactor_connection_to_host, -1); rb_define_module_function(mCproton, "pn_reactor_connection", _wrap_pn_reactor_connection, -1); rb_define_module_function(mCproton, "pn_reactor_set_connection_host", _wrap_pn_reactor_set_connection_host, -1); rb_define_module_function(mCproton, "pn_reactor_get_connection_address", _wrap_pn_reactor_get_connection_address, -1); rb_define_module_function(mCproton, "pn_reactor_wakeup", _wrap_pn_reactor_wakeup, -1); @@ -23630,9 +23585,10 @@ rb_define_module_function(mCproton, "pn_class_reactor", _wrap_pn_class_reactor, -1); rb_define_module_function(mCproton, "pn_object_reactor", _wrap_pn_object_reactor, -1); rb_define_module_function(mCproton, "pn_event_reactor", _wrap_pn_event_reactor, -1); rb_define_module_function(mCproton, "pn_record_get_handler", _wrap_pn_record_get_handler, -1); rb_define_module_function(mCproton, "pn_record_set_handler", _wrap_pn_record_set_handler, -1); + rb_define_module_function(mCproton, "pn_event_root", _wrap_pn_event_root, -1); rb_define_const(mCproton, "PROTON_HANDLERS_H", SWIG_From_int((int)(1))); rb_define_module_function(mCproton, "pn_handshaker", _wrap_pn_handshaker, -1); rb_define_module_function(mCproton, "pn_iohandler", _wrap_pn_iohandler, -1); rb_define_module_function(mCproton, "pn_flowcontroller", _wrap_pn_flowcontroller, -1); }