mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Added JNI API to delete one ProxyConfig and one AuthInfo
This commit is contained in:
parent
db78dd7fb3
commit
bcd22f8a74
3 changed files with 32 additions and 1 deletions
|
|
@ -814,6 +814,14 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_addProxyConfig( JNIEnv*
|
|||
return (jint)linphone_core_add_proxy_config((LinphoneCore*)lc,(LinphoneProxyConfig*)pc);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeProxyConfig(JNIEnv* env, jobject thiz, jlong lc, jlong proxy) {
|
||||
linphone_core_remove_proxy_config((LinphoneCore*)lc, (LinphoneProxyConfig*)proxy);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeAuthInfo(JNIEnv* env, jobject thiz, jlong lc, jlong authInfo) {
|
||||
linphone_core_remove_auth_info((LinphoneCore*)lc, (LinphoneAuthInfo*)authInfo);
|
||||
}
|
||||
|
||||
extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_getAuthInfosList(JNIEnv* env, jobject thiz,jlong lc) {
|
||||
const MSList* authInfos = linphone_core_get_auth_info_list((LinphoneCore*)lc);
|
||||
int listCount = ms_list_size(authInfos);
|
||||
|
|
|
|||
|
|
@ -369,6 +369,13 @@ public interface LinphoneCore {
|
|||
* @throws LinphoneCoreException
|
||||
*/
|
||||
public void addProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException;
|
||||
|
||||
/**
|
||||
* Removes a proxy configuration.
|
||||
* @param proxyCfg
|
||||
*/
|
||||
public void removeProxyConfig(LinphoneProxyConfig proxyCfg);
|
||||
|
||||
/**
|
||||
* Sets the default proxy.
|
||||
*<br>
|
||||
|
|
@ -389,6 +396,12 @@ public interface LinphoneCore {
|
|||
*/
|
||||
LinphoneAuthInfo[] getAuthInfosList();
|
||||
|
||||
/**
|
||||
* Removes a auth info.
|
||||
* @param authInfo
|
||||
*/
|
||||
public void removeAuthInfo(LinphoneAuthInfo authInfo);
|
||||
|
||||
/**
|
||||
* clear all the added auth info
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,10 +44,12 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
|
||||
private native void setDefaultProxyConfig(long nativePtr,long proxyCfgNativePtr);
|
||||
private native int addProxyConfig(LinphoneProxyConfig jprtoxyCfg,long nativePtr,long proxyCfgNativePtr);
|
||||
private native void removeProxyConfig(long nativePtr, long proxyCfg);
|
||||
private native void clearAuthInfos(long nativePtr);
|
||||
|
||||
private native void clearProxyConfigs(long nativePtr);
|
||||
private native void addAuthInfo(long nativePtr,long authInfoNativePtr);
|
||||
private native void removeAuthInfo(long nativePtr, long authInfoNativePtr);
|
||||
private native Object invite(long nativePtr,String uri);
|
||||
private native void terminateCall(long nativePtr, long call);
|
||||
private native long getRemoteAddress(long nativePtr);
|
||||
|
|
@ -168,6 +170,11 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
addAuthInfo(nativePtr,((LinphoneAuthInfoImpl)info).nativePtr);
|
||||
}
|
||||
|
||||
public synchronized void removeAuthInfo(LinphoneAuthInfo info) {
|
||||
isValid();
|
||||
removeAuthInfo(nativePtr,((LinphoneAuthInfoImpl)info).nativePtr);
|
||||
}
|
||||
|
||||
public synchronized LinphoneProxyConfig getDefaultProxyConfig() {
|
||||
isValid();
|
||||
long lNativePtr = getDefaultProxyConfig(nativePtr);
|
||||
|
|
@ -198,10 +205,13 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
throw new LinphoneCoreException("bad proxy config");
|
||||
}
|
||||
}
|
||||
public synchronized void removeProxyConfig(LinphoneProxyConfig proxyCfg) {
|
||||
isValid();
|
||||
removeProxyConfig(nativePtr, ((LinphoneProxyConfigImpl)proxyCfg).nativePtr);
|
||||
}
|
||||
public synchronized void clearAuthInfos() {
|
||||
isValid();
|
||||
clearAuthInfos(nativePtr);
|
||||
|
||||
}
|
||||
public synchronized void clearProxyConfigs() {
|
||||
isValid();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue