forked from mirrors/linphone-iphone
Added JNI API to get proxyconfigs' prefix & escape plus
This commit is contained in:
parent
d02090876a
commit
f04dab8f10
3 changed files with 31 additions and 0 deletions
|
|
@ -1462,10 +1462,15 @@ extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getDomain(JNIE
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setDialEscapePlus(JNIEnv* env,jobject thiz,jlong proxyCfg,jboolean value) {
|
||||
linphone_proxy_config_set_dial_escape_plus((LinphoneProxyConfig*)proxyCfg,value);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneProxyConfigImpl_getDialEscapePlus(JNIEnv* env,jobject thiz,jlong proxyCfg) {
|
||||
return (jboolean) linphone_proxy_config_get_dial_escape_plus((LinphoneProxyConfig*)proxyCfg);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setDialPrefix(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong proxyCfg
|
||||
|
|
@ -1474,6 +1479,12 @@ extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setDialPrefix(JNI
|
|||
linphone_proxy_config_set_dial_prefix((LinphoneProxyConfig*)proxyCfg,prefix);
|
||||
env->ReleaseStringUTFChars(jprefix, prefix);
|
||||
}
|
||||
|
||||
extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getDialPrefix(JNIEnv* env,jobject thiz,jlong proxyCfg) {
|
||||
const char * prefix = linphone_proxy_config_get_dial_prefix((LinphoneProxyConfig*)proxyCfg);
|
||||
return prefix ? env->NewStringUTF(prefix) : NULL;
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_enablePublish(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong proxyCfg
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@ public interface LinphoneProxyConfig {
|
|||
* @param prefix
|
||||
*/
|
||||
public void setDialPrefix(String prefix);
|
||||
|
||||
/**
|
||||
* Returns the automatically added international prefix to e164 phone numbers
|
||||
*/
|
||||
public String getDialPrefix();
|
||||
|
||||
/**
|
||||
* * Sets whether liblinphone should replace "+" by "00" in dialed numbers (passed to
|
||||
* {@link LinphoneCore#invite(String)}).
|
||||
|
|
@ -91,6 +97,12 @@ public interface LinphoneProxyConfig {
|
|||
*/
|
||||
public void setDialEscapePlus(boolean value);
|
||||
|
||||
/**
|
||||
* Whether liblinphone should replace "+" by "00" in dialed numbers (passed to
|
||||
* {@link LinphoneCore#invite(String)}).
|
||||
*/
|
||||
public boolean getDialEscapePlus();
|
||||
|
||||
/**
|
||||
* get domain host name or ip
|
||||
* @return may be null
|
||||
|
|
|
|||
|
|
@ -65,12 +65,14 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
|
||||
private native boolean isRegistered(long ptr);
|
||||
private native void setDialPrefix(long ptr, String prefix);
|
||||
private native String getDialPrefix(long ptr);
|
||||
|
||||
private native String normalizePhoneNumber(long ptr,String number);
|
||||
|
||||
private native String getDomain(long ptr);
|
||||
|
||||
private native void setDialEscapePlus(long ptr, boolean value);
|
||||
private native boolean getDialEscapePlus(long ptr);
|
||||
|
||||
private native String getRoute(long ptr);
|
||||
private native int setRoute(long ptr,String uri);
|
||||
|
|
@ -108,12 +110,18 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
public void setDialPrefix(String prefix) {
|
||||
setDialPrefix(nativePtr, prefix);
|
||||
}
|
||||
public String getDialPrefix() {
|
||||
return getDialPrefix(nativePtr);
|
||||
}
|
||||
public String getDomain() {
|
||||
return getDomain(nativePtr);
|
||||
}
|
||||
public void setDialEscapePlus(boolean value) {
|
||||
setDialEscapePlus(nativePtr,value);
|
||||
}
|
||||
public boolean getDialEscapePlus() {
|
||||
return getDialEscapePlus(nativePtr);
|
||||
}
|
||||
public String getIdentity() {
|
||||
return getIdentity(nativePtr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue