diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index e80c85dea..340210805 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -779,6 +779,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_delete(JNIEnv* env delete lcData; } +extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_migrateToMultiTransport(JNIEnv* env + ,jobject thiz + ,jlong lc) { + return (jint) linphone_core_migrate_to_multi_transport((LinphoneCore *)lc); +} + /* * Class: org_linphone_core_LinphoneCoreImpl * Method: createInfoMessage diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 6c7094ddf..114150acf 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -1463,4 +1463,14 @@ public interface LinphoneCore { * @return an array of String */ public String[] getSupportedVideoSizes(); + + /** + * Migrate configuration so that all SIP transports are enabled. + * Versions of linphone < 3.7 did not support using multiple SIP transport simultaneously. + * This function helps application to migrate the configuration so that all transports are enabled. + * Existing proxy configuration are added a transport parameter so that they continue using the unique transport that was set previously. + * This function must be used just after creating the core, before any call to linphone_core_iterate() + * @returns 1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error. + */ + public int migrateToMultiTransport(); } diff --git a/java/impl/org/linphone/core/LinphoneCoreImpl.java b/java/impl/org/linphone/core/LinphoneCoreImpl.java index bdb3540aa..d3803df22 100644 --- a/java/impl/org/linphone/core/LinphoneCoreImpl.java +++ b/java/impl/org/linphone/core/LinphoneCoreImpl.java @@ -144,6 +144,7 @@ class LinphoneCoreImpl implements LinphoneCore { private native String getPrimaryContactDisplayName(long nativePtr); private native void setChatDatabasePath(long nativePtr, String path); private native long[] getChatRooms(long nativePtr); + private native int migrateToMultiTransport(long nativePtr); LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig, File factoryConfig, Object userdata) throws IOException { mListener = listener; @@ -396,10 +397,12 @@ class LinphoneCoreImpl implements LinphoneCore { addFriend(nativePtr,((LinphoneFriendImpl)lf).nativePtr); } + @SuppressWarnings("deprecation") public synchronized void setPresenceInfo(int minutes_away, String alternative_contact, OnlineStatus status) { setPresenceInfo(nativePtr,minutes_away,alternative_contact,status.mValue); } + @SuppressWarnings("deprecation") public synchronized OnlineStatus getPresenceInfo() { return OnlineStatus.fromInt(getPresenceInfo(nativePtr)); } @@ -1094,4 +1097,9 @@ class LinphoneCoreImpl implements LinphoneCore { public String[] getSupportedVideoSizes() { return listSupportedVideoResolutions(nativePtr); } + + @Override + public int migrateToMultiTransport() { + return migrateToMultiTransport(nativePtr); + } } diff --git a/mediastreamer2 b/mediastreamer2 index c4fd2eea1..1de47782b 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit c4fd2eea1e49cb102327670a122a177e08a7f206 +Subproject commit 1de47782b0598594d8c6c55e9ff641da51326719