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
408da4db
Commit
408da4db
authored
Apr 13, 2017
by
François Grisez
Browse files
Declared the return type of functions returning an error code as LinphoneStatus
parent
69e19e22
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
136 additions
and
136 deletions
+136
-136
coreapi/address.c
coreapi/address.c
+5
-5
coreapi/call_params.c
coreapi/call_params.c
+1
-1
coreapi/chat.c
coreapi/chat.c
+1
-1
coreapi/chat_file_transfer.c
coreapi/chat_file_transfer.c
+1
-1
coreapi/conference.cc
coreapi/conference.cc
+1
-1
coreapi/dict.c
coreapi/dict.c
+2
-2
coreapi/echo-tester.c
coreapi/echo-tester.c
+3
-3
coreapi/event.c
coreapi/event.c
+9
-9
coreapi/friend.c
coreapi/friend.c
+4
-4
coreapi/friendlist.c
coreapi/friendlist.c
+2
-2
coreapi/info.c
coreapi/info.c
+1
-1
coreapi/linphonecall.c
coreapi/linphonecall.c
+18
-18
coreapi/linphonecore.c
coreapi/linphonecore.c
+43
-43
coreapi/lpconfig.c
coreapi/lpconfig.c
+3
-3
coreapi/lsd.c
coreapi/lsd.c
+2
-2
coreapi/misc.c
coreapi/misc.c
+2
-2
coreapi/payload_type.c
coreapi/payload_type.c
+1
-1
coreapi/player.c
coreapi/player.c
+4
-4
coreapi/presence.c
coreapi/presence.c
+27
-27
coreapi/proxy.c
coreapi/proxy.c
+6
-6
No files found.
coreapi/address.c
View file @
408da4db
...
...
@@ -64,27 +64,27 @@ int linphone_address_get_port(const LinphoneAddress *u) {
return
sal_address_get_port
(
u
);
}
in
t
linphone_address_set_display_name
(
LinphoneAddress
*
u
,
const
char
*
display_name
){
L
in
phoneStatus
linphone_address_set_display_name
(
LinphoneAddress
*
u
,
const
char
*
display_name
){
sal_address_set_display_name
(
u
,
display_name
);
return
0
;
}
in
t
linphone_address_set_username
(
LinphoneAddress
*
uri
,
const
char
*
username
){
L
in
phoneStatus
linphone_address_set_username
(
LinphoneAddress
*
uri
,
const
char
*
username
)
{
sal_address_set_username
(
uri
,
username
);
return
0
;
}
in
t
linphone_address_set_domain
(
LinphoneAddress
*
uri
,
const
char
*
host
){
L
in
phoneStatus
linphone_address_set_domain
(
LinphoneAddress
*
uri
,
const
char
*
host
){
sal_address_set_domain
(
uri
,
host
);
return
0
;
}
in
t
linphone_address_set_port
(
LinphoneAddress
*
uri
,
int
port
){
L
in
phoneStatus
linphone_address_set_port
(
LinphoneAddress
*
uri
,
int
port
){
sal_address_set_port
(
uri
,
port
);
return
0
;
}
in
t
linphone_address_set_transport
(
LinphoneAddress
*
uri
,
LinphoneTransportType
tp
){
L
in
phoneStatus
linphone_address_set_transport
(
LinphoneAddress
*
uri
,
LinphoneTransportType
tp
){
sal_address_set_transport
(
uri
,(
SalTransport
)
tp
);
return
0
;
}
...
...
coreapi/call_params.c
View file @
408da4db
...
...
@@ -150,7 +150,7 @@ void linphone_call_params_enable_audio(LinphoneCallParams *cp, bool_t enabled){
cp
->
audio_dir
=
LinphoneMediaDirectionSendRecv
;
}
in
t
linphone_call_params_enable_realtime_text
(
LinphoneCallParams
*
params
,
bool_t
yesno
)
{
L
in
phoneStatus
linphone_call_params_enable_realtime_text
(
LinphoneCallParams
*
params
,
bool_t
yesno
)
{
params
->
realtimetext_enabled
=
yesno
;
return
0
;
}
...
...
coreapi/chat.c
View file @
408da4db
...
...
@@ -1384,7 +1384,7 @@ uint32_t linphone_chat_room_get_char(const LinphoneChatRoom *cr) {
return
0
;
}
in
t
linphone_chat_message_put_char
(
LinphoneChatMessage
*
msg
,
uint32_t
character
)
{
L
in
phoneStatus
linphone_chat_message_put_char
(
LinphoneChatMessage
*
msg
,
uint32_t
character
)
{
LinphoneChatRoom
*
cr
=
linphone_chat_message_get_chat_room
(
msg
);
LinphoneCall
*
call
=
cr
->
call
;
LinphoneCore
*
lc
=
cr
->
lc
;
...
...
coreapi/chat_file_transfer.c
View file @
408da4db
...
...
@@ -587,7 +587,7 @@ int linphone_chat_room_upload_file(LinphoneChatMessage *msg) {
return
err
;
}
in
t
linphone_chat_message_download_file
(
LinphoneChatMessage
*
msg
)
{
L
in
phoneStatus
linphone_chat_message_download_file
(
LinphoneChatMessage
*
msg
)
{
belle_http_request_listener_callbacks_t
cbs
=
{
0
};
int
err
;
...
...
coreapi/conference.cc
View file @
408da4db
...
...
@@ -1035,7 +1035,7 @@ int linphone_conference_add_participant(LinphoneConference *obj, LinphoneCall *c
return
obj
->
conf
->
addParticipant
(
call
);
}
in
t
linphone_conference_remove_participant
(
LinphoneConference
*
obj
,
const
LinphoneAddress
*
uri
)
{
L
in
phoneStatus
linphone_conference_remove_participant
(
LinphoneConference
*
obj
,
const
LinphoneAddress
*
uri
)
{
return
obj
->
conf
->
removeParticipant
(
uri
);
}
...
...
coreapi/dict.c
View file @
408da4db
...
...
@@ -86,7 +86,7 @@ int64_t linphone_dictionary_get_int64(LinphoneDictionary* obj, const char* key,
return
belle_sip_dict_get_int64
(
obj
,
key
,
default_value
);
}
in
t
linphone_dictionary_remove
(
LinphoneDictionary
*
obj
,
const
char
*
key
)
L
in
phoneStatus
linphone_dictionary_remove
(
LinphoneDictionary
*
obj
,
const
char
*
key
)
{
return
belle_sip_dict_remove
(
obj
,
key
);
}
...
...
@@ -96,7 +96,7 @@ void linphone_dictionary_clear(LinphoneDictionary* obj)
belle_sip_dict_clear
(
obj
);
}
in
t
linphone_dictionary_haskey
(
const
LinphoneDictionary
*
obj
,
const
char
*
key
)
L
in
phoneStatus
linphone_dictionary_haskey
(
const
LinphoneDictionary
*
obj
,
const
char
*
key
)
{
return
belle_sip_dict_haskey
(
obj
,
key
);
}
...
...
coreapi/echo-tester.c
View file @
408da4db
...
...
@@ -79,7 +79,7 @@ void ec_tester_destroy(EchoTester *ect) {
ms_free
(
ect
);
}
in
t
linphone_core_start_echo_tester
(
LinphoneCore
*
lc
,
unsigned
int
rate
)
{
L
in
phoneStatus
linphone_core_start_echo_tester
(
LinphoneCore
*
lc
,
unsigned
int
rate
)
{
if
(
lc
->
ect
!=
NULL
)
{
ms_error
(
"Echo tester is still on going !"
);
return
-
1
;
...
...
@@ -91,7 +91,7 @@ int linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate) {
return
1
;
}
in
t
linphone_core_stop_echo_tester
(
LinphoneCore
*
lc
)
{
L
in
phoneStatus
linphone_core_stop_echo_tester
(
LinphoneCore
*
lc
)
{
if
(
lc
->
ect
==
NULL
)
{
ms_error
(
"Echo tester is not running !"
);
return
-
1
;
...
...
@@ -101,4 +101,4 @@ int linphone_core_stop_echo_tester(LinphoneCore *lc) {
ec_tester_destroy
(
lc
->
ect
);
lc
->
ect
=
NULL
;
return
1
;
}
\ No newline at end of file
}
coreapi/event.c
View file @
408da4db
...
...
@@ -187,7 +187,7 @@ LinphoneEvent *linphone_core_subscribe(LinphoneCore *lc, const LinphoneAddress *
return
lev
;
}
in
t
linphone_event_send_subscribe
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
L
in
phoneStatus
linphone_event_send_subscribe
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
SalBodyHandler
*
body_handler
;
int
err
;
...
...
@@ -226,15 +226,15 @@ int linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneContent *bod
return
err
;
}
in
t
linphone_event_update_subscribe
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
L
in
phoneStatus
linphone_event_update_subscribe
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
return
linphone_event_send_subscribe
(
lev
,
body
);
}
in
t
linphone_event_refresh_subscribe
(
LinphoneEvent
*
lev
)
{
L
in
phoneStatus
linphone_event_refresh_subscribe
(
LinphoneEvent
*
lev
)
{
return
sal_op_refresh
(
lev
->
op
);
}
in
t
linphone_event_accept_subscription
(
LinphoneEvent
*
lev
){
L
in
phoneStatus
linphone_event_accept_subscription
(
LinphoneEvent
*
lev
){
int
err
;
if
(
lev
->
subscription_state
!=
LinphoneSubscriptionIncomingReceived
){
ms_error
(
"linphone_event_accept_subscription(): cannot accept subscription if subscription wasn't just received."
);
...
...
@@ -247,7 +247,7 @@ int linphone_event_accept_subscription(LinphoneEvent *lev){
return
err
;
}
in
t
linphone_event_deny_subscription
(
LinphoneEvent
*
lev
,
LinphoneReason
reason
){
L
in
phoneStatus
linphone_event_deny_subscription
(
LinphoneEvent
*
lev
,
LinphoneReason
reason
){
int
err
;
if
(
lev
->
subscription_state
!=
LinphoneSubscriptionIncomingReceived
){
ms_error
(
"linphone_event_deny_subscription(): cannot deny subscription if subscription wasn't just received."
);
...
...
@@ -258,7 +258,7 @@ int linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason){
return
err
;
}
in
t
linphone_event_notify
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
L
in
phoneStatus
linphone_event_notify
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
SalBodyHandler
*
body_handler
;
if
(
lev
->
subscription_state
!=
LinphoneSubscriptionActive
&&
lev
->
subscription_state
!=
LinphoneSubscriptionIncomingReceived
){
ms_error
(
"linphone_event_notify(): cannot notify if subscription is not active."
);
...
...
@@ -320,15 +320,15 @@ LinphoneEvent *linphone_core_publish(LinphoneCore *lc, const LinphoneAddress *re
}
in
t
linphone_event_send_publish
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
L
in
phoneStatus
linphone_event_send_publish
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
){
return
_linphone_event_send_publish
(
lev
,
body
,
TRUE
);
}
in
t
linphone_event_update_publish
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
)
{
L
in
phoneStatus
linphone_event_update_publish
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
)
{
return
linphone_event_send_publish
(
lev
,
body
);
}
in
t
linphone_event_refresh_publish
(
LinphoneEvent
*
lev
)
{
L
in
phoneStatus
linphone_event_refresh_publish
(
LinphoneEvent
*
lev
)
{
return
sal_op_refresh
(
lev
->
op
);
}
void
linphone_event_pause_publish
(
LinphoneEvent
*
lev
)
{
...
...
coreapi/friend.c
View file @
408da4db
...
...
@@ -290,7 +290,7 @@ const LinphoneAddress * linphone_friend_get_address(const LinphoneFriend *lf) {
return
NULL
;
}
in
t
linphone_friend_set_address
(
LinphoneFriend
*
lf
,
const
LinphoneAddress
*
addr
)
{
L
in
phoneStatus
linphone_friend_set_address
(
LinphoneFriend
*
lf
,
const
LinphoneAddress
*
addr
)
{
LinphoneAddress
*
fr
=
linphone_address_clone
(
addr
);
char
*
address
;
const
LinphoneAddress
*
mAddr
=
linphone_friend_get_address
(
lf
);
...
...
@@ -431,7 +431,7 @@ void linphone_friend_remove_phone_number(LinphoneFriend *lf, const char *phone)
}
}
in
t
linphone_friend_set_name
(
LinphoneFriend
*
lf
,
const
char
*
name
){
L
in
phoneStatus
linphone_friend_set_name
(
LinphoneFriend
*
lf
,
const
char
*
name
){
if
(
linphone_core_vcard_supported
())
{
if
(
!
lf
->
vcard
)
linphone_friend_create_vcard
(
lf
,
name
);
linphone_vcard_set_full_name
(
lf
->
vcard
,
name
);
...
...
@@ -445,12 +445,12 @@ int linphone_friend_set_name(LinphoneFriend *lf, const char *name){
return
0
;
}
in
t
linphone_friend_enable_subscribes
(
LinphoneFriend
*
fr
,
bool_t
val
){
L
in
phoneStatus
linphone_friend_enable_subscribes
(
LinphoneFriend
*
fr
,
bool_t
val
){
fr
->
subscribe
=
val
;
return
0
;
}
in
t
linphone_friend_set_inc_subscribe_policy
(
LinphoneFriend
*
fr
,
LinphoneSubscribePolicy
pol
)
{
L
in
phoneStatus
linphone_friend_set_inc_subscribe_policy
(
LinphoneFriend
*
fr
,
LinphoneSubscribePolicy
pol
)
{
fr
->
pol
=
pol
;
return
0
;
}
...
...
coreapi/friendlist.c
View file @
408da4db
...
...
@@ -993,7 +993,7 @@ LinphoneCore* linphone_friend_list_get_core(const LinphoneFriendList *list) {
return
list
->
lc
;
}
in
t
linphone_friend_list_import_friends_from_vcard4_file
(
LinphoneFriendList
*
list
,
const
char
*
vcard_file
)
{
L
in
phoneStatus
linphone_friend_list_import_friends_from_vcard4_file
(
LinphoneFriendList
*
list
,
const
char
*
vcard_file
)
{
bctbx_list_t
*
vcards
=
NULL
;
bctbx_list_t
*
vcards_iterator
=
NULL
;
int
count
=
0
;
...
...
@@ -1033,7 +1033,7 @@ int linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *lis
return
count
;
}
in
t
linphone_friend_list_import_friends_from_vcard4_buffer
(
LinphoneFriendList
*
list
,
const
char
*
vcard_buffer
)
{
L
in
phoneStatus
linphone_friend_list_import_friends_from_vcard4_buffer
(
LinphoneFriendList
*
list
,
const
char
*
vcard_buffer
)
{
bctbx_list_t
*
vcards
=
NULL
;
bctbx_list_t
*
vcards_iterator
=
NULL
;
int
count
=
0
;
...
...
coreapi/info.c
View file @
408da4db
...
...
@@ -76,7 +76,7 @@ LinphoneInfoMessage *linphone_core_create_info_message(LinphoneCore *lc){
return
belle_sip_object_new
(
LinphoneInfoMessage
);
}
in
t
linphone_call_send_info_message
(
LinphoneCall
*
call
,
const
LinphoneInfoMessage
*
info
)
{
L
in
phoneStatus
linphone_call_send_info_message
(
LinphoneCall
*
call
,
const
LinphoneInfoMessage
*
info
)
{
SalBodyHandler
*
body_handler
=
sal_body_handler_from_content
(
info
->
content
);
sal_op_set_sent_custom_header
(
call
->
op
,
info
->
headers
);
return
sal_send_info
(
call
->
op
,
NULL
,
NULL
,
body_handler
);
...
...
coreapi/linphonecall.c
View file @
408da4db
...
...
@@ -2245,7 +2245,7 @@ void linphone_call_send_vfu_request(LinphoneCall *call) {
#endif
}
in
t
linphone_call_take_video_snapshot
(
LinphoneCall
*
call
,
const
char
*
file
){
L
in
phoneStatus
linphone_call_take_video_snapshot
(
LinphoneCall
*
call
,
const
char
*
file
)
{
#ifdef VIDEO_ENABLED
if
(
call
->
videostream
!=
NULL
&&
call
->
videostream
->
jpegwriter
!=
NULL
){
return
ms_filter_call_method
(
call
->
videostream
->
jpegwriter
,
MS_JPEG_WRITER_TAKE_SNAPSHOT
,(
void
*
)
file
);
...
...
@@ -2255,7 +2255,7 @@ int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file){
return
-
1
;
}
in
t
linphone_call_take_preview_snapshot
(
LinphoneCall
*
call
,
const
char
*
file
){
L
in
phoneStatus
linphone_call_take_preview_snapshot
(
LinphoneCall
*
call
,
const
char
*
file
)
{
#ifdef VIDEO_ENABLED
if
(
call
->
videostream
!=
NULL
&&
call
->
videostream
->
local_jpegwriter
!=
NULL
){
return
ms_filter_call_method
(
call
->
videostream
->
local_jpegwriter
,
MS_JPEG_WRITER_TAKE_SNAPSHOT
,(
void
*
)
file
);
...
...
@@ -4853,7 +4853,7 @@ static int send_dtmf_handler(void *data, unsigned int revents){
}
}
in
t
linphone_call_send_dtmf
(
LinphoneCall
*
call
,
char
dtmf
){
L
in
phoneStatus
linphone_call_send_dtmf
(
LinphoneCall
*
call
,
char
dtmf
)
{
if
(
call
==
NULL
){
ms_warning
(
"linphone_call_send_dtmf(): invalid call, canceling DTMF."
);
return
-
1
;
...
...
@@ -4864,7 +4864,7 @@ int linphone_call_send_dtmf(LinphoneCall *call,char dtmf){
return
0
;
}
in
t
linphone_call_send_dtmfs
(
LinphoneCall
*
call
,
const
char
*
dtmfs
)
{
L
in
phoneStatus
linphone_call_send_dtmfs
(
LinphoneCall
*
call
,
const
char
*
dtmfs
)
{
if
(
call
==
NULL
){
ms_warning
(
"linphone_call_send_dtmfs(): invalid call, canceling DTMF sequence."
);
return
-
1
;
...
...
@@ -4992,7 +4992,7 @@ RtpTransport* linphone_call_get_meta_rtcp_transport(LinphoneCall *call, int stre
return
meta_rtcp
;
}
in
t
linphone_call_pause
(
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_call_pause
(
LinphoneCall
*
call
)
{
int
err
=
_linphone_call_pause
(
call
);
if
(
err
==
0
)
call
->
paused_by_app
=
TRUE
;
return
err
;
...
...
@@ -5037,7 +5037,7 @@ int _linphone_call_pause(LinphoneCall *call) {
return
0
;
}
in
t
linphone_call_resume
(
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_call_resume
(
LinphoneCall
*
call
)
{
LinphoneCore
*
lc
;
const
char
*
subject
=
"Call resuming"
;
char
*
remote_address
;
...
...
@@ -5117,7 +5117,7 @@ static void terminate_call(LinphoneCall *call) {
linphone_call_set_state
(
call
,
LinphoneCallEnd
,
"Call terminated"
);
}
in
t
linphone_call_terminate
(
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_call_terminate
(
LinphoneCall
*
call
)
{
ms_message
(
"Terminate call [%p] which is currently in state %s"
,
call
,
linphone_call_state_to_string
(
call
->
state
));
switch
(
call
->
state
)
{
case
LinphoneCallReleased
:
...
...
@@ -5141,7 +5141,7 @@ int linphone_call_terminate(LinphoneCall *call) {
return
0
;
}
in
t
linphone_call_redirect
(
LinphoneCall
*
call
,
const
char
*
redirect_uri
)
{
L
in
phoneStatus
linphone_call_redirect
(
LinphoneCall
*
call
,
const
char
*
redirect_uri
)
{
char
*
real_url
=
NULL
;
LinphoneCore
*
lc
;
LinphoneAddress
*
real_parsed_url
;
...
...
@@ -5169,7 +5169,7 @@ int linphone_call_redirect(LinphoneCall *call, const char *redirect_uri) {
return
0
;
}
in
t
linphone_call_decline
(
LinphoneCall
*
call
,
LinphoneReason
reason
)
{
L
in
phoneStatus
linphone_call_decline
(
LinphoneCall
*
call
,
LinphoneReason
reason
)
{
if
((
call
->
state
!=
LinphoneCallIncomingReceived
)
&&
(
call
->
state
!=
LinphoneCallIncomingEarlyMedia
))
{
ms_error
(
"Cannot decline a call that is in state %s"
,
linphone_call_state_to_string
(
call
->
state
));
return
-
1
;
...
...
@@ -5180,11 +5180,11 @@ int linphone_call_decline(LinphoneCall * call, LinphoneReason reason) {
return
0
;
}
in
t
linphone_call_accept
(
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_call_accept
(
LinphoneCall
*
call
)
{
return
linphone_call_accept_with_params
(
call
,
NULL
);
}
in
t
linphone_call_accept_with_params
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_call_accept_with_params
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
LinphoneCore
*
lc
;
SalOp
*
replaced
;
SalMediaDescription
*
new_md
;
...
...
@@ -5287,11 +5287,11 @@ int linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParam
return
0
;
}
in
t
linphone_call_accept_early_media
(
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_call_accept_early_media
(
LinphoneCall
*
call
)
{
return
linphone_call_accept_early_media_with_params
(
call
,
NULL
);
}
in
t
linphone_call_accept_early_media_with_params
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_call_accept_early_media_with_params
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
SalMediaDescription
*
md
;
if
(
call
->
state
!=
LinphoneCallIncomingReceived
)
{
...
...
@@ -5318,7 +5318,7 @@ int linphone_call_accept_early_media_with_params(LinphoneCall *call, const Linph
return
0
;
}
in
t
linphone_call_update
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_call_update
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
int
err
=
0
;
LinphoneCallState
nextstate
;
LinphoneCallState
initial_state
=
call
->
state
;
...
...
@@ -5465,7 +5465,7 @@ int linphone_call_start_update(LinphoneCall *call) {
return
err
;
}
in
t
linphone_call_defer_update
(
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_call_defer_update
(
LinphoneCall
*
call
)
{
if
(
call
->
state
!=
LinphoneCallUpdatedByRemote
)
{
ms_error
(
"linphone_call_defer_update() not done in state LinphoneCallUpdatedByRemote"
);
return
-
1
;
...
...
@@ -5564,7 +5564,7 @@ int _linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *p
return
0
;
}
in
t
linphone_call_accept_update
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_call_accept_update
(
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
if
(
call
->
state
!=
LinphoneCallUpdatedByRemote
)
{
ms_error
(
"linphone_call_accept_update(): invalid state %s to call this function."
,
linphone_call_state_to_string
(
call
->
state
));
return
-
1
;
...
...
@@ -5576,7 +5576,7 @@ int linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *pa
return
_linphone_call_accept_update
(
call
,
params
,
call
->
prevstate
,
linphone_call_state_to_string
(
call
->
prevstate
));
}
in
t
linphone_call_transfer
(
LinphoneCall
*
call
,
const
char
*
refer_to
)
{
L
in
phoneStatus
linphone_call_transfer
(
LinphoneCall
*
call
,
const
char
*
refer_to
)
{
char
*
real_url
=
NULL
;
LinphoneCore
*
lc
=
linphone_call_get_core
(
call
);
LinphoneAddress
*
real_parsed_url
=
linphone_core_interpret_url
(
lc
,
refer_to
);
...
...
@@ -5594,7 +5594,7 @@ int linphone_call_transfer(LinphoneCall *call, const char *refer_to) {
return
0
;
}
in
t
linphone_call_transfer_to_another
(
LinphoneCall
*
call
,
LinphoneCall
*
dest
)
{
L
in
phoneStatus
linphone_call_transfer_to_another
(
LinphoneCall
*
call
,
LinphoneCall
*
dest
)
{
int
result
=
sal_call_refer_with_replaces
(
call
->
op
,
dest
->
op
);
linphone_call_set_transfer_state
(
call
,
LinphoneCallOutgoingInit
);
return
result
;
...
...
coreapi/linphonecore.c
View file @
408da4db
...
...
@@ -2284,7 +2284,7 @@ const bctbx_list_t *linphone_core_get_text_codecs(const LinphoneCore *lc) {
return
lc
->
codecs_conf
.
text_codecs
;
}
in
t
linphone_core_set_primary_contact
(
LinphoneCore
*
lc
,
const
char
*
contact
)
{
L
in
phoneStatus
linphone_core_set_primary_contact
(
LinphoneCore
*
lc
,
const
char
*
contact
)
{
LinphoneAddress
*
ctt
;
if
(
lc
->
sip_conf
.
contact
!=
NULL
&&
strcmp
(
lc
->
sip_conf
.
contact
,
contact
)
==
0
){
...
...
@@ -2411,7 +2411,7 @@ LinphoneAddress *linphone_core_get_primary_contact_parsed(LinphoneCore *lc){
return
linphone_address_new
(
linphone_core_get_primary_contact
(
lc
));
}
in
t
linphone_core_set_audio_codecs
(
LinphoneCore
*
lc
,
bctbx_list_t
*
codecs
){
L
in
phoneStatus
linphone_core_set_audio_codecs
(
LinphoneCore
*
lc
,
bctbx_list_t
*
codecs
){
if
(
lc
->
codecs_conf
.
audio_codecs
!=
NULL
)
bctbx_list_free
(
lc
->
codecs_conf
.
audio_codecs
);
lc
->
codecs_conf
.
audio_codecs
=
codecs
;
_linphone_core_codec_config_write
(
lc
);
...
...
@@ -2419,14 +2419,14 @@ int linphone_core_set_audio_codecs(LinphoneCore *lc, bctbx_list_t *codecs){
return
0
;
}
in
t
linphone_core_set_video_codecs
(
LinphoneCore
*
lc
,
bctbx_list_t
*
codecs
){
L
in
phoneStatus
linphone_core_set_video_codecs
(
LinphoneCore
*
lc
,
bctbx_list_t
*
codecs
){
if
(
lc
->
codecs_conf
.
video_codecs
!=
NULL
)
bctbx_list_free
(
lc
->
codecs_conf
.
video_codecs
);
lc
->
codecs_conf
.
video_codecs
=
codecs
;
_linphone_core_codec_config_write
(
lc
);
return
0
;
}
in
t
linphone_core_set_text_codecs
(
LinphoneCore
*
lc
,
bctbx_list_t
*
codecs
)
{
L
in
phoneStatus
linphone_core_set_text_codecs
(
LinphoneCore
*
lc
,
bctbx_list_t
*
codecs
)
{
if
(
lc
->
codecs_conf
.
text_codecs
!=
NULL
)
bctbx_list_free
(
lc
->
codecs_conf
.
text_codecs
);
...
...
@@ -2764,7 +2764,7 @@ bool_t linphone_core_sip_transport_supported(const LinphoneCore *lc, LinphoneTra
return
sal_transport_available
(
lc
->
sal
,(
SalTransport
)
tp
);
}
in
t
linphone_core_set_sip_transports
(
LinphoneCore
*
lc
,
const
LinphoneSipTransports
*
tr_config
/*config to be saved*/
){
L
in
phoneStatus
linphone_core_set_sip_transports
(
LinphoneCore
*
lc
,
const
LinphoneSipTransports
*
tr_config
/*config to be saved*/
){
LinphoneSipTransports
tr
=*
tr_config
;
if
(
lp_config_get_int
(
lc
->
config
,
"sip"
,
"sip_random_port"
,
0
)
==
1
)
{
...
...
@@ -2798,7 +2798,7 @@ int linphone_core_set_sip_transports(LinphoneCore *lc, const LinphoneSipTranspor
return
_linphone_core_apply_transports
(
lc
);
}
in
t
linphone_core_get_sip_transports
(
LinphoneCore
*
lc
,
LinphoneSipTransports
*
tr
){
L
in
phoneStatus
linphone_core_get_sip_transports
(
LinphoneCore
*
lc
,
LinphoneSipTransports
*
tr
){
memcpy
(
tr
,
&
lc
->
sip_conf
.
transports
,
sizeof
(
*
tr
));
return
0
;
}
...
...
@@ -3462,7 +3462,7 @@ LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, const
return
call
;
}
in
t
linphone_core_transfer_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
char
*
url
)
{
L
in
phoneStatus
linphone_core_transfer_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
char
*
url
)
{
if
(
call
==
NULL
)
{
ms_warning
(
"No established call to refer."
);
return
-
1
;
...
...
@@ -3470,7 +3470,7 @@ int linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char
return
linphone_call_transfer
(
call
,
url
);
}
in
t
linphone_core_transfer_call_to_another
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
LinphoneCall
*
dest
)
{
L
in
phoneStatus
linphone_core_transfer_call_to_another
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
LinphoneCall
*
dest
)
{
return
linphone_call_transfer_to_another
(
call
,
dest
);
}
...
...
@@ -3544,23 +3544,23 @@ void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call){
ms_free
(
tmp
);
}
in
t
linphone_core_accept_early_media_with_params
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_core_accept_early_media_with_params
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
return
linphone_call_accept_early_media_with_params
(
call
,
params
);
}
in
t
linphone_core_accept_early_media
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_core_accept_early_media
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
return
linphone_call_accept_early_media
(
call
);
}
in
t
linphone_core_update_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_core_update_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
return
linphone_call_update
(
call
,
params
);
}
in
t
linphone_core_defer_call_update
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_core_defer_call_update
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
return
linphone_call_defer_update
(
call
);
}
in
t
linphone_core_accept_call_update
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_core_accept_call_update
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
return
linphone_call_accept_update
(
call
,
params
);
}
...
...
@@ -3572,11 +3572,11 @@ static LinphoneCall * get_unique_call(LinphoneCore *lc) {
return
call
;
}
in
t
linphone_core_accept_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_core_accept_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
return
linphone_call_accept_with_params
(
call
,
NULL
);
}
in
t
linphone_core_accept_call_with_params
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
L
in
phoneStatus
linphone_core_accept_call_with_params
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallParams
*
params
)
{
if
(
call
==
NULL
)
{
call
=
get_unique_call
(
lc
);
if
(
call
==
NULL
)
{
...
...
@@ -3587,11 +3587,11 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call,
return
linphone_call_accept_with_params
(
call
,
params
);
}
in
t
linphone_core_redirect_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
char
*
redirect_uri
)
{
L
in
phoneStatus
linphone_core_redirect_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
char
*
redirect_uri
)
{
return
linphone_call_redirect
(
call
,
redirect_uri
);
}
in
t
linphone_core_terminate_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_core_terminate_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
if
(
call
==
NULL
)
{
call
=
get_unique_call
(
lc
);
if
(
call
==
NULL
)
{
...
...
@@ -3602,7 +3602,7 @@ int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call) {
return
linphone_call_terminate
(
call
);
}
in
t
linphone_core_terminate_all_calls
(
LinphoneCore
*
lc
){
L
in
phoneStatus
linphone_core_terminate_all_calls
(
LinphoneCore
*
lc
)
{
bctbx_list_t
*
calls
=
lc
->
calls
;
while
(
calls
)
{
LinphoneCall
*
c
=
(
LinphoneCall
*
)
calls
->
data
;
...
...
@@ -3612,7 +3612,7 @@ int linphone_core_terminate_all_calls(LinphoneCore *lc){
return
0
;
}
in
t
linphone_core_decline_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
LinphoneReason
reason
)
{
L
in
phoneStatus
linphone_core_decline_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
LinphoneReason
reason
)
{
return
linphone_call_decline
(
call
,
reason
);
}
...
...
@@ -3628,11 +3628,11 @@ LinphoneCall *linphone_core_get_current_call(const LinphoneCore *lc){
return
lc
->
current_call
;
}
in
t
linphone_core_pause_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_core_pause_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
return
linphone_call_pause
(
call
);
}
in
t
linphone_core_pause_all_calls
(
LinphoneCore
*
lc
){
L
in
phoneStatus
linphone_core_pause_all_calls
(
LinphoneCore
*
lc
){
const
bctbx_list_t
*
elem
;
for
(
elem
=
lc
->
calls
;
elem
!=
NULL
;
elem
=
elem
->
next
){
LinphoneCall
*
call
=
(
LinphoneCall
*
)
elem
->
data
;
...
...
@@ -3664,7 +3664,7 @@ int linphone_core_preempt_sound_resources(LinphoneCore *lc){
return
err
;
}
in
t
linphone_core_resume_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
L
in
phoneStatus
linphone_core_resume_call
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
)
{
return
linphone_call_resume
(
call
);
}
...
...
@@ -4023,7 +4023,7 @@ bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *dev
return
ms_snd_card_manager_get_playback_card
(
ms_factory_get_snd_card_manager
(
lc
->
factory
),
devid
)
!=
NULL
;
}
in
t
linphone_core_set_ringer_device
(
LinphoneCore
*
lc
,
const
char
*
devid
){
L
in
phoneStatus
linphone_core_set_ringer_device
(
LinphoneCore
*
lc
,
const
char
*
devid
){
MSSndCard
*
card
=
get_card_from_string_id
(
devid
,
MS_SND_CARD_CAP_PLAYBACK
,
lc
->
factory
);
lc
->
sound_conf
.
ring_sndcard
=
card
;
if
(
card
&&
linphone_core_ready
(
lc
))
...
...
@@ -4031,7 +4031,7 @@ int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid){
return
0
;
}
in
t
linphone_core_set_playback_device
(
LinphoneCore
*
lc
,
const
char
*
devid
){
L
in
phoneStatus
linphone_core_set_playback_device
(
LinphoneCore
*
lc
,
const
char
*
devid
){
MSSndCard
*
card
=
get_card_from_string_id
(
devid
,
MS_SND_CARD_CAP_PLAYBACK
,
lc
->
factory
);
lc
->
sound_conf
.
play_sndcard
=
card
;
if
(
card
&&
linphone_core_ready
(
lc
))
...
...
@@ -4039,7 +4039,7 @@ int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid){
return
0
;
}
in
t
linphone_core_set_capture_device
(
LinphoneCore
*
lc
,
const
char
*
devid
){
L
in
phoneStatus
linphone_core_set_capture_device
(
LinphoneCore
*
lc
,
const
char
*
devid
){
MSSndCard
*
card
=
get_card_from_string_id
(
devid
,
MS_SND_CARD_CAP_CAPTURE
,
lc
->
factory
);
lc
->
sound_conf
.
capt_sndcard
=
card
;
if
(
card
&&
linphone_core_ready
(
lc
))
...
...
@@ -4207,7 +4207,7 @@ static void notify_end_of_ringtone( LinphoneRingtonePlayer* rp, void* user_data,
lc
->
preview_finished
=
1
;
}
in
t
linphone_core_preview_ring
(
LinphoneCore
*
lc
,
const
char
*
ring
,
LinphoneCoreCbFunc
end_of_ringtone
,
void
*
userdata
)
L
in
phoneStatus
linphone_core_preview_ring
(
LinphoneCore
*
lc
,
const
char
*
ring
,
LinphoneCoreCbFunc
end_of_ringtone
,
void
*
userdata
)
{
int
err
;
MSSndCard
*
ringcard
=
lc
->
sound_conf
.
lsd_card
?
lc
->
sound_conf
.
lsd_card
:
lc
->
sound_conf
.
ring_sndcard
;
...
...
@@ -4675,7 +4675,7 @@ static void snapshot_taken(void *userdata, struct _MSFilter *f, unsigned int id,
}
#endif
in
t
linphone_core_take_preview_snapshot
(
LinphoneCore
*
lc
,
const
char
*
file
)
{
L
in
phoneStatus
linphone_core_take_preview_snapshot
(
LinphoneCore
*
lc
,
const
char
*
file
)
{
LinphoneCall
*
call
=
linphone_core_get_current_call
(
lc
);
if
(
!
file
)
return
-
1
;
...
...
@@ -4848,7 +4848,7 @@ bool_t linphone_core_self_view_enabled(const LinphoneCore *lc){
return
lc
->
video_conf
.
selfview
;
}