%newobject ESLconnection::filter;
%newobject ESLconnection::recvEvent;
%newobject ESLconnection::recvEventTimed;
+%newobject ESLconnection::execute;
+%newobject ESLconnection::executeAsync;
#endif
%include "esl_oop.h"
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
- jint jresult = 0 ;
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
+ jlong jresult = 0 ;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
(void)jenv;
(void)jcls;
arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
if (!arg4) return 0;
}
- result = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
- jresult = (jint)result;
+ result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ *(ESLevent **)&jresult = result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1executeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
- jint jresult = 0 ;
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1executeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
+ jlong jresult = 0 ;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
(void)jenv;
(void)jcls;
arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
if (!arg4) return 0;
}
- result = (int)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
- jresult = (jint)result;
+ result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ *(ESLevent **)&jresult = result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
return eslJNI.ESLconnection_events(swigCPtr, this, etype, value);
}
- public int execute(String app, String arg, String uuid) {
- return eslJNI.ESLconnection_execute(swigCPtr, this, app, arg, uuid);
+ public ESLevent execute(String app, String arg, String uuid) {
+ long cPtr = eslJNI.ESLconnection_execute(swigCPtr, this, app, arg, uuid);
+ return (cPtr == 0) ? null : new ESLevent(cPtr, true);
}
- public int executeAsync(String app, String arg, String uuid) {
- return eslJNI.ESLconnection_executeAsync(swigCPtr, this, app, arg, uuid);
+ public ESLevent executeAsync(String app, String arg, String uuid) {
+ long cPtr = eslJNI.ESLconnection_executeAsync(swigCPtr, this, app, arg, uuid);
+ return (cPtr == 0) ? null : new ESLevent(cPtr, true);
}
public int setAsyncExecute(String val) {
public final static native long ESLconnection_recvEventTimed(long jarg1, ESLconnection jarg1_, int jarg2);
public final static native long ESLconnection_filter(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3);
public final static native int ESLconnection_events(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3);
- public final static native int ESLconnection_execute(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3, String jarg4);
- public final static native int ESLconnection_executeAsync(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3, String jarg4);
+ public final static native long ESLconnection_execute(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3, String jarg4);
+ public final static native long ESLconnection_executeAsync(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3, String jarg4);
public final static native int ESLconnection_setAsyncExecute(long jarg1, ESLconnection jarg1_, String jarg2);
public final static native int ESLconnection_setEventLock(long jarg1, ESLconnection jarg1_, String jarg2);
public final static native int ESLconnection_disconnect(long jarg1, ESLconnection jarg1_);
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
SWIG_check_num_args("execute",2,4)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"ESLconnection *");
if(lua_gettop(L)>=4){
arg4 = (char *)lua_tostring(L, 4);
}
- result = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
SWIG_arg=0;
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
SWIG_check_num_args("executeAsync",2,4)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("executeAsync",1,"ESLconnection *");
if(lua_gettop(L)>=4){
arg4 = (char *)lua_tostring(L, 4);
}
- result = (int)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
SWIG_arg=0;
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
public static extern int ESLconnection_events(HandleRef jarg1, string jarg2, string jarg3);
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_execute")]
- public static extern int ESLconnection_execute(HandleRef jarg1, string jarg2, string jarg3, string jarg4);
+ public static extern IntPtr ESLconnection_execute(HandleRef jarg1, string jarg2, string jarg3, string jarg4);
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_executeAsync")]
- public static extern int ESLconnection_executeAsync(HandleRef jarg1, string jarg2, string jarg3, string jarg4);
+ public static extern IntPtr ESLconnection_executeAsync(HandleRef jarg1, string jarg2, string jarg3, string jarg4);
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_setAsyncExecute")]
public static extern int ESLconnection_setAsyncExecute(HandleRef jarg1, string jarg2);
return ret;
}
- public int execute(string app, string arg, string uuid) {
- int ret = ESLPINVOKE.ESLconnection_execute(swigCPtr, app, arg, uuid);
+ public ESLevent execute(string app, string arg, string uuid) {
+ IntPtr cPtr = ESLPINVOKE.ESLconnection_execute(swigCPtr, app, arg, uuid);
+ ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
- public int executeAsync(string app, string arg, string uuid) {
- int ret = ESLPINVOKE.ESLconnection_executeAsync(swigCPtr, app, arg, uuid);
+ public ESLevent executeAsync(string app, string arg, string uuid) {
+ IntPtr cPtr = ESLPINVOKE.ESLconnection_executeAsync(swigCPtr, app, arg, uuid);
+ ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
}
-SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_execute(void * jarg1, char * jarg2, char * jarg3, char * jarg4) {
- int jresult ;
+SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_execute(void * jarg1, char * jarg2, char * jarg3, char * jarg4) {
+ void * jresult ;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
arg1 = (ESLconnection *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
arg4 = (char *)jarg4;
- result = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
- jresult = result;
+ result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ jresult = (void *)result;
return jresult;
}
-SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_executeAsync(void * jarg1, char * jarg2, char * jarg3, char * jarg4) {
- int jresult ;
+SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_executeAsync(void * jarg1, char * jarg2, char * jarg3, char * jarg4) {
+ void * jresult ;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
arg1 = (ESLconnection *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
arg4 = (char *)jarg4;
- result = (int)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
- jresult = result;
+ result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ jresult = (void *)result;
return jresult;
}
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
}
arg4 = reinterpret_cast< char * >(buf4);
}
- result = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
- ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+ result = (ESLevent *)(arg1)->execute((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++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
}
arg4 = reinterpret_cast< char * >(buf4);
}
- result = (int)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
- ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+ result = (ESLevent *)(arg1)->executeAsync((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++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
case 2: $r=ESLconnection_execute($this->_cPtr,$app,$arg); break;
default: $r=ESLconnection_execute($this->_cPtr,$app,$arg,$uuid);
}
- return $r;
+ return is_resource($r) ? new ESLevent($r) : $r;
}
function executeAsync($app,$arg=null,$uuid=null) {
case 2: $r=ESLconnection_executeAsync($this->_cPtr,$app,$arg); break;
default: $r=ESLconnection_executeAsync($this->_cPtr,$app,$arg,$uuid);
}
- return $r;
+ return is_resource($r) ? new ESLevent($r) : $r;
}
function setAsyncExecute($val) {
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
convert_to_long_ex(args[1]);
arg2 = (int) Z_LVAL_PP(args[1]);
/*@SWIG@*/;
WRONG_PARAM_COUNT;
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[0]);
arg1 = (char *) Z_STRVAL_PP(args[0]);
/*@SWIG@*/;
if(arg_count > 1) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
}
if(arg_count > 1) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
convert_to_long_ex(args[1]);
arg2 = (int) Z_LVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
if(arg_count > 1) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[0]);
arg1 = (char *) Z_STRVAL_PP(args[0]);
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
convert_to_long_ex(args[0]);
arg1 = (int) Z_LVAL_PP(args[0]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
if(arg_count > 2) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
if(arg_count > 2) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
convert_to_long_ex(args[1]);
arg2 = (int) Z_LVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
zval **args[4];
int arg_count;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
if(arg_count > 2) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
if(arg_count > 3) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@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 = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
{
- ZVAL_LONG(return_value,result);
+ SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
}
return;
fail:
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
zval **args[4];
int arg_count;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
if(arg_count > 2) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
if(arg_count > 3) {
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@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 = (int)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
{
- ZVAL_LONG(return_value,result);
+ SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
}
return;
fail:
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[1]);
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
}
- /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
convert_to_long_ex(args[0]);
arg1 = (int) Z_LVAL_PP(args[0]);
/*@SWIG@*/;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
}
arg4 = reinterpret_cast< char * >(buf4);
}
- result = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
- resultobj = SWIG_From_int(static_cast< int >(result));
+ result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
}
arg4 = reinterpret_cast< char * >(buf4);
}
- result = (int)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
- resultobj = SWIG_From_int(static_cast< int >(result));
+ result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
}
-/*@SWIG:/usr/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+/*@SWIG:/usr/local/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
{
VALUE obj = args[0];
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
}
arg4 = reinterpret_cast< char * >(buf4);
}
- result = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
- vresult = SWIG_From_int(static_cast< int >(result));
+ result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
- int result;
+ ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
}
arg4 = reinterpret_cast< char * >(buf4);
}
- result = (int)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
- vresult = SWIG_From_int(static_cast< int >(result));
+ result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
return handle.event_lock;
}
-int ESLconnection::execute(const char *app, const char *arg, const char *uuid)
+ESLevent *ESLconnection::execute(const char *app, const char *arg, const char *uuid)
{
- return esl_execute(&handle, app, arg, uuid);
+ if (esl_execute(&handle, app, arg, uuid) == ESL_SUCCESS) {
+ esl_event_t *event;
+ esl_event_dup(&event, handle.last_sr_event);
+ return new ESLevent(event, 1);
+ }
+
+ return NULL;
}
-int ESLconnection::executeAsync(const char *app, const char *arg, const char *uuid)
+ESLevent *ESLconnection::executeAsync(const char *app, const char *arg, const char *uuid)
{
int async = handle.async_execute;
int r;
r = esl_execute(&handle, app, arg, uuid);
handle.async_execute = async;
- return r;
+ if (r == ESL_SUCCESS) {
+ esl_event_t *event;
+ esl_event_dup(&event, handle.last_sr_event);
+ return new ESLevent(event, 1);
+ }
+
+ return NULL;
}
int ESLconnection::sendEvent(ESLevent *send_me)
ESLevent *recvEventTimed(int ms);
ESLevent *filter(const char *header, const char *value);
int events(const char *etype, const char *value);
- int execute(const char *app, const char *arg = NULL, const char *uuid = NULL);
- int executeAsync(const char *app, const char *arg = NULL, const char *uuid = NULL);
+ ESLevent *execute(const char *app, const char *arg = NULL, const char *uuid = NULL);
+ ESLevent *executeAsync(const char *app, const char *arg = NULL, const char *uuid = NULL);
int setAsyncExecute(const char *val);
int setEventLock(const char *val);
int disconnect(void);