diff --git a/libs/esl/ruby/Makefile b/libs/esl/ruby/Makefile index 21ed211a44..177b448143 100644 --- a/libs/esl/ruby/Makefile +++ b/libs/esl/ruby/Makefile @@ -4,7 +4,7 @@ LOCAL_CFLAGS=$(shell ruby cflags.rb) all: ESL.so esl_wrap.cpp: - swig -module ESL -ruby -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i + swig2.0 -module ESL -ruby -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i esl_wrap.o: esl_wrap.cpp $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o diff --git a/libs/esl/ruby/esl_wrap.cpp b/libs/esl/ruby/esl_wrap.cpp index 2d7e906402..81dcb73e0e 100644 --- a/libs/esl/ruby/esl_wrap.cpp +++ b/libs/esl/ruby/esl_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.7 * * 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 @@ -10,19 +10,23 @@ #define SWIGRUBY + #ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { - T *tt; + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); public: - SwigValueWrapper() : tt(0) { } - SwigValueWrapper(const SwigValueWrapper& rhs) : tt(new T(*rhs.tt)) { } - SwigValueWrapper(const T& t) : tt(new T(t)) { } - ~SwigValueWrapper() { delete tt; } - SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } - operator T&() const { return *tt; } - T *operator&() { return tt; } -private: - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { @@ -72,6 +76,12 @@ template T SwigValueInit() { # endif #endif +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) @@ -175,6 +185,12 @@ template T SwigValueInit() { # endif #endif +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) @@ -239,7 +255,7 @@ template T SwigValueInit() { /* ----------------------------------------------------------------------------- * swigrun.swg * - * This file contains generic CAPI SWIG runtime support for pointer + * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ @@ -258,11 +274,11 @@ template T SwigValueInit() { /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the swig runtime code. - In 99.9% of the cases, swig just needs to declare them as 'static'. + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. - But only do this if is strictly necessary, ie, if you have problems - with your compiler or so. + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. */ #ifndef SWIGRUNTIME @@ -289,14 +305,14 @@ template T SwigValueInit() { /* Flags/methods for returning states. - The swig conversion methods, as ConvertPtr, return and integer + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. - In old swig versions, you usually write code as: + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code @@ -304,7 +320,7 @@ template T SwigValueInit() { //fail code } - Now you can be more explicit as: + Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { @@ -313,7 +329,7 @@ template T SwigValueInit() { // fail code } - that seems to be the same, but now you can also do + which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); @@ -331,7 +347,7 @@ template T SwigValueInit() { I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that - requires also to SWIG_ConvertPtr to return new result values, as + also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { @@ -349,7 +365,7 @@ template T SwigValueInit() { Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - swig errors code. + SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this @@ -363,9 +379,8 @@ template T SwigValueInit() { fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() +*/ - - */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) @@ -390,7 +405,6 @@ template T SwigValueInit() { #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank @@ -413,8 +427,6 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { #endif - - #include #ifdef __cplusplus @@ -511,40 +523,58 @@ SWIG_TypeCompare(const char *nb, const char *tb) { } -/* think of this as a c++ template<> or a scheme macro */ -#define SWIG_TypeCheck_Template(comparison, ty) \ - if (ty) { \ - swig_cast_info *iter = ty->cast; \ - while (iter) { \ - if (comparison) { \ - if (iter == ty->cast) return iter; \ - /* Move iter to the top of the linked list */ \ - iter->prev->next = iter->next; \ - if (iter->next) \ - iter->next->prev = iter->prev; \ - iter->next = ty->cast; \ - iter->prev = 0; \ - if (ty->cast) ty->cast->prev = iter; \ - ty->cast = iter; \ - return iter; \ - } \ - iter = iter->next; \ - } \ - } \ - return 0 - /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { - SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; } -/* Same as previous function, except strcmp is replaced with a pointer comparison */ +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { - SWIG_TypeCheck_Template(iter->type == from, into); +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; } /* @@ -825,6 +855,15 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #include +/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which + * breaks using rb_intern as an lvalue, as SWIG does. We work around this + * issue for now by disabling this. + * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645 + */ +#ifdef rb_intern +# undef rb_intern +#endif + /* Remove global macros defined in Ruby's win32.h */ #ifdef write # undef write @@ -832,6 +871,15 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #ifdef read # undef read #endif +#ifdef bind +# undef bind +#endif +#ifdef close +# undef close +#endif +#ifdef connect +# undef connect +#endif /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ @@ -974,7 +1022,7 @@ static VALUE _mSWIG = Qnil; /* Define custom exceptions for errors that do not map to existing Ruby exceptions. Note this only works for C++ since a global cannot be - initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/ + initialized by a function in C. For C, fallback to rb_eRuntimeError.*/ SWIGINTERN VALUE getNullReferenceError(void) { @@ -1119,9 +1167,6 @@ void Ruby_Format_OverloadedError( } /* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * * rubytracking.swg * * This file contains support for tracking mappings from @@ -1317,9 +1362,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { /* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * * rubyrun.swg * * This file contains the runtime support for Ruby modules @@ -1363,7 +1405,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { /* Error manipulation */ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) -#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg) +#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg) #define SWIG_fail goto fail @@ -1418,7 +1460,7 @@ static ID swig_call_id = 0; ++swig_virtual_calls; # define SWIG_RELEASE_STACK --swig_virtual_calls; # define Ruby_DirectorTypeMismatchException(x) \ - rb_raise( rb_eTypeError, x ); return c_result; + rb_raise( rb_eTypeError, "%s", x ); return c_result; static unsigned int swig_virtual_calls = 0; @@ -1510,7 +1552,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) downcast methods. */ if (obj != Qnil) { VALUE value = rb_iv_get(obj, "@__swigtype__"); - char* type_name = RSTRING_PTR(value); + const char* type_name = RSTRING_PTR(value); if (strcmp(type->name, type_name) == 0) { return obj; @@ -1792,7 +1834,7 @@ static VALUE mESL; #define SWIG_RUBY_THREAD_END_BLOCK -#define SWIGVERSION 0x010335 +#define SWIGVERSION 0x020007 #define SWIG_VERSION SWIGVERSION @@ -1902,7 +1944,7 @@ SWIG_ruby_failed(void) } -/*@SWIG:/usr/local/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) { VALUE obj = args[0]; @@ -1963,7 +2005,7 @@ SWIG_From_bool (bool value) return value ? Qtrue : Qfalse; } -swig_class cESLevent; +static swig_class SwigClassESLevent; SWIGINTERN VALUE _wrap_ESLevent_event_set(int argc, VALUE *argv, VALUE self) { @@ -1988,7 +2030,6 @@ _wrap_ESLevent_event_set(int argc, VALUE *argv, VALUE self) { } arg2 = reinterpret_cast< esl_event_t * >(argp2); if (arg1) (arg1)->event = arg2; - return Qnil; fail: return Qnil; @@ -1998,9 +2039,9 @@ fail: SWIGINTERN VALUE _wrap_ESLevent_event_get(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - esl_event_t *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + esl_event_t *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2060,9 +2101,9 @@ fail: SWIGINTERN VALUE _wrap_ESLevent_serialized_string_get(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2104,7 +2145,6 @@ _wrap_ESLevent_mine_set(int argc, VALUE *argv, VALUE self) { } arg2 = static_cast< int >(val2); if (arg1) (arg1)->mine = arg2; - return Qnil; fail: return Qnil; @@ -2114,9 +2154,9 @@ fail: SWIGINTERN VALUE _wrap_ESLevent_mine_get(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2139,13 +2179,13 @@ SWIGINTERN VALUE _wrap_new_ESLevent__SWIG_0(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; char *arg2 = (char *) NULL ; - ESLevent *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + ESLevent *result = 0 ; if ((argc < 1) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; @@ -2162,8 +2202,8 @@ _wrap_new_ESLevent__SWIG_0(int argc, VALUE *argv, VALUE self) { } arg2 = reinterpret_cast< char * >(buf2); } - result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2);DATA_PTR(self) = result; - + result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2); + DATA_PTR(self) = result; if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return self; @@ -2178,11 +2218,11 @@ SWIGINTERN VALUE _wrap_new_ESLevent__SWIG_1(int argc, VALUE *argv, VALUE self) { esl_event_t *arg1 = (esl_event_t *) 0 ; int arg2 = (int) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; + ESLevent *result = 0 ; if ((argc < 1) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; @@ -2199,8 +2239,8 @@ _wrap_new_ESLevent__SWIG_1(int argc, VALUE *argv, VALUE self) { } arg2 = static_cast< int >(val2); } - result = (ESLevent *)new ESLevent(arg1,arg2);DATA_PTR(self) = result; - + result = (ESLevent *)new ESLevent(arg1,arg2); + DATA_PTR(self) = result; return self; fail: return Qnil; @@ -2227,9 +2267,9 @@ _wrap_ESLevent_allocate(VALUE self) { SWIGINTERN VALUE _wrap_new_ESLevent__SWIG_2(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + ESLevent *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; @@ -2239,8 +2279,8 @@ _wrap_new_ESLevent__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLevent *","ESLevent", 1, argv[0] )); } arg1 = reinterpret_cast< ESLevent * >(argp1); - result = (ESLevent *)new ESLevent(arg1);DATA_PTR(self) = result; - + result = (ESLevent *)new ESLevent(arg1); + DATA_PTR(self) = result; return self; fail: return Qnil; @@ -2319,12 +2359,12 @@ SWIGINTERN VALUE _wrap_ESLevent_serialize(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) NULL ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 1)) { @@ -2356,11 +2396,11 @@ SWIGINTERN VALUE _wrap_ESLevent_setPriority(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; - bool result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 1)) { @@ -2397,7 +2437,6 @@ _wrap_ESLevent_getHeader(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; int arg3 = (int) -1 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2405,6 +2444,7 @@ _wrap_ESLevent_getHeader(int argc, VALUE *argv, VALUE self) { int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; + char *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 2)) { @@ -2440,9 +2480,9 @@ fail: SWIGINTERN VALUE _wrap_ESLevent_getBody(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2464,9 +2504,9 @@ fail: SWIGINTERN VALUE _wrap_ESLevent_getType(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2489,12 +2529,12 @@ SWIGINTERN VALUE _wrap_ESLevent_addBody(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -2525,7 +2565,6 @@ _wrap_ESLevent_addHeader(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2534,6 +2573,7 @@ _wrap_ESLevent_addHeader(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { @@ -2571,7 +2611,6 @@ _wrap_ESLevent_pushHeader(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2580,6 +2619,7 @@ _wrap_ESLevent_pushHeader(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { @@ -2617,7 +2657,6 @@ _wrap_ESLevent_unshiftHeader(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2626,6 +2665,7 @@ _wrap_ESLevent_unshiftHeader(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { @@ -2662,12 +2702,12 @@ SWIGINTERN VALUE _wrap_ESLevent_delHeader(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -2696,9 +2736,9 @@ fail: SWIGINTERN VALUE _wrap_ESLevent_firstHeader(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2720,9 +2760,9 @@ fail: SWIGINTERN VALUE _wrap_ESLevent_nextHeader(int argc, VALUE *argv, VALUE self) { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2741,7 +2781,7 @@ fail: } -swig_class cESLconnection; +static swig_class SwigClassESLconnection; SWIGINTERN VALUE _wrap_new_ESLconnection__SWIG_0(int argc, VALUE *argv, VALUE self) { @@ -2749,7 +2789,6 @@ _wrap_new_ESLconnection__SWIG_0(int argc, VALUE *argv, VALUE self) { int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2761,6 +2800,7 @@ _wrap_new_ESLconnection__SWIG_0(int argc, VALUE *argv, VALUE self) { int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; + ESLconnection *result = 0 ; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; @@ -2785,8 +2825,8 @@ _wrap_new_ESLconnection__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","ESLconnection", 4, argv[3] )); } arg4 = reinterpret_cast< char * >(buf4); - result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);DATA_PTR(self) = result; - + result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4); + DATA_PTR(self) = result; if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; @@ -2804,7 +2844,6 @@ _wrap_new_ESLconnection__SWIG_1(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2813,6 +2852,7 @@ _wrap_new_ESLconnection__SWIG_1(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + ESLconnection *result = 0 ; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; @@ -2832,8 +2872,8 @@ _wrap_new_ESLconnection__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","ESLconnection", 3, argv[2] )); } arg3 = reinterpret_cast< char * >(buf3); - result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);DATA_PTR(self) = result; - + result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3); + DATA_PTR(self) = result; if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return self; @@ -2850,7 +2890,6 @@ _wrap_new_ESLconnection__SWIG_2(int argc, VALUE *argv, VALUE self) { char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2863,6 +2902,7 @@ _wrap_new_ESLconnection__SWIG_2(int argc, VALUE *argv, VALUE self) { int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; + ESLconnection *result = 0 ; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; @@ -2887,8 +2927,8 @@ _wrap_new_ESLconnection__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","ESLconnection", 4, argv[3] )); } arg4 = reinterpret_cast< char * >(buf4); - result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);DATA_PTR(self) = result; - + result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4); + DATA_PTR(self) = result; if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; @@ -2908,7 +2948,6 @@ _wrap_new_ESLconnection__SWIG_3(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2918,6 +2957,7 @@ _wrap_new_ESLconnection__SWIG_3(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + ESLconnection *result = 0 ; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; @@ -2937,8 +2977,8 @@ _wrap_new_ESLconnection__SWIG_3(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","ESLconnection", 3, argv[2] )); } arg3 = reinterpret_cast< char * >(buf3); - result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);DATA_PTR(self) = result; - + result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3); + DATA_PTR(self) = result; if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; @@ -2971,9 +3011,9 @@ _wrap_ESLconnection_allocate(VALUE self) { SWIGINTERN VALUE _wrap_new_ESLconnection__SWIG_4(int argc, VALUE *argv, VALUE self) { int arg1 ; - ESLconnection *result = 0 ; int val1 ; int ecode1 = 0 ; + ESLconnection *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; @@ -2983,8 +3023,8 @@ _wrap_new_ESLconnection__SWIG_4(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","ESLconnection", 1, argv[0] )); } arg1 = static_cast< int >(val1); - result = (ESLconnection *)new ESLconnection(arg1);DATA_PTR(self) = result; - + result = (ESLconnection *)new ESLconnection(arg1); + DATA_PTR(self) = result; return self; fail: return Qnil; @@ -3108,9 +3148,9 @@ free_ESLconnection(ESLconnection *arg1) { SWIGINTERN VALUE _wrap_ESLconnection_socketDescriptor(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -3132,9 +3172,9 @@ fail: SWIGINTERN VALUE _wrap_ESLconnection_connected(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -3156,9 +3196,9 @@ fail: SWIGINTERN VALUE _wrap_ESLconnection_getInfo(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -3181,12 +3221,12 @@ SWIGINTERN VALUE _wrap_ESLconnection_send(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3216,12 +3256,12 @@ SWIGINTERN VALUE _wrap_ESLconnection_sendRecv(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3252,7 +3292,6 @@ _wrap_ESLconnection_api(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3261,6 +3300,7 @@ _wrap_ESLconnection_api(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 2)) { @@ -3301,7 +3341,6 @@ _wrap_ESLconnection_bgapi(int argc, VALUE *argv, VALUE self) { char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3313,6 +3352,7 @@ _wrap_ESLconnection_bgapi(int argc, VALUE *argv, VALUE self) { int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 3)) { @@ -3360,11 +3400,11 @@ SWIGINTERN VALUE _wrap_ESLconnection_sendEvent(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; ESLevent *arg2 = (ESLevent *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3393,7 +3433,6 @@ _wrap_ESLconnection_sendMSG(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; ESLevent *arg2 = (ESLevent *) 0 ; char *arg3 = (char *) NULL ; - int result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -3401,6 +3440,7 @@ _wrap_ESLconnection_sendMSG(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 2)) { @@ -3436,9 +3476,9 @@ fail: SWIGINTERN VALUE _wrap_ESLconnection_recvEvent(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -3461,11 +3501,11 @@ SWIGINTERN VALUE _wrap_ESLconnection_recvEventTimed(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; int arg2 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3494,7 +3534,6 @@ _wrap_ESLconnection_filter(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3503,6 +3542,7 @@ _wrap_ESLconnection_filter(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { @@ -3540,7 +3580,6 @@ _wrap_ESLconnection_events(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3549,6 +3588,7 @@ _wrap_ESLconnection_events(int argc, VALUE *argv, VALUE self) { int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { @@ -3587,7 +3627,6 @@ _wrap_ESLconnection_execute(int argc, VALUE *argv, VALUE self) { char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3599,6 +3638,7 @@ _wrap_ESLconnection_execute(int argc, VALUE *argv, VALUE self) { int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 3)) { @@ -3648,7 +3688,6 @@ _wrap_ESLconnection_executeAsync(int argc, VALUE *argv, VALUE self) { char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3660,6 +3699,7 @@ _wrap_ESLconnection_executeAsync(int argc, VALUE *argv, VALUE self) { int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; + ESLevent *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 3)) { @@ -3707,12 +3747,12 @@ SWIGINTERN VALUE _wrap_ESLconnection_setAsyncExecute(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3742,12 +3782,12 @@ SWIGINTERN VALUE _wrap_ESLconnection_setEventLock(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3776,9 +3816,9 @@ fail: SWIGINTERN VALUE _wrap_ESLconnection_disconnect(int argc, VALUE *argv, VALUE self) { ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; + int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -4108,57 +4148,57 @@ SWIGEXPORT void Init_ESL(void) { SWIG_RubyInitializeTrackings(); - cESLevent.klass = rb_define_class_under(mESL, "ESLevent", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_ESLevent, (void *) &cESLevent); - rb_define_alloc_func(cESLevent.klass, _wrap_ESLevent_allocate); - rb_define_method(cESLevent.klass, "initialize", VALUEFUNC(_wrap_new_ESLevent), -1); - rb_define_method(cESLevent.klass, "event=", VALUEFUNC(_wrap_ESLevent_event_set), -1); - rb_define_method(cESLevent.klass, "event", VALUEFUNC(_wrap_ESLevent_event_get), -1); - rb_define_method(cESLevent.klass, "serialized_string=", VALUEFUNC(_wrap_ESLevent_serialized_string_set), -1); - rb_define_method(cESLevent.klass, "serialized_string", VALUEFUNC(_wrap_ESLevent_serialized_string_get), -1); - rb_define_method(cESLevent.klass, "mine=", VALUEFUNC(_wrap_ESLevent_mine_set), -1); - rb_define_method(cESLevent.klass, "mine", VALUEFUNC(_wrap_ESLevent_mine_get), -1); - rb_define_method(cESLevent.klass, "serialize", VALUEFUNC(_wrap_ESLevent_serialize), -1); - rb_define_method(cESLevent.klass, "setPriority", VALUEFUNC(_wrap_ESLevent_setPriority), -1); - rb_define_method(cESLevent.klass, "getHeader", VALUEFUNC(_wrap_ESLevent_getHeader), -1); - rb_define_method(cESLevent.klass, "getBody", VALUEFUNC(_wrap_ESLevent_getBody), -1); - rb_define_method(cESLevent.klass, "getType", VALUEFUNC(_wrap_ESLevent_getType), -1); - rb_define_method(cESLevent.klass, "addBody", VALUEFUNC(_wrap_ESLevent_addBody), -1); - rb_define_method(cESLevent.klass, "addHeader", VALUEFUNC(_wrap_ESLevent_addHeader), -1); - rb_define_method(cESLevent.klass, "pushHeader", VALUEFUNC(_wrap_ESLevent_pushHeader), -1); - rb_define_method(cESLevent.klass, "unshiftHeader", VALUEFUNC(_wrap_ESLevent_unshiftHeader), -1); - rb_define_method(cESLevent.klass, "delHeader", VALUEFUNC(_wrap_ESLevent_delHeader), -1); - rb_define_method(cESLevent.klass, "firstHeader", VALUEFUNC(_wrap_ESLevent_firstHeader), -1); - rb_define_method(cESLevent.klass, "nextHeader", VALUEFUNC(_wrap_ESLevent_nextHeader), -1); - cESLevent.mark = 0; - cESLevent.destroy = (void (*)(void *)) free_ESLevent; - cESLevent.trackObjects = 0; + SwigClassESLevent.klass = rb_define_class_under(mESL, "ESLevent", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ESLevent, (void *) &SwigClassESLevent); + rb_define_alloc_func(SwigClassESLevent.klass, _wrap_ESLevent_allocate); + rb_define_method(SwigClassESLevent.klass, "initialize", VALUEFUNC(_wrap_new_ESLevent), -1); + rb_define_method(SwigClassESLevent.klass, "event=", VALUEFUNC(_wrap_ESLevent_event_set), -1); + rb_define_method(SwigClassESLevent.klass, "event", VALUEFUNC(_wrap_ESLevent_event_get), -1); + rb_define_method(SwigClassESLevent.klass, "serialized_string=", VALUEFUNC(_wrap_ESLevent_serialized_string_set), -1); + rb_define_method(SwigClassESLevent.klass, "serialized_string", VALUEFUNC(_wrap_ESLevent_serialized_string_get), -1); + rb_define_method(SwigClassESLevent.klass, "mine=", VALUEFUNC(_wrap_ESLevent_mine_set), -1); + rb_define_method(SwigClassESLevent.klass, "mine", VALUEFUNC(_wrap_ESLevent_mine_get), -1); + rb_define_method(SwigClassESLevent.klass, "serialize", VALUEFUNC(_wrap_ESLevent_serialize), -1); + rb_define_method(SwigClassESLevent.klass, "setPriority", VALUEFUNC(_wrap_ESLevent_setPriority), -1); + rb_define_method(SwigClassESLevent.klass, "getHeader", VALUEFUNC(_wrap_ESLevent_getHeader), -1); + rb_define_method(SwigClassESLevent.klass, "getBody", VALUEFUNC(_wrap_ESLevent_getBody), -1); + rb_define_method(SwigClassESLevent.klass, "getType", VALUEFUNC(_wrap_ESLevent_getType), -1); + rb_define_method(SwigClassESLevent.klass, "addBody", VALUEFUNC(_wrap_ESLevent_addBody), -1); + rb_define_method(SwigClassESLevent.klass, "addHeader", VALUEFUNC(_wrap_ESLevent_addHeader), -1); + rb_define_method(SwigClassESLevent.klass, "pushHeader", VALUEFUNC(_wrap_ESLevent_pushHeader), -1); + rb_define_method(SwigClassESLevent.klass, "unshiftHeader", VALUEFUNC(_wrap_ESLevent_unshiftHeader), -1); + rb_define_method(SwigClassESLevent.klass, "delHeader", VALUEFUNC(_wrap_ESLevent_delHeader), -1); + rb_define_method(SwigClassESLevent.klass, "firstHeader", VALUEFUNC(_wrap_ESLevent_firstHeader), -1); + rb_define_method(SwigClassESLevent.klass, "nextHeader", VALUEFUNC(_wrap_ESLevent_nextHeader), -1); + SwigClassESLevent.mark = 0; + SwigClassESLevent.destroy = (void (*)(void *)) free_ESLevent; + SwigClassESLevent.trackObjects = 0; - cESLconnection.klass = rb_define_class_under(mESL, "ESLconnection", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_ESLconnection, (void *) &cESLconnection); - rb_define_alloc_func(cESLconnection.klass, _wrap_ESLconnection_allocate); - rb_define_method(cESLconnection.klass, "initialize", VALUEFUNC(_wrap_new_ESLconnection), -1); - rb_define_method(cESLconnection.klass, "socketDescriptor", VALUEFUNC(_wrap_ESLconnection_socketDescriptor), -1); - rb_define_method(cESLconnection.klass, "connected", VALUEFUNC(_wrap_ESLconnection_connected), -1); - rb_define_method(cESLconnection.klass, "getInfo", VALUEFUNC(_wrap_ESLconnection_getInfo), -1); - rb_define_method(cESLconnection.klass, "send", VALUEFUNC(_wrap_ESLconnection_send), -1); - rb_define_method(cESLconnection.klass, "sendRecv", VALUEFUNC(_wrap_ESLconnection_sendRecv), -1); - rb_define_method(cESLconnection.klass, "api", VALUEFUNC(_wrap_ESLconnection_api), -1); - rb_define_method(cESLconnection.klass, "bgapi", VALUEFUNC(_wrap_ESLconnection_bgapi), -1); - rb_define_method(cESLconnection.klass, "sendEvent", VALUEFUNC(_wrap_ESLconnection_sendEvent), -1); - rb_define_method(cESLconnection.klass, "sendMSG", VALUEFUNC(_wrap_ESLconnection_sendMSG), -1); - rb_define_method(cESLconnection.klass, "recvEvent", VALUEFUNC(_wrap_ESLconnection_recvEvent), -1); - rb_define_method(cESLconnection.klass, "recvEventTimed", VALUEFUNC(_wrap_ESLconnection_recvEventTimed), -1); - rb_define_method(cESLconnection.klass, "filter", VALUEFUNC(_wrap_ESLconnection_filter), -1); - rb_define_method(cESLconnection.klass, "events", VALUEFUNC(_wrap_ESLconnection_events), -1); - rb_define_method(cESLconnection.klass, "execute", VALUEFUNC(_wrap_ESLconnection_execute), -1); - rb_define_method(cESLconnection.klass, "executeAsync", VALUEFUNC(_wrap_ESLconnection_executeAsync), -1); - rb_define_method(cESLconnection.klass, "setAsyncExecute", VALUEFUNC(_wrap_ESLconnection_setAsyncExecute), -1); - rb_define_method(cESLconnection.klass, "setEventLock", VALUEFUNC(_wrap_ESLconnection_setEventLock), -1); - rb_define_method(cESLconnection.klass, "disconnect", VALUEFUNC(_wrap_ESLconnection_disconnect), -1); - cESLconnection.mark = 0; - cESLconnection.destroy = (void (*)(void *)) free_ESLconnection; - cESLconnection.trackObjects = 0; + SwigClassESLconnection.klass = rb_define_class_under(mESL, "ESLconnection", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ESLconnection, (void *) &SwigClassESLconnection); + rb_define_alloc_func(SwigClassESLconnection.klass, _wrap_ESLconnection_allocate); + rb_define_method(SwigClassESLconnection.klass, "initialize", VALUEFUNC(_wrap_new_ESLconnection), -1); + rb_define_method(SwigClassESLconnection.klass, "socketDescriptor", VALUEFUNC(_wrap_ESLconnection_socketDescriptor), -1); + rb_define_method(SwigClassESLconnection.klass, "connected", VALUEFUNC(_wrap_ESLconnection_connected), -1); + rb_define_method(SwigClassESLconnection.klass, "getInfo", VALUEFUNC(_wrap_ESLconnection_getInfo), -1); + rb_define_method(SwigClassESLconnection.klass, "send", VALUEFUNC(_wrap_ESLconnection_send), -1); + rb_define_method(SwigClassESLconnection.klass, "sendRecv", VALUEFUNC(_wrap_ESLconnection_sendRecv), -1); + rb_define_method(SwigClassESLconnection.klass, "api", VALUEFUNC(_wrap_ESLconnection_api), -1); + rb_define_method(SwigClassESLconnection.klass, "bgapi", VALUEFUNC(_wrap_ESLconnection_bgapi), -1); + rb_define_method(SwigClassESLconnection.klass, "sendEvent", VALUEFUNC(_wrap_ESLconnection_sendEvent), -1); + rb_define_method(SwigClassESLconnection.klass, "sendMSG", VALUEFUNC(_wrap_ESLconnection_sendMSG), -1); + rb_define_method(SwigClassESLconnection.klass, "recvEvent", VALUEFUNC(_wrap_ESLconnection_recvEvent), -1); + rb_define_method(SwigClassESLconnection.klass, "recvEventTimed", VALUEFUNC(_wrap_ESLconnection_recvEventTimed), -1); + rb_define_method(SwigClassESLconnection.klass, "filter", VALUEFUNC(_wrap_ESLconnection_filter), -1); + rb_define_method(SwigClassESLconnection.klass, "events", VALUEFUNC(_wrap_ESLconnection_events), -1); + rb_define_method(SwigClassESLconnection.klass, "execute", VALUEFUNC(_wrap_ESLconnection_execute), -1); + rb_define_method(SwigClassESLconnection.klass, "executeAsync", VALUEFUNC(_wrap_ESLconnection_executeAsync), -1); + rb_define_method(SwigClassESLconnection.klass, "setAsyncExecute", VALUEFUNC(_wrap_ESLconnection_setAsyncExecute), -1); + rb_define_method(SwigClassESLconnection.klass, "setEventLock", VALUEFUNC(_wrap_ESLconnection_setEventLock), -1); + rb_define_method(SwigClassESLconnection.klass, "disconnect", VALUEFUNC(_wrap_ESLconnection_disconnect), -1); + SwigClassESLconnection.mark = 0; + SwigClassESLconnection.destroy = (void (*)(void *)) free_ESLconnection; + SwigClassESLconnection.trackObjects = 0; rb_define_module_function(mESL, "eslSetLogLevel", VALUEFUNC(_wrap_eslSetLogLevel), -1); } diff --git a/libs/esl/ruby/single_command.rb b/libs/esl/ruby/single_command.rb index b763cd8211..783152c390 100644 --- a/libs/esl/ruby/single_command.rb +++ b/libs/esl/ruby/single_command.rb @@ -1,8 +1,14 @@ #! /usr/bin/ruby +require_relative './ESL' -require "ESL" +HOST = '127.0.0.1'.to_s +PORT = '8021'.to_s +PASSWORD = 'ClueCon'.to_s command = ARGV.join(" ") -con = ESL::ESLconnection.new("localhost", "8021", "ClueCon") -e = con.sendRecv("api #{command}") -puts e.getBody() + +con = ESL::ESLconnection.new(HOST,PORT,PASSWORD) +e = con.sendRecv('api ' + command) + +puts e.getBody +