Commit 408da4db authored by François Grisez's avatar François Grisez

Declared the return type of functions returning an error code as LinphoneStatus

parent 69e19e22
......@@ -64,27 +64,27 @@ int linphone_address_get_port(const LinphoneAddress *u) {
return sal_address_get_port(u);
}
int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){
LinphoneStatus linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){
sal_address_set_display_name(u,display_name);
return 0;
}
int linphone_address_set_username(LinphoneAddress *uri, const char *username){
LinphoneStatus linphone_address_set_username(LinphoneAddress *uri, const char *username) {
sal_address_set_username(uri,username);
return 0;
}
int linphone_address_set_domain(LinphoneAddress *uri, const char *host){
LinphoneStatus linphone_address_set_domain(LinphoneAddress *uri, const char *host){
sal_address_set_domain(uri,host);
return 0;
}
int linphone_address_set_port(LinphoneAddress *uri, int port){
LinphoneStatus linphone_address_set_port(LinphoneAddress *uri, int port){
sal_address_set_port(uri,port);
return 0;
}
int linphone_address_set_transport(LinphoneAddress *uri, LinphoneTransportType tp){
LinphoneStatus linphone_address_set_transport(LinphoneAddress *uri, LinphoneTransportType tp){
sal_address_set_transport(uri,(SalTransport)tp);
return 0;
}
......
......@@ -150,7 +150,7 @@ void linphone_call_params_enable_audio(LinphoneCallParams *cp, bool_t enabled){
cp->audio_dir=LinphoneMediaDirectionSendRecv;
}
int linphone_call_params_enable_realtime_text(LinphoneCallParams *params, bool_t yesno) {
LinphoneStatus linphone_call_params_enable_realtime_text(LinphoneCallParams *params, bool_t yesno) {
params->realtimetext_enabled=yesno;
return 0;
}
......
......@@ -1384,7 +1384,7 @@ uint32_t linphone_chat_room_get_char(const LinphoneChatRoom *cr) {
return 0;
}
int linphone_chat_message_put_char(LinphoneChatMessage *msg, uint32_t character) {
LinphoneStatus 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;
......
......@@ -587,7 +587,7 @@ int linphone_chat_room_upload_file(LinphoneChatMessage *msg) {
return err;
}
int linphone_chat_message_download_file(LinphoneChatMessage *msg) {
LinphoneStatus linphone_chat_message_download_file(LinphoneChatMessage *msg) {
belle_http_request_listener_callbacks_t cbs = {0};
int err;
......
......@@ -1035,7 +1035,7 @@ int linphone_conference_add_participant(LinphoneConference *obj, LinphoneCall *c
return obj->conf->addParticipant(call);
}
int linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri) {
LinphoneStatus linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri) {
return obj->conf->removeParticipant(uri);
}
......
......@@ -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);
}
int linphone_dictionary_remove(LinphoneDictionary* obj, const char* key)
LinphoneStatus 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);
}
int linphone_dictionary_haskey(const LinphoneDictionary* obj, const char* key)
LinphoneStatus linphone_dictionary_haskey(const LinphoneDictionary* obj, const char* key)
{
return belle_sip_dict_haskey(obj, key);
}
......
......@@ -79,7 +79,7 @@ void ec_tester_destroy(EchoTester *ect) {
ms_free(ect);
}
int linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate) {
LinphoneStatus 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;
}
int linphone_core_stop_echo_tester(LinphoneCore *lc) {
LinphoneStatus 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
}
......@@ -187,7 +187,7 @@ LinphoneEvent *linphone_core_subscribe(LinphoneCore *lc, const LinphoneAddress *
return lev;
}
int linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus 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;
}
int linphone_event_update_subscribe(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus linphone_event_update_subscribe(LinphoneEvent *lev, const LinphoneContent *body){
return linphone_event_send_subscribe(lev,body);
}
int linphone_event_refresh_subscribe(LinphoneEvent *lev) {
LinphoneStatus linphone_event_refresh_subscribe(LinphoneEvent *lev) {
return sal_op_refresh(lev->op);
}
int linphone_event_accept_subscription(LinphoneEvent *lev){
LinphoneStatus 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;
}
int linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason){
LinphoneStatus 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;
}
int linphone_event_notify(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus 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
}
int linphone_event_send_publish(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus linphone_event_send_publish(LinphoneEvent *lev, const LinphoneContent *body){
return _linphone_event_send_publish(lev,body,TRUE);
}
int linphone_event_update_publish(LinphoneEvent* lev, const LinphoneContent* body ) {
LinphoneStatus linphone_event_update_publish(LinphoneEvent* lev, const LinphoneContent* body ) {
return linphone_event_send_publish(lev,body);
}
int linphone_event_refresh_publish(LinphoneEvent *lev) {
LinphoneStatus linphone_event_refresh_publish(LinphoneEvent *lev) {
return sal_op_refresh(lev->op);
}
void linphone_event_pause_publish(LinphoneEvent *lev) {
......
......@@ -290,7 +290,7 @@ const LinphoneAddress * linphone_friend_get_address(const LinphoneFriend *lf) {
return NULL;
}
int linphone_friend_set_address(LinphoneFriend *lf, const LinphoneAddress *addr) {
LinphoneStatus 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)
}
}
int linphone_friend_set_name(LinphoneFriend *lf, const char *name){
LinphoneStatus 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;
}
int linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val){
LinphoneStatus linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val){
fr->subscribe=val;
return 0;
}
int linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol) {
LinphoneStatus linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol) {
fr->pol=pol;
return 0;
}
......
......@@ -993,7 +993,7 @@ LinphoneCore* linphone_friend_list_get_core(const LinphoneFriendList *list) {
return list->lc;
}
int linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *list, const char *vcard_file) {
LinphoneStatus 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;
}
int linphone_friend_list_import_friends_from_vcard4_buffer(LinphoneFriendList *list, const char *vcard_buffer) {
LinphoneStatus 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;
......
......@@ -76,7 +76,7 @@ LinphoneInfoMessage *linphone_core_create_info_message(LinphoneCore *lc){
return belle_sip_object_new(LinphoneInfoMessage);
}
int linphone_call_send_info_message(LinphoneCall *call, const LinphoneInfoMessage *info) {
LinphoneStatus 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);
......
......@@ -2245,7 +2245,7 @@ void linphone_call_send_vfu_request(LinphoneCall *call) {
#endif
}
int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file){
LinphoneStatus 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;
}
int linphone_call_take_preview_snapshot(LinphoneCall *call, const char *file){
LinphoneStatus 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){
}
}
int linphone_call_send_dtmf(LinphoneCall *call,char dtmf){
LinphoneStatus 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;
}
int linphone_call_send_dtmfs(LinphoneCall *call,const char *dtmfs) {
LinphoneStatus 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;
}
int linphone_call_pause(LinphoneCall *call) {
LinphoneStatus 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;
}
int linphone_call_resume(LinphoneCall *call) {
LinphoneStatus 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");
}
int linphone_call_terminate(LinphoneCall *call) {
LinphoneStatus 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;
}
int linphone_call_redirect(LinphoneCall *call, const char *redirect_uri) {
LinphoneStatus 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;
}
int linphone_call_decline(LinphoneCall * call, LinphoneReason reason) {
LinphoneStatus 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;
}
int linphone_call_accept(LinphoneCall *call) {
LinphoneStatus linphone_call_accept(LinphoneCall *call) {
return linphone_call_accept_with_params(call, NULL);
}
int linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus 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;
}
int linphone_call_accept_early_media(LinphoneCall* call) {
LinphoneStatus linphone_call_accept_early_media(LinphoneCall* call) {
return linphone_call_accept_early_media_with_params(call, NULL);
}
int linphone_call_accept_early_media_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus 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;
}
int linphone_call_update(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus 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;
}
int linphone_call_defer_update(LinphoneCall *call) {
LinphoneStatus 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;
}
int linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus 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));
}
int linphone_call_transfer(LinphoneCall *call, const char *refer_to) {
LinphoneStatus 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;
}
int linphone_call_transfer_to_another(LinphoneCall *call, LinphoneCall *dest) {
LinphoneStatus 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;
......
......@@ -2284,7 +2284,7 @@ const bctbx_list_t *linphone_core_get_text_codecs(const LinphoneCore *lc) {
return lc->codecs_conf.text_codecs;
}
int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact) {
LinphoneStatus 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));
}
int linphone_core_set_audio_codecs(LinphoneCore *lc, bctbx_list_t *codecs){
LinphoneStatus 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;
}
int linphone_core_set_video_codecs(LinphoneCore *lc, bctbx_list_t *codecs){
LinphoneStatus 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;
}
int linphone_core_set_text_codecs(LinphoneCore *lc, bctbx_list_t *codecs) {
LinphoneStatus 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);
}
int linphone_core_set_sip_transports(LinphoneCore *lc, const LinphoneSipTransports * tr_config /*config to be saved*/){
LinphoneStatus 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);
}
int linphone_core_get_sip_transports(LinphoneCore *lc, LinphoneSipTransports *tr){
LinphoneStatus 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;
}
int linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char *url) {
LinphoneStatus 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);
}
int linphone_core_transfer_call_to_another(LinphoneCore *lc, LinphoneCall *call, LinphoneCall *dest) {
LinphoneStatus 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);
}
int linphone_core_accept_early_media_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus linphone_core_accept_early_media_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
return linphone_call_accept_early_media_with_params(call, params);
}
int linphone_core_accept_early_media(LinphoneCore *lc, LinphoneCall *call) {
LinphoneStatus linphone_core_accept_early_media(LinphoneCore *lc, LinphoneCall *call) {
return linphone_call_accept_early_media(call);
}
int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
return linphone_call_update(call, params);
}
int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call) {
LinphoneStatus linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call) {
return linphone_call_defer_update(call);
}
int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus 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;
}
int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call) {
LinphoneStatus linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call) {
return linphone_call_accept_with_params(call, NULL);
}
int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus 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);
}
int linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri) {
LinphoneStatus linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri) {
return linphone_call_redirect(call, redirect_uri);
}
int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call) {
LinphoneStatus 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);
}
int linphone_core_terminate_all_calls(LinphoneCore *lc){
LinphoneStatus 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;
}
int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall *call, LinphoneReason reason) {
LinphoneStatus 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;
}
int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call) {
LinphoneStatus linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call) {
return linphone_call_pause(call);
}
int linphone_core_pause_all_calls(LinphoneCore *lc){
LinphoneStatus 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;
}
int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call) {
LinphoneStatus 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;
}
int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid){
LinphoneStatus 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;
}
int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid){
LinphoneStatus 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;
}
int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid){
LinphoneStatus 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;
}
int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc end_of_ringtone,void * userdata)
LinphoneStatus 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
int linphone_core_take_preview_snapshot(LinphoneCore *lc, const char *file) {
LinphoneStatus 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;
}
int linphone_core_set_video_device(LinphoneCore *lc, const char *id){
LinphoneStatus linphone_core_set_video_device(LinphoneCore *lc, const char *id){
MSWebCam *</