ext/cproton/cproton.c in qpid_proton-0.7.1 vs ext/cproton/cproton.c in qpid_proton-0.8

- old
+ new

@@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.11 + * Version 3.0.2 * * 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. @@ -632,18 +632,18 @@ swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; + size_t l = 0; + size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { - register int compare = strcmp(name, iname); + int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; @@ -683,11 +683,11 @@ } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { - register size_t i = 0; + size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; @@ -702,14 +702,14 @@ Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; for (; u != eu; ++u) { - register unsigned char uu = *u; + unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } @@ -717,15 +717,15 @@ /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; + char d = *(c++); + unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else @@ -1477,18 +1477,17 @@ /* Define Ruby class for C type */ SWIGRUNTIME void SWIG_Ruby_define_class(swig_type_info *type) { - VALUE klass; char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); if (NIL_P(_cSWIG_Pointer)) { _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); } - klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); + rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); free((void *) klass_name); } /* Create a new pointer object */ SWIGRUNTIME VALUE @@ -1779,82 +1778,77 @@ /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_char swig_types[0] #define SWIGTYPE_p_f_p_struct_pn_transport_t_p_q_const__char__void swig_types[1] #define SWIGTYPE_p_f_p_void__p_void swig_types[2] -#define SWIGTYPE_p_f_p_void__uintptr_t swig_types[3] -#define SWIGTYPE_p_f_p_void__void swig_types[4] -#define SWIGTYPE_p_f_p_void_p_struct_pn_string_t__int swig_types[5] -#define SWIGTYPE_p_f_p_void_p_void__intptr_t swig_types[6] -#define SWIGTYPE_p_int swig_types[7] -#define SWIGTYPE_p_intptr_t swig_types[8] -#define SWIGTYPE_p_long swig_types[9] -#define SWIGTYPE_p_long_long swig_types[10] -#define SWIGTYPE_p_p_char swig_types[11] -#define SWIGTYPE_p_pn_activate_criteria_t swig_types[12] -#define SWIGTYPE_p_pn_atom_t swig_types[13] -#define SWIGTYPE_p_pn_atom_t_u swig_types[14] -#define SWIGTYPE_p_pn_bytes_t swig_types[15] -#define SWIGTYPE_p_pn_class_t swig_types[16] -#define SWIGTYPE_p_pn_collector_t swig_types[17] -#define SWIGTYPE_p_pn_condition_t swig_types[18] -#define SWIGTYPE_p_pn_connection_t swig_types[19] -#define SWIGTYPE_p_pn_connector_t swig_types[20] -#define SWIGTYPE_p_pn_data_t swig_types[21] -#define SWIGTYPE_p_pn_decimal128_t swig_types[22] -#define SWIGTYPE_p_pn_delivery_t swig_types[23] -#define SWIGTYPE_p_pn_delivery_tag_t swig_types[24] -#define SWIGTYPE_p_pn_disposition_t swig_types[25] -#define SWIGTYPE_p_pn_distribution_mode_t swig_types[26] -#define SWIGTYPE_p_pn_driver_t swig_types[27] -#define SWIGTYPE_p_pn_durability_t swig_types[28] -#define SWIGTYPE_p_pn_error_t swig_types[29] -#define SWIGTYPE_p_pn_event_category_t swig_types[30] -#define SWIGTYPE_p_pn_event_t swig_types[31] -#define SWIGTYPE_p_pn_event_type_t swig_types[32] -#define SWIGTYPE_p_pn_expiry_policy_t swig_types[33] -#define SWIGTYPE_p_pn_format_t swig_types[34] -#define SWIGTYPE_p_pn_hash_t swig_types[35] -#define SWIGTYPE_p_pn_io_t swig_types[36] -#define SWIGTYPE_p_pn_iterator_t swig_types[37] -#define SWIGTYPE_p_pn_link_t swig_types[38] -#define SWIGTYPE_p_pn_list_t swig_types[39] -#define SWIGTYPE_p_pn_listener_t swig_types[40] -#define SWIGTYPE_p_pn_map_t swig_types[41] -#define SWIGTYPE_p_pn_message_t swig_types[42] -#define SWIGTYPE_p_pn_messenger_t swig_types[43] -#define SWIGTYPE_p_pn_rcv_settle_mode_t swig_types[44] -#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[45] -#define SWIGTYPE_p_pn_sasl_state_t swig_types[46] -#define SWIGTYPE_p_pn_sasl_t swig_types[47] -#define SWIGTYPE_p_pn_selectable_t swig_types[48] -#define SWIGTYPE_p_pn_session_t swig_types[49] -#define SWIGTYPE_p_pn_snd_settle_mode_t swig_types[50] -#define SWIGTYPE_p_pn_ssl_domain_t swig_types[51] -#define SWIGTYPE_p_pn_ssl_mode_t swig_types[52] -#define SWIGTYPE_p_pn_ssl_resume_status_t swig_types[53] -#define SWIGTYPE_p_pn_ssl_t swig_types[54] -#define SWIGTYPE_p_pn_ssl_verify_mode_t swig_types[55] -#define SWIGTYPE_p_pn_status_t swig_types[56] -#define SWIGTYPE_p_pn_string_t swig_types[57] -#define SWIGTYPE_p_pn_subscription_t swig_types[58] -#define SWIGTYPE_p_pn_terminus_t swig_types[59] -#define SWIGTYPE_p_pn_terminus_type_t swig_types[60] -#define SWIGTYPE_p_pn_transport_t swig_types[61] -#define SWIGTYPE_p_pn_type_t swig_types[62] -#define SWIGTYPE_p_pn_uuid_t swig_types[63] -#define SWIGTYPE_p_short swig_types[64] -#define SWIGTYPE_p_signed_char swig_types[65] -#define SWIGTYPE_p_uintptr_t swig_types[66] -#define SWIGTYPE_p_unsigned_char swig_types[67] -#define SWIGTYPE_p_unsigned_int swig_types[68] -#define SWIGTYPE_p_unsigned_long swig_types[69] -#define SWIGTYPE_p_unsigned_long_long swig_types[70] -#define SWIGTYPE_p_unsigned_short swig_types[71] -#define SWIGTYPE_p_void swig_types[72] -static swig_type_info *swig_types[74]; -static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; +#define SWIGTYPE_p_int swig_types[3] +#define SWIGTYPE_p_intptr_t swig_types[4] +#define SWIGTYPE_p_long swig_types[5] +#define SWIGTYPE_p_long_long swig_types[6] +#define SWIGTYPE_p_p_char swig_types[7] +#define SWIGTYPE_p_pn_activate_criteria_t swig_types[8] +#define SWIGTYPE_p_pn_atom_t swig_types[9] +#define SWIGTYPE_p_pn_bytes_t swig_types[10] +#define SWIGTYPE_p_pn_cid_t swig_types[11] +#define SWIGTYPE_p_pn_class_t swig_types[12] +#define SWIGTYPE_p_pn_collector_t swig_types[13] +#define SWIGTYPE_p_pn_condition_t swig_types[14] +#define SWIGTYPE_p_pn_connection_t swig_types[15] +#define SWIGTYPE_p_pn_connector_t swig_types[16] +#define SWIGTYPE_p_pn_data_t swig_types[17] +#define SWIGTYPE_p_pn_decimal128_t swig_types[18] +#define SWIGTYPE_p_pn_delivery_t swig_types[19] +#define SWIGTYPE_p_pn_disposition_t swig_types[20] +#define SWIGTYPE_p_pn_distribution_mode_t swig_types[21] +#define SWIGTYPE_p_pn_driver_t swig_types[22] +#define SWIGTYPE_p_pn_durability_t swig_types[23] +#define SWIGTYPE_p_pn_error_t swig_types[24] +#define SWIGTYPE_p_pn_event_t swig_types[25] +#define SWIGTYPE_p_pn_event_type_t swig_types[26] +#define SWIGTYPE_p_pn_expiry_policy_t swig_types[27] +#define SWIGTYPE_p_pn_format_t swig_types[28] +#define SWIGTYPE_p_pn_hash_t swig_types[29] +#define SWIGTYPE_p_pn_io_t swig_types[30] +#define SWIGTYPE_p_pn_iterator_t swig_types[31] +#define SWIGTYPE_p_pn_link_t swig_types[32] +#define SWIGTYPE_p_pn_list_t swig_types[33] +#define SWIGTYPE_p_pn_listener_t swig_types[34] +#define SWIGTYPE_p_pn_map_t swig_types[35] +#define SWIGTYPE_p_pn_message_t swig_types[36] +#define SWIGTYPE_p_pn_messenger_t swig_types[37] +#define SWIGTYPE_p_pn_rcv_settle_mode_t swig_types[38] +#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[39] +#define SWIGTYPE_p_pn_sasl_state_t swig_types[40] +#define SWIGTYPE_p_pn_sasl_t swig_types[41] +#define SWIGTYPE_p_pn_selectable_t swig_types[42] +#define SWIGTYPE_p_pn_selector_t swig_types[43] +#define SWIGTYPE_p_pn_session_t swig_types[44] +#define SWIGTYPE_p_pn_snd_settle_mode_t swig_types[45] +#define SWIGTYPE_p_pn_ssl_domain_t swig_types[46] +#define SWIGTYPE_p_pn_ssl_mode_t swig_types[47] +#define SWIGTYPE_p_pn_ssl_resume_status_t swig_types[48] +#define SWIGTYPE_p_pn_ssl_t swig_types[49] +#define SWIGTYPE_p_pn_ssl_verify_mode_t swig_types[50] +#define SWIGTYPE_p_pn_status_t swig_types[51] +#define SWIGTYPE_p_pn_string_t swig_types[52] +#define SWIGTYPE_p_pn_subscription_t swig_types[53] +#define SWIGTYPE_p_pn_terminus_t swig_types[54] +#define SWIGTYPE_p_pn_terminus_type_t swig_types[55] +#define SWIGTYPE_p_pn_transport_t swig_types[56] +#define SWIGTYPE_p_pn_type_t swig_types[57] +#define SWIGTYPE_p_pn_url_t swig_types[58] +#define SWIGTYPE_p_pn_uuid_t swig_types[59] +#define SWIGTYPE_p_short swig_types[60] +#define SWIGTYPE_p_signed_char swig_types[61] +#define SWIGTYPE_p_unsigned_char swig_types[62] +#define SWIGTYPE_p_unsigned_int swig_types[63] +#define SWIGTYPE_p_unsigned_long swig_types[64] +#define SWIGTYPE_p_unsigned_long_long swig_types[65] +#define SWIGTYPE_p_unsigned_short swig_types[66] +#define SWIGTYPE_p_void swig_types[67] +static swig_type_info *swig_types[69]; +static swig_module_info swig_module = {swig_types, 68, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ @@ -1865,11 +1859,11 @@ #define SWIG_RUBY_THREAD_BEGIN_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK -#define SWIGVERSION 0x020011 +#define SWIGVERSION 0x030002 #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)) @@ -1880,12 +1874,12 @@ #include <proton/sasl.h> #include <proton/driver.h> #include <proton/messenger.h> #include <proton/ssl.h> #include <proton/driver_extras.h> - #include <proton/types.h> +#include <proton/url.h> #include <uuid/uuid.h> #if !defined(RSTRING_LEN) @@ -1949,11 +1943,11 @@ { return Qnil; } -/*@SWIG:/usr/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.2/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]); @@ -2085,34 +2079,10 @@ { return value ? Qtrue : Qfalse; } -SWIGINTERN int -SWIG_AsCharArray(VALUE obj, char *val, size_t size) -{ - char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; - int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); - if (SWIG_IsOK(res)) { - if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; - if (csize <= size) { - if (val) { - if (csize) memcpy(val, cptr, csize*sizeof(char)); - if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); - } - if (alloc == SWIG_NEWOBJ) { - free((char*)cptr); - res = SWIG_DelNewMask(res); - } - return res; - } - if (alloc == SWIG_NEWOBJ) free((char*)cptr); - } - return SWIG_TypeError; -} - - SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_long (unsigned long value) { return ULONG2NUM(value); } @@ -2123,11 +2093,11 @@ { return SWIG_From_unsigned_SS_long ((unsigned long)(value)); } -/*@SWIG:/usr/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.2/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]); @@ -2195,17 +2165,17 @@ #else # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX)) #endif -/*@SWIG:/usr/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.2/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]); - *res = NUM2DBL(obj); + *res = NUM2DBL(obj); (void)type; return obj; } /*@SWIG@*/ SWIGINTERN int @@ -2274,11 +2244,11 @@ { return ULL2NUM(value); } -/*@SWIG:/usr/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.2/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]); @@ -2326,11 +2296,11 @@ } return res; } -/*@SWIG:/usr/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig/3.0.2/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]); @@ -2377,33 +2347,11 @@ } } return res; } -typedef union { - bool as_bool; - uint8_t as_ubyte; - int8_t as_byte; - uint16_t as_ushort; - int16_t as_short; - uint32_t as_uint; - int32_t as_int; - pn_char_t as_char; - uint64_t as_ulong; - int64_t as_long; - pn_timestamp_t as_timestamp; - float as_float; - double as_double; - pn_decimal32_t as_decimal32; - pn_decimal64_t as_decimal64; - pn_decimal128_t as_decimal128; - pn_uuid_t as_uuid; - pn_bytes_t as_bytes; -} pn_atom_t_u; - - SWIGINTERN int SWIG_AsVal_signed_SS_char (VALUE obj, signed char *val) { long v; int res = SWIG_AsVal_long (obj, &v); @@ -2416,17 +2364,10 @@ } return res; } -SWIGINTERNINLINE VALUE -SWIG_From_signed_SS_char (signed char value) -{ - return SWIG_From_long (value); -} - - SWIGINTERN int SWIG_AsVal_short (VALUE obj, short *val) { long v; int res = SWIG_AsVal_long (obj, &v); @@ -2440,10 +2381,17 @@ return res; } SWIGINTERNINLINE VALUE +SWIG_From_signed_SS_char (signed char value) +{ + return SWIG_From_long (value); +} + + +SWIGINTERNINLINE VALUE SWIG_From_short (short value) { return SWIG_From_long (value); } @@ -2455,10 +2403,17 @@ SWIG_From_float (float value) { return SWIG_From_double (value); } + + pn_connection_t *pn_cast_pn_connection(void *x) { return (pn_connection_t *) x; } + pn_session_t *pn_cast_pn_session(void *x) { return (pn_session_t *) x; } + pn_link_t *pn_cast_pn_link(void *x) { return (pn_link_t *) x; } + pn_delivery_t *pn_cast_pn_delivery(void *x) { return (pn_delivery_t *) x; } + pn_transport_t *pn_cast_pn_transport(void *x) { return (pn_transport_t *) x; } + SWIGINTERN VALUE _wrap_pn_message_load(int argc, VALUE *argv, VALUE self) { pn_message_t *arg1 = (pn_message_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; @@ -3243,824 +3198,648 @@ if (buff2) free((char*)buff2); return Qnil; } -static swig_class SwigClassPn_decimal128_t; - SWIGINTERN VALUE -_wrap_pn_decimal128_t_bytes_set(int argc, VALUE *argv, VALUE self) { - pn_decimal128_t *arg1 = (pn_decimal128_t *) 0 ; - char *arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - char temp2[16] ; +_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 < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_decimal128_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_decimal128_t *","bytes", 1, self )); - } - arg1 = (pn_decimal128_t *)(argp1); - res2 = SWIG_AsCharArray(argv[0], temp2, 16); + 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 [16]","bytes", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_bytes", 2, argv[1] )); } - arg2 = (char *)(temp2); - if (arg2) memcpy(arg1->bytes,arg2,16*sizeof(char)); - else memset(arg1->bytes,0,16*sizeof(char)); - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_decimal128_t_bytes_get(int argc, VALUE *argv, VALUE self) { - pn_decimal128_t *arg1 = (pn_decimal128_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - char *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_decimal128_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_decimal128_t *","bytes", 1, self )); - } - arg1 = (pn_decimal128_t *)(argp1); - result = (char *)(char *) ((arg1)->bytes); + arg2 = (char *)(buf2); + result = pn_bytes(arg1,(char const *)arg2); { - size_t size = 16; - - while (size && (result[size - 1] == '\0')) --size; - - vresult = SWIG_FromCharPtrAndSize(result, size); + 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; } -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE -_wrap_pn_decimal128_t_allocate(VALUE self) { -#else - SWIGINTERN VALUE - _wrap_pn_decimal128_t_allocate(int argc, VALUE *argv, VALUE self) { -#endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_pn_decimal128_t); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; - } +_wrap_PN_OBJECT_get(VALUE self) { + VALUE _val; + _val = SWIG_NewPointerObj(SWIG_as_voidptr(PN_OBJECT), SWIGTYPE_p_pn_class_t, 0 ); + return _val; +} + SWIGINTERN VALUE -_wrap_new_pn_decimal128_t(int argc, VALUE *argv, VALUE self) { - pn_decimal128_t *result = 0 ; +_wrap_PN_VOID_get(VALUE self) { + VALUE _val; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - result = (pn_decimal128_t *)calloc(1, sizeof(pn_decimal128_t)); - DATA_PTR(self) = result; - return self; -fail: - return Qnil; + _val = SWIG_NewPointerObj(SWIG_as_voidptr(PN_VOID), SWIGTYPE_p_pn_class_t, 0 ); + return _val; } -SWIGINTERN void -free_pn_decimal128_t(pn_decimal128_t *arg1) { - free((char *) arg1); +SWIGINTERN VALUE +_wrap_PN_WEAKREF_get(VALUE self) { + VALUE _val; + + _val = SWIG_NewPointerObj(SWIG_as_voidptr(PN_WEAKREF), SWIGTYPE_p_pn_class_t, 0 ); + return _val; } -static swig_class SwigClassPn_uuid_t; SWIGINTERN VALUE -_wrap_pn_uuid_t_bytes_set(int argc, VALUE *argv, VALUE self) { - pn_uuid_t *arg1 = (pn_uuid_t *) 0 ; - char *arg2 ; +_wrap_pn_class_id(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - char temp2[16] ; - int res2 ; + pn_cid_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(self, &argp1,SWIGTYPE_p_pn_uuid_t, 0 | 0 ); + 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_uuid_t *","bytes", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_id", 1, argv[0] )); } - arg1 = (pn_uuid_t *)(argp1); - res2 = SWIG_AsCharArray(argv[0], temp2, 16); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [16]","bytes", 2, argv[0] )); - } - arg2 = (char *)(temp2); - if (arg2) memcpy(arg1->bytes,arg2,16*sizeof(char)); - else memset(arg1->bytes,0,16*sizeof(char)); - return Qnil; + 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 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_uuid_t_bytes_get(int argc, VALUE *argv, VALUE self) { - pn_uuid_t *arg1 = (pn_uuid_t *) 0 ; +_wrap_pn_class_name(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_uuid_t, 0 | 0 ); + 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_uuid_t *","bytes", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_name", 1, argv[0] )); } - arg1 = (pn_uuid_t *)(argp1); - result = (char *)(char *) ((arg1)->bytes); - { - size_t size = 16; - - while (size && (result[size - 1] == '\0')) --size; - - vresult = SWIG_FromCharPtrAndSize(result, size); - } + arg1 = (pn_class_t *)(argp1); + result = (char *)pn_class_name((struct pn_class_t const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE -_wrap_pn_uuid_t_allocate(VALUE self) { -#else - SWIGINTERN VALUE - _wrap_pn_uuid_t_allocate(int argc, VALUE *argv, VALUE self) { -#endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_pn_uuid_t); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; - } - - -SWIGINTERN VALUE -_wrap_new_pn_uuid_t(int argc, VALUE *argv, VALUE self) { - pn_uuid_t *result = 0 ; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - result = (pn_uuid_t *)calloc(1, sizeof(pn_uuid_t)); - DATA_PTR(self) = result; - return self; -fail: - return Qnil; -} - - -SWIGINTERN void -free_pn_uuid_t(pn_uuid_t *arg1) { - free((char *) arg1); -} - -static swig_class SwigClassPn_bytes_t; - - -/* - Document-method: Cproton::pn_bytes_t.size - - call-seq: - size -> size_t - -Size or Length of the pn_bytes_t. -*/ - -/* - Document-method: Cproton::pn_bytes_t.size= - - call-seq: - size=(x) -> size_t - -Size or Length of the pn_bytes_t. -*/ -SWIGINTERN VALUE -_wrap_pn_bytes_t_size_set(int argc, VALUE *argv, VALUE self) { - pn_bytes_t *arg1 = (pn_bytes_t *) 0 ; +_wrap_pn_class_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 < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_bytes_t, 0 | 0 ); + 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_bytes_t *","size", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_new", 1, argv[0] )); } - arg1 = (pn_bytes_t *)(argp1); - ecode2 = SWIG_AsVal_size_t(argv[0], &val2); + 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","size", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_class_new", 2, argv[1] )); } arg2 = (size_t)(val2); - if (arg1) (arg1)->size = arg2; - return Qnil; + result = (void *)pn_class_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_bytes_t_size_get(int argc, VALUE *argv, VALUE self) { - pn_bytes_t *arg1 = (pn_bytes_t *) 0 ; +_wrap_pn_class_incref(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - size_t result; + int res2 ; + void *result = 0 ; 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; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_bytes_t, 0 | 0 ); + 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_bytes_t *","size", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_incref", 1, argv[0] )); } - arg1 = (pn_bytes_t *)(argp1); - result = (size_t) ((arg1)->size); - vresult = SWIG_From_size_t((size_t)(result)); + arg1 = (pn_class_t *)(argp1); + 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_class_incref", 2, argv[1] )); + } + result = (void *)pn_class_incref((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_bytes_t_start_set(int argc, VALUE *argv, VALUE self) { - pn_bytes_t *arg1 = (pn_bytes_t *) 0 ; - char *arg2 = (char *) 0 ; +_wrap_pn_class_refcount(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; + int result; + VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_bytes_t, 0 | 0 ); + 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_bytes_t *","start", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_refcount", 1, argv[0] )); } - arg1 = (pn_bytes_t *)(argp1); - res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + arg1 = (pn_class_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","start", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_class_refcount", 2, argv[1] )); } - arg2 = (char *)(buf2); - if (arg1->start) free((char*)arg1->start); - if (arg2) { - size_t size = strlen((const char *)(arg2)) + 1; - arg1->start = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); - } else { - arg1->start = 0; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return Qnil; + result = (int)pn_class_refcount((struct pn_class_t const *)arg1,arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return Qnil; } SWIGINTERN VALUE -_wrap_pn_bytes_t_start_get(int argc, VALUE *argv, VALUE self) { - pn_bytes_t *arg1 = (pn_bytes_t *) 0 ; +_wrap_pn_class_decref(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - char *result = 0 ; + int res2 ; + int 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; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_bytes_t, 0 | 0 ); + 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_bytes_t *","start", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_decref", 1, argv[0] )); } - arg1 = (pn_bytes_t *)(argp1); - result = (char *) ((arg1)->start); - vresult = SWIG_FromCharPtr((const char *)result); + arg1 = (pn_class_t *)(argp1); + 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_class_decref", 2, argv[1] )); + } + result = (int)pn_class_decref((struct pn_class_t const *)arg1,arg2); + vresult = SWIG_From_int((int)(result)); return vresult; fail: return Qnil; } -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE -_wrap_pn_bytes_t_allocate(VALUE self) { -#else - SWIGINTERN VALUE - _wrap_pn_bytes_t_allocate(int argc, VALUE *argv, VALUE self) { -#endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_pn_bytes_t); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; - } - - -SWIGINTERN VALUE -_wrap_new_pn_bytes_t(int argc, VALUE *argv, VALUE self) { - pn_bytes_t *result = 0 ; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - result = (pn_bytes_t *)calloc(1, sizeof(pn_bytes_t)); - DATA_PTR(self) = result; - return self; -fail: - return Qnil; -} - - -SWIGINTERN void -free_pn_bytes_t(pn_bytes_t *arg1) { - free((char *) arg1); -} - -SWIGINTERN VALUE -_wrap_pn_bytes(int argc, VALUE *argv, VALUE self) { - size_t arg1 ; - char *arg2 = (char *) 0 ; - size_t val1 ; - int ecode1 = 0 ; +_wrap_pn_class_free(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - pn_bytes_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] )); - } - arg1 = (size_t)(val1); - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + 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_class_free", 1, argv[0] )); + } + arg1 = (pn_class_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","pn_bytes", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_class_free", 2, argv[1] )); } - arg2 = (char *)(buf2); - result = pn_bytes(arg1,arg2); - { - vresult = rb_str_new((&result)->start, (&result)->size); - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return vresult; + pn_class_free((struct pn_class_t const *)arg1,arg2); + return Qnil; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return Qnil; } SWIGINTERN VALUE -_wrap_pn_bytes_dup(int argc, VALUE *argv, VALUE self) { - size_t arg1 ; - char *arg2 = (char *) 0 ; - size_t val1 ; - int ecode1 = 0 ; +_wrap_pn_class_reify(int argc, VALUE *argv, VALUE self) { + pn_class_t *arg1 = (pn_class_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - pn_bytes_t result; + pn_class_t *result = 0 ; 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_dup", 1, argv[0] )); - } - arg1 = (size_t)(val1); - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + 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_class_reify", 1, argv[0] )); + } + arg1 = (pn_class_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_bytes_dup", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_class_reify", 2, argv[1] )); } - arg2 = (char *)(buf2); - result = pn_bytes_dup(arg1,(char const *)arg2); - { - vresult = rb_str_new((&result)->start, (&result)->size); - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (pn_class_t *)pn_class_reify((struct pn_class_t const *)arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_class_t, 0 | 0 ); return vresult; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return Qnil; } -static swig_class SwigClassPn_class_t; - SWIGINTERN VALUE -_wrap_pn_class_t_initialize_set(int argc, VALUE *argv, VALUE self) { +_wrap_pn_class_hashcode(int argc, VALUE *argv, VALUE self) { pn_class_t *arg1 = (pn_class_t *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; + int res2 ; + uintptr_t result; + VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + 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 *","initialize", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_hashcode", 1, argv[0] )); } arg1 = (pn_class_t *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(void *)","initialize", 2, argv[0] )); - } + 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_class_hashcode", 2, argv[1] )); } - if (arg1) (arg1)->initialize = arg2; - return Qnil; + result = (uintptr_t)pn_class_hashcode((struct pn_class_t const *)arg1,arg2); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_initialize_get(int argc, VALUE *argv, VALUE self) { +_wrap_pn_class_compare(int argc, VALUE *argv, VALUE self) { pn_class_t *arg1 = (pn_class_t *) 0 ; + void *arg2 = (void *) 0 ; + void *arg3 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void (*result)(void *) = 0 ; + int res2 ; + int res3 ; + intptr_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 < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + 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 *","initialize", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_compare", 1, argv[0] )); } arg1 = (pn_class_t *)(argp1); - result = (void (*)(void *)) ((arg1)->initialize); - vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); + 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_class_compare", 2, argv[1] )); + } + 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 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_finalize_set(int argc, VALUE *argv, VALUE self) { +_wrap_pn_class_equals(int argc, VALUE *argv, VALUE self) { pn_class_t *arg1 = (pn_class_t *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; + void *arg2 = (void *) 0 ; + void *arg3 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; + int res2 ; + int res3 ; + bool result; + VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + 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 *","finalize", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_equals", 1, argv[0] )); } arg1 = (pn_class_t *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(void *)","finalize", 2, argv[0] )); - } + 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_class_equals", 2, argv[1] )); } - if (arg1) (arg1)->finalize = arg2; - return Qnil; + 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_equals", 3, argv[2] )); + } + result = (bool)pn_class_equals((struct pn_class_t const *)arg1,arg2,arg3); + vresult = SWIG_From_bool((bool)(result)); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_finalize_get(int argc, VALUE *argv, VALUE self) { +_wrap_pn_class_inspect(int argc, VALUE *argv, VALUE self) { pn_class_t *arg1 = (pn_class_t *) 0 ; + void *arg2 = (void *) 0 ; + pn_string_t *arg3 = (pn_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void (*result)(void *) = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + 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 *","finalize", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_class_inspect", 1, argv[0] )); } arg1 = (pn_class_t *)(argp1); - result = (void (*)(void *)) ((arg1)->finalize); - vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); + 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_class_inspect", 2, argv[1] )); + } + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_pn_string_t, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "pn_string_t *","pn_class_inspect", 3, argv[2] )); + } + arg3 = (pn_string_t *)(argp3); + result = (int)pn_class_inspect((struct pn_class_t const *)arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_hashcode_set(int argc, VALUE *argv, VALUE self) { - pn_class_t *arg1 = (pn_class_t *) 0 ; - uintptr_t (*arg2)(void *) = (uintptr_t (*)(void *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; +_wrap_pn_void_hashcode(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + uintptr_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(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t *","hashcode", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_void_hashcode", 1, argv[0] )); } - arg1 = (pn_class_t *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void__uintptr_t); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "uintptr_t (*)(void *)","hashcode", 2, argv[0] )); - } - } - if (arg1) (arg1)->hashcode = arg2; - return Qnil; + result = (uintptr_t)pn_void_hashcode(arg1); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_hashcode_get(int argc, VALUE *argv, VALUE self) { - pn_class_t *arg1 = (pn_class_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - uintptr_t (*result)(void *) = 0 ; +_wrap_pn_void_compare(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + void *arg2 = (void *) 0 ; + int res1 ; + int res2 ; + intptr_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; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t *","hashcode", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_void_compare", 1, argv[0] )); } - arg1 = (pn_class_t *)(argp1); - result = (uintptr_t (*)(void *)) ((arg1)->hashcode); - vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__uintptr_t); + 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 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_compare_set(int argc, VALUE *argv, VALUE self) { - pn_class_t *arg1 = (pn_class_t *) 0 ; - intptr_t (*arg2)(void *,void *) = (intptr_t (*)(void *,void *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; +_wrap_pn_void_inspect(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + pn_string_t *arg2 = (pn_string_t *) 0 ; + int res1 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t *","compare", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_void_inspect", 1, argv[0] )); } - arg1 = (pn_class_t *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void_p_void__intptr_t); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "intptr_t (*)(void *,void *)","compare", 2, argv[0] )); - } + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_string_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_string_t *","pn_void_inspect", 2, argv[1] )); } - if (arg1) (arg1)->compare = arg2; - return Qnil; + arg2 = (pn_string_t *)(argp2); + result = (int)pn_void_inspect(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_compare_get(int argc, VALUE *argv, VALUE self) { +_wrap_pn_object_new(int argc, VALUE *argv, VALUE self) { pn_class_t *arg1 = (pn_class_t *) 0 ; + size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - intptr_t (*result)(void *,void *) = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *result = 0 ; 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; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + 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 *","compare", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t const *","pn_object_new", 1, argv[0] )); } arg1 = (pn_class_t *)(argp1); - result = (intptr_t (*)(void *,void *)) ((arg1)->compare); - vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_void__intptr_t); + ecode2 = SWIG_AsVal_size_t(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_object_new", 2, argv[1] )); + } + arg2 = (size_t)(val2); + result = (void *)pn_object_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; } - -/* - Document-method: Cproton::pn_class_t.inspect - - call-seq: - inspect(arg2, arg3) -> int (*)(void *,pn_string_t *) - -Inspect class and its contents. -*/ - -/* - Document-method: Cproton::pn_class_t.inspect= - - call-seq: - inspect=(x) -> int (*)(void *,pn_string_t *) - -Inspect class and its contents. -*/ SWIGINTERN VALUE -_wrap_pn_class_t_inspect_set(int argc, VALUE *argv, VALUE self) { - pn_class_t *arg1 = (pn_class_t *) 0 ; - int (*arg2)(void *,pn_string_t *) = (int (*)(void *,pn_string_t *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; +_wrap_pn_object_reify(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + pn_class_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(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t *","inspect", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_object_reify", 1, argv[0] )); } - arg1 = (pn_class_t *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void_p_struct_pn_string_t__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(void *,pn_string_t *)","inspect", 2, argv[0] )); - } - } - if (arg1) (arg1)->inspect = arg2; - return Qnil; + result = (pn_class_t *)pn_object_reify(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_class_t, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_class_t_inspect_get(int argc, VALUE *argv, VALUE self) { - pn_class_t *arg1 = (pn_class_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int (*result)(void *,pn_string_t *) = 0 ; - VALUE vresult = Qnil; +_wrap_pn_object_incref(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_class_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_class_t *","inspect", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_object_incref", 1, argv[0] )); } - arg1 = (pn_class_t *)(argp1); - result = (int (*)(void *,pn_string_t *)) ((arg1)->inspect); - vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_struct_pn_string_t__int); - return vresult; + pn_object_incref(arg1); + return Qnil; fail: return Qnil; } -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE -_wrap_pn_class_t_allocate(VALUE self) { -#else - SWIGINTERN VALUE - _wrap_pn_class_t_allocate(int argc, VALUE *argv, VALUE self) { -#endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_pn_class_t); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; - } +_wrap_pn_object_refcount(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + int result; + VALUE vresult = Qnil; - -SWIGINTERN VALUE -_wrap_new_pn_class_t(int argc, VALUE *argv, VALUE self) { - pn_class_t *result = 0 ; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - result = (pn_class_t *)calloc(1, sizeof(pn_class_t)); - DATA_PTR(self) = result; - return self; + 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_object_refcount", 1, argv[0] )); + } + result = (int)pn_object_refcount(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; fail: return Qnil; } -SWIGINTERN void -free_pn_class_t(pn_class_t *arg1) { - free((char *) arg1); -} - SWIGINTERN VALUE -_wrap_pn_new(int argc, VALUE *argv, VALUE self) { - size_t arg1 ; - pn_class_t *arg2 = (pn_class_t *) 0 ; - size_t val1 ; - int ecode1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *result = 0 ; - VALUE vresult = Qnil; +_wrap_pn_object_decref(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",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_new", 1, argv[0] )); - } - arg1 = (size_t)(val1); - res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_class_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_class_t *","pn_new", 2, argv[1] )); + 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_object_decref", 1, argv[0] )); } - arg2 = (pn_class_t *)(argp2); - result = (void *)pn_new(arg1,arg2); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - return vresult; + pn_object_decref(arg1); + return Qnil; fail: return Qnil; } SWIGINTERN VALUE -_wrap_pn_initialize(int argc, VALUE *argv, VALUE self) { +_wrap_pn_object_free(int argc, VALUE *argv, VALUE self) { void *arg1 = (void *) 0 ; - pn_class_t *arg2 = (pn_class_t *) 0 ; int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + 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_initialize", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_object_free", 1, argv[0] )); } - res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_class_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_class_t *","pn_initialize", 2, argv[1] )); - } - arg2 = (pn_class_t *)(argp2); - pn_initialize(arg1,arg2); + pn_object_free(arg1); return Qnil; fail: return Qnil; } @@ -4089,20 +3868,23 @@ SWIGINTERN VALUE _wrap_pn_decref(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_decref", 1, argv[0] )); } - pn_decref(arg1); - return Qnil; + result = (int)pn_decref(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; fail: return Qnil; } @@ -4127,29 +3909,10 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_finalize(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_finalize", 1, argv[0] )); - } - pn_finalize(arg1); - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE _wrap_pn_free(int argc, VALUE *argv, VALUE self) { void *arg1 = (void *) 0 ; int res1 ; if ((argc < 1) || (argc > 1)) { @@ -4200,12 +3963,12 @@ } 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_hashcode", 1, argv[0] )); } - result = pn_hashcode(arg1); - vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)malloc(sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + result = (uintptr_t)pn_hashcode(arg1); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); return vresult; fail: return Qnil; } @@ -4296,33 +4059,33 @@ } SWIGINTERN VALUE _wrap_pn_list(int argc, VALUE *argv, VALUE self) { - size_t arg1 ; - int arg2 ; - size_t val1 ; - int ecode1 = 0 ; - int val2 ; + pn_class_t *arg1 = (pn_class_t *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; int ecode2 = 0 ; pn_list_t *result = 0 ; 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_list", 1, argv[0] )); - } - arg1 = (size_t)(val1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); + 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_list", 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( "", "int","pn_list", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_list", 2, argv[1] )); } - arg2 = (int)(val2); - result = (pn_list_t *)pn_list(arg1,arg2); + arg2 = (size_t)(val2); + result = (pn_list_t *)pn_list((struct pn_class_t const *)arg1,arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_list_t, 0 | 0 ); return vresult; fail: return Qnil; } @@ -4596,41 +4359,49 @@ } SWIGINTERN VALUE _wrap_pn_map(int argc, VALUE *argv, VALUE self) { - size_t arg1 ; - float arg2 ; - int arg3 ; - size_t val1 ; - int ecode1 = 0 ; - float val2 ; - int ecode2 = 0 ; - int val3 ; + pn_class_t *arg1 = (pn_class_t *) 0 ; + pn_class_t *arg2 = (pn_class_t *) 0 ; + size_t arg3 ; + float arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + size_t val3 ; int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; pn_map_t *result = 0 ; VALUE vresult = Qnil; - if ((argc < 3) || (argc > 3)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",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_map", 1, argv[0] )); - } - arg1 = (size_t)(val1); - ecode2 = SWIG_AsVal_float(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "float","pn_map", 2, argv[1] )); - } - arg2 = (float)(val2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); + 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_map", 1, argv[0] )); + } + arg1 = (pn_class_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_class_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_class_t const *","pn_map", 2, argv[1] )); + } + arg2 = (pn_class_t *)(argp2); + ecode3 = SWIG_AsVal_size_t(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","pn_map", 3, argv[2] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","pn_map", 3, argv[2] )); } - arg3 = (int)(val3); - result = (pn_map_t *)pn_map(arg1,arg2,arg3); + arg3 = (size_t)(val3); + ecode4 = SWIG_AsVal_float(argv[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "float","pn_map", 4, argv[3] )); + } + arg4 = (float)(val4); + result = (pn_map_t *)pn_map((struct pn_class_t const *)arg1,(struct pn_class_t const *)arg2,arg3,arg4); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_map_t, 0 | 0 ); return vresult; fail: return Qnil; } @@ -4767,12 +4538,12 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_map_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_map_t *","pn_map_head", 1, argv[0] )); } arg1 = (pn_map_t *)(argp1); - result = pn_map_head(arg1); - vresult = SWIG_NewPointerObj((pn_handle_t *)memcpy((pn_handle_t *)malloc(sizeof(pn_handle_t)),&result,sizeof(pn_handle_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + result = (pn_handle_t)pn_map_head(arg1); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); return vresult; fail: return Qnil; } @@ -4781,12 +4552,12 @@ _wrap_pn_map_next(int argc, VALUE *argv, VALUE self) { pn_map_t *arg1 = (pn_map_t *) 0 ; pn_handle_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; pn_handle_t result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; @@ -4794,23 +4565,17 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_map_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_map_t *","pn_map_next", 1, argv[0] )); } arg1 = (pn_map_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_next", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_handle_t","pn_map_next", 2, argv[1])); - } else { - arg2 = *((pn_handle_t *)(argp2)); - } - } - result = pn_map_next(arg1,arg2); - vresult = SWIG_NewPointerObj((pn_handle_t *)memcpy((pn_handle_t *)malloc(sizeof(pn_handle_t)),&result,sizeof(pn_handle_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_next", 2, argv[1] )); + } + arg2 = (pn_handle_t)(val2); + result = (pn_handle_t)pn_map_next(arg1,arg2); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); return vresult; fail: return Qnil; } @@ -4819,12 +4584,12 @@ _wrap_pn_map_key(int argc, VALUE *argv, VALUE self) { pn_map_t *arg1 = (pn_map_t *) 0 ; pn_handle_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long 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; @@ -4832,21 +4597,15 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_map_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_map_t *","pn_map_key", 1, argv[0] )); } arg1 = (pn_map_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_key", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_handle_t","pn_map_key", 2, argv[1])); - } else { - arg2 = *((pn_handle_t *)(argp2)); - } - } + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_key", 2, argv[1] )); + } + arg2 = (pn_handle_t)(val2); result = (void *)pn_map_key(arg1,arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return vresult; fail: return Qnil; @@ -4857,12 +4616,12 @@ _wrap_pn_map_value(int argc, VALUE *argv, VALUE self) { pn_map_t *arg1 = (pn_map_t *) 0 ; pn_handle_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long 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; @@ -4870,62 +4629,56 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_map_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_map_t *","pn_map_value", 1, argv[0] )); } arg1 = (pn_map_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_value", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_handle_t","pn_map_value", 2, argv[1])); - } else { - arg2 = *((pn_handle_t *)(argp2)); - } - } + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_value", 2, argv[1] )); + } + arg2 = (pn_handle_t)(val2); result = (void *)pn_map_value(arg1,arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_pn_hash(int argc, VALUE *argv, VALUE self) { - size_t arg1 ; - float arg2 ; - int arg3 ; - size_t val1 ; - int ecode1 = 0 ; - float val2 ; + pn_class_t *arg1 = (pn_class_t *) 0 ; + size_t arg2 ; + float arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; int ecode2 = 0 ; - int val3 ; + float val3 ; int ecode3 = 0 ; pn_hash_t *result = 0 ; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",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_hash", 1, argv[0] )); - } - arg1 = (size_t)(val1); - ecode2 = SWIG_AsVal_float(argv[1], &val2); + 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_hash", 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( "", "float","pn_hash", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_hash", 2, argv[1] )); } - arg2 = (float)(val2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_float(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","pn_hash", 3, argv[2] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "float","pn_hash", 3, argv[2] )); } - arg3 = (int)(val3); - result = (pn_hash_t *)pn_hash(arg1,arg2,arg3); + arg3 = (float)(val3); + result = (pn_hash_t *)pn_hash((struct pn_class_t const *)arg1,arg2,arg3); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_hash_t, 0 | 0 ); return vresult; fail: return Qnil; } @@ -4960,12 +4713,12 @@ pn_hash_t *arg1 = (pn_hash_t *) 0 ; uintptr_t arg2 ; void *arg3 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; int res3 ; int result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { @@ -4974,21 +4727,15 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_hash_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_put", 1, argv[0] )); } arg1 = (pn_hash_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_put", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uintptr_t","pn_hash_put", 2, argv[1])); - } else { - arg2 = *((uintptr_t *)(argp2)); - } - } + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_put", 2, argv[1] )); + } + arg2 = (uintptr_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_hash_put", 3, argv[2] )); } result = (int)pn_hash_put(arg1,arg2,arg3); @@ -5003,12 +4750,12 @@ _wrap_pn_hash_get(int argc, VALUE *argv, VALUE self) { pn_hash_t *arg1 = (pn_hash_t *) 0 ; uintptr_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long 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; @@ -5016,21 +4763,15 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_hash_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_get", 1, argv[0] )); } arg1 = (pn_hash_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_get", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uintptr_t","pn_hash_get", 2, argv[1])); - } else { - arg2 = *((uintptr_t *)(argp2)); - } - } + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_get", 2, argv[1] )); + } + arg2 = (uintptr_t)(val2); result = (void *)pn_hash_get(arg1,arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return vresult; fail: return Qnil; @@ -5041,32 +4782,26 @@ _wrap_pn_hash_del(int argc, VALUE *argv, VALUE self) { pn_hash_t *arg1 = (pn_hash_t *) 0 ; uintptr_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned 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_hash_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_del", 1, argv[0] )); } arg1 = (pn_hash_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_del", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uintptr_t","pn_hash_del", 2, argv[1])); - } else { - arg2 = *((uintptr_t *)(argp2)); - } - } + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_del", 2, argv[1] )); + } + arg2 = (uintptr_t)(val2); pn_hash_del(arg1,arg2); return Qnil; fail: return Qnil; } @@ -5086,12 +4821,12 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_hash_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_head", 1, argv[0] )); } arg1 = (pn_hash_t *)(argp1); - result = pn_hash_head(arg1); - vresult = SWIG_NewPointerObj((pn_handle_t *)memcpy((pn_handle_t *)malloc(sizeof(pn_handle_t)),&result,sizeof(pn_handle_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + result = (pn_handle_t)pn_hash_head(arg1); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); return vresult; fail: return Qnil; } @@ -5100,12 +4835,12 @@ _wrap_pn_hash_next(int argc, VALUE *argv, VALUE self) { pn_hash_t *arg1 = (pn_hash_t *) 0 ; pn_handle_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; pn_handle_t result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; @@ -5113,23 +4848,17 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_hash_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_next", 1, argv[0] )); } arg1 = (pn_hash_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_next", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_handle_t","pn_hash_next", 2, argv[1])); - } else { - arg2 = *((pn_handle_t *)(argp2)); - } - } - result = pn_hash_next(arg1,arg2); - vresult = SWIG_NewPointerObj((pn_handle_t *)memcpy((pn_handle_t *)malloc(sizeof(pn_handle_t)),&result,sizeof(pn_handle_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_next", 2, argv[1] )); + } + arg2 = (pn_handle_t)(val2); + result = (pn_handle_t)pn_hash_next(arg1,arg2); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); return vresult; fail: return Qnil; } @@ -5138,12 +4867,12 @@ _wrap_pn_hash_key(int argc, VALUE *argv, VALUE self) { pn_hash_t *arg1 = (pn_hash_t *) 0 ; pn_handle_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; uintptr_t result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; @@ -5151,23 +4880,17 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_hash_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_key", 1, argv[0] )); } arg1 = (pn_hash_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_key", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_handle_t","pn_hash_key", 2, argv[1])); - } else { - arg2 = *((pn_handle_t *)(argp2)); - } - } - result = pn_hash_key(arg1,arg2); - vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)malloc(sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_key", 2, argv[1] )); + } + arg2 = (pn_handle_t)(val2); + result = (uintptr_t)pn_hash_key(arg1,arg2); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); return vresult; fail: return Qnil; } @@ -5176,12 +4899,12 @@ _wrap_pn_hash_value(int argc, VALUE *argv, VALUE self) { pn_hash_t *arg1 = (pn_hash_t *) 0 ; pn_handle_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long 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; @@ -5189,21 +4912,15 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_hash_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_value", 1, argv[0] )); } arg1 = (pn_hash_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_value", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_handle_t","pn_hash_value", 2, argv[1])); - } else { - arg2 = *((pn_handle_t *)(argp2)); - } - } + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_value", 2, argv[1] )); + } + arg2 = (pn_handle_t)(val2); result = (void *)pn_hash_value(arg1,arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return vresult; fail: return Qnil; @@ -5804,11 +5521,11 @@ return 0; } static int check_sasl_outcome(int x) { - static int values[] = { PN_SASL_NONE,PN_SASL_OK,PN_SASL_AUTH,PN_SASL_SYS,PN_SASL_PERM,PN_SASL_TEMP }; + static int values[] = { PN_SASL_NONE,PN_SASL_OK,PN_SASL_AUTH,PN_SASL_SYS,PN_SASL_PERM,PN_SASL_TEMP,PN_SASL_SKIPPED }; static int size = sizeof(values); int i,j; for (i = 0, j = 0; i < size; i+=sizeof(int),j++) { if (x == values[j]) return 1; } @@ -7846,10 +7563,31 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_link_detach(int argc, VALUE *argv, VALUE self) { + pn_link_t *arg1 = (pn_link_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_link_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_link_t *","pn_link_detach", 1, argv[0] )); + } + arg1 = (pn_link_t *)(argp1); + pn_link_detach(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_link_source(int argc, VALUE *argv, VALUE self) { pn_link_t *arg1 = (pn_link_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; pn_terminus_t *result = 0 ; @@ -9046,182 +8784,11 @@ fail: return Qnil; } -static swig_class SwigClassPn_delivery_tag_t; - - -/* - Document-method: Cproton::pn_delivery_tag_t.size - - call-seq: - size -> size_t - -Size or Length of the pn_delivery_tag_t. -*/ - -/* - Document-method: Cproton::pn_delivery_tag_t.size= - - call-seq: - size=(x) -> size_t - -Size or Length of the pn_delivery_tag_t. -*/ SWIGINTERN VALUE -_wrap_pn_delivery_tag_t_size_set(int argc, VALUE *argv, VALUE self) { - struct pn_delivery_tag_t *arg1 = (struct pn_delivery_tag_t *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_delivery_tag_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct pn_delivery_tag_t *","size", 1, self )); - } - arg1 = (struct pn_delivery_tag_t *)(argp1); - ecode2 = SWIG_AsVal_size_t(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","size", 2, argv[0] )); - } - arg2 = (size_t)(val2); - if (arg1) (arg1)->size = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_delivery_tag_t_size_get(int argc, VALUE *argv, VALUE self) { - struct pn_delivery_tag_t *arg1 = (struct pn_delivery_tag_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_delivery_tag_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct pn_delivery_tag_t *","size", 1, self )); - } - arg1 = (struct pn_delivery_tag_t *)(argp1); - result = (size_t) ((arg1)->size); - vresult = SWIG_From_size_t((size_t)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_delivery_tag_t_bytes_set(int argc, VALUE *argv, VALUE self) { - struct pn_delivery_tag_t *arg1 = (struct pn_delivery_tag_t *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_delivery_tag_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct pn_delivery_tag_t *","bytes", 1, self )); - } - arg1 = (struct pn_delivery_tag_t *)(argp1); - res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","bytes", 2, argv[0] )); - } - arg2 = (char *)(buf2); - if (arg2) { - size_t size = strlen((const char *)((const char *)(arg2))) + 1; - arg1->bytes = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); - } else { - arg1->bytes = 0; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return Qnil; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_delivery_tag_t_bytes_get(int argc, VALUE *argv, VALUE self) { - struct pn_delivery_tag_t *arg1 = (struct pn_delivery_tag_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - char *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_delivery_tag_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct pn_delivery_tag_t *","bytes", 1, self )); - } - arg1 = (struct pn_delivery_tag_t *)(argp1); - result = (char *) ((arg1)->bytes); - vresult = SWIG_FromCharPtr((const char *)result); - return vresult; -fail: - return Qnil; -} - - -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC -SWIGINTERN VALUE -_wrap_pn_delivery_tag_t_allocate(VALUE self) { -#else - SWIGINTERN VALUE - _wrap_pn_delivery_tag_t_allocate(int argc, VALUE *argv, VALUE self) { -#endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_pn_delivery_tag_t); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; - } - - -SWIGINTERN VALUE -_wrap_new_pn_delivery_tag_t(int argc, VALUE *argv, VALUE self) { - struct pn_delivery_tag_t *result = 0 ; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - result = (struct pn_delivery_tag_t *)calloc(1, sizeof(struct pn_delivery_tag_t)); - DATA_PTR(self) = result; - return self; -fail: - return Qnil; -} - - -SWIGINTERN void -free_pn_delivery_tag_t(struct pn_delivery_tag_t *arg1) { - free((char *) arg1); -} - -SWIGINTERN VALUE _wrap_pn_delivery_get_context(int argc, VALUE *argv, VALUE self) { pn_delivery_t *arg1 = (pn_delivery_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *result = 0 ; @@ -10070,10 +9637,34 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_transport_condition(int argc, VALUE *argv, VALUE self) { + pn_transport_t *arg1 = (pn_transport_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_condition_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_transport_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_condition", 1, argv[0] )); + } + arg1 = (pn_transport_t *)(argp1); + result = (pn_condition_t *)pn_transport_condition(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_condition_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_transport_error(int argc, VALUE *argv, VALUE self) { pn_transport_t *arg1 = (pn_transport_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; pn_error_t *result = 0 ; @@ -10641,11 +10232,11 @@ int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; - int result; + ssize_t result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } @@ -10662,11 +10253,11 @@ ecode3 = SWIG_AsVal_size_t(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","pn_transport_push", 3, argv[2] )); } arg3 = (size_t)(val3); - result = (int)pn_transport_push(arg1,(char const *)arg2,arg3); + result = (ssize_t)pn_transport_push(arg1,(char const *)arg2,arg3); vresult = SWIG_From_int((int)(result)); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return vresult; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); @@ -10788,11 +10379,11 @@ int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; - int result; + ssize_t result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } @@ -10809,11 +10400,11 @@ ecode3 = SWIG_AsVal_size_t(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","pn_transport_peek", 3, argv[2] )); } arg3 = (size_t)(val3); - result = (int)pn_transport_peek(arg1,arg2,arg3); + result = (ssize_t)pn_transport_peek(arg1,arg2,arg3); vresult = SWIG_From_int((int)(result)); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return vresult; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); @@ -11001,10 +10592,34 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_transport_connection(int argc, VALUE *argv, VALUE self) { + pn_transport_t *arg1 = (pn_transport_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + pn_connection_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_transport_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_connection", 1, argv[0] )); + } + arg1 = (pn_transport_t *)(argp1); + result = (pn_connection_t *)pn_transport_connection(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_connection_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_event_type_name(int argc, VALUE *argv, VALUE self) { pn_event_type_t arg1 ; int val1 ; int ecode1 = 0 ; char *result = 0 ; @@ -11062,10 +10677,56 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_collector_put(int argc, VALUE *argv, VALUE self) { + pn_collector_t *arg1 = (pn_collector_t *) 0 ; + pn_class_t *arg2 = (pn_class_t *) 0 ; + void *arg3 = (void *) 0 ; + pn_event_type_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + int val4 ; + int ecode4 = 0 ; + pn_event_t *result = 0 ; + 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_collector_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_collector_t *","pn_collector_put", 1, argv[0] )); + } + arg1 = (pn_collector_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_class_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_class_t const *","pn_collector_put", 2, argv[1] )); + } + arg2 = (pn_class_t *)(argp2); + 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_collector_put", 3, argv[2] )); + } + ecode4 = SWIG_AsVal_int(argv[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "pn_event_type_t","pn_collector_put", 4, argv[3] )); + } + arg4 = (pn_event_type_t)(val4); + result = (pn_event_t *)pn_collector_put(arg1,(struct pn_class_t const *)arg2,arg3,arg4); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_event_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_collector_peek(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 ; @@ -11134,34 +10795,58 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_event_category(int argc, VALUE *argv, VALUE self) { +_wrap_pn_event_class(int argc, VALUE *argv, VALUE self) { pn_event_t *arg1 = (pn_event_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - pn_event_category_t result; + pn_class_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_category", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_event_t *","pn_event_class", 1, argv[0] )); } arg1 = (pn_event_t *)(argp1); - result = (pn_event_category_t)pn_event_category(arg1); - vresult = SWIG_From_int((int)(result)); + result = (pn_class_t *)pn_event_class(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_class_t, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE +_wrap_pn_event_context(int argc, VALUE *argv, VALUE self) { + pn_event_t *arg1 = (pn_event_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *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_context", 1, argv[0] )); + } + arg1 = (pn_event_t *)(argp1); + result = (void *)pn_event_context(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 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 ; @@ -13161,10 +12846,41 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_sasl_allow_skip(int argc, VALUE *argv, VALUE self) { + pn_sasl_t *arg1 = (pn_sasl_t *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool 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_sasl_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_sasl_t *","pn_sasl_allow_skip", 1, argv[0] )); + } + arg1 = (pn_sasl_t *)(argp1); + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","pn_sasl_allow_skip", 2, argv[1] )); + } + arg2 = (bool)(val2); + SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)"); + + pn_sasl_allow_skip(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_sasl_plain(int argc, VALUE *argv, VALUE self) { pn_sasl_t *arg1 = (pn_sasl_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; @@ -13427,23 +13143,23 @@ SWIGINTERN VALUE _wrap_pn_driver_error(int argc, VALUE *argv, VALUE self) { pn_driver_t *arg1 = (pn_driver_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - char *result = 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_driver_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_driver_t *","pn_driver_error", 1, argv[0] )); } arg1 = (pn_driver_t *)(argp1); - result = (char *)pn_driver_error(arg1); - vresult = SWIG_FromCharPtr((const char *)result); + result = (pn_error_t *)pn_driver_error(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_error_t, 0 | 0 ); return vresult; fail: return Qnil; } @@ -15267,10 +14983,96 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_messenger_subscribe_ttl(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + char *arg2 = (char *) 0 ; + pn_seconds_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + unsigned long val3 ; + int ecode3 = 0 ; + pn_subscription_t *result = 0 ; + 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_subscribe_ttl", 1, argv[0] )); + } + arg1 = (pn_messenger_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_messenger_subscribe_ttl", 2, argv[1] )); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_unsigned_SS_long(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "pn_seconds_t","pn_messenger_subscribe_ttl", 3, argv[2] )); + } + arg3 = (pn_seconds_t)(val3); + result = (pn_subscription_t *)pn_messenger_subscribe_ttl(arg1,(char const *)arg2,arg3); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_subscription_t, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_messenger_get_link(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + char *arg2 = (char *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + pn_link_t *result = 0 ; + 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_get_link", 1, argv[0] )); + } + arg1 = (pn_messenger_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_messenger_get_link", 2, argv[1] )); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_bool(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","pn_messenger_get_link", 3, argv[2] )); + } + arg3 = (bool)(val3); + result = (pn_link_t *)pn_messenger_get_link(arg1,(char const *)arg2,arg3); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_link_t, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_subscription_get_context(int argc, VALUE *argv, VALUE self) { pn_subscription_t *arg1 = (pn_subscription_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *result = 0 ; @@ -15408,10 +15210,42 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_messenger_delivery(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + pn_tracker_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long long val2 ; + int ecode2 = 0 ; + pn_delivery_t *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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_delivery", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_tracker_t","pn_messenger_delivery", 2, argv[1] )); + } + arg2 = (pn_tracker_t)(val2); + result = (pn_delivery_t *)pn_messenger_delivery(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_delivery_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_messenger_buffered(int argc, VALUE *argv, VALUE self) { pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; pn_tracker_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -15812,10 +15646,42 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_messenger_tracker_link(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + pn_tracker_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long long val2 ; + int ecode2 = 0 ; + pn_link_t *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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_tracker_link", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_tracker_t","pn_messenger_tracker_link", 2, argv[1] )); + } + arg2 = (pn_tracker_t)(val2); + result = (pn_link_t *)pn_messenger_tracker_link(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_link_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_pn_messenger_outgoing(int argc, VALUE *argv, VALUE self) { pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; @@ -16008,10 +15874,225 @@ return Qnil; } SWIGINTERN VALUE +_wrap_pn_messenger_set_flags(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_set_flags", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pn_messenger_set_flags", 2, argv[1] )); + } + arg2 = (int)(val2); + result = (int)pn_messenger_set_flags(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_messenger_get_flags(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + 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], &argp1,SWIGTYPE_p_pn_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_get_flags", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + result = (int)pn_messenger_get_flags(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_messenger_set_snd_settle_mode(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + pn_snd_settle_mode_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_set_snd_settle_mode", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_snd_settle_mode_t","pn_messenger_set_snd_settle_mode", 2, argv[1] )); + } + arg2 = (pn_snd_settle_mode_t)(val2); + result = (int)pn_messenger_set_snd_settle_mode(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_messenger_set_rcv_settle_mode(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + pn_rcv_settle_mode_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_set_rcv_settle_mode", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_rcv_settle_mode_t","pn_messenger_set_rcv_settle_mode", 2, argv[1] )); + } + arg2 = (pn_rcv_settle_mode_t)(val2); + result = (int)pn_messenger_set_rcv_settle_mode(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_messenger_set_tracer(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + pn_tracer_t arg2 = (pn_tracer_t) 0 ; + void *argp1 = 0 ; + int res1 = 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_set_tracer", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_struct_pn_transport_t_p_q_const__char__void); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "pn_tracer_t","pn_messenger_set_tracer", 2, argv[1] )); + } + } + pn_messenger_set_tracer(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_messenger_get_remote_idle_timeout(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + pn_millis_t 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_get_remote_idle_timeout", 1, argv[0] )); + } + arg1 = (pn_messenger_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_messenger_get_remote_idle_timeout", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (pn_millis_t)pn_messenger_get_remote_idle_timeout(arg1,(char const *)arg2); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_messenger_set_ssl_peer_authentication_mode(int argc, VALUE *argv, VALUE self) { + pn_messenger_t *arg1 = (pn_messenger_t *) 0 ; + pn_ssl_verify_mode_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 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_messenger_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_messenger_t *","pn_messenger_set_ssl_peer_authentication_mode", 1, argv[0] )); + } + arg1 = (pn_messenger_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_ssl_verify_mode_t","pn_messenger_set_ssl_peer_authentication_mode", 2, argv[1] )); + } + arg2 = (pn_ssl_verify_mode_t)(val2); + result = (int)pn_messenger_set_ssl_peer_authentication_mode(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + 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)) { @@ -16481,10 +16562,34 @@ 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)) { @@ -17195,1116 +17300,11 @@ fail: return Qnil; } -static swig_class SwigClassPn_atom_t; - SWIGINTERN VALUE -_wrap_pn_atom_t_type_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t *arg1 = (pn_atom_t *) 0 ; - pn_type_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t *","type", 1, self )); - } - arg1 = (pn_atom_t *)(argp1); - ecode2 = SWIG_AsVal_int(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_type_t","type", 2, argv[0] )); - } - arg2 = (pn_type_t)(val2); - if (arg1) (arg1)->type = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_type_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t *arg1 = (pn_atom_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_type_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t *","type", 1, self )); - } - arg1 = (pn_atom_t *)(argp1); - result = (pn_type_t) ((arg1)->type); - vresult = SWIG_From_int((int)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t *arg1 = (pn_atom_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_atom_t_u *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t *","u", 1, self )); - } - arg1 = (pn_atom_t *)(argp1); - result = (pn_atom_t_u *)& ((arg1)->u); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC -SWIGINTERN VALUE -_wrap_pn_atom_t_allocate(VALUE self) { -#else - SWIGINTERN VALUE - _wrap_pn_atom_t_allocate(int argc, VALUE *argv, VALUE self) { -#endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_pn_atom_t); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; - } - - -SWIGINTERN VALUE -_wrap_new_pn_atom_t(int argc, VALUE *argv, VALUE self) { - pn_atom_t *result = 0 ; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - result = (pn_atom_t *)calloc(1, sizeof(pn_atom_t)); - DATA_PTR(self) = result; - return self; -fail: - return Qnil; -} - - -SWIGINTERN void -free_pn_atom_t(pn_atom_t *arg1) { - free((char *) arg1); -} - -static swig_class SwigClassPn_atom_t_u; - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_bool_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_bool", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_bool(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","as_bool", 2, argv[0] )); - } - arg2 = (bool)(val2); - if (arg1) (arg1)->as_bool = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_bool_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_bool", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (bool) ((arg1)->as_bool); - vresult = SWIG_From_bool((bool)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_ubyte_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - uint8_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ubyte", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","as_ubyte", 2, argv[0] )); - } - arg2 = (uint8_t)(val2); - if (arg1) (arg1)->as_ubyte = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_ubyte_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - uint8_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ubyte", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (uint8_t) ((arg1)->as_ubyte); - vresult = SWIG_From_unsigned_SS_char((unsigned char)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_byte_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - int8_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - signed char val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_byte", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_signed_SS_char(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int8_t","as_byte", 2, argv[0] )); - } - arg2 = (int8_t)(val2); - if (arg1) (arg1)->as_byte = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_byte_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int8_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_byte", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (int8_t) ((arg1)->as_byte); - vresult = SWIG_From_signed_SS_char((signed char)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_ushort_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - uint16_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned short val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ushort", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_short(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint16_t","as_ushort", 2, argv[0] )); - } - arg2 = (uint16_t)(val2); - if (arg1) (arg1)->as_ushort = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_ushort_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - uint16_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ushort", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (uint16_t) ((arg1)->as_ushort); - vresult = SWIG_From_unsigned_SS_short((unsigned short)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_short_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - int16_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - short val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_short", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_short(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int16_t","as_short", 2, argv[0] )); - } - arg2 = (int16_t)(val2); - if (arg1) (arg1)->as_short = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_short_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int16_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_short", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (int16_t) ((arg1)->as_short); - vresult = SWIG_From_short((short)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_uint_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - uint32_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned long val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_uint", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","as_uint", 2, argv[0] )); - } - arg2 = (uint32_t)(val2); - if (arg1) (arg1)->as_uint = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_uint_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - uint32_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_uint", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (uint32_t) ((arg1)->as_uint); - vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_int_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - int32_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_int", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_long(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int32_t","as_int", 2, argv[0] )); - } - arg2 = (int32_t)(val2); - if (arg1) (arg1)->as_int = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_int_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int32_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_int", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (int32_t) ((arg1)->as_int); - vresult = SWIG_From_long((long)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_char_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - pn_char_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned long val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_char", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_char_t","as_char", 2, argv[0] )); - } - arg2 = (pn_char_t)(val2); - if (arg1) (arg1)->as_char = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_char_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_char_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_char", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (pn_char_t) ((arg1)->as_char); - vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_ulong_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - uint64_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned long long val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ulong", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","as_ulong", 2, argv[0] )); - } - arg2 = (uint64_t)(val2); - if (arg1) (arg1)->as_ulong = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_ulong_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - uint64_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ulong", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (uint64_t) ((arg1)->as_ulong); - vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_long_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - int64_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_long", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int64_t","as_long", 2, argv[0] )); - } - arg2 = (int64_t)(val2); - if (arg1) (arg1)->as_long = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_long_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int64_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_long", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (int64_t) ((arg1)->as_long); - vresult = SWIG_From_long_SS_long((long long)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_timestamp_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - pn_timestamp_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_timestamp", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_timestamp_t","as_timestamp", 2, argv[0] )); - } - arg2 = (pn_timestamp_t)(val2); - if (arg1) (arg1)->as_timestamp = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_timestamp_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_timestamp_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_timestamp", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (pn_timestamp_t) ((arg1)->as_timestamp); - vresult = SWIG_From_long_SS_long((long long)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_float_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - float arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - float val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_float", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_float(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "float","as_float", 2, argv[0] )); - } - arg2 = (float)(val2); - if (arg1) (arg1)->as_float = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_float_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - float result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_float", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (float) ((arg1)->as_float); - vresult = SWIG_From_float((float)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_double_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_double", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - ecode2 = SWIG_AsVal_double(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","as_double", 2, argv[0] )); - } - arg2 = (double)(val2); - if (arg1) (arg1)->as_double = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_double_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_double", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (double) ((arg1)->as_double); - vresult = SWIG_From_double((double)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_decimal32_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - pn_decimal32_t arg2 ; - 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(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal32", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - { - arg2 = FIX2UINT(argv[0]); - } - if (arg1) (arg1)->as_decimal32 = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_decimal32_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_decimal32_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal32", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (pn_decimal32_t) ((arg1)->as_decimal32); - { - vresult = ULL2NUM(result); - } - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_decimal64_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - pn_decimal64_t arg2 ; - 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(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal64", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - { - arg2 = NUM2ULONG(argv[0]); - } - if (arg1) (arg1)->as_decimal64 = arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_decimal64_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_decimal64_t result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal64", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (pn_decimal64_t) ((arg1)->as_decimal64); - { - vresult = ULL2NUM(result); - } - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_decimal128_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - pn_decimal128_t *arg2 = (pn_decimal128_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal128", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_pn_decimal128_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_decimal128_t *","as_decimal128", 2, argv[0] )); - } - arg2 = (pn_decimal128_t *)(argp2); - if (arg1) (arg1)->as_decimal128 = *arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_decimal128_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_decimal128_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal128", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (pn_decimal128_t *)& ((arg1)->as_decimal128); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_decimal128_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_uuid_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - pn_uuid_t *arg2 = (pn_uuid_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_uuid", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_pn_uuid_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_uuid_t *","as_uuid", 2, argv[0] )); - } - arg2 = (pn_uuid_t *)(argp2); - if (arg1) (arg1)->as_uuid = *arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_uuid_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_uuid_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_uuid", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (pn_uuid_t *)& ((arg1)->as_uuid); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_uuid_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_bytes_set(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - pn_bytes_t *arg2 = (pn_bytes_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_bytes", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_pn_bytes_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_bytes_t *","as_bytes", 2, argv[0] )); - } - arg2 = (pn_bytes_t *)(argp2); - if (arg1) (arg1)->as_bytes = *arg2; - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_pn_atom_t_u_as_bytes_get(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_bytes_t *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_bytes", 1, self )); - } - arg1 = (pn_atom_t_u *)(argp1); - result = (pn_bytes_t *)& ((arg1)->as_bytes); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_bytes_t, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC -SWIGINTERN VALUE -_wrap_pn_atom_t_u_allocate(VALUE self) { -#else - SWIGINTERN VALUE - _wrap_pn_atom_t_u_allocate(int argc, VALUE *argv, VALUE self) { -#endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_pn_atom_t_u); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; - } - - -SWIGINTERN VALUE -_wrap_new_pn_atom_t_u(int argc, VALUE *argv, VALUE self) { - pn_atom_t_u *result = 0 ; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - result = (pn_atom_t_u *)calloc(1, sizeof(pn_atom_t_u)); - DATA_PTR(self) = result; - return self; -fail: - return Qnil; -} - - -SWIGINTERN void -free_pn_atom_t_u(pn_atom_t_u *arg1) { - free((char *) arg1); -} - -SWIGINTERN VALUE _wrap_pn_data(int argc, VALUE *argv, VALUE self) { size_t arg1 ; size_t val1 ; int ecode1 = 0 ; pn_data_t *result = 0 ; @@ -19627,85 +18627,10 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_data_put_atom(int argc, VALUE *argv, VALUE self) { - pn_data_t *arg1 = (pn_data_t *) 0 ; - pn_atom_t arg2 ; - void *argp1 = 0 ; - int res1 = 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_data_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_atom", 1, argv[0] )); - } - arg1 = (pn_data_t *)(argp1); - { - if (argv[1] == Qnil) - { - (&arg2)->type = PN_NULL; - } - else - { - switch(TYPE(argv[1])) - { - case T_TRUE: - (&arg2)->type = PN_BOOL; - (&arg2)->u.as_bool = true; - break; - - case T_FALSE: - (&arg2)->type = PN_BOOL; - (&arg2)->u.as_bool = false; - break; - - case T_FLOAT: - (&arg2)->type = PN_FLOAT; - (&arg2)->u.as_float = NUM2DBL(argv[1]); - break; - - case T_STRING: - (&arg2)->type = PN_STRING; - (&arg2)->u.as_bytes.start = RSTRING_PTR(argv[1]); - if ((&arg2)->u.as_bytes.start) - { - (&arg2)->u.as_bytes.size = RSTRING_LEN(argv[1]); - } - else - { - (&arg2)->u.as_bytes.size = 0; - } - break; - - case T_FIXNUM: - (&arg2)->type = PN_INT; - (&arg2)->u.as_int = FIX2LONG(argv[1]); - break; - - case T_BIGNUM: - (&arg2)->type = PN_LONG; - (&arg2)->u.as_long = NUM2LL(argv[1]); - break; - - } - } - } - result = (int)pn_data_put_atom(arg1,arg2); - vresult = SWIG_From_int((int)(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE _wrap_pn_data_get_list(int argc, VALUE *argv, VALUE self) { pn_data_t *arg1 = (pn_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t result; @@ -20402,89 +19327,10 @@ return Qnil; } SWIGINTERN VALUE -_wrap_pn_data_get_atom(int argc, VALUE *argv, VALUE self) { - pn_data_t *arg1 = (pn_data_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - pn_atom_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_data_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_atom", 1, argv[0] )); - } - arg1 = (pn_data_t *)(argp1); - result = pn_data_get_atom(arg1); - { - switch((&result)->type) - { - case PN_NULL: - vresult = Qnil; - break; - - case PN_BOOL: - vresult = (&result)->u.as_bool ? Qtrue : Qfalse; - break; - - case PN_BYTE: - vresult = INT2NUM((&result)->u.as_byte); - break; - - case PN_UBYTE: - vresult = UINT2NUM((&result)->u.as_ubyte); - break; - - case PN_SHORT: - vresult = INT2NUM((&result)->u.as_short); - break; - - case PN_USHORT: - vresult = UINT2NUM((&result)->u.as_ushort); - break; - - case PN_INT: - vresult = INT2NUM((&result)->u.as_int); - break; - - case PN_UINT: - vresult = UINT2NUM((&result)->u.as_uint); - break; - - case PN_LONG: - vresult = LL2NUM((&result)->u.as_long); - break; - - case PN_ULONG: - vresult = ULL2NUM((&result)->u.as_ulong); - break; - - case PN_FLOAT: - vresult = rb_float_new((&result)->u.as_float); - break; - - case PN_DOUBLE: - vresult = rb_float_new((&result)->u.as_double); - break; - - case PN_STRING: - vresult = rb_str_new((&result)->u.as_bytes.start, (&result)->u.as_bytes.size); - break; - } - } - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE _wrap_pn_data_copy(int argc, VALUE *argv, VALUE self) { pn_data_t *arg1 = (pn_data_t *) 0 ; pn_data_t *arg2 = (pn_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -20642,12 +19488,12 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_point", 1, argv[0] )); } arg1 = (pn_data_t *)(argp1); - result = pn_data_point(arg1); - vresult = SWIG_NewPointerObj((pn_handle_t *)memcpy((pn_handle_t *)malloc(sizeof(pn_handle_t)),&result,sizeof(pn_handle_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + result = (pn_handle_t)pn_data_point(arg1); + vresult = SWIG_From_unsigned_SS_long((unsigned long)(result)); return vresult; fail: return Qnil; } @@ -20656,12 +19502,12 @@ _wrap_pn_data_restore(int argc, VALUE *argv, VALUE self) { pn_data_t *arg1 = (pn_data_t *) 0 ; pn_handle_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; @@ -20669,21 +19515,15 @@ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_restore", 1, argv[0] )); } arg1 = (pn_data_t *)(argp1); - { - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uintptr_t, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_handle_t","pn_data_restore", 2, argv[1] )); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_handle_t","pn_data_restore", 2, argv[1])); - } else { - arg2 = *((pn_handle_t *)(argp2)); - } - } + ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_data_restore", 2, argv[1] )); + } + arg2 = (pn_handle_t)(val2); result = (bool)pn_data_restore(arg1,arg2); vresult = SWIG_From_bool((bool)(result)); return vresult; fail: return Qnil; @@ -20709,44 +19549,593 @@ fail: return Qnil; } +SWIGINTERN VALUE +_wrap_pn_cast_pn_connection(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + pn_connection_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],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_cast_pn_connection", 1, argv[0] )); + } + result = (pn_connection_t *)pn_cast_pn_connection(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_connection_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + +SWIGINTERN VALUE +_wrap_pn_cast_pn_session(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + pn_session_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],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_cast_pn_session", 1, argv[0] )); + } + result = (pn_session_t *)pn_cast_pn_session(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_session_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_cast_pn_link(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + pn_link_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],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_cast_pn_link", 1, argv[0] )); + } + result = (pn_link_t *)pn_cast_pn_link(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_link_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_cast_pn_delivery(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + pn_delivery_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],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_cast_pn_delivery", 1, argv[0] )); + } + result = (pn_delivery_t *)pn_cast_pn_delivery(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_delivery_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_cast_pn_transport(int argc, VALUE *argv, VALUE self) { + void *arg1 = (void *) 0 ; + int res1 ; + pn_transport_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],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_cast_pn_transport", 1, argv[0] )); + } + result = (pn_transport_t *)pn_cast_pn_transport(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_transport_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url(int argc, VALUE *argv, VALUE self) { + pn_url_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_url_t *)pn_url(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_url_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_parse(int argc, VALUE *argv, VALUE self) { + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + pn_url_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_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","pn_url_parse", 1, argv[0] )); + } + arg1 = (char *)(buf1); + result = (pn_url_t *)pn_url_parse((char const *)arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_url_t, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return vresult; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_free(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_free", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + pn_url_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_clear(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_clear", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + pn_url_clear(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_str(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_str", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + result = (char *)pn_url_str(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_get_scheme(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_get_scheme", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + result = (char *)pn_url_get_scheme(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_get_username(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_get_username", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + result = (char *)pn_url_get_username(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_get_password(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_get_password", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + result = (char *)pn_url_get_password(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_get_host(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_get_host", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + result = (char *)pn_url_get_host(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_get_port(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_get_port", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + result = (char *)pn_url_get_port(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_get_path(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_get_path", 1, argv[0] )); + } + arg1 = (pn_url_t *)(argp1); + result = (char *)pn_url_get_path(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_set_scheme(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_set_scheme", 1, argv[0] )); + } + arg1 = (pn_url_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_url_set_scheme", 2, argv[1] )); + } + arg2 = (char *)(buf2); + pn_url_set_scheme(arg1,(char const *)arg2); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_set_username(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_set_username", 1, argv[0] )); + } + arg1 = (pn_url_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_url_set_username", 2, argv[1] )); + } + arg2 = (char *)(buf2); + pn_url_set_username(arg1,(char const *)arg2); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_set_password(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_set_password", 1, argv[0] )); + } + arg1 = (pn_url_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_url_set_password", 2, argv[1] )); + } + arg2 = (char *)(buf2); + pn_url_set_password(arg1,(char const *)arg2); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_set_host(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_set_host", 1, argv[0] )); + } + arg1 = (pn_url_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_url_set_host", 2, argv[1] )); + } + arg2 = (char *)(buf2); + pn_url_set_host(arg1,(char const *)arg2); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_set_port(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_set_port", 1, argv[0] )); + } + arg1 = (pn_url_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_url_set_port", 2, argv[1] )); + } + arg2 = (char *)(buf2); + pn_url_set_port(arg1,(char const *)arg2); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_pn_url_set_path(int argc, VALUE *argv, VALUE self) { + pn_url_t *arg1 = (pn_url_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 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_url_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_url_t *","pn_url_set_path", 1, argv[0] )); + } + arg1 = (pn_url_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_url_set_path", 2, argv[1] )); + } + arg2 = (char *)(buf2); + pn_url_set_path(arg1,(char const *)arg2); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + + /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_pn_transport_t_p_q_const__char__void = {"_p_f_p_struct_pn_transport_t_p_q_const__char__void", "void (*)(struct pn_transport_t *,char const *)|pn_tracer_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void__p_void = {"_p_f_p_void__p_void", "void *(*)(void *)|pn_iterator_next_t", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_void__uintptr_t = {"_p_f_p_void__uintptr_t", "uintptr_t (*)(void *)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_void_p_struct_pn_string_t__int = {"_p_f_p_void_p_struct_pn_string_t__int", "int (*)(void *,struct pn_string_t *)|int (*)(void *,pn_string_t *)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_void_p_void__intptr_t = {"_p_f_p_void_p_void__intptr_t", "intptr_t (*)(void *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|ssize_t *|pn_state_t *|pn_trace_t *|pn_socket_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_intptr_t = {"_p_intptr_t", "intptr_t *|pn_shandle_t *", 0, 0, (void*)0, 0}; 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_activate_criteria_t = {"_p_pn_activate_criteria_t", "enum pn_activate_criteria_t *|pn_activate_criteria_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_atom_t_u = {"_p_pn_atom_t_u", "pn_atom_t_u *", 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_class_t = {"_p_pn_class_t", "pn_class_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}; static swig_type_info _swigt__p_pn_connector_t = {"_p_pn_connector_t", "struct pn_connector_t *|pn_connector_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_data_t = {"_p_pn_data_t", "struct pn_data_t *|pn_data_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_decimal128_t = {"_p_pn_decimal128_t", "pn_decimal128_t *", 0, 0, (void*)0, 0}; 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_delivery_tag_t = {"_p_pn_delivery_tag_t", "struct pn_delivery_tag_t *|pn_delivery_tag_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_driver_t = {"_p_pn_driver_t", "struct pn_driver_t *|pn_driver_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_category_t = {"_p_pn_event_category_t", "enum pn_event_category_t *|pn_event_category_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_format_t = {"_p_pn_format_t", "enum pn_format_t *|pn_format_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}; @@ -20761,10 +20150,11 @@ 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_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_state_t = {"_p_pn_sasl_state_t", "enum pn_sasl_state_t *|pn_sasl_state_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_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_mode_t = {"_p_pn_ssl_mode_t", "enum pn_ssl_mode_t *|pn_ssl_mode_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_ssl_resume_status_t = {"_p_pn_ssl_resume_status_t", "enum pn_ssl_resume_status_t *|pn_ssl_resume_status_t *", 0, 0, (void*)0, 0}; @@ -20775,53 +20165,47 @@ static swig_type_info _swigt__p_pn_subscription_t = {"_p_pn_subscription_t", "struct pn_subscription_t *|pn_subscription_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_terminus_t = {"_p_pn_terminus_t", "struct pn_terminus_t *|pn_terminus_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_terminus_type_t = {"_p_pn_terminus_type_t", "enum pn_terminus_type_t *|pn_terminus_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_transport_t = {"_p_pn_transport_t", "struct pn_transport_t *|pn_transport_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_type_t = {"_p_pn_type_t", "enum pn_type_t *|pn_type_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_pn_url_t = {"_p_pn_url_t", "struct pn_url_t *|pn_url_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pn_uuid_t = {"_p_pn_uuid_t", "pn_uuid_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int8_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_uintptr_t = {"_p_uintptr_t", "uintptr_t *|pn_handle_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "size_t *|unsigned int *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "pn_seconds_t *|pn_decimal32_t *|uint32_t *|unsigned long *|pn_millis_t *|pn_char_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "pn_seconds_t *|uintptr_t *|pn_decimal32_t *|uint32_t *|pn_handle_t *|unsigned long *|pn_millis_t *|pn_char_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "pn_decimal64_t *|uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_char, &_swigt__p_f_p_struct_pn_transport_t_p_q_const__char__void, &_swigt__p_f_p_void__p_void, - &_swigt__p_f_p_void__uintptr_t, - &_swigt__p_f_p_void__void, - &_swigt__p_f_p_void_p_struct_pn_string_t__int, - &_swigt__p_f_p_void_p_void__intptr_t, &_swigt__p_int, &_swigt__p_intptr_t, &_swigt__p_long, &_swigt__p_long_long, &_swigt__p_p_char, &_swigt__p_pn_activate_criteria_t, &_swigt__p_pn_atom_t, - &_swigt__p_pn_atom_t_u, &_swigt__p_pn_bytes_t, + &_swigt__p_pn_cid_t, &_swigt__p_pn_class_t, &_swigt__p_pn_collector_t, &_swigt__p_pn_condition_t, &_swigt__p_pn_connection_t, &_swigt__p_pn_connector_t, &_swigt__p_pn_data_t, &_swigt__p_pn_decimal128_t, &_swigt__p_pn_delivery_t, - &_swigt__p_pn_delivery_tag_t, &_swigt__p_pn_disposition_t, &_swigt__p_pn_distribution_mode_t, &_swigt__p_pn_driver_t, &_swigt__p_pn_durability_t, &_swigt__p_pn_error_t, - &_swigt__p_pn_event_category_t, &_swigt__p_pn_event_t, &_swigt__p_pn_event_type_t, &_swigt__p_pn_expiry_policy_t, &_swigt__p_pn_format_t, &_swigt__p_pn_hash_t, @@ -20836,10 +20220,11 @@ &_swigt__p_pn_rcv_settle_mode_t, &_swigt__p_pn_sasl_outcome_t, &_swigt__p_pn_sasl_state_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_domain_t, &_swigt__p_pn_ssl_mode_t, &_swigt__p_pn_ssl_resume_status_t, @@ -20850,14 +20235,14 @@ &_swigt__p_pn_subscription_t, &_swigt__p_pn_terminus_t, &_swigt__p_pn_terminus_type_t, &_swigt__p_pn_transport_t, &_swigt__p_pn_type_t, + &_swigt__p_pn_url_t, &_swigt__p_pn_uuid_t, &_swigt__p_short, &_swigt__p_signed_char, - &_swigt__p_uintptr_t, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, @@ -20865,38 +20250,32 @@ }; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_pn_transport_t_p_q_const__char__void[] = { {&_swigt__p_f_p_struct_pn_transport_t_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void__p_void[] = { {&_swigt__p_f_p_void__p_void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_void__uintptr_t[] = { {&_swigt__p_f_p_void__uintptr_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_void_p_struct_pn_string_t__int[] = { {&_swigt__p_f_p_void_p_struct_pn_string_t__int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_void_p_void__intptr_t[] = { {&_swigt__p_f_p_void_p_void__intptr_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_intptr_t[] = { {&_swigt__p_intptr_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_activate_criteria_t[] = { {&_swigt__p_pn_activate_criteria_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_atom_t[] = { {&_swigt__p_pn_atom_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_pn_atom_t_u[] = { {&_swigt__p_pn_atom_t_u, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_bytes_t[] = { {&_swigt__p_pn_bytes_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_pn_cid_t[] = { {&_swigt__p_pn_cid_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_class_t[] = { {&_swigt__p_pn_class_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_collector_t[] = { {&_swigt__p_pn_collector_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_condition_t[] = { {&_swigt__p_pn_condition_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_connection_t[] = { {&_swigt__p_pn_connection_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_connector_t[] = { {&_swigt__p_pn_connector_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_data_t[] = { {&_swigt__p_pn_data_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_decimal128_t[] = { {&_swigt__p_pn_decimal128_t, 0, 0, 0},{0, 0, 0, 0}}; 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_delivery_tag_t[] = { {&_swigt__p_pn_delivery_tag_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_driver_t[] = { {&_swigt__p_pn_driver_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_category_t[] = { {&_swigt__p_pn_event_category_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_format_t[] = { {&_swigt__p_pn_format_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}}; @@ -20911,10 +20290,11 @@ 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_sasl_outcome_t[] = { {&_swigt__p_pn_sasl_outcome_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_sasl_state_t[] = { {&_swigt__p_pn_sasl_state_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_domain_t[] = { {&_swigt__p_pn_ssl_domain_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_ssl_mode_t[] = { {&_swigt__p_pn_ssl_mode_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_ssl_resume_status_t[] = { {&_swigt__p_pn_ssl_resume_status_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -20925,14 +20305,14 @@ static swig_cast_info _swigc__p_pn_subscription_t[] = { {&_swigt__p_pn_subscription_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_terminus_t[] = { {&_swigt__p_pn_terminus_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_terminus_type_t[] = { {&_swigt__p_pn_terminus_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_transport_t[] = { {&_swigt__p_pn_transport_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_type_t[] = { {&_swigt__p_pn_type_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_pn_url_t[] = { {&_swigt__p_pn_url_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pn_uuid_t[] = { {&_swigt__p_pn_uuid_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_uintptr_t[] = { {&_swigt__p_uintptr_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; @@ -20940,38 +20320,32 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_char, _swigc__p_f_p_struct_pn_transport_t_p_q_const__char__void, _swigc__p_f_p_void__p_void, - _swigc__p_f_p_void__uintptr_t, - _swigc__p_f_p_void__void, - _swigc__p_f_p_void_p_struct_pn_string_t__int, - _swigc__p_f_p_void_p_void__intptr_t, _swigc__p_int, _swigc__p_intptr_t, _swigc__p_long, _swigc__p_long_long, _swigc__p_p_char, _swigc__p_pn_activate_criteria_t, _swigc__p_pn_atom_t, - _swigc__p_pn_atom_t_u, _swigc__p_pn_bytes_t, + _swigc__p_pn_cid_t, _swigc__p_pn_class_t, _swigc__p_pn_collector_t, _swigc__p_pn_condition_t, _swigc__p_pn_connection_t, _swigc__p_pn_connector_t, _swigc__p_pn_data_t, _swigc__p_pn_decimal128_t, _swigc__p_pn_delivery_t, - _swigc__p_pn_delivery_tag_t, _swigc__p_pn_disposition_t, _swigc__p_pn_distribution_mode_t, _swigc__p_pn_driver_t, _swigc__p_pn_durability_t, _swigc__p_pn_error_t, - _swigc__p_pn_event_category_t, _swigc__p_pn_event_t, _swigc__p_pn_event_type_t, _swigc__p_pn_expiry_policy_t, _swigc__p_pn_format_t, _swigc__p_pn_hash_t, @@ -20986,10 +20360,11 @@ _swigc__p_pn_rcv_settle_mode_t, _swigc__p_pn_sasl_outcome_t, _swigc__p_pn_sasl_state_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_domain_t, _swigc__p_pn_ssl_mode_t, _swigc__p_pn_ssl_resume_status_t, @@ -21000,14 +20375,14 @@ _swigc__p_pn_subscription_t, _swigc__p_pn_terminus_t, _swigc__p_pn_terminus_type_t, _swigc__p_pn_transport_t, _swigc__p_pn_type_t, + _swigc__p_pn_url_t, _swigc__p_pn_uuid_t, _swigc__p_short, _swigc__p_signed_char, - _swigc__p_uintptr_t, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, @@ -21028,11 +20403,11 @@ * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned statically to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same @@ -21289,70 +20664,42 @@ rb_define_module_function(mCproton, "pn_delivery_tag", _wrap_pn_delivery_tag, -1); rb_define_module_function(mCproton, "pn_message_data", _wrap_pn_message_data, -1); rb_define_module_function(mCproton, "pn_ssl_get_cipher_name", _wrap_pn_ssl_get_cipher_name, -1); rb_define_module_function(mCproton, "pn_ssl_get_protocol_name", _wrap_pn_ssl_get_protocol_name, -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)(8))); rb_define_const(mCproton, "PROTON_TYPES_H", SWIG_From_int((int)(1))); - - SwigClassPn_decimal128_t.klass = rb_define_class_under(mCproton, "Pn_decimal128_t", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_pn_decimal128_t, (void *) &SwigClassPn_decimal128_t); - rb_define_alloc_func(SwigClassPn_decimal128_t.klass, _wrap_pn_decimal128_t_allocate); - rb_define_method(SwigClassPn_decimal128_t.klass, "initialize", _wrap_new_pn_decimal128_t, -1); - rb_define_method(SwigClassPn_decimal128_t.klass, "bytes=", _wrap_pn_decimal128_t_bytes_set, -1); - rb_define_method(SwigClassPn_decimal128_t.klass, "bytes", _wrap_pn_decimal128_t_bytes_get, -1); - SwigClassPn_decimal128_t.mark = 0; - SwigClassPn_decimal128_t.destroy = (void (*)(void *)) free_pn_decimal128_t; - SwigClassPn_decimal128_t.trackObjects = 0; - - SwigClassPn_uuid_t.klass = rb_define_class_under(mCproton, "Pn_uuid_t", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_pn_uuid_t, (void *) &SwigClassPn_uuid_t); - rb_define_alloc_func(SwigClassPn_uuid_t.klass, _wrap_pn_uuid_t_allocate); - rb_define_method(SwigClassPn_uuid_t.klass, "initialize", _wrap_new_pn_uuid_t, -1); - rb_define_method(SwigClassPn_uuid_t.klass, "bytes=", _wrap_pn_uuid_t_bytes_set, -1); - rb_define_method(SwigClassPn_uuid_t.klass, "bytes", _wrap_pn_uuid_t_bytes_get, -1); - SwigClassPn_uuid_t.mark = 0; - SwigClassPn_uuid_t.destroy = (void (*)(void *)) free_pn_uuid_t; - SwigClassPn_uuid_t.trackObjects = 0; - - SwigClassPn_bytes_t.klass = rb_define_class_under(mCproton, "Pn_bytes_t", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_pn_bytes_t, (void *) &SwigClassPn_bytes_t); - rb_define_alloc_func(SwigClassPn_bytes_t.klass, _wrap_pn_bytes_t_allocate); - rb_define_method(SwigClassPn_bytes_t.klass, "initialize", _wrap_new_pn_bytes_t, -1); - rb_define_method(SwigClassPn_bytes_t.klass, "size=", _wrap_pn_bytes_t_size_set, -1); - rb_define_method(SwigClassPn_bytes_t.klass, "size", _wrap_pn_bytes_t_size_get, -1); - rb_define_method(SwigClassPn_bytes_t.klass, "start=", _wrap_pn_bytes_t_start_set, -1); - rb_define_method(SwigClassPn_bytes_t.klass, "start", _wrap_pn_bytes_t_start_get, -1); - SwigClassPn_bytes_t.mark = 0; - SwigClassPn_bytes_t.destroy = (void (*)(void *)) free_pn_bytes_t; - SwigClassPn_bytes_t.trackObjects = 0; rb_define_module_function(mCproton, "pn_bytes", _wrap_pn_bytes, -1); - rb_define_module_function(mCproton, "pn_bytes_dup", _wrap_pn_bytes_dup, -1); rb_define_const(mCproton, "PROTON_OBJECT_H", SWIG_From_int((int)(1))); - - SwigClassPn_class_t.klass = rb_define_class_under(mCproton, "Pn_class_t", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_pn_class_t, (void *) &SwigClassPn_class_t); - rb_define_alloc_func(SwigClassPn_class_t.klass, _wrap_pn_class_t_allocate); - rb_define_method(SwigClassPn_class_t.klass, "initialize", _wrap_new_pn_class_t, -1); - rb_define_method(SwigClassPn_class_t.klass, "initialize=", _wrap_pn_class_t_initialize_set, -1); - rb_define_method(SwigClassPn_class_t.klass, "initialize", _wrap_pn_class_t_initialize_get, -1); - rb_define_method(SwigClassPn_class_t.klass, "finalize=", _wrap_pn_class_t_finalize_set, -1); - rb_define_method(SwigClassPn_class_t.klass, "finalize", _wrap_pn_class_t_finalize_get, -1); - rb_define_method(SwigClassPn_class_t.klass, "hashcode=", _wrap_pn_class_t_hashcode_set, -1); - rb_define_method(SwigClassPn_class_t.klass, "hashcode", _wrap_pn_class_t_hashcode_get, -1); - rb_define_method(SwigClassPn_class_t.klass, "compare=", _wrap_pn_class_t_compare_set, -1); - rb_define_method(SwigClassPn_class_t.klass, "compare", _wrap_pn_class_t_compare_get, -1); - rb_define_method(SwigClassPn_class_t.klass, "inspect=", _wrap_pn_class_t_inspect_set, -1); - rb_define_method(SwigClassPn_class_t.klass, "inspect", _wrap_pn_class_t_inspect_get, -1); - SwigClassPn_class_t.mark = 0; - SwigClassPn_class_t.destroy = (void (*)(void *)) free_pn_class_t; - SwigClassPn_class_t.trackObjects = 0; - rb_define_module_function(mCproton, "pn_new", _wrap_pn_new, -1); - rb_define_module_function(mCproton, "pn_initialize", _wrap_pn_initialize, -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); + rb_define_module_function(mCproton, "pn_class_name", _wrap_pn_class_name, -1); + rb_define_module_function(mCproton, "pn_class_new", _wrap_pn_class_new, -1); + rb_define_module_function(mCproton, "pn_class_incref", _wrap_pn_class_incref, -1); + rb_define_module_function(mCproton, "pn_class_refcount", _wrap_pn_class_refcount, -1); + rb_define_module_function(mCproton, "pn_class_decref", _wrap_pn_class_decref, -1); + rb_define_module_function(mCproton, "pn_class_free", _wrap_pn_class_free, -1); + 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_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); + rb_define_module_function(mCproton, "pn_object_incref", _wrap_pn_object_incref, -1); + rb_define_module_function(mCproton, "pn_object_refcount", _wrap_pn_object_refcount, -1); + rb_define_module_function(mCproton, "pn_object_decref", _wrap_pn_object_decref, -1); + rb_define_module_function(mCproton, "pn_object_free", _wrap_pn_object_free, -1); rb_define_module_function(mCproton, "pn_incref", _wrap_pn_incref, -1); rb_define_module_function(mCproton, "pn_decref", _wrap_pn_decref, -1); rb_define_module_function(mCproton, "pn_refcount", _wrap_pn_refcount, -1); - rb_define_module_function(mCproton, "pn_finalize", _wrap_pn_finalize, -1); rb_define_module_function(mCproton, "pn_free", _wrap_pn_free, -1); rb_define_module_function(mCproton, "pn_class", _wrap_pn_class, -1); rb_define_module_function(mCproton, "pn_hashcode", _wrap_pn_hashcode, -1); rb_define_module_function(mCproton, "pn_compare", _wrap_pn_compare, -1); rb_define_module_function(mCproton, "pn_equals", _wrap_pn_equals, -1); @@ -21503,10 +20850,11 @@ rb_define_module_function(mCproton, "pn_link_session", _wrap_pn_link_session, -1); rb_define_module_function(mCproton, "pn_link_head", _wrap_pn_link_head, -1); rb_define_module_function(mCproton, "pn_link_next", _wrap_pn_link_next, -1); rb_define_module_function(mCproton, "pn_link_open", _wrap_pn_link_open, -1); rb_define_module_function(mCproton, "pn_link_close", _wrap_pn_link_close, -1); + rb_define_module_function(mCproton, "pn_link_detach", _wrap_pn_link_detach, -1); rb_define_module_function(mCproton, "pn_link_source", _wrap_pn_link_source, -1); rb_define_module_function(mCproton, "pn_link_target", _wrap_pn_link_target, -1); rb_define_module_function(mCproton, "pn_link_remote_source", _wrap_pn_link_remote_source, -1); rb_define_module_function(mCproton, "pn_link_remote_target", _wrap_pn_link_remote_target, -1); rb_define_module_function(mCproton, "pn_link_current", _wrap_pn_link_current, -1); @@ -21542,14 +20890,14 @@ rb_define_const(mCproton, "PN_TARGET", SWIG_From_int((int)(PN_TARGET))); rb_define_const(mCproton, "PN_COORDINATOR", SWIG_From_int((int)(PN_COORDINATOR))); rb_define_const(mCproton, "PN_NONDURABLE", SWIG_From_int((int)(PN_NONDURABLE))); rb_define_const(mCproton, "PN_CONFIGURATION", SWIG_From_int((int)(PN_CONFIGURATION))); rb_define_const(mCproton, "PN_DELIVERIES", SWIG_From_int((int)(PN_DELIVERIES))); - rb_define_const(mCproton, "PN_LINK_CLOSE", SWIG_From_int((int)(PN_LINK_CLOSE))); - rb_define_const(mCproton, "PN_SESSION_CLOSE", SWIG_From_int((int)(PN_SESSION_CLOSE))); - rb_define_const(mCproton, "PN_CONNECTION_CLOSE", SWIG_From_int((int)(PN_CONNECTION_CLOSE))); - rb_define_const(mCproton, "PN_NEVER", SWIG_From_int((int)(PN_NEVER))); + rb_define_const(mCproton, "PN_EXPIRE_WITH_LINK", SWIG_From_int((int)(PN_EXPIRE_WITH_LINK))); + rb_define_const(mCproton, "PN_EXPIRE_WITH_SESSION", SWIG_From_int((int)(PN_EXPIRE_WITH_SESSION))); + rb_define_const(mCproton, "PN_EXPIRE_WITH_CONNECTION", SWIG_From_int((int)(PN_EXPIRE_WITH_CONNECTION))); + rb_define_const(mCproton, "PN_EXPIRE_NEVER", SWIG_From_int((int)(PN_EXPIRE_NEVER))); rb_define_const(mCproton, "PN_DIST_MODE_UNSPECIFIED", SWIG_From_int((int)(PN_DIST_MODE_UNSPECIFIED))); rb_define_const(mCproton, "PN_DIST_MODE_COPY", SWIG_From_int((int)(PN_DIST_MODE_COPY))); rb_define_const(mCproton, "PN_DIST_MODE_MOVE", SWIG_From_int((int)(PN_DIST_MODE_MOVE))); rb_define_module_function(mCproton, "pn_terminus_get_type", _wrap_pn_terminus_get_type, -1); rb_define_module_function(mCproton, "pn_terminus_set_type", _wrap_pn_terminus_set_type, -1); @@ -21569,22 +20917,10 @@ rb_define_module_function(mCproton, "pn_terminus_capabilities", _wrap_pn_terminus_capabilities, -1); rb_define_module_function(mCproton, "pn_terminus_outcomes", _wrap_pn_terminus_outcomes, -1); rb_define_module_function(mCproton, "pn_terminus_filter", _wrap_pn_terminus_filter, -1); rb_define_module_function(mCproton, "pn_terminus_copy", _wrap_pn_terminus_copy, -1); rb_define_const(mCproton, "PROTON_DELIVERY_H", SWIG_From_int((int)(1))); - - SwigClassPn_delivery_tag_t.klass = rb_define_class_under(mCproton, "Pn_delivery_tag_t", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_pn_delivery_tag_t, (void *) &SwigClassPn_delivery_tag_t); - rb_define_alloc_func(SwigClassPn_delivery_tag_t.klass, _wrap_pn_delivery_tag_t_allocate); - rb_define_method(SwigClassPn_delivery_tag_t.klass, "initialize", _wrap_new_pn_delivery_tag_t, -1); - rb_define_method(SwigClassPn_delivery_tag_t.klass, "size=", _wrap_pn_delivery_tag_t_size_set, -1); - rb_define_method(SwigClassPn_delivery_tag_t.klass, "size", _wrap_pn_delivery_tag_t_size_get, -1); - rb_define_method(SwigClassPn_delivery_tag_t.klass, "bytes=", _wrap_pn_delivery_tag_t_bytes_set, -1); - rb_define_method(SwigClassPn_delivery_tag_t.klass, "bytes", _wrap_pn_delivery_tag_t_bytes_get, -1); - SwigClassPn_delivery_tag_t.mark = 0; - SwigClassPn_delivery_tag_t.destroy = (void (*)(void *)) free_pn_delivery_tag_t; - SwigClassPn_delivery_tag_t.trackObjects = 0; rb_define_module_function(mCproton, "pn_delivery_get_context", _wrap_pn_delivery_get_context, -1); rb_define_module_function(mCproton, "pn_delivery_set_context", _wrap_pn_delivery_set_context, -1); rb_define_module_function(mCproton, "pn_delivery_link", _wrap_pn_delivery_link, -1); rb_define_module_function(mCproton, "pn_delivery_local", _wrap_pn_delivery_local, -1); rb_define_module_function(mCproton, "pn_delivery_local_state", _wrap_pn_delivery_local_state, -1); @@ -21626,10 +20962,11 @@ rb_define_const(mCproton, "PN_TRACE_RAW", SWIG_From_int((int)((1)))); rb_define_const(mCproton, "PN_TRACE_FRM", SWIG_From_int((int)((2)))); rb_define_const(mCproton, "PN_TRACE_DRV", SWIG_From_int((int)((4)))); rb_define_module_function(mCproton, "pn_transport", _wrap_pn_transport, -1); rb_define_module_function(mCproton, "pn_transport_free", _wrap_pn_transport_free, -1); + rb_define_module_function(mCproton, "pn_transport_condition", _wrap_pn_transport_condition, -1); rb_define_module_function(mCproton, "pn_transport_error", _wrap_pn_transport_error, -1); rb_define_module_function(mCproton, "pn_transport_bind", _wrap_pn_transport_bind, -1); rb_define_module_function(mCproton, "pn_transport_unbind", _wrap_pn_transport_unbind, -1); rb_define_module_function(mCproton, "pn_transport_trace", _wrap_pn_transport_trace, -1); rb_define_module_function(mCproton, "pn_transport_set_tracer", _wrap_pn_transport_set_tracer, -1); @@ -21660,31 +20997,51 @@ rb_define_module_function(mCproton, "pn_transport_quiesced", _wrap_pn_transport_quiesced, -1); rb_define_module_function(mCproton, "pn_transport_closed", _wrap_pn_transport_closed, -1); rb_define_module_function(mCproton, "pn_transport_tick", _wrap_pn_transport_tick, -1); rb_define_module_function(mCproton, "pn_transport_get_frames_output", _wrap_pn_transport_get_frames_output, -1); rb_define_module_function(mCproton, "pn_transport_get_frames_input", _wrap_pn_transport_get_frames_input, -1); + rb_define_module_function(mCproton, "pn_transport_connection", _wrap_pn_transport_connection, -1); rb_define_const(mCproton, "PROTON_EVENT_H", SWIG_From_int((int)(1))); - rb_define_const(mCproton, "PN_EVENT_CATEGORY_NONE", SWIG_From_int((int)(PN_EVENT_CATEGORY_NONE))); - rb_define_const(mCproton, "PN_EVENT_CATEGORY_PROTOCOL", SWIG_From_int((int)(PN_EVENT_CATEGORY_PROTOCOL))); - rb_define_const(mCproton, "PN_EVENT_CATEGORY_COUNT", SWIG_From_int((int)(PN_EVENT_CATEGORY_COUNT))); rb_define_const(mCproton, "PN_EVENT_NONE", SWIG_From_int((int)(PN_EVENT_NONE))); - rb_define_const(mCproton, "PN_CONNECTION_REMOTE_STATE", SWIG_From_int((int)(PN_CONNECTION_REMOTE_STATE))); - rb_define_const(mCproton, "PN_CONNECTION_LOCAL_STATE", SWIG_From_int((int)(PN_CONNECTION_LOCAL_STATE))); - rb_define_const(mCproton, "PN_SESSION_REMOTE_STATE", SWIG_From_int((int)(PN_SESSION_REMOTE_STATE))); - rb_define_const(mCproton, "PN_SESSION_LOCAL_STATE", SWIG_From_int((int)(PN_SESSION_LOCAL_STATE))); - rb_define_const(mCproton, "PN_LINK_REMOTE_STATE", SWIG_From_int((int)(PN_LINK_REMOTE_STATE))); - rb_define_const(mCproton, "PN_LINK_LOCAL_STATE", SWIG_From_int((int)(PN_LINK_LOCAL_STATE))); + rb_define_const(mCproton, "PN_CONNECTION_INIT", SWIG_From_int((int)(PN_CONNECTION_INIT))); + rb_define_const(mCproton, "PN_CONNECTION_BOUND", SWIG_From_int((int)(PN_CONNECTION_BOUND))); + rb_define_const(mCproton, "PN_CONNECTION_UNBOUND", SWIG_From_int((int)(PN_CONNECTION_UNBOUND))); + rb_define_const(mCproton, "PN_CONNECTION_LOCAL_OPEN", SWIG_From_int((int)(PN_CONNECTION_LOCAL_OPEN))); + rb_define_const(mCproton, "PN_CONNECTION_REMOTE_OPEN", SWIG_From_int((int)(PN_CONNECTION_REMOTE_OPEN))); + rb_define_const(mCproton, "PN_CONNECTION_LOCAL_CLOSE", SWIG_From_int((int)(PN_CONNECTION_LOCAL_CLOSE))); + rb_define_const(mCproton, "PN_CONNECTION_REMOTE_CLOSE", SWIG_From_int((int)(PN_CONNECTION_REMOTE_CLOSE))); + rb_define_const(mCproton, "PN_CONNECTION_FINAL", SWIG_From_int((int)(PN_CONNECTION_FINAL))); + rb_define_const(mCproton, "PN_SESSION_INIT", SWIG_From_int((int)(PN_SESSION_INIT))); + rb_define_const(mCproton, "PN_SESSION_LOCAL_OPEN", SWIG_From_int((int)(PN_SESSION_LOCAL_OPEN))); + rb_define_const(mCproton, "PN_SESSION_REMOTE_OPEN", SWIG_From_int((int)(PN_SESSION_REMOTE_OPEN))); + rb_define_const(mCproton, "PN_SESSION_LOCAL_CLOSE", SWIG_From_int((int)(PN_SESSION_LOCAL_CLOSE))); + rb_define_const(mCproton, "PN_SESSION_REMOTE_CLOSE", SWIG_From_int((int)(PN_SESSION_REMOTE_CLOSE))); + rb_define_const(mCproton, "PN_SESSION_FINAL", SWIG_From_int((int)(PN_SESSION_FINAL))); + rb_define_const(mCproton, "PN_LINK_INIT", SWIG_From_int((int)(PN_LINK_INIT))); + rb_define_const(mCproton, "PN_LINK_LOCAL_OPEN", SWIG_From_int((int)(PN_LINK_LOCAL_OPEN))); + rb_define_const(mCproton, "PN_LINK_REMOTE_OPEN", SWIG_From_int((int)(PN_LINK_REMOTE_OPEN))); + rb_define_const(mCproton, "PN_LINK_LOCAL_CLOSE", SWIG_From_int((int)(PN_LINK_LOCAL_CLOSE))); + rb_define_const(mCproton, "PN_LINK_REMOTE_CLOSE", SWIG_From_int((int)(PN_LINK_REMOTE_CLOSE))); + rb_define_const(mCproton, "PN_LINK_LOCAL_DETACH", SWIG_From_int((int)(PN_LINK_LOCAL_DETACH))); + rb_define_const(mCproton, "PN_LINK_REMOTE_DETACH", SWIG_From_int((int)(PN_LINK_REMOTE_DETACH))); rb_define_const(mCproton, "PN_LINK_FLOW", SWIG_From_int((int)(PN_LINK_FLOW))); + rb_define_const(mCproton, "PN_LINK_FINAL", SWIG_From_int((int)(PN_LINK_FINAL))); 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_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_TAIL_CLOSED", SWIG_From_int((int)(PN_TRANSPORT_TAIL_CLOSED))); + rb_define_const(mCproton, "PN_TRANSPORT_CLOSED", SWIG_From_int((int)(PN_TRANSPORT_CLOSED))); 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_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_event_type", _wrap_pn_event_type, -1); - rb_define_module_function(mCproton, "pn_event_category", _wrap_pn_event_category, -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_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); @@ -21751,10 +21108,11 @@ rb_define_const(mCproton, "PN_SASL_OK", SWIG_From_int((int)(PN_SASL_OK))); rb_define_const(mCproton, "PN_SASL_AUTH", SWIG_From_int((int)(PN_SASL_AUTH))); rb_define_const(mCproton, "PN_SASL_SYS", SWIG_From_int((int)(PN_SASL_SYS))); rb_define_const(mCproton, "PN_SASL_PERM", SWIG_From_int((int)(PN_SASL_PERM))); rb_define_const(mCproton, "PN_SASL_TEMP", SWIG_From_int((int)(PN_SASL_TEMP))); + rb_define_const(mCproton, "PN_SASL_SKIPPED", SWIG_From_int((int)(PN_SASL_SKIPPED))); rb_define_const(mCproton, "PN_SASL_CONF", SWIG_From_int((int)(PN_SASL_CONF))); rb_define_const(mCproton, "PN_SASL_IDLE", SWIG_From_int((int)(PN_SASL_IDLE))); rb_define_const(mCproton, "PN_SASL_STEP", SWIG_From_int((int)(PN_SASL_STEP))); rb_define_const(mCproton, "PN_SASL_PASS", SWIG_From_int((int)(PN_SASL_PASS))); rb_define_const(mCproton, "PN_SASL_FAIL", SWIG_From_int((int)(PN_SASL_FAIL))); @@ -21762,10 +21120,11 @@ rb_define_module_function(mCproton, "pn_sasl_state", _wrap_pn_sasl_state, -1); rb_define_module_function(mCproton, "pn_sasl_mechanisms", _wrap_pn_sasl_mechanisms, -1); rb_define_module_function(mCproton, "pn_sasl_remote_mechanisms", _wrap_pn_sasl_remote_mechanisms, -1); rb_define_module_function(mCproton, "pn_sasl_client", _wrap_pn_sasl_client, -1); rb_define_module_function(mCproton, "pn_sasl_server", _wrap_pn_sasl_server, -1); + rb_define_module_function(mCproton, "pn_sasl_allow_skip", _wrap_pn_sasl_allow_skip, -1); rb_define_module_function(mCproton, "pn_sasl_plain", _wrap_pn_sasl_plain, -1); rb_define_module_function(mCproton, "pn_sasl_pending", _wrap_pn_sasl_pending, -1); rb_define_module_function(mCproton, "pn_sasl_recv", _wrap_pn_sasl_recv, -1); rb_define_module_function(mCproton, "pn_sasl_send", _wrap_pn_sasl_send, -1); rb_define_module_function(mCproton, "pn_sasl_done", _wrap_pn_sasl_done, -1); @@ -21848,15 +21207,18 @@ rb_define_module_function(mCproton, "pn_messenger_set_incoming_window", _wrap_pn_messenger_set_incoming_window, -1); rb_define_module_function(mCproton, "pn_messenger_start", _wrap_pn_messenger_start, -1); rb_define_module_function(mCproton, "pn_messenger_stop", _wrap_pn_messenger_stop, -1); rb_define_module_function(mCproton, "pn_messenger_stopped", _wrap_pn_messenger_stopped, -1); rb_define_module_function(mCproton, "pn_messenger_subscribe", _wrap_pn_messenger_subscribe, -1); + rb_define_module_function(mCproton, "pn_messenger_subscribe_ttl", _wrap_pn_messenger_subscribe_ttl, -1); + rb_define_module_function(mCproton, "pn_messenger_get_link", _wrap_pn_messenger_get_link, -1); rb_define_module_function(mCproton, "pn_subscription_get_context", _wrap_pn_subscription_get_context, -1); rb_define_module_function(mCproton, "pn_subscription_set_context", _wrap_pn_subscription_set_context, -1); rb_define_module_function(mCproton, "pn_subscription_address", _wrap_pn_subscription_address, -1); rb_define_module_function(mCproton, "pn_messenger_put", _wrap_pn_messenger_put, -1); rb_define_module_function(mCproton, "pn_messenger_status", _wrap_pn_messenger_status, -1); + rb_define_module_function(mCproton, "pn_messenger_delivery", _wrap_pn_messenger_delivery, -1); rb_define_module_function(mCproton, "pn_messenger_buffered", _wrap_pn_messenger_buffered, -1); rb_define_module_function(mCproton, "pn_messenger_settle", _wrap_pn_messenger_settle, -1); rb_define_module_function(mCproton, "pn_messenger_outgoing_tracker", _wrap_pn_messenger_outgoing_tracker, -1); rb_define_module_function(mCproton, "pn_messenger_work", _wrap_pn_messenger_work, -1); rb_define_module_function(mCproton, "pn_messenger_interrupt", _wrap_pn_messenger_interrupt, -1); @@ -21867,16 +21229,25 @@ rb_define_module_function(mCproton, "pn_messenger_incoming_tracker", _wrap_pn_messenger_incoming_tracker, -1); rb_define_module_function(mCproton, "pn_messenger_incoming_subscription", _wrap_pn_messenger_incoming_subscription, -1); rb_define_const(mCproton, "PN_CUMULATIVE", SWIG_From_int((int)((0x1)))); rb_define_module_function(mCproton, "pn_messenger_accept", _wrap_pn_messenger_accept, -1); rb_define_module_function(mCproton, "pn_messenger_reject", _wrap_pn_messenger_reject, -1); + rb_define_module_function(mCproton, "pn_messenger_tracker_link", _wrap_pn_messenger_tracker_link, -1); rb_define_module_function(mCproton, "pn_messenger_outgoing", _wrap_pn_messenger_outgoing, -1); rb_define_module_function(mCproton, "pn_messenger_incoming", _wrap_pn_messenger_incoming, -1); rb_define_module_function(mCproton, "pn_messenger_route", _wrap_pn_messenger_route, -1); rb_define_module_function(mCproton, "pn_messenger_rewrite", _wrap_pn_messenger_rewrite, -1); rb_define_module_function(mCproton, "pn_messenger_selectable", _wrap_pn_messenger_selectable, -1); rb_define_module_function(mCproton, "pn_messenger_deadline", _wrap_pn_messenger_deadline, -1); + rb_define_const(mCproton, "PN_FLAGS_CHECK_ROUTES", SWIG_From_int((int)((0x1)))); + rb_define_module_function(mCproton, "pn_messenger_set_flags", _wrap_pn_messenger_set_flags, -1); + rb_define_module_function(mCproton, "pn_messenger_get_flags", _wrap_pn_messenger_get_flags, -1); + 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); @@ -21888,10 +21259,11 @@ 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_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_fd", _wrap_pn_selectable_fd, -1); @@ -21951,65 +21323,10 @@ rb_define_const(mCproton, "PN_DESCRIBED", SWIG_From_int((int)(PN_DESCRIBED))); rb_define_const(mCproton, "PN_ARRAY", SWIG_From_int((int)(PN_ARRAY))); rb_define_const(mCproton, "PN_LIST", SWIG_From_int((int)(PN_LIST))); rb_define_const(mCproton, "PN_MAP", SWIG_From_int((int)(PN_MAP))); rb_define_module_function(mCproton, "pn_type_name", _wrap_pn_type_name, -1); - - SwigClassPn_atom_t.klass = rb_define_class_under(mCproton, "Pn_atom_t", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_pn_atom_t, (void *) &SwigClassPn_atom_t); - rb_define_alloc_func(SwigClassPn_atom_t.klass, _wrap_pn_atom_t_allocate); - rb_define_method(SwigClassPn_atom_t.klass, "initialize", _wrap_new_pn_atom_t, -1); - rb_define_method(SwigClassPn_atom_t.klass, "type=", _wrap_pn_atom_t_type_set, -1); - rb_define_method(SwigClassPn_atom_t.klass, "type", _wrap_pn_atom_t_type_get, -1); - rb_define_method(SwigClassPn_atom_t.klass, "u", _wrap_pn_atom_t_u_get, -1); - SwigClassPn_atom_t.mark = 0; - SwigClassPn_atom_t.destroy = (void (*)(void *)) free_pn_atom_t; - SwigClassPn_atom_t.trackObjects = 0; - - SwigClassPn_atom_t_u.klass = rb_define_class_under(mCproton, "Pn_atom_t_u", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_pn_atom_t_u, (void *) &SwigClassPn_atom_t_u); - rb_define_alloc_func(SwigClassPn_atom_t_u.klass, _wrap_pn_atom_t_u_allocate); - rb_define_method(SwigClassPn_atom_t_u.klass, "initialize", _wrap_new_pn_atom_t_u, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_bool=", _wrap_pn_atom_t_u_as_bool_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_bool", _wrap_pn_atom_t_u_as_bool_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_ubyte=", _wrap_pn_atom_t_u_as_ubyte_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_ubyte", _wrap_pn_atom_t_u_as_ubyte_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_byte=", _wrap_pn_atom_t_u_as_byte_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_byte", _wrap_pn_atom_t_u_as_byte_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_ushort=", _wrap_pn_atom_t_u_as_ushort_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_ushort", _wrap_pn_atom_t_u_as_ushort_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_short=", _wrap_pn_atom_t_u_as_short_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_short", _wrap_pn_atom_t_u_as_short_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_uint=", _wrap_pn_atom_t_u_as_uint_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_uint", _wrap_pn_atom_t_u_as_uint_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_int=", _wrap_pn_atom_t_u_as_int_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_int", _wrap_pn_atom_t_u_as_int_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_char=", _wrap_pn_atom_t_u_as_char_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_char", _wrap_pn_atom_t_u_as_char_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_ulong=", _wrap_pn_atom_t_u_as_ulong_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_ulong", _wrap_pn_atom_t_u_as_ulong_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_long=", _wrap_pn_atom_t_u_as_long_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_long", _wrap_pn_atom_t_u_as_long_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_timestamp=", _wrap_pn_atom_t_u_as_timestamp_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_timestamp", _wrap_pn_atom_t_u_as_timestamp_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_float=", _wrap_pn_atom_t_u_as_float_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_float", _wrap_pn_atom_t_u_as_float_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_double=", _wrap_pn_atom_t_u_as_double_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_double", _wrap_pn_atom_t_u_as_double_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_decimal32=", _wrap_pn_atom_t_u_as_decimal32_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_decimal32", _wrap_pn_atom_t_u_as_decimal32_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_decimal64=", _wrap_pn_atom_t_u_as_decimal64_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_decimal64", _wrap_pn_atom_t_u_as_decimal64_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_decimal128=", _wrap_pn_atom_t_u_as_decimal128_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_decimal128", _wrap_pn_atom_t_u_as_decimal128_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_uuid=", _wrap_pn_atom_t_u_as_uuid_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_uuid", _wrap_pn_atom_t_u_as_uuid_get, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_bytes=", _wrap_pn_atom_t_u_as_bytes_set, -1); - rb_define_method(SwigClassPn_atom_t_u.klass, "as_bytes", _wrap_pn_atom_t_u_as_bytes_get, -1); - SwigClassPn_atom_t_u.mark = 0; - SwigClassPn_atom_t_u.destroy = (void (*)(void *)) free_pn_atom_t_u; - SwigClassPn_atom_t_u.trackObjects = 0; rb_define_module_function(mCproton, "pn_data", _wrap_pn_data, -1); rb_define_module_function(mCproton, "pn_data_free", _wrap_pn_data_free, -1); rb_define_module_function(mCproton, "pn_data_errno", _wrap_pn_data_errno, -1); rb_define_module_function(mCproton, "pn_data_error", _wrap_pn_data_error, -1); rb_define_module_function(mCproton, "pn_data_fill", _wrap_pn_data_fill, -1); @@ -22050,11 +21367,10 @@ rb_define_module_function(mCproton, "pn_data_put_decimal128", _wrap_pn_data_put_decimal128, -1); rb_define_module_function(mCproton, "pn_data_put_uuid", _wrap_pn_data_put_uuid, -1); rb_define_module_function(mCproton, "pn_data_put_binary", _wrap_pn_data_put_binary, -1); rb_define_module_function(mCproton, "pn_data_put_string", _wrap_pn_data_put_string, -1); rb_define_module_function(mCproton, "pn_data_put_symbol", _wrap_pn_data_put_symbol, -1); - rb_define_module_function(mCproton, "pn_data_put_atom", _wrap_pn_data_put_atom, -1); rb_define_module_function(mCproton, "pn_data_get_list", _wrap_pn_data_get_list, -1); rb_define_module_function(mCproton, "pn_data_get_map", _wrap_pn_data_get_map, -1); rb_define_module_function(mCproton, "pn_data_get_array", _wrap_pn_data_get_array, -1); rb_define_module_function(mCproton, "pn_data_is_array_described", _wrap_pn_data_is_array_described, -1); rb_define_module_function(mCproton, "pn_data_get_array_type", _wrap_pn_data_get_array_type, -1); @@ -22079,16 +21395,37 @@ rb_define_module_function(mCproton, "pn_data_get_uuid", _wrap_pn_data_get_uuid, -1); rb_define_module_function(mCproton, "pn_data_get_binary", _wrap_pn_data_get_binary, -1); rb_define_module_function(mCproton, "pn_data_get_string", _wrap_pn_data_get_string, -1); rb_define_module_function(mCproton, "pn_data_get_symbol", _wrap_pn_data_get_symbol, -1); rb_define_module_function(mCproton, "pn_data_get_bytes", _wrap_pn_data_get_bytes, -1); - rb_define_module_function(mCproton, "pn_data_get_atom", _wrap_pn_data_get_atom, -1); rb_define_module_function(mCproton, "pn_data_copy", _wrap_pn_data_copy, -1); rb_define_module_function(mCproton, "pn_data_append", _wrap_pn_data_append, -1); rb_define_module_function(mCproton, "pn_data_appendn", _wrap_pn_data_appendn, -1); rb_define_module_function(mCproton, "pn_data_narrow", _wrap_pn_data_narrow, -1); rb_define_module_function(mCproton, "pn_data_widen", _wrap_pn_data_widen, -1); rb_define_module_function(mCproton, "pn_data_point", _wrap_pn_data_point, -1); rb_define_module_function(mCproton, "pn_data_restore", _wrap_pn_data_restore, -1); rb_define_module_function(mCproton, "pn_data_dump", _wrap_pn_data_dump, -1); + rb_define_module_function(mCproton, "pn_cast_pn_connection", _wrap_pn_cast_pn_connection, -1); + rb_define_module_function(mCproton, "pn_cast_pn_session", _wrap_pn_cast_pn_session, -1); + rb_define_module_function(mCproton, "pn_cast_pn_link", _wrap_pn_cast_pn_link, -1); + 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_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); + rb_define_module_function(mCproton, "pn_url_get_scheme", _wrap_pn_url_get_scheme, -1); + rb_define_module_function(mCproton, "pn_url_get_username", _wrap_pn_url_get_username, -1); + rb_define_module_function(mCproton, "pn_url_get_password", _wrap_pn_url_get_password, -1); + rb_define_module_function(mCproton, "pn_url_get_host", _wrap_pn_url_get_host, -1); + rb_define_module_function(mCproton, "pn_url_get_port", _wrap_pn_url_get_port, -1); + rb_define_module_function(mCproton, "pn_url_get_path", _wrap_pn_url_get_path, -1); + rb_define_module_function(mCproton, "pn_url_set_scheme", _wrap_pn_url_set_scheme, -1); + rb_define_module_function(mCproton, "pn_url_set_username", _wrap_pn_url_set_username, -1); + rb_define_module_function(mCproton, "pn_url_set_password", _wrap_pn_url_set_password, -1); + rb_define_module_function(mCproton, "pn_url_set_host", _wrap_pn_url_set_host, -1); + rb_define_module_function(mCproton, "pn_url_set_port", _wrap_pn_url_set_port, -1); + rb_define_module_function(mCproton, "pn_url_set_path", _wrap_pn_url_set_path, -1); }