add optional job-uuid param to bgapi in oop mod
This commit is contained in:
parent
646ad887d7
commit
e96acac3c8
|
@ -790,11 +790,12 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1api(JNIEn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1bgapi(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
|
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1bgapi(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
|
||||||
jlong jresult = 0 ;
|
jlong jresult = 0 ;
|
||||||
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
||||||
char *arg2 = (char *) 0 ;
|
char *arg2 = (char *) 0 ;
|
||||||
char *arg3 = (char *) NULL ;
|
char *arg3 = (char *) NULL ;
|
||||||
|
char *arg4 = (char *) NULL ;
|
||||||
ESLevent *result = 0 ;
|
ESLevent *result = 0 ;
|
||||||
|
|
||||||
(void)jenv;
|
(void)jenv;
|
||||||
|
@ -811,10 +812,16 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1bgapi(JNI
|
||||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||||
if (!arg3) return 0;
|
if (!arg3) return 0;
|
||||||
}
|
}
|
||||||
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
|
arg4 = 0;
|
||||||
|
if (jarg4) {
|
||||||
|
arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
|
||||||
|
if (!arg4) return 0;
|
||||||
|
}
|
||||||
|
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
||||||
*(ESLevent **)&jresult = result;
|
*(ESLevent **)&jresult = result;
|
||||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||||
|
if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
|
||||||
return jresult;
|
return jresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,8 @@ public class ESLconnection {
|
||||||
return (cPtr == 0) ? null : new ESLevent(cPtr, true);
|
return (cPtr == 0) ? null : new ESLevent(cPtr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ESLevent bgapi(String cmd, String arg) {
|
public ESLevent bgapi(String cmd, String arg, String job_uuid) {
|
||||||
long cPtr = eslJNI.ESLconnection_bgapi(swigCPtr, this, cmd, arg);
|
long cPtr = eslJNI.ESLconnection_bgapi(swigCPtr, this, cmd, arg, job_uuid);
|
||||||
return (cPtr == 0) ? null : new ESLevent(cPtr, true);
|
return (cPtr == 0) ? null : new ESLevent(cPtr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ class eslJNI {
|
||||||
public final static native int ESLconnection_send(long jarg1, ESLconnection jarg1_, String jarg2);
|
public final static native int ESLconnection_send(long jarg1, ESLconnection jarg1_, String jarg2);
|
||||||
public final static native long ESLconnection_sendRecv(long jarg1, ESLconnection jarg1_, String jarg2);
|
public final static native long ESLconnection_sendRecv(long jarg1, ESLconnection jarg1_, String jarg2);
|
||||||
public final static native long ESLconnection_api(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3);
|
public final static native long ESLconnection_api(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3);
|
||||||
public final static native long ESLconnection_bgapi(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3);
|
public final static native long ESLconnection_bgapi(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3, String jarg4);
|
||||||
public final static native long ESLconnection_sendEvent(long jarg1, ESLconnection jarg1_, long jarg2, ESLevent jarg2_);
|
public final static native long ESLconnection_sendEvent(long jarg1, ESLconnection jarg1_, long jarg2, ESLevent jarg2_);
|
||||||
public final static native long ESLconnection_recvEvent(long jarg1, ESLconnection jarg1_);
|
public final static native long ESLconnection_recvEvent(long jarg1, ESLconnection jarg1_);
|
||||||
public final static native long ESLconnection_recvEventTimed(long jarg1, ESLconnection jarg1_, int jarg2);
|
public final static native long ESLconnection_recvEventTimed(long jarg1, ESLconnection jarg1_, int jarg2);
|
||||||
|
|
|
@ -2498,12 +2498,14 @@ static int _wrap_ESLconnection_bgapi(lua_State* L) {
|
||||||
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
||||||
char *arg2 = (char *) 0 ;
|
char *arg2 = (char *) 0 ;
|
||||||
char *arg3 = (char *) NULL ;
|
char *arg3 = (char *) NULL ;
|
||||||
|
char *arg4 = (char *) NULL ;
|
||||||
ESLevent *result = 0 ;
|
ESLevent *result = 0 ;
|
||||||
|
|
||||||
SWIG_check_num_args("bgapi",2,3)
|
SWIG_check_num_args("bgapi",2,4)
|
||||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("bgapi",1,"ESLconnection *");
|
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("bgapi",1,"ESLconnection *");
|
||||||
if(!lua_isstring(L,2)) SWIG_fail_arg("bgapi",2,"char const *");
|
if(!lua_isstring(L,2)) SWIG_fail_arg("bgapi",2,"char const *");
|
||||||
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("bgapi",3,"char const *");
|
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("bgapi",3,"char const *");
|
||||||
|
if(lua_gettop(L)>=4 && !lua_isstring(L,4)) SWIG_fail_arg("bgapi",4,"char const *");
|
||||||
|
|
||||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
|
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
|
||||||
SWIG_fail_ptr("ESLconnection_bgapi",1,SWIGTYPE_p_ESLconnection);
|
SWIG_fail_ptr("ESLconnection_bgapi",1,SWIGTYPE_p_ESLconnection);
|
||||||
|
@ -2513,7 +2515,10 @@ static int _wrap_ESLconnection_bgapi(lua_State* L) {
|
||||||
if(lua_gettop(L)>=3){
|
if(lua_gettop(L)>=3){
|
||||||
arg3 = (char *)lua_tostring(L, 3);
|
arg3 = (char *)lua_tostring(L, 3);
|
||||||
}
|
}
|
||||||
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
|
if(lua_gettop(L)>=4){
|
||||||
|
arg4 = (char *)lua_tostring(L, 4);
|
||||||
|
}
|
||||||
|
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
||||||
SWIG_arg=0;
|
SWIG_arg=0;
|
||||||
SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
|
||||||
return SWIG_arg;
|
return SWIG_arg;
|
||||||
|
|
|
@ -275,7 +275,7 @@ class ESLPINVOKE {
|
||||||
public static extern IntPtr ESLconnection_Api(HandleRef jarg1, string jarg2, string jarg3);
|
public static extern IntPtr ESLconnection_Api(HandleRef jarg1, string jarg2, string jarg3);
|
||||||
|
|
||||||
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_Bgapi")]
|
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_Bgapi")]
|
||||||
public static extern IntPtr ESLconnection_Bgapi(HandleRef jarg1, string jarg2, string jarg3);
|
public static extern IntPtr ESLconnection_Bgapi(HandleRef jarg1, string jarg2, string jarg3, string jarg4);
|
||||||
|
|
||||||
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_SendEvent")]
|
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_SendEvent")]
|
||||||
public static extern IntPtr ESLconnection_SendEvent(HandleRef jarg1, HandleRef jarg2);
|
public static extern IntPtr ESLconnection_SendEvent(HandleRef jarg1, HandleRef jarg2);
|
||||||
|
|
|
@ -80,8 +80,8 @@ public class ESLconnection : IDisposable {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ESLevent Bgapi(string cmd, string arg) {
|
public ESLevent Bgapi(string cmd, string arg, string job_uuid) {
|
||||||
IntPtr cPtr = ESLPINVOKE.ESLconnection_Bgapi(swigCPtr, cmd, arg);
|
IntPtr cPtr = ESLPINVOKE.ESLconnection_Bgapi(swigCPtr, cmd, arg, job_uuid);
|
||||||
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
|
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -677,17 +677,19 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_Api(void * jarg1, char * jarg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_Bgapi(void * jarg1, char * jarg2, char * jarg3) {
|
SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_Bgapi(void * jarg1, char * jarg2, char * jarg3, char * jarg4) {
|
||||||
void * jresult ;
|
void * jresult ;
|
||||||
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
||||||
char *arg2 = (char *) 0 ;
|
char *arg2 = (char *) 0 ;
|
||||||
char *arg3 = (char *) NULL ;
|
char *arg3 = (char *) NULL ;
|
||||||
|
char *arg4 = (char *) NULL ;
|
||||||
ESLevent *result = 0 ;
|
ESLevent *result = 0 ;
|
||||||
|
|
||||||
arg1 = (ESLconnection *)jarg1;
|
arg1 = (ESLconnection *)jarg1;
|
||||||
arg2 = (char *)jarg2;
|
arg2 = (char *)jarg2;
|
||||||
arg3 = (char *)jarg3;
|
arg3 = (char *)jarg3;
|
||||||
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
|
arg4 = (char *)jarg4;
|
||||||
|
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
||||||
jresult = (void *)result;
|
jresult = (void *)result;
|
||||||
return jresult;
|
return jresult;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3072,6 +3072,7 @@ XS(_wrap_ESLconnection_bgapi) {
|
||||||
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
||||||
char *arg2 = (char *) 0 ;
|
char *arg2 = (char *) 0 ;
|
||||||
char *arg3 = (char *) NULL ;
|
char *arg3 = (char *) NULL ;
|
||||||
|
char *arg4 = (char *) NULL ;
|
||||||
ESLevent *result = 0 ;
|
ESLevent *result = 0 ;
|
||||||
void *argp1 = 0 ;
|
void *argp1 = 0 ;
|
||||||
int res1 = 0 ;
|
int res1 = 0 ;
|
||||||
|
@ -3081,11 +3082,14 @@ XS(_wrap_ESLconnection_bgapi) {
|
||||||
int res3 ;
|
int res3 ;
|
||||||
char *buf3 = 0 ;
|
char *buf3 = 0 ;
|
||||||
int alloc3 = 0 ;
|
int alloc3 = 0 ;
|
||||||
|
int res4 ;
|
||||||
|
char *buf4 = 0 ;
|
||||||
|
int alloc4 = 0 ;
|
||||||
int argvi = 0;
|
int argvi = 0;
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
|
|
||||||
if ((items < 2) || (items > 3)) {
|
if ((items < 2) || (items > 4)) {
|
||||||
SWIG_croak("Usage: ESLconnection_bgapi(self,cmd,arg);");
|
SWIG_croak("Usage: ESLconnection_bgapi(self,cmd,arg,job_uuid);");
|
||||||
}
|
}
|
||||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
|
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
|
||||||
if (!SWIG_IsOK(res1)) {
|
if (!SWIG_IsOK(res1)) {
|
||||||
|
@ -3104,16 +3108,25 @@ XS(_wrap_ESLconnection_bgapi) {
|
||||||
}
|
}
|
||||||
arg3 = reinterpret_cast< char * >(buf3);
|
arg3 = reinterpret_cast< char * >(buf3);
|
||||||
}
|
}
|
||||||
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
|
if (items > 3) {
|
||||||
|
res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
|
||||||
|
if (!SWIG_IsOK(res4)) {
|
||||||
|
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_bgapi" "', argument " "4"" of type '" "char const *""'");
|
||||||
|
}
|
||||||
|
arg4 = reinterpret_cast< char * >(buf4);
|
||||||
|
}
|
||||||
|
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
||||||
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||||
|
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||||
|
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||||
XSRETURN(argvi);
|
XSRETURN(argvi);
|
||||||
fail:
|
fail:
|
||||||
|
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||||
|
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||||
SWIG_croak_null();
|
SWIG_croak_null();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,10 +152,11 @@ class ESLconnection {
|
||||||
return is_resource($r) ? new ESLevent($r) : $r;
|
return is_resource($r) ? new ESLevent($r) : $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bgapi($cmd,$arg=null) {
|
function bgapi($cmd,$arg=null,$job_uuid=null) {
|
||||||
switch (func_num_args()) {
|
switch (func_num_args()) {
|
||||||
case 1: $r=ESLconnection_bgapi($this->_cPtr,$cmd); break;
|
case 1: $r=ESLconnection_bgapi($this->_cPtr,$cmd); break;
|
||||||
default: $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg);
|
case 2: $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg); break;
|
||||||
|
default: $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg,$job_uuid);
|
||||||
}
|
}
|
||||||
return is_resource($r) ? new ESLevent($r) : $r;
|
return is_resource($r) ? new ESLevent($r) : $r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2075,13 +2075,14 @@ ZEND_NAMED_FUNCTION(_wrap_ESLconnection_bgapi) {
|
||||||
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
||||||
char *arg2 = (char *) 0 ;
|
char *arg2 = (char *) 0 ;
|
||||||
char *arg3 = (char *) NULL ;
|
char *arg3 = (char *) NULL ;
|
||||||
|
char *arg4 = (char *) NULL ;
|
||||||
ESLevent *result = 0 ;
|
ESLevent *result = 0 ;
|
||||||
zval **args[3];
|
zval **args[4];
|
||||||
int arg_count;
|
int arg_count;
|
||||||
|
|
||||||
SWIG_ResetError();
|
SWIG_ResetError();
|
||||||
arg_count = ZEND_NUM_ARGS();
|
arg_count = ZEND_NUM_ARGS();
|
||||||
if(arg_count<2 || arg_count>3 ||
|
if(arg_count<2 || arg_count>4 ||
|
||||||
zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
|
zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
|
||||||
|
@ -2104,7 +2105,14 @@ ZEND_NAMED_FUNCTION(_wrap_ESLconnection_bgapi) {
|
||||||
/*@SWIG@*/;
|
/*@SWIG@*/;
|
||||||
|
|
||||||
}
|
}
|
||||||
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
|
if(arg_count > 3) {
|
||||||
|
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
|
||||||
|
convert_to_string_ex(args[3]);
|
||||||
|
arg4 = (char *) Z_STRVAL_PP(args[3]);
|
||||||
|
/*@SWIG@*/;
|
||||||
|
|
||||||
|
}
|
||||||
|
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
||||||
{
|
{
|
||||||
SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
|
SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4151,6 +4151,7 @@ SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), P
|
||||||
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
||||||
char *arg2 = (char *) 0 ;
|
char *arg2 = (char *) 0 ;
|
||||||
char *arg3 = (char *) NULL ;
|
char *arg3 = (char *) NULL ;
|
||||||
|
char *arg4 = (char *) NULL ;
|
||||||
ESLevent *result = 0 ;
|
ESLevent *result = 0 ;
|
||||||
void *argp1 = 0 ;
|
void *argp1 = 0 ;
|
||||||
int res1 = 0 ;
|
int res1 = 0 ;
|
||||||
|
@ -4160,12 +4161,16 @@ SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), P
|
||||||
int res3 ;
|
int res3 ;
|
||||||
char *buf3 = 0 ;
|
char *buf3 = 0 ;
|
||||||
int alloc3 = 0 ;
|
int alloc3 = 0 ;
|
||||||
|
int res4 ;
|
||||||
|
char *buf4 = 0 ;
|
||||||
|
int alloc4 = 0 ;
|
||||||
PyObject * obj0 = 0 ;
|
PyObject * obj0 = 0 ;
|
||||||
PyObject * obj1 = 0 ;
|
PyObject * obj1 = 0 ;
|
||||||
PyObject * obj2 = 0 ;
|
PyObject * obj2 = 0 ;
|
||||||
|
PyObject * obj3 = 0 ;
|
||||||
|
|
||||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||||
if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_bgapi",&obj0,&obj1,&obj2)) SWIG_fail;
|
if (!PyArg_ParseTuple(args,(char *)"OO|OO:ESLconnection_bgapi",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
||||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
|
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
|
||||||
if (!SWIG_IsOK(res1)) {
|
if (!SWIG_IsOK(res1)) {
|
||||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
|
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
|
||||||
|
@ -4183,19 +4188,28 @@ SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), P
|
||||||
}
|
}
|
||||||
arg3 = reinterpret_cast< char * >(buf3);
|
arg3 = reinterpret_cast< char * >(buf3);
|
||||||
}
|
}
|
||||||
|
if (obj3) {
|
||||||
|
res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
|
||||||
|
if (!SWIG_IsOK(res4)) {
|
||||||
|
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_bgapi" "', argument " "4"" of type '" "char const *""'");
|
||||||
|
}
|
||||||
|
arg4 = reinterpret_cast< char * >(buf4);
|
||||||
|
}
|
||||||
{
|
{
|
||||||
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
||||||
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
|
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
||||||
SWIG_PYTHON_THREAD_END_ALLOW;
|
SWIG_PYTHON_THREAD_END_ALLOW;
|
||||||
}
|
}
|
||||||
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
|
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||||
|
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
fail:
|
fail:
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||||
|
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3055,6 +3055,7 @@ _wrap_ESLconnection_bgapi(int argc, VALUE *argv, VALUE self) {
|
||||||
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
ESLconnection *arg1 = (ESLconnection *) 0 ;
|
||||||
char *arg2 = (char *) 0 ;
|
char *arg2 = (char *) 0 ;
|
||||||
char *arg3 = (char *) NULL ;
|
char *arg3 = (char *) NULL ;
|
||||||
|
char *arg4 = (char *) NULL ;
|
||||||
ESLevent *result = 0 ;
|
ESLevent *result = 0 ;
|
||||||
void *argp1 = 0 ;
|
void *argp1 = 0 ;
|
||||||
int res1 = 0 ;
|
int res1 = 0 ;
|
||||||
|
@ -3064,9 +3065,12 @@ _wrap_ESLconnection_bgapi(int argc, VALUE *argv, VALUE self) {
|
||||||
int res3 ;
|
int res3 ;
|
||||||
char *buf3 = 0 ;
|
char *buf3 = 0 ;
|
||||||
int alloc3 = 0 ;
|
int alloc3 = 0 ;
|
||||||
|
int res4 ;
|
||||||
|
char *buf4 = 0 ;
|
||||||
|
int alloc4 = 0 ;
|
||||||
VALUE vresult = Qnil;
|
VALUE vresult = Qnil;
|
||||||
|
|
||||||
if ((argc < 1) || (argc > 2)) {
|
if ((argc < 1) || (argc > 3)) {
|
||||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
||||||
}
|
}
|
||||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
|
||||||
|
@ -3086,14 +3090,23 @@ _wrap_ESLconnection_bgapi(int argc, VALUE *argv, VALUE self) {
|
||||||
}
|
}
|
||||||
arg3 = reinterpret_cast< char * >(buf3);
|
arg3 = reinterpret_cast< char * >(buf3);
|
||||||
}
|
}
|
||||||
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
|
if (argc > 2) {
|
||||||
|
res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
|
||||||
|
if (!SWIG_IsOK(res4)) {
|
||||||
|
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","bgapi", 4, argv[2] ));
|
||||||
|
}
|
||||||
|
arg4 = reinterpret_cast< char * >(buf4);
|
||||||
|
}
|
||||||
|
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
||||||
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||||
|
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||||
return vresult;
|
return vresult;
|
||||||
fail:
|
fail:
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||||
|
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ ESLevent *ESLconnection::api(const char *cmd, const char *arg)
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
ESLevent *ESLconnection::bgapi(const char *cmd, const char *arg)
|
ESLevent *ESLconnection::bgapi(const char *cmd, const char *arg, const char *job_uuid)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
char *cmd_buf;
|
char *cmd_buf;
|
||||||
|
@ -115,12 +115,17 @@ ESLevent *ESLconnection::bgapi(const char *cmd, const char *arg)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlen(cmd) + (arg ? strlen(arg) : 0) + 10;
|
len = strlen(cmd) + (arg ? strlen(arg) : 0) + (job_uuid ? strlen(job_uuid) + 12 : 0) + 10;
|
||||||
|
|
||||||
cmd_buf = (char *) malloc(len + 1);
|
cmd_buf = (char *) malloc(len + 1);
|
||||||
assert(cmd_buf);
|
assert(cmd_buf);
|
||||||
|
|
||||||
snprintf(cmd_buf, len, "bgapi %s %s", cmd, arg ? arg : "");
|
if (job_uuid) {
|
||||||
|
snprintf(cmd_buf, len, "bgapi %s%s%s\nJob-UUID: %s", cmd, arg ? " " : "", arg ? arg : "", job_uuid);
|
||||||
|
} else {
|
||||||
|
snprintf(cmd_buf, len, "bgapi %s%s%s", cmd, arg ? " " : "", arg ? arg : "");
|
||||||
|
}
|
||||||
|
|
||||||
*(cmd_buf + (len)) = '\0';
|
*(cmd_buf + (len)) = '\0';
|
||||||
|
|
||||||
event = sendRecv(cmd_buf);
|
event = sendRecv(cmd_buf);
|
||||||
|
|
|
@ -82,7 +82,7 @@ class ESLconnection {
|
||||||
int send(const char *cmd);
|
int send(const char *cmd);
|
||||||
ESLevent *sendRecv(const char *cmd);
|
ESLevent *sendRecv(const char *cmd);
|
||||||
ESLevent *api(const char *cmd, const char *arg = NULL);
|
ESLevent *api(const char *cmd, const char *arg = NULL);
|
||||||
ESLevent *bgapi(const char *cmd, const char *arg = NULL);
|
ESLevent *bgapi(const char *cmd, const char *arg = NULL, const char *job_uuid = NULL);
|
||||||
ESLevent *sendEvent(ESLevent *send_me);
|
ESLevent *sendEvent(ESLevent *send_me);
|
||||||
ESLevent *recvEvent();
|
ESLevent *recvEvent();
|
||||||
ESLevent *recvEventTimed(int ms);
|
ESLevent *recvEventTimed(int ms);
|
||||||
|
|
Loading…
Reference in New Issue