]> sjero.net Git - linphone/commitdiff
srtp: add Java impl
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Mon, 10 Oct 2011 07:26:14 +0000 (09:26 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Mon, 10 Oct 2011 07:26:40 +0000 (09:26 +0200)
LinphoneCallParamsImpl.java
LinphoneCoreImpl.java

index ef05eb22851d2097153c099ba2c12e919f07ba2f..c346dcd1fa246931e9fdc8b5a01c794bee91123a 100644 (file)
@@ -28,6 +28,8 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
        private native void enableVideo(long nativePtr, boolean b);
        private native boolean getVideoEnabled(long nativePtr);
        private native void audioBandwidth(long nativePtr, int bw);
+       private native void setMediaEncryption(long nativePtr, String menc);
+       private native String getMediaEncryption(long nativePtr);
        private native void destroy(long nativePtr);
        
        
@@ -48,4 +50,12 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
        public void setAudioBandwidth(int value) {
                audioBandwidth(nativePtr, value);
        }
+       
+       public String getMediaEncryption() {
+               return getMediaEncryption(nativePtr);
+       }
+       
+       public void setMediaEnctyption(String menc) {
+               setMediaEncryption(nativePtr, menc);
+       }
 }
index 902ea9f4f2623f87728957949648566ec6181cd1..355523d59159b53c48192bd39969bd6691bb1dab 100644 (file)
@@ -104,7 +104,12 @@ class LinphoneCoreImpl implements LinphoneCore {
        private native void enableEchoLimiter(long nativePtr2, boolean val);
        private native int setVideoDevice(long nativePtr2, int id);
        private native int getVideoDevice(long nativePtr2);
-
+       private native String getMediaEncryption(long nativePtr);
+       private native void setMediaEncryption(long nativePtr, String menc);
+       private native boolean isMediaEncryptionMandatory(long nativePtr);
+       private native void setMediaEncryptionMandatory(long nativePtr, boolean yesno);
+       
+       
        LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object  userdata) throws IOException {
                mListener=listener;
                nativePtr = newLinphoneCore(listener,userConfig.getCanonicalPath(),factoryConfig.getCanonicalPath(),userdata);
@@ -545,4 +550,17 @@ class LinphoneCoreImpl implements LinphoneCore {
                // TODO Auto-generated method stub
                return null;
        }
+       
+       public String getMediaEncryption() {
+               return getMediaEncryption(nativePtr);
+       }
+       public boolean isMediaEncryptionMandatory() {
+               return isMediaEncryptionMandatory(nativePtr);
+       }
+       public void setMediaEncryption(String menc) {
+               setMediaEncryption(nativePtr, menc);            
+       }
+       public void setMediaEncryptionMandatory(boolean yesno) {
+               setMediaEncryptionMandatory(nativePtr, yesno);
+       }
 }