srtp: add Java impl

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2011-10-10 09:26:14 +02:00
parent c0e8108a12
commit 0a14943579
2 changed files with 29 additions and 1 deletions

View 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);
}
}

View 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);
}
}