Commit 88c01239 authored by François Grisez's avatar François Grisez
Browse files

Fix JNI of getConference() methods of LinphoneCore and LinphoneCall

parent 95c893dc
......@@ -4135,8 +4135,12 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getConferenceSize(JNIEnv
return (jint)linphone_core_get_conference_size((LinphoneCore *) pCore);
}
extern "C" jlong Jave_org_linphone_core_LinphoneCoreImpl_getConference(JNIEnv *env, jobject thiz, jlong pCore) {
return (jlong)linphone_core_get_conference((LinphoneCore *)pCore);
extern "C" jobject Jave_org_linphone_core_LinphoneCoreImpl_getConference(JNIEnv *env, jobject thiz, jlong pCore) {
jclass conference_class = env->FindClass("org/linphone/core/LinphoneConference");
jmethodID conference_constructor = env->GetMethodID(conference_class, "<init>", "(J)");
LinphoneConference *conf = linphone_core_get_conference((LinphoneCore *)pCore);
if(conf) return env->NewObject(conference_class, conference_constructor, conf);
else return NULL;
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_startConferenceRecording(JNIEnv *env,jobject thiz,jlong pCore, jstring jpath){
......@@ -4273,8 +4277,12 @@ extern "C" void Java_org_linphone_core_LinphoneCallImpl_setAuthenticationTokenVe
linphone_call_set_authentication_token_verified(call, verified);
}
extern "C" jlong Java_org_linphnoe_core_LinphoneCallImpl_getConference(JNIEnv *env, jobject thiz, jlong ptr) {
return (jlong)linphone_call_get_conference((LinphoneCall *)ptr);
extern "C" jobject Java_org_linphnoe_core_LinphoneCallImpl_getConference(JNIEnv *env, jobject thiz, jlong ptr) {
jclass conference_class = env->FindClass("org/linphone/core/LinphoneConference");
jmethodID conference_constructor = env->GetMethodID(conference_class, "<init>", "(J)");
LinphoneConference *conf = linphone_call_get_conference((LinphoneCall *)ptr);
if(conf) return env->NewObject(conference_class, conference_constructor, conf);
return NULL;
}
extern "C" jfloat Java_org_linphone_core_LinphoneCallImpl_getPlayVolume(JNIEnv* env, jobject thiz, jlong ptr) {
......
......@@ -1413,7 +1413,7 @@ public interface LinphoneCore {
* That function can be used to test whether a conference is running.
* @return A positive value if a conference is running, 0 if not.
**/
long getConference();
LinphoneConference getConference();
/**
* Request recording of the conference into a supplied file path.
......
......@@ -709,8 +709,8 @@ class LinphoneCoreImpl implements LinphoneCore {
public synchronized int getConferenceSize() {
return getConferenceSize(nativePtr);
}
private native long getConference(long nativePtr);
public synchronized long getConference() {
private native LinphoneConference getConference(long nativePtr);
public synchronized LinphoneConference getConference() {
return getConference(nativePtr);
}
private native int getCallsNb(long 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