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
5633e418
Commit
5633e418
authored
Sep 22, 2011
by
Simon Morlat
Browse files
fix for unicity of LinphoneCall in java
parent
73acd250
Changes
3
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecall.c
View file @
5633e418
...
...
@@ -41,6 +41,10 @@ static MSWebCam *get_nowebcam_device(){
}
#endif
LinphoneCore
*
linphone_call_get_core
(
const
LinphoneCall
*
call
){
return
call
->
core
;
}
static
const
char
*
get_hexa_zrtp_identifier
(
LinphoneCore
*
lc
){
const
char
*
confZid
=
lp_config_get_string
(
lc
->
config
,
"rtp"
,
"zid"
,
NULL
);
if
(
confZid
!=
NULL
)
{
...
...
coreapi/linphonecore.h
View file @
5633e418
...
...
@@ -235,7 +235,7 @@ typedef enum _LinphoneCallState{
const
char
*
linphone_call_state_to_string
(
LinphoneCallState
cs
);
LinphoneCore
*
linphone_call_get_core
(
const
LinphoneCall
*
call
);
LinphoneCallState
linphone_call_get_state
(
const
LinphoneCall
*
call
);
bool_t
linphone_call_asked_to_autoanswer
(
LinphoneCall
*
call
);
const
LinphoneAddress
*
linphone_core_get_current_call_remote_address
(
struct
_LinphoneCore
*
lc
);
...
...
coreapi/linphonecore_jni.cc
View file @
5633e418
...
...
@@ -466,20 +466,22 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_iterate( JNIEnv* env
,
jlong
lc
)
{
linphone_core_iterate
((
LinphoneCore
*
)
lc
);
}
extern
"C"
j
long
Java_org_linphone_core_LinphoneCoreImpl_invite
(
JNIEnv
*
env
extern
"C"
j
object
Java_org_linphone_core_LinphoneCoreImpl_invite
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
,
jstring
juri
)
{
const
char
*
uri
=
env
->
GetStringUTFChars
(
juri
,
NULL
);
LinphoneCoreData
*
lcd
=
(
LinphoneCoreData
*
)
linphone_core_get_user_data
((
LinphoneCore
*
)
lc
);
LinphoneCall
*
lCall
=
linphone_core_invite
((
LinphoneCore
*
)
lc
,
uri
);
env
->
ReleaseStringUTFChars
(
juri
,
uri
);
return
(
jlong
)
lCall
;
return
lcd
->
getCall
(
env
,
lCall
)
;
}
extern
"C"
j
long
Java_org_linphone_core_LinphoneCoreImpl_inviteAddress
(
JNIEnv
*
env
extern
"C"
j
object
Java_org_linphone_core_LinphoneCoreImpl_inviteAddress
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
,
jlong
to
)
{
return
(
jlong
)
linphone_core_invite_address
((
LinphoneCore
*
)
lc
,(
LinphoneAddress
*
)
to
);
LinphoneCoreData
*
lcd
=
(
LinphoneCoreData
*
)
linphone_core_get_user_data
((
LinphoneCore
*
)
lc
);
return
lcd
->
getCall
(
env
,
linphone_core_invite_address
((
LinphoneCore
*
)
lc
,(
LinphoneAddress
*
)
to
));
}
extern
"C"
void
Java_org_linphone_core_LinphoneCoreImpl_terminateCall
(
JNIEnv
*
env
...
...
@@ -1088,10 +1090,11 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCallImpl_isEchoLimiterEnabled
return
linphone_call_echo_limiter_enabled
((
LinphoneCall
*
)
ptr
);
}
extern
"C"
j
long
Java_org_linphone_core_LinphoneCallImpl_getReplacedCall
(
JNIEnv
*
env
extern
"C"
j
object
Java_org_linphone_core_LinphoneCallImpl_getReplacedCall
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
ptr
)
{
return
(
jlong
)
linphone_call_get_replaced_call
((
LinphoneCall
*
)
ptr
);
LinphoneCoreData
*
lcd
=
(
LinphoneCoreData
*
)
linphone_core_get_user_data
(
linphone_call_get_core
((
LinphoneCall
*
)
ptr
));
return
lcd
->
getCall
(
env
,
linphone_call_get_replaced_call
((
LinphoneCall
*
)
ptr
));
}
extern
"C"
jfloat
Java_org_linphone_core_LinphoneCallImpl_getCurrentQuality
(
JNIEnv
*
env
...
...
@@ -1265,8 +1268,9 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCallImpl_cameraEnabled(JNIEnv
linphone_call_camera_enabled
((
LinphoneCall
*
)
lc
);
}
extern
"C"
jlong
Java_org_linphone_core_LinphoneCoreImpl_inviteAddressWithParams
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
,
jlong
addr
,
jlong
params
){
return
(
jlong
)
linphone_core_invite_address_with_params
((
LinphoneCore
*
)
lc
,
(
const
LinphoneAddress
*
)
addr
,
(
const
LinphoneCallParams
*
)
params
);
extern
"C"
jobject
Java_org_linphone_core_LinphoneCoreImpl_inviteAddressWithParams
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
,
jlong
addr
,
jlong
params
){
LinphoneCoreData
*
lcd
=
(
LinphoneCoreData
*
)
linphone_core_get_user_data
((
LinphoneCore
*
)
lc
);
return
lcd
->
getCall
(
env
,
linphone_core_invite_address_with_params
((
LinphoneCore
*
)
lc
,
(
const
LinphoneAddress
*
)
addr
,
(
const
LinphoneCallParams
*
)
params
));
}
extern
"C"
jint
Java_org_linphone_core_LinphoneCoreImpl_updateAddressWithParams
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
,
jlong
call
,
jlong
params
){
...
...
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