Commit d94a2036 authored by Simon Morlat's avatar Simon Morlat
Browse files

add missing Java bindings

parent f06140d0
......@@ -1987,6 +1987,22 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRingback(JNIEnv* env
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setProvisioningUri(JNIEnv* env
,jobject thiz
,jlong lc
,jstring jpath) {
const char* path = jpath?env->GetStringUTFChars(jpath, NULL):NULL;
linphone_core_set_provisioning_uri((LinphoneCore*)lc,path);
if (path) env->ReleaseStringUTFChars(jpath, path);
}
extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getProvisioningUri(JNIEnv* env
,jobject thiz
,jlong lc) {
const char* path = linphone_core_get_provisioning_uri((LinphoneCore*)lc);
return path ? env->NewStringUTF(path) : NULL;
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableKeepAlive(JNIEnv* env
,jobject thiz
,jlong lc
......@@ -4005,6 +4021,10 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getSipDscp(JNIEnv* env,j
return linphone_core_get_sip_dscp((LinphoneCore*)ptr);
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getGlobalState(JNIEnv* env,jobject thiz,jlong ptr){
return linphone_core_get_global_state((LinphoneCore*)ptr);
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getSignalingTransportPort(JNIEnv* env,jobject thiz,jlong ptr, jint code) {
LCSipTransports tr;
linphone_core_get_sip_transports((LinphoneCore *) ptr, &tr);
......
......@@ -567,6 +567,11 @@ public interface LinphoneCore {
*/
public void setContext(Object context);
/**
* Get the LinphoneCore's global state.
**/
public GlobalState getGlobalState();
/**
* clear all added proxy configs
*/
......@@ -2170,4 +2175,14 @@ public interface LinphoneCore {
* @return The name of the video preset used for video calls (can be null if the default video preset is used).
*/
public String getVideoPreset();
/**
* Set a provisioning URI to fetch an xml linphonerc config file from, at next LinphoneCore instantiation.
**/
public void setProvisioningUri(String uri);
/**
* Get the provisioning URI previously set.
**/
public String getProvisioningUri();
}
......@@ -1525,4 +1525,19 @@ class LinphoneCoreImpl implements LinphoneCore {
long ptr = createCallParams(nativePtr, callptr);
return new LinphoneCallParamsImpl(ptr);
}
private native void setProvisioningUri(long nativePtr, String uri);
@Override
public void setProvisioningUri(String uri){
setProvisioningUri(nativePtr, uri);
}
private native String getProvisioningUri(long nativePtr);
@Override
public String getProvisioningUri(){
return getProvisioningUri(nativePtr);
}
private native int getGlobalState(long nativePtr);
public GlobalState getGlobalState(){
return GlobalState.fromInt(getGlobalState(nativePtr));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment