getProxyConfigList added to JNI exports

This commit is contained in:
Sylvain Berfini 2012-02-02 11:29:01 +01:00
parent 9bc489eebf
commit 2ed9ed7ce3
2 changed files with 18 additions and 0 deletions

View file

@ -455,6 +455,22 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_getDefaultProxyConfig(
return (jlong)config;
}
extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_getProxyConfigList(JNIEnv* env, jobject thiz, jlong lc) {
const MSList* proxies = linphone_core_get_proxy_config_list((LinphoneCore*)lc);
int proxyCount = ms_list_size(proxies);
jlongArray jProxies = env->NewLongArray(proxyCount);
jlong *jInternalArray = env->GetLongArrayElements(jProxies, NULL);
for (int i = 0; i < proxyCount; i++ ) {
jInternalArray[i] = (unsigned long) (proxies->data);
proxies = proxies->next;
}
env->ReleaseLongArrayElements(jProxies, jInternalArray, 0);
return jProxies;
}
extern "C" int Java_org_linphone_core_LinphoneCoreImpl_addProxyConfig( JNIEnv* env
,jobject thiz
,jobject jproxyCfg

View file

@ -720,4 +720,6 @@ public interface LinphoneCore {
void tunnelAddServerAndMirror(String host, int port, int udpMirrorPort, int roundTripDelay);
boolean isTunnelAvailable();
LinphoneProxyConfig[] getProxyConfigList();
}