Commit fda6a31d authored by Simon Morlat's avatar Simon Morlat

add jni for LinphoneCore.startReferedCall()

parent ded4d064
......@@ -2882,6 +2882,11 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_transferCallToAnother(JN
return (jint)linphone_core_transfer_call_to_another((LinphoneCore *) pCore, (LinphoneCall *) pCall, (LinphoneCall *) pDestCall);
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_startReferedCall(JNIEnv *env, jobject thiz, jlong lc, jlong callptr, jlong params){
LinphoneCoreData *lcd=(LinphoneCoreData*)linphone_core_get_user_data((LinphoneCore*)lc);
return lcd->getCall(env,linphone_core_start_refered_call((LinphoneCore *)lc, (LinphoneCall *)callptr, (const LinphoneCallParams *)params));
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setZrtpSecretsCache(JNIEnv *env,jobject thiz,jlong pCore, jstring jFile) {
if (jFile) {
const char* cFile=env->GetStringUTFChars(jFile, NULL);
......@@ -367,7 +367,6 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call);
int linphone_core_restart_invite(LinphoneCore *lc, LinphoneCall *call);
int linphone_core_start_update_call(LinphoneCore *lc, LinphoneCall *call);
int linphone_core_start_accept_call_update(LinphoneCore *lc, LinphoneCall *call);
void linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params);
void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call);
bool_t linphone_core_incompatible_security(LinphoneCore *lc, SalMediaDescription *md);
extern SalCallbacks linphone_sal_callbacks;
......@@ -1088,6 +1088,16 @@ public interface LinphoneCore {
* @param dest a running call whose remote person will receive the transfer
void transferCallToAnother(LinphoneCall callToTransfer, LinphoneCall destination);
* Start a new call as a consequence of a transfer request received from a call.
* This function is for advanced usage: the execution of transfers is automatically managed by the LinphoneCore. However if an application
* wants to have control over the call parameters for the new call, it should call this function immediately during the LinphoneCallRefered notification.
* @param call a call that has just been notified about LinphoneCallRefered state event.
* @param params the call parameters to be applied to the new call.
* @return a LinphoneCall corresponding to the new call that is attempted to the transfer destination.
LinphoneCall startReferedCall(LinphoneCall call, LinphoneCallParams params);
* Search from the list of current calls if a remote address match uri
* @param uri which should match call remote uri
......@@ -1081,4 +1081,11 @@ class LinphoneCoreImpl implements LinphoneCore {
return new LinphoneAuthInfoImpl(ptr);
private native LinphoneCall startReferedCall(long corePtr, long callptr, long paramsPtr);
public LinphoneCall startReferedCall(LinphoneCall call,
LinphoneCallParams params) {
long ptrParams =((LinphoneCallParamsImpl)params).nativePtr;
return startReferedCall(nativePtr, getCallPtr(call), ptrParams);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment