From ce510f9d1fa8d66aabcca308f0d2a9174f68acd4 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Mon, 14 Nov 2011 15:32:31 +0100 Subject: [PATCH] Jni for setAuthenticationTokenVerified function. --- coreapi/linphonecore_jni.cc | 5 +++++ .../common/org/linphone/core/LinphoneCall.java | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index d7715a627..27fa417cc 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1584,6 +1584,11 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCallImpl_isAuthenticationToke LinphoneCall *call = (LinphoneCall *) ptr; return linphone_call_get_authentication_token_verified(call); } +extern "C" void Java_org_linphone_core_LinphoneCallImpl_setAuthenticationTokenVerified(JNIEnv* env,jobject thiz,jlong ptr,jboolean verified) { + LinphoneCall *call = (LinphoneCall *) ptr; + linphone_call_set_authentication_token_verified(call, verified); +} + extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_soundResourcesLocked(JNIEnv* env,jobject thiz,jlong ptr){ return linphone_core_sound_resources_locked((LinphoneCore *) ptr); diff --git a/java/common/org/linphone/core/LinphoneCall.java b/java/common/org/linphone/core/LinphoneCall.java index 1c4b0e85b..3d1c9696f 100644 --- a/java/common/org/linphone/core/LinphoneCall.java +++ b/java/common/org/linphone/core/LinphoneCall.java @@ -220,8 +220,24 @@ public interface LinphoneCall { */ float getAverageQuality(); - + /** + * Used by ZRTP encryption mechanism. + * @return SAS associated to the main stream [voice] + */ String getAuthenticationToken(); + + /** + * Used by ZRTP encryption mechanism. + * SAS can be verified manually by the user or automatically using a previously shared secret. + * @return true if the main stream [voice ]SAS was verified. + */ boolean isAuthenticationTokenVerified(); + + /** + * Used by ZRTP encryption mechanism. + * @param verified true when displayed SAS is correct + */ + void setAuthenticationTokenVerified(boolean verified); + boolean isInConference(); }