mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
add array manipulation to the wraper code
This commit is contained in:
@@ -2396,15 +2396,18 @@ SWIGINTERN VALUE
|
||||
_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 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
VALUE vresult = Qnil;
|
||||
|
||||
if ((argc < 1) || (argc > 1)) {
|
||||
if ((argc < 1) || (argc > 2)) {
|
||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
@@ -2417,7 +2420,14 @@ _wrap_ESLevent_getHeader(int argc, VALUE *argv, VALUE self) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if (argc > 1) {
|
||||
ecode3 = SWIG_AsVal_int(argv[1], &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","getHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
vresult = SWIG_FromCharPtr((const char *)result);
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
return vresult;
|
||||
@@ -2556,6 +2566,98 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_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 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 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(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLevent *","pushHeader", 1, self ));
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pushHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","pushHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
vresult = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return vresult;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_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 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 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(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLevent *","unshiftHeader", 1, self ));
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","unshiftHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","unshiftHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
vresult = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return vresult;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_wrap_ESLevent_delHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
@@ -3835,6 +3937,8 @@ SWIGEXPORT void Init_ESL(void) {
|
||||
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);
|
||||
|
Reference in New Issue
Block a user