Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
c9ada30c
Commit
c9ada30c
authored
May 12, 2017
by
Erwan Croze
👋🏻
Browse files
Add getNatPolicy JNI to LinphoneProxyConfig
parent
7c3f25b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecore_jni.cc
View file @
c9ada30c
...
...
@@ -2867,6 +2867,10 @@ extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getContactUriP
return
params
?
env
->
NewStringUTF
(
params
)
:
NULL
;
}
JNIEXPORT
jobject
JNICALL
Java_org_linphone_core_LinphoneProxyConfigImpl_getNatPolicy
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
proxyCfg
)
{
LinphoneNatPolicy
*
nat_policy
=
linphone_proxy_config_get_nat_policy
((
LinphoneProxyConfig
*
)
proxyCfg
);
return
(
nat_policy
!=
NULL
)
?
getNatPolicy
(
env
,
nat_policy
)
:
NULL
;
}
extern
"C"
jint
Java_org_linphone_core_LinphoneProxyConfigImpl_setRoute
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
proxyCfg
,
jstring
jroute
)
{
if
(
jroute
!=
NULL
)
{
...
...
java/common/org/linphone/core/LinphoneProxyConfig.java
View file @
c9ada30c
...
...
@@ -85,6 +85,11 @@ public interface LinphoneProxyConfig {
*/
public
boolean
registerEnabled
();
/**
* @return nat policy from proxy config
*/
public
LinphoneNatPolicy
getNatPolicy
();
/**
* normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222
* @param number
...
...
java/impl/org/linphone/core/LinphoneProxyConfigImpl.java
View file @
c9ada30c
...
...
@@ -100,6 +100,8 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
private
native
int
lookupCCCFromIso
(
long
nativePtr
,
String
iso
);
private
native
int
lookupCCCFromE164
(
long
nativePtr
,
String
e164
);
private
native
Object
getNatPolicy
(
long
nativePtr
);
public
LinphoneProxyConfig
enableRegister
(
boolean
value
)
{
isValid
();
...
...
@@ -124,6 +126,10 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
return
this
;
}
public
LinphoneNatPolicy
getNatPolicy
()
{
return
(
LinphoneNatPolicy
)
getNatPolicy
(
nativePtr
);
}
public
void
setIdentity
(
String
identity
)
throws
LinphoneCoreException
{
isValid
();
setIdentity
(
nativePtr
,
identity
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment