mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-03 11:49:31 +00:00
Fix JNI of getConference() methods of LinphoneCore and LinphoneCall
This commit is contained in:
parent
95c893dcc1
commit
dc62411463
4 changed files with 19 additions and 11 deletions
|
|
@ -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) {
|
||||
|
|
@ -6578,6 +6586,7 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCoreImpl_getSipTransportTi
|
|||
return linphone_core_get_sip_transport_timeout((LinphoneCore*)pcore);
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneConferenceImpl_getParticipants(JNIEnv *env, jobject thiz, jlong pconference) {
|
||||
MSList *participants, *it;
|
||||
jclass addr_class = env->FindClass("org/linphone/core/LinphoneAddressImpl");
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -25,17 +25,16 @@ import java.util.List;
|
|||
public class LinphoneConferenceImpl implements LinphoneConference {
|
||||
private final long nativePtr;
|
||||
|
||||
|
||||
private LinphoneConferenceImpl(long nativePtr) {
|
||||
this.nativePtr = nativePtr;
|
||||
}
|
||||
private native void finalize(long nativePtr);
|
||||
protected void finalize() {
|
||||
finalize(nativePtr);
|
||||
}
|
||||
|
||||
private native List<LinphoneAddress> getParticipants(long nativePtr);
|
||||
public List<LinphoneAddress> getParticipants() {
|
||||
return getParticipants(nativePtr);
|
||||
}
|
||||
|
||||
private native int removeParticipant(long nativePtr, LinphoneAddress uri);
|
||||
public int removeParticipant(LinphoneAddress uri) {
|
||||
return removeParticipant(nativePtr, uri);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue