mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-13 07:41:51 +00:00
add new chatplan concept and mod_sms. Apps for chat messages: copy new base freeswitch.xml and chatplan dir if you are upgrading on existing config base
This commit is contained in:
@@ -66,6 +66,14 @@ public class Event {
|
||||
this(freeswitchJNI.new_Event__SWIG_1(SWIGTYPE_p_switch_event_t.getCPtr(wrap_me), free_me), true);
|
||||
}
|
||||
|
||||
public int chat_execute(String app, String data) {
|
||||
return freeswitchJNI.Event_chat_execute(swigCPtr, this, app, data);
|
||||
}
|
||||
|
||||
public int chat_send(String dest_proto) {
|
||||
return freeswitchJNI.Event_chat_send(swigCPtr, this, dest_proto);
|
||||
}
|
||||
|
||||
public String serialize(String format) {
|
||||
return freeswitchJNI.Event_serialize(swigCPtr, this, format);
|
||||
}
|
||||
|
||||
@@ -54,6 +54,8 @@ class freeswitchJNI {
|
||||
public final static native long new_Event__SWIG_0(String jarg1, String jarg2);
|
||||
public final static native long new_Event__SWIG_1(long jarg1, int jarg2);
|
||||
public final static native void delete_Event(long jarg1);
|
||||
public final static native int Event_chat_execute(long jarg1, Event jarg1_, String jarg2, String jarg3);
|
||||
public final static native int Event_chat_send(long jarg1, Event jarg1_, String jarg2);
|
||||
public final static native String Event_serialize(long jarg1, Event jarg1_, String jarg2);
|
||||
public final static native boolean Event_setPriority(long jarg1, Event jarg1_, long jarg2);
|
||||
public final static native String Event_getHeader(long jarg1, Event jarg1_, String jarg2);
|
||||
|
||||
@@ -1054,6 +1054,57 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1Event(JNI
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1chat_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
|
||||
jint jresult = 0 ;
|
||||
Event *arg1 = (Event *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) NULL ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(Event **)&jarg1;
|
||||
arg2 = 0;
|
||||
if (jarg2) {
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
arg3 = 0;
|
||||
if (jarg3) {
|
||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||
if (!arg3) return 0;
|
||||
}
|
||||
result = (int)(arg1)->chat_execute((char const *)arg2,(char const *)arg3);
|
||||
jresult = (jint)result;
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1chat_1send(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
|
||||
jint jresult = 0 ;
|
||||
Event *arg1 = (Event *) 0 ;
|
||||
char *arg2 = (char *) NULL ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(Event **)&jarg1;
|
||||
arg2 = 0;
|
||||
if (jarg2) {
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
result = (int)(arg1)->chat_send((char const *)arg2);
|
||||
jresult = (jint)result;
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
|
||||
jstring jresult = 0 ;
|
||||
Event *arg1 = (Event *) 0 ;
|
||||
|
||||
Reference in New Issue
Block a user