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
dc624114
Commit
dc624114
authored
Jan 06, 2016
by
François Grisez
Browse files
Fix JNI of getConference() methods of LinphoneCore and LinphoneCall
parent
95c893dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
11 deletions
+19
-11
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+13
-4
java/common/org/linphone/core/LinphoneCore.java
java/common/org/linphone/core/LinphoneCore.java
+1
-1
java/impl/org/linphone/core/LinphoneConferenceImpl.java
java/impl/org/linphone/core/LinphoneConferenceImpl.java
+3
-4
java/impl/org/linphone/core/LinphoneCoreImpl.java
java/impl/org/linphone/core/LinphoneCoreImpl.java
+2
-2
No files found.
coreapi/linphonecore_jni.cc
View file @
dc624114
...
...
@@ -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"
);
...
...
java/common/org/linphone/core/LinphoneCore.java
View file @
dc624114
...
...
@@ -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.
...
...
java/impl/org/linphone/core/LinphoneConferenceImpl.java
View file @
dc624114
...
...
@@ -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
);
...
...
java/impl/org/linphone/core/LinphoneCoreImpl.java
View file @
dc624114
...
...
@@ -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
);
...
...
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