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
d94a2036
Commit
d94a2036
authored
Oct 30, 2015
by
Simon Morlat
Browse files
add missing Java bindings
parent
f06140d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+20
-0
java/common/org/linphone/core/LinphoneCore.java
java/common/org/linphone/core/LinphoneCore.java
+15
-0
java/impl/org/linphone/core/LinphoneCoreImpl.java
java/impl/org/linphone/core/LinphoneCoreImpl.java
+15
-0
No files found.
coreapi/linphonecore_jni.cc
View file @
d94a2036
...
...
@@ -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);
...
...
java/common/org/linphone/core/LinphoneCore.java
View file @
d94a2036
...
...
@@ -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
();
}
java/impl/org/linphone/core/LinphoneCoreImpl.java
View file @
d94a2036
...
...
@@ -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
));
}
}
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