wrap new methods

This commit is contained in:
Simon Morlat 2013-08-14 16:08:26 +02:00
parent 86ade2174c
commit 01d35e5b53
3 changed files with 48 additions and 0 deletions

View file

@ -1911,6 +1911,32 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransferState(
return linphone_call_get_transfer_state(call);
}
/*
* Class: org_linphone_core_LinphoneCallImpl
* Method: getTransfererCall
* Signature: (J)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransfererCall(JNIEnv *env, jobject jCall, jlong callptr){
LinphoneCall *call=(LinphoneCall*)callptr;
LinphoneCore *lc=linphone_call_get_core(call);
LinphoneCoreData *lcdata=(LinphoneCoreData*)linphone_core_get_user_data(lc);
LinphoneCall *ret=linphone_call_get_transferer_call(call);
return lcdata->getCall(env,ret);
}
/*
* Class: org_linphone_core_LinphoneCallImpl
* Method: getTransferTargetCall
* Signature: (J)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransferTargetCall(JNIEnv *env, jobject jCall, jlong callptr){
LinphoneCall *call=(LinphoneCall*)callptr;
LinphoneCore *lc=linphone_call_get_core(call);
LinphoneCoreData *lcdata=(LinphoneCoreData*)linphone_core_get_user_data(lc);
LinphoneCall *ret=linphone_call_get_transfer_target_call(call);
return lcdata->getCall(env,ret);
}
extern "C" void Java_org_linphone_core_LinphoneCallImpl_enableEchoCancellation( JNIEnv* env
,jobject thiz
,jlong ptr

View file

@ -303,4 +303,16 @@ public interface LinphoneCall {
* Send an info message to remote peer.
*/
void sendInfoMessage(LinphoneInfoMessage msg);
/**
* Returns the transferer if this call was started automatically as a result of an incoming transfer request.
* The call in which the transfer request was received is returned in this case.
**/
LinphoneCall getTransfererCall();
/**
* When this call has received a transfer request, returns the new call that was automatically created as a result of the transfer.
**/
LinphoneCall getTransferTargetCall();
}

View file

@ -217,4 +217,14 @@ class LinphoneCallImpl implements LinphoneCall {
public void sendInfoMessage(LinphoneInfoMessage msg) {
sendInfoMessage(nativePtr,((LinphoneInfoMessageImpl)msg).nativePtr);
}
private native Object getTransfererCall(long callPtr);
@Override
public LinphoneCall getTransfererCall() {
return (LinphoneCall)getTransfererCall(nativePtr);
}
private native Object getTransferTargetCall(long callPtr);
@Override
public LinphoneCall getTransferTargetCall() {
return (LinphoneCall)getTransferTargetCall(nativePtr);
}
}