diff --git a/coreapi/address.c b/coreapi/address.c index d7578c2ba..35fbe2808 100644 --- a/coreapi/address.c +++ b/coreapi/address.c @@ -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; } diff --git a/coreapi/call_params.c b/coreapi/call_params.c index 568dc0b80..a4989670d 100644 --- a/coreapi/call_params.c +++ b/coreapi/call_params.c @@ -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; } diff --git a/coreapi/chat.c b/coreapi/chat.c index 761195ad6..ed8422bde 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -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; diff --git a/coreapi/chat_file_transfer.c b/coreapi/chat_file_transfer.c index 287d3eca7..575242c50 100644 --- a/coreapi/chat_file_transfer.c +++ b/coreapi/chat_file_transfer.c @@ -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; diff --git a/coreapi/conference.cc b/coreapi/conference.cc index 6e44da789..51541ae78 100644 --- a/coreapi/conference.cc +++ b/coreapi/conference.cc @@ -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); } diff --git a/coreapi/dict.c b/coreapi/dict.c index 18a23345c..87f2ed70d 100644 --- a/coreapi/dict.c +++ b/coreapi/dict.c @@ -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); } diff --git a/coreapi/echo-tester.c b/coreapi/echo-tester.c index 5740c7302..b73ae2da0 100644 --- a/coreapi/echo-tester.c +++ b/coreapi/echo-tester.c @@ -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 +} diff --git a/coreapi/event.c b/coreapi/event.c index 2f331c7be..44f6c1bf2 100644 --- a/coreapi/event.c +++ b/coreapi/event.c @@ -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) { diff --git a/coreapi/friend.c b/coreapi/friend.c index 485739750..c103f4035 100644 --- a/coreapi/friend.c +++ b/coreapi/friend.c @@ -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; } diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c index ac4c895f8..5055b0ff5 100644 --- a/coreapi/friendlist.c +++ b/coreapi/friendlist.c @@ -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; diff --git a/coreapi/info.c b/coreapi/info.c index 6bd80ebc3..27eb883a4 100644 --- a/coreapi/info.c +++ b/coreapi/info.c @@ -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); diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 322ef88d4..f48e5d94e 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -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; diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 8ec7b2dd3..c495cb20a 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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 *olddev=lc->video_conf.device; const char *vd; if (id!=NULL){ @@ -4893,7 +4893,7 @@ static VideoStream * get_active_video_stream(LinphoneCore *lc){ } #endif -int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { +LinphoneStatus linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { #ifdef VIDEO_ENABLED VideoStream *vs=get_active_video_stream(lc); /* If we have a video stream (either preview, either from call), we @@ -4924,7 +4924,7 @@ const char *linphone_core_get_static_picture(LinphoneCore *lc) { return path; } -int linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps) { +LinphoneStatus linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps) { #ifdef VIDEO_ENABLED VideoStream *vs = NULL; @@ -5361,7 +5361,7 @@ void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms){ else ms_filter_call_method(f, MS_DTMF_GEN_START, &dtmf); } -int linphone_core_play_local(LinphoneCore *lc, const char *audiofile){ +LinphoneStatus linphone_core_play_local(LinphoneCore *lc, const char *audiofile){ MSFilter *f=get_audio_resource(lc,LinphoneLocalPlayer); int loopms=-1; if (!f) return -1; @@ -6583,7 +6583,7 @@ bool_t linphone_core_media_encryption_supported(const LinphoneCore *lc, Linphone return FALSE; } -int linphone_core_set_media_encryption(LinphoneCore *lc, LinphoneMediaEncryption menc) { +LinphoneStatus linphone_core_set_media_encryption(LinphoneCore *lc, LinphoneMediaEncryption menc) { const char *type="none"; int ret=-1; @@ -6772,7 +6772,7 @@ void linphone_core_set_avpf_rr_interval(LinphoneCore *lc, int interval){ lp_config_set_int(lc->config,"rtp","avpf_rr_interval",interval); } -int linphone_core_set_audio_multicast_addr(LinphoneCore *lc, const char* ip) { +LinphoneStatus linphone_core_set_audio_multicast_addr(LinphoneCore *lc, const char* ip) { char* new_value; if (ip && !ms_is_multicast(ip)) { ms_error("Cannot set multicast audio addr to core [%p] because [%s] is not multicast",lc,ip); @@ -6784,7 +6784,7 @@ int linphone_core_set_audio_multicast_addr(LinphoneCore *lc, const char* ip) { return 0; } -int linphone_core_set_video_multicast_addr(LinphoneCore *lc, const char* ip) { +LinphoneStatus linphone_core_set_video_multicast_addr(LinphoneCore *lc, const char* ip) { char* new_value; if (ip && !ms_is_multicast(ip)) { ms_error("Cannot set multicast video addr to core [%p] because [%s] is not multicast",lc,ip); @@ -6804,7 +6804,7 @@ const char* linphone_core_get_video_multicast_addr(const LinphoneCore *lc){ return lc->rtp_conf.video_multicast_addr; } -int linphone_core_set_audio_multicast_ttl(LinphoneCore *lc, int ttl) { +LinphoneStatus linphone_core_set_audio_multicast_ttl(LinphoneCore *lc, int ttl) { if (ttl>255) { ms_error("Cannot set multicast audio ttl to core [%p] to [%i] value must be <256",lc,ttl); return -1; @@ -6814,7 +6814,7 @@ int linphone_core_set_audio_multicast_ttl(LinphoneCore *lc, int ttl) { return 0; } -int linphone_core_set_video_multicast_ttl(LinphoneCore *lc, int ttl) { +LinphoneStatus linphone_core_set_video_multicast_ttl(LinphoneCore *lc, int ttl) { if (ttl>255) { ms_error("Cannot set multicast video ttl to core [%p] to [%i] value must be <256",lc,ttl); return -1; @@ -6987,7 +6987,7 @@ LinphoneConference *linphone_core_create_conference_with_params(LinphoneCore *lc return lc->conf_ctx; } -int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call) { +LinphoneStatus linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call) { LinphoneConference *conference = linphone_core_get_conference(lc); if(conference == NULL) { LinphoneConferenceParams *params = linphone_conference_params_new(lc); @@ -6998,7 +6998,7 @@ int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call) { else return -1; } -int linphone_core_add_all_to_conference(LinphoneCore *lc) { +LinphoneStatus linphone_core_add_all_to_conference(LinphoneCore *lc) { bctbx_list_t *calls=lc->calls; while (calls) { LinphoneCall *call=(LinphoneCall*)calls->data; @@ -7013,7 +7013,7 @@ int linphone_core_add_all_to_conference(LinphoneCore *lc) { return 0; } -int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call) { +LinphoneStatus linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call) { if(lc->conf_ctx) return linphone_conference_remove_participant_with_call(lc->conf_ctx, call); else return -1; } @@ -7028,12 +7028,12 @@ int linphone_core_terminate_conference(LinphoneCore *lc) { return 0; } -int linphone_core_enter_conference(LinphoneCore *lc) { +LinphoneStatus linphone_core_enter_conference(LinphoneCore *lc) { if(lc->conf_ctx) return linphone_conference_enter(lc->conf_ctx); else return -1; } -int linphone_core_leave_conference(LinphoneCore *lc) { +LinphoneStatus linphone_core_leave_conference(LinphoneCore *lc) { if(lc->conf_ctx) return linphone_conference_leave(lc->conf_ctx); else return -1; } @@ -7053,12 +7053,12 @@ float linphone_core_get_conference_local_input_volume(LinphoneCore *lc) { else return -1.0; } -int linphone_core_start_conference_recording(LinphoneCore *lc, const char *path) { +LinphoneStatus linphone_core_start_conference_recording(LinphoneCore *lc, const char *path) { if(lc->conf_ctx) return linphone_conference_start_recording(lc->conf_ctx, path); return -1; } -int linphone_core_stop_conference_recording(LinphoneCore *lc) { +LinphoneStatus linphone_core_stop_conference_recording(LinphoneCore *lc) { if(lc->conf_ctx) return linphone_conference_stop_recording(lc->conf_ctx); return -1; } diff --git a/coreapi/lpconfig.c b/coreapi/lpconfig.c index 86c39e46c..1e55d02d9 100644 --- a/coreapi/lpconfig.c +++ b/coreapi/lpconfig.c @@ -465,7 +465,7 @@ LpConfig *linphone_config_new_with_factory(const char *config_filename, const ch } } -int linphone_config_read_file(LpConfig *lpconfig, const char *filename){ +LinphoneStatus linphone_config_read_file(LpConfig *lpconfig, const char *filename){ char* path = lp_realpath(filename, NULL); bctbx_vfs_file_t* pFile = bctbx_file_open(lpconfig->g_bctbx_vfs, path, "r"); if (pFile != NULL){ @@ -795,7 +795,7 @@ void lp_section_write(LpSection *sec,LpConfig *lpconfig){ } -int linphone_config_sync(LpConfig *lpconfig){ +LinphoneStatus linphone_config_sync(LpConfig *lpconfig){ bctbx_vfs_file_t *pFile = NULL; if (lpconfig->filename==NULL) return -1; if (lpconfig->readonly) return 0; @@ -990,7 +990,7 @@ end: if(realfilepath) ms_free(realfilepath); } -int linphone_config_read_relative_file(const LpConfig *lpconfig, const char *filename, char *data, size_t max_length) { +LinphoneStatus linphone_config_read_relative_file(const LpConfig *lpconfig, const char *filename, char *data, size_t max_length) { char *dup_config_file = NULL; const char *dir = NULL; char *filepath = NULL; diff --git a/coreapi/lsd.c b/coreapi/lsd.c index 5bd11026c..f6a3b5104 100644 --- a/coreapi/lsd.c +++ b/coreapi/lsd.c @@ -112,7 +112,7 @@ LinphoneSoundDaemon *lsd_player_get_daemon(const LsdPlayer *p){ return p->lsd; } -int lsd_player_stop(LsdPlayer *p){ +LinphoneStatus lsd_player_stop(LsdPlayer *p){ ms_filter_call_method_noarg(p->player,MS_PLAYER_PAUSE); return 0; } @@ -185,7 +185,7 @@ static void lsd_player_configure(LsdPlayer *b){ ms_message("player configured for rate=%i, channels=%i",rate,chans); } -int lsd_player_play(LsdPlayer *b, const char *filename ){ +LinphoneStatus lsd_player_play(LsdPlayer *b, const char *filename ){ int state; ms_filter_call_method(b->player,MS_PLAYER_GET_STATE,&state); diff --git a/coreapi/misc.c b/coreapi/misc.c index 5f0d018f4..1216559ef 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -1231,7 +1231,7 @@ static void linphone_core_migrate_proxy_config(LinphoneCore *lc, LinphoneTranspo } } -int linphone_core_migrate_to_multi_transport(LinphoneCore *lc){ +LinphoneStatus linphone_core_migrate_to_multi_transport(LinphoneCore *lc){ if (!lp_config_get_int(lc->config,"sip","multi_transport_migration_done",0)){ LinphoneTransportType tpt; int port; @@ -1512,7 +1512,7 @@ bool_t linphone_core_symmetric_rtp_enabled(LinphoneCore*lc){ return lp_config_get_int(lc->config,"rtp","symmetric",0); } -int linphone_core_set_network_simulator_params(LinphoneCore *lc, const OrtpNetworkSimulatorParams *params){ +LinphoneStatus linphone_core_set_network_simulator_params(LinphoneCore *lc, const OrtpNetworkSimulatorParams *params){ if (params!=&lc->net_conf.netsim_params) lc->net_conf.netsim_params=*params; /*TODO: should we make some sanity checks on the parameters here*/ diff --git a/coreapi/payload_type.c b/coreapi/payload_type.c index e53d0739f..19881e61b 100644 --- a/coreapi/payload_type.c +++ b/coreapi/payload_type.c @@ -69,7 +69,7 @@ static int _linphone_core_enable_payload_type(LinphoneCore *lc, OrtpPayloadType return 0; } -int linphone_core_enable_payload_type(LinphoneCore *lc, OrtpPayloadType *pt, bool_t enabled){ +LinphoneStatus linphone_core_enable_payload_type(LinphoneCore *lc, OrtpPayloadType *pt, bool_t enabled){ if (!_payload_type_is_in_core(pt, lc)) { char *desc = _payload_type_get_description(pt); ms_error("cannot enable '%s' payload type: not in the core", desc); diff --git a/coreapi/player.c b/coreapi/player.c index b1214aadb..275a71702 100644 --- a/coreapi/player.c +++ b/coreapi/player.c @@ -20,21 +20,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "private.h" -int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback cb, void *user_data){ +LinphoneStatus linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback cb, void *user_data){ obj->user_data=user_data; obj->cb=cb; return obj->open(obj,filename); } -int linphone_player_start(LinphonePlayer *obj){ +LinphoneStatus linphone_player_start(LinphonePlayer *obj){ return obj->start(obj); } -int linphone_player_pause(LinphonePlayer *obj){ +LinphoneStatus linphone_player_pause(LinphonePlayer *obj){ return obj->pause(obj); } -int linphone_player_seek(LinphonePlayer *obj, int time_ms){ +LinphoneStatus linphone_player_seek(LinphonePlayer *obj, int time_ms){ return obj->seek(obj,time_ms); } diff --git a/coreapi/presence.c b/coreapi/presence.c index 73045cb03..12fb8f834 100644 --- a/coreapi/presence.c +++ b/coreapi/presence.c @@ -345,7 +345,7 @@ char * linphone_presence_model_get_contact(const LinphonePresenceModel *model) { return ms_strdup(contact); } -int linphone_presence_model_set_contact(LinphonePresenceModel *model, const char *contact) { +LinphoneStatus linphone_presence_model_set_contact(LinphonePresenceModel *model, const char *contact) { LinphonePresenceService *service; if (model == NULL) return -1; @@ -385,7 +385,7 @@ LinphonePresenceActivity * linphone_presence_model_get_activity(const LinphonePr return linphone_presence_model_get_nth_activity(model, 0); } -int linphone_presence_model_set_activity(LinphonePresenceModel *model, LinphonePresenceActivityType acttype, const char *description) { +LinphoneStatus linphone_presence_model_set_activity(LinphonePresenceModel *model, LinphonePresenceActivityType acttype, const char *description) { LinphonePresenceActivity *activity; int err = 0; @@ -418,7 +418,7 @@ LinphonePresenceActivity * linphone_presence_model_get_nth_activity(const Linpho return st.activity; } -int linphone_presence_model_add_activity(LinphonePresenceModel *model, LinphonePresenceActivity *activity) { +LinphoneStatus linphone_presence_model_add_activity(LinphonePresenceModel *model, LinphonePresenceActivity *activity) { char *id = NULL; LinphonePresencePerson *person = NULL; @@ -443,7 +443,7 @@ int linphone_presence_model_add_activity(LinphonePresenceModel *model, LinphoneP return 0; } -int linphone_presence_model_clear_activities(LinphonePresenceModel *model) { +LinphoneStatus linphone_presence_model_clear_activities(LinphonePresenceModel *model) { if (model == NULL) return -1; bctbx_list_for_each(model->persons, (MSIterateFunc)linphone_presence_person_clear_activities); @@ -545,7 +545,7 @@ LinphonePresenceNote * linphone_presence_model_get_note(const LinphonePresenceMo return st.note; } -int linphone_presence_model_add_note(LinphonePresenceModel *model, const char *note_content, const char *lang) { +LinphoneStatus linphone_presence_model_add_note(LinphonePresenceModel *model, const char *note_content, const char *lang) { LinphonePresenceService *service; LinphonePresenceNote *note; @@ -591,7 +591,7 @@ static void clear_presence_service_notes(LinphonePresenceService *service) { service->notes = NULL; } -int linphone_presence_model_clear_notes(LinphonePresenceModel *model) { +LinphoneStatus linphone_presence_model_clear_notes(LinphonePresenceModel *model) { if (model == NULL) return -1; @@ -624,13 +624,13 @@ LinphonePresenceService * linphone_presence_model_get_nth_service(const Linphone return (LinphonePresenceService *)bctbx_list_nth_data(model->services, idx); } -int linphone_presence_model_add_service(LinphonePresenceModel *model, LinphonePresenceService *service) { +LinphoneStatus linphone_presence_model_add_service(LinphonePresenceModel *model, LinphonePresenceService *service) { if ((model == NULL) || (service == NULL)) return -1; model->services = bctbx_list_append(model->services, linphone_presence_service_ref(service)); return 0; } -int linphone_presence_model_clear_services(LinphonePresenceModel *model) { +LinphoneStatus linphone_presence_model_clear_services(LinphonePresenceModel *model) { if (model == NULL) return -1; bctbx_list_for_each(model->services, (MSIterateFunc)linphone_presence_service_unref); @@ -650,13 +650,13 @@ LinphonePresencePerson * linphone_presence_model_get_nth_person(const LinphonePr return (LinphonePresencePerson *)bctbx_list_nth_data(model->persons, idx); } -int linphone_presence_model_add_person(LinphonePresenceModel *model, LinphonePresencePerson *person) { +LinphoneStatus linphone_presence_model_add_person(LinphonePresenceModel *model, LinphonePresencePerson *person) { if ((model == NULL) || (person == NULL)) return -1; presence_model_add_person(model, person); return 0; } -int linphone_presence_model_clear_persons(LinphonePresenceModel *model) { +LinphoneStatus linphone_presence_model_clear_persons(LinphonePresenceModel *model) { if (model == NULL) return -1; bctbx_list_for_each(model->persons, (MSIterateFunc)linphone_presence_person_unref); @@ -665,7 +665,7 @@ int linphone_presence_model_clear_persons(LinphonePresenceModel *model) { return 0; } -int linphone_presence_model_set_presentity(LinphonePresenceModel *model, const LinphoneAddress *presentity) { +LinphoneStatus linphone_presence_model_set_presentity(LinphonePresenceModel *model, const LinphoneAddress *presentity) { if (model->presentity) { linphone_address_unref(model->presentity); @@ -737,7 +737,7 @@ char * linphone_presence_service_get_id(const LinphonePresenceService *service) return ms_strdup(service->id); } -int linphone_presence_service_set_id(LinphonePresenceService *service, const char *id) { +LinphoneStatus linphone_presence_service_set_id(LinphonePresenceService *service, const char *id) { if (service == NULL) return -1; if (service->id != NULL) ms_free(service->id); @@ -753,7 +753,7 @@ LinphonePresenceBasicStatus linphone_presence_service_get_basic_status(const Lin return service->status; } -int linphone_presence_service_set_basic_status(LinphonePresenceService *service, LinphonePresenceBasicStatus basic_status) { +LinphoneStatus linphone_presence_service_set_basic_status(LinphonePresenceService *service, LinphonePresenceBasicStatus basic_status) { if (service == NULL) return -1; service->status = basic_status; return 0; @@ -764,7 +764,7 @@ char * linphone_presence_service_get_contact(const LinphonePresenceService *serv return ms_strdup(service->contact); } -int linphone_presence_service_set_contact(LinphonePresenceService *service, const char *contact) { +LinphoneStatus linphone_presence_service_set_contact(LinphonePresenceService *service, const char *contact) { if (service == NULL) return -1; if (service->contact != NULL) ms_free(service->contact); @@ -786,13 +786,13 @@ LinphonePresenceNote * linphone_presence_service_get_nth_note(const LinphonePres return (LinphonePresenceNote *)bctbx_list_nth_data(service->notes, idx); } -int linphone_presence_service_add_note(LinphonePresenceService *service, LinphonePresenceNote *note) { +LinphoneStatus linphone_presence_service_add_note(LinphonePresenceService *service, LinphonePresenceNote *note) { if ((service == NULL) || (note == NULL)) return -1; service->notes = bctbx_list_append(service->notes, linphone_presence_note_ref(note)); return 0; } -int linphone_presence_service_clear_notes(LinphonePresenceService *service) { +LinphoneStatus linphone_presence_service_clear_notes(LinphonePresenceService *service) { if (service == NULL) return -1; bctbx_list_for_each(service->notes, (MSIterateFunc)linphone_presence_note_unref); @@ -825,7 +825,7 @@ char * linphone_presence_person_get_id(const LinphonePresencePerson *person) { return ms_strdup(person->id); } -int linphone_presence_person_set_id(LinphonePresencePerson *person, const char *id) { +LinphoneStatus linphone_presence_person_set_id(LinphonePresencePerson *person, const char *id) { if (person == NULL) return -1; if (person->id != NULL) ms_free(person->id); @@ -847,14 +847,14 @@ LinphonePresenceActivity * linphone_presence_person_get_nth_activity(const Linph return (LinphonePresenceActivity *)bctbx_list_nth_data(person->activities, idx); } -int linphone_presence_person_add_activity(LinphonePresencePerson *person, LinphonePresenceActivity *activity) { +LinphoneStatus linphone_presence_person_add_activity(LinphonePresencePerson *person, LinphonePresenceActivity *activity) { if ((person == NULL) || (activity == NULL)) return -1; // insert in first position since its the most recent activity! person->activities = bctbx_list_prepend(person->activities, linphone_presence_activity_ref(activity)); return 0; } -int linphone_presence_person_clear_activities(LinphonePresencePerson *person) { +LinphoneStatus linphone_presence_person_clear_activities(LinphonePresencePerson *person) { if (person == NULL) return -1; bctbx_list_for_each(person->activities, (MSIterateFunc)linphone_presence_activity_unref); bctbx_list_free(person->activities); @@ -873,13 +873,13 @@ LinphonePresenceNote * linphone_presence_person_get_nth_note(const LinphonePrese return (LinphonePresenceNote *)bctbx_list_nth_data(person->notes, idx); } -int linphone_presence_person_add_note(LinphonePresencePerson *person, LinphonePresenceNote *note) { +LinphoneStatus linphone_presence_person_add_note(LinphonePresencePerson *person, LinphonePresenceNote *note) { if ((person == NULL) || (note == NULL)) return -1; person->notes = bctbx_list_append(person->notes, linphone_presence_note_ref(note)); return 0; } -int linphone_presence_person_clear_notes(LinphonePresencePerson *person) { +LinphoneStatus linphone_presence_person_clear_notes(LinphonePresencePerson *person) { if (person == NULL) return -1; bctbx_list_for_each(person->notes, (MSIterateFunc)linphone_presence_note_unref); bctbx_list_free(person->notes); @@ -898,13 +898,13 @@ LinphonePresenceNote * linphone_presence_person_get_nth_activities_note(const Li return (LinphonePresenceNote *)bctbx_list_nth_data(person->activities_notes, idx); } -int linphone_presence_person_add_activities_note(LinphonePresencePerson *person, LinphonePresenceNote *note) { +LinphoneStatus linphone_presence_person_add_activities_note(LinphonePresencePerson *person, LinphonePresenceNote *note) { if ((person == NULL) || (note == NULL)) return -1; person->notes = bctbx_list_append(person->activities_notes, linphone_presence_note_ref(note)); return 0; } -int linphone_presence_person_clear_activities_notes(LinphonePresencePerson *person) { +LinphoneStatus linphone_presence_person_clear_activities_notes(LinphonePresencePerson *person) { if (person == NULL) return -1; bctbx_list_for_each(person->activities_notes, (MSIterateFunc)linphone_presence_note_unref); bctbx_list_free(person->activities_notes); @@ -1004,7 +1004,7 @@ LinphonePresenceActivityType linphone_presence_activity_get_type(const LinphoneP return activity->type; } -int linphone_presence_activity_set_type(LinphonePresenceActivity *activity, LinphonePresenceActivityType acttype) { +LinphoneStatus linphone_presence_activity_set_type(LinphonePresenceActivity *activity, LinphonePresenceActivityType acttype) { if (activity == NULL) return -1; activity->type = acttype; return 0; @@ -1016,7 +1016,7 @@ const char * linphone_presence_activity_get_description(const LinphonePresenceAc return activity->description; } -int linphone_presence_activity_set_description(LinphonePresenceActivity *activity, const char *description) { +LinphoneStatus linphone_presence_activity_set_description(LinphonePresenceActivity *activity, const char *description) { if (activity == NULL) return -1; if (activity->description != NULL) ms_free(activity->description); @@ -1059,7 +1059,7 @@ const char * linphone_presence_note_get_content(const LinphonePresenceNote *note return note->content; } -int linphone_presence_note_set_content(LinphonePresenceNote *note, const char *content) { +LinphoneStatus linphone_presence_note_set_content(LinphonePresenceNote *note, const char *content) { if (content == NULL) return -1; if (note->content != NULL) { ms_free(note->content); @@ -1074,7 +1074,7 @@ const char * linphone_presence_note_get_lang(const LinphonePresenceNote *note) { return note->lang; } -int linphone_presence_note_set_lang(LinphonePresenceNote *note, const char *lang) { +LinphoneStatus linphone_presence_note_set_lang(LinphonePresenceNote *note, const char *lang) { if (note->lang != NULL) { ms_free(note->lang); note->lang = NULL; diff --git a/coreapi/proxy.c b/coreapi/proxy.c index f38b76c24..f7d645f82 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -253,7 +253,7 @@ bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *cfg){ return cfg->state == LinphoneRegistrationOk; } -int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *cfg, const char *server_addr){ +LinphoneStatus linphone_proxy_config_set_server_addr(LinphoneProxyConfig *cfg, const char *server_addr){ LinphoneAddress *addr=NULL; char *modified=NULL; @@ -280,7 +280,7 @@ int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *cfg, const char * } -int linphone_proxy_config_set_identity_address(LinphoneProxyConfig *cfg, const LinphoneAddress *addr){ +LinphoneStatus linphone_proxy_config_set_identity_address(LinphoneProxyConfig *cfg, const LinphoneAddress *addr){ if (!addr || linphone_address_get_username(addr)==NULL){ char* as_string = addr ? linphone_address_as_string(addr) : ms_strdup("NULL"); ms_warning("Invalid sip identity: %s", as_string); @@ -299,7 +299,7 @@ int linphone_proxy_config_set_identity_address(LinphoneProxyConfig *cfg, const L return 0; } -int linphone_proxy_config_set_identity(LinphoneProxyConfig *cfg, const char *identity){ +LinphoneStatus linphone_proxy_config_set_identity(LinphoneProxyConfig *cfg, const char *identity){ if (identity!=NULL && strlen(identity)>0){ LinphoneAddress *addr=linphone_address_new(identity); int ret=linphone_proxy_config_set_identity_address(cfg, addr); @@ -313,7 +313,7 @@ const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg){ return cfg->identity_address ? linphone_address_get_domain(cfg->identity_address) : NULL; } -int linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const char *route) +LinphoneStatus linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const char *route) { if (cfg->reg_route!=NULL){ ms_free(cfg->reg_route); @@ -767,7 +767,7 @@ LinphoneAddress* linphone_proxy_config_normalize_sip_uri(LinphoneProxyConfig *pr /** * Commits modification made to the proxy configuration. **/ -int linphone_proxy_config_done(LinphoneProxyConfig *cfg) +LinphoneStatus linphone_proxy_config_done(LinphoneProxyConfig *cfg) { LinphoneProxyConfigAddressComparisonResult res; @@ -967,7 +967,7 @@ void linphone_proxy_config_set_custom_header(LinphoneProxyConfig *cfg, const cha cfg->register_changed = TRUE; } -int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){ +LinphoneStatus linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){ if (!linphone_proxy_config_check(lc,cfg)) { return -1; } diff --git a/coreapi/remote_provisioning.c b/coreapi/remote_provisioning.c index 167a28e4d..0bb40595b 100644 --- a/coreapi/remote_provisioning.c +++ b/coreapi/remote_provisioning.c @@ -138,7 +138,7 @@ int linphone_remote_provisioning_download_and_apply(LinphoneCore *lc, const char } } -int linphone_core_set_provisioning_uri(LinphoneCore *lc, const char *remote_provisioning_uri) { +LinphoneStatus linphone_core_set_provisioning_uri(LinphoneCore *lc, const char *remote_provisioning_uri) { belle_generic_uri_t *uri=remote_provisioning_uri?belle_generic_uri_parse(remote_provisioning_uri):NULL; if (!remote_provisioning_uri||uri) { lp_config_set_string(lc->config,"misc","config-uri",remote_provisioning_uri); diff --git a/coreapi/ringtoneplayer.c b/coreapi/ringtoneplayer.c index d3f7ae58b..5159c7b8a 100644 --- a/coreapi/ringtoneplayer.c +++ b/coreapi/ringtoneplayer.c @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "TargetConditionals.h" #endif -int linphone_ringtoneplayer_start(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms) { +LinphoneStatus linphone_ringtoneplayer_start(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms) { return linphone_ringtoneplayer_start_with_cb(factory, rp, card, ringtone, loop_pause_ms, NULL, NULL); } @@ -88,7 +88,7 @@ static void notify_end_of_ringtone(void *ud, MSFilter *f, unsigned int event, vo } } -int linphone_ringtoneplayer_start_with_cb(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms, LinphoneRingtonePlayerFunc end_of_ringtone, void * user_data) { +LinphoneStatus linphone_ringtoneplayer_start_with_cb(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms, LinphoneRingtonePlayerFunc end_of_ringtone, void * user_data) { if (linphone_ringtoneplayer_is_started(rp)) { ms_message("the local ringtone is already started"); return 2; @@ -107,7 +107,7 @@ bool_t linphone_ringtoneplayer_is_started(LinphoneRingtonePlayer* rp) { return (rp->ringstream!=NULL); } -int linphone_ringtoneplayer_stop(LinphoneRingtonePlayer* rp) { +LinphoneStatus linphone_ringtoneplayer_stop(LinphoneRingtonePlayer* rp) { if (rp->ringstream) { ring_stop(rp->ringstream); rp->ringstream = NULL; diff --git a/coreapi/sipsetup.c b/coreapi/sipsetup.c index 27e9c0c6c..a1f22f7d7 100644 --- a/coreapi/sipsetup.c +++ b/coreapi/sipsetup.c @@ -124,7 +124,7 @@ int sip_setup_context_get_capabilities(SipSetupContext *ctx){ return ctx->funcs->capabilities; } -int sip_setup_context_create_account(SipSetupContext * ctx, const char *uri, const char *passwd, const char *email, int suscribe){ +LinphoneStatus sip_setup_context_create_account(SipSetupContext * ctx, const char *uri, const char *passwd, const char *email, int suscribe){ if (ctx->funcs->create_account) return ctx->funcs->create_account(ctx, uri, passwd, email, suscribe); else return -1; @@ -142,7 +142,7 @@ int sip_setup_context_account_validated(SipSetupContext *ctx, const char *uri){ return -1; } -int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd, const char *userid){ +LinphoneStatus sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd, const char *userid){ LinphoneAddress *from=linphone_address_new(uri); if (from==NULL) { ms_warning("Fail to parse %s",uri); @@ -156,19 +156,19 @@ int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, cons return -1; } -int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz){ +LinphoneStatus sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz){ if (ctx->funcs->get_proxy) return ctx->funcs->get_proxy(ctx,domain ? domain : ctx->domain,proxy,sz); return -1; } -int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size){ +LinphoneStatus sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size){ if (ctx->funcs->get_stun_servers) return ctx->funcs->get_stun_servers(ctx,stun1,stun2,size); return -1; } -int sip_setup_context_get_relay(SipSetupContext *ctx,char *relay, size_t size){ +LinphoneStatus sip_setup_context_get_relay(SipSetupContext *ctx,char *relay, size_t size){ if (ctx->funcs->get_relay) return ctx->funcs->get_relay(ctx,relay,size); return -1; @@ -180,13 +180,13 @@ BuddyLookupRequest *sip_setup_context_create_buddy_lookup_request(SipSetupContex return NULL; } -int sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req){ +LinphoneStatus sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req){ if (ctx->funcs->buddy_lookup_funcs) return ctx->funcs->buddy_lookup_funcs->request_submit(ctx,req); return -1; } -int sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req){ +LinphoneStatus sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req){ if (ctx->funcs->buddy_lookup_funcs) return ctx->funcs->buddy_lookup_funcs->request_free(ctx,req); return -1; @@ -205,7 +205,7 @@ const char ** sip_setup_context_get_domains(SipSetupContext *ctx){ } -int sip_setup_context_logout(SipSetupContext *ctx){ +LinphoneStatus sip_setup_context_logout(SipSetupContext *ctx){ if (ctx->funcs->logout_account){ return ctx->funcs->logout_account(ctx); } diff --git a/include/linphone/address.h b/include/linphone/address.h index 3ad35fa5c..f7eef3f5c 100644 --- a/include/linphone/address.h +++ b/include/linphone/address.h @@ -80,27 +80,27 @@ LINPHONE_PUBLIC int linphone_address_get_port(const LinphoneAddress *u); /** * Sets the display name. **/ -LINPHONE_PUBLIC int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name); +LINPHONE_PUBLIC LinphoneStatus linphone_address_set_display_name(LinphoneAddress *u, const char *display_name); /** * Sets the username. **/ -LINPHONE_PUBLIC int linphone_address_set_username(LinphoneAddress *uri, const char *username); +LINPHONE_PUBLIC LinphoneStatus linphone_address_set_username(LinphoneAddress *uri, const char *username); /** * Sets the domain. **/ -LINPHONE_PUBLIC int linphone_address_set_domain(LinphoneAddress *uri, const char *host); +LINPHONE_PUBLIC LinphoneStatus linphone_address_set_domain(LinphoneAddress *uri, const char *host); /** * Sets the port number. **/ -LINPHONE_PUBLIC int linphone_address_set_port(LinphoneAddress *uri, int port); +LINPHONE_PUBLIC LinphoneStatus linphone_address_set_port(LinphoneAddress *uri, int port); /** * Set a transport. **/ -LINPHONE_PUBLIC int linphone_address_set_transport(LinphoneAddress *uri,LinphoneTransportType type); +LINPHONE_PUBLIC LinphoneStatus linphone_address_set_transport(LinphoneAddress *uri,LinphoneTransportType type); /** * Removes address's tags and uri headers so that it is displayable to the user. diff --git a/include/linphone/call.h b/include/linphone/call.h index 453ea4411..ca697b91c 100644 --- a/include/linphone/call.h +++ b/include/linphone/call.h @@ -187,7 +187,7 @@ LINPHONE_PUBLIC bool_t linphone_call_camera_enabled(const LinphoneCall *lc); * @param file a path where to write the jpeg content. * @return 0 if successfull, -1 otherwise (typically if jpeg format is not supported). **/ -LINPHONE_PUBLIC int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file); +LINPHONE_PUBLIC LinphoneStatus linphone_call_take_video_snapshot(LinphoneCall *call, const char *file); /** * Take a photo of currently captured video and write it into a jpeg file. @@ -196,7 +196,7 @@ LINPHONE_PUBLIC int linphone_call_take_video_snapshot(LinphoneCall *call, const * @param file a path where to write the jpeg content. * @return 0 if successfull, -1 otherwise (typically if jpeg format is not supported). **/ -LINPHONE_PUBLIC int linphone_call_take_preview_snapshot(LinphoneCall *call, const char *file); +LINPHONE_PUBLIC LinphoneStatus linphone_call_take_preview_snapshot(LinphoneCall *call, const char *file); /** * Returns the reason for a call termination (either error or normal termination) @@ -275,7 +275,7 @@ LINPHONE_PUBLIC void linphone_call_zoom_video(LinphoneCall *call, float zoom_fac * @param dtmf The dtmf name specified as a char, such as '0', '#' etc... * @return 0 if successful, -1 on error. **/ -LINPHONE_PUBLIC int linphone_call_send_dtmf(LinphoneCall *call, char dtmf); +LINPHONE_PUBLIC LinphoneStatus linphone_call_send_dtmf(LinphoneCall *call, char dtmf); /** * Send a list of dtmf. @@ -286,7 +286,7 @@ LINPHONE_PUBLIC int linphone_call_send_dtmf(LinphoneCall *call, char dtmf); * @param dtmfs A dtmf sequence such as '123#123123' * @return -2 if there is already a DTMF sequence, -1 if call is not ready, 0 otherwise. **/ -LINPHONE_PUBLIC int linphone_call_send_dtmfs(LinphoneCall *call, const char *dtmfs); +LINPHONE_PUBLIC LinphoneStatus linphone_call_send_dtmfs(LinphoneCall *call, const char *dtmfs); /** * Stop current DTMF sequence sending. @@ -361,7 +361,7 @@ LINPHONE_PUBLIC RtpTransport * linphone_call_get_meta_rtcp_transport(LinphoneCal * @return 0 on success, -1 on failure * @see linphone_call_resume() **/ -LINPHONE_PUBLIC int linphone_call_pause(LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_call_pause(LinphoneCall *call); /** * Resumes a call. @@ -370,14 +370,14 @@ LINPHONE_PUBLIC int linphone_call_pause(LinphoneCall *call); * @return 0 on success, -1 on failure * @see linphone_call_pause() **/ -LINPHONE_PUBLIC int linphone_call_resume(LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_call_resume(LinphoneCall *call); /** * Terminates a call. * @param[in] call LinphoneCall object * @return 0 on success, -1 on failure **/ -LINPHONE_PUBLIC int linphone_call_terminate(LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_call_terminate(LinphoneCall *call); /** * Redirect the specified call to the given redirect URI. @@ -385,7 +385,7 @@ LINPHONE_PUBLIC int linphone_call_terminate(LinphoneCall *call); * @param[in] redirect_uri The URI to redirect the call to * @return 0 if successful, -1 on error. */ -LINPHONE_PUBLIC int linphone_call_redirect(LinphoneCall *call, const char *redirect_uri); +LINPHONE_PUBLIC LinphoneStatus linphone_call_redirect(LinphoneCall *call, const char *redirect_uri); /** * Decline a pending incoming call, with a reason. @@ -393,7 +393,7 @@ LINPHONE_PUBLIC int linphone_call_redirect(LinphoneCall *call, const char *redir * @param[in] reason The reason for rejecting the call: LinphoneReasonDeclined or LinphoneReasonBusy * @return 0 on success, -1 on failure **/ -LINPHONE_PUBLIC int linphone_call_decline(LinphoneCall * call, LinphoneReason reason); +LINPHONE_PUBLIC LinphoneStatus linphone_call_decline(LinphoneCall * call, LinphoneReason reason); /** * Accept an incoming call. @@ -405,7 +405,7 @@ LINPHONE_PUBLIC int linphone_call_decline(LinphoneCall * call, LinphoneReason re * @param[in] call A LinphoneCall object * @return 0 on success, -1 on failure **/ -LINPHONE_PUBLIC int linphone_call_accept(LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_call_accept(LinphoneCall *call); /** * Accept an incoming call, with parameters. @@ -418,7 +418,7 @@ LINPHONE_PUBLIC int linphone_call_accept(LinphoneCall *call); * @param[in] params The specific parameters for this call, for example whether video is accepted or not. Use NULL to use default parameters * @return 0 on success, -1 on failure **/ -LINPHONE_PUBLIC int linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParams *params); +LINPHONE_PUBLIC LinphoneStatus linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParams *params); /** * Accept an early media session for an incoming call. @@ -427,7 +427,7 @@ LINPHONE_PUBLIC int linphone_call_accept_with_params(LinphoneCall *call, const L * @return 0 if successful, -1 otherwise * @see linphone_call_accept_early_media_with_params() **/ -LINPHONE_PUBLIC int linphone_call_accept_early_media(LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_call_accept_early_media(LinphoneCall *call); /** * When receiving an incoming, accept to start a media session as early-media. @@ -438,7 +438,7 @@ LINPHONE_PUBLIC int linphone_call_accept_early_media(LinphoneCall *call); * @param[in] params The call parameters to use (can be NULL) * @return 0 if successful, -1 otherwise **/ -LINPHONE_PUBLIC int linphone_call_accept_early_media_with_params(LinphoneCall *call, const LinphoneCallParams *params); +LINPHONE_PUBLIC LinphoneStatus linphone_call_accept_early_media_with_params(LinphoneCall *call, const LinphoneCallParams *params); /** * Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore. @@ -453,7 +453,7 @@ LINPHONE_PUBLIC int linphone_call_accept_early_media_with_params(LinphoneCall *c * @param[in] params The new call parameters to use (may be NULL) * @return 0 if successful, -1 otherwise. **/ -LINPHONE_PUBLIC int linphone_call_update(LinphoneCall *call, const LinphoneCallParams *params); +LINPHONE_PUBLIC LinphoneStatus linphone_call_update(LinphoneCall *call, const LinphoneCallParams *params); /** * When receiving a #LinphoneCallUpdatedByRemote state notification, prevent LinphoneCore from performing an automatic answer. @@ -474,7 +474,7 @@ LINPHONE_PUBLIC int linphone_call_update(LinphoneCall *call, const LinphoneCallP * @param[in] call A LinphoneCall object * @return 0 if successful, -1 if the linphone_call_defer_update() was done outside a valid #LinphoneCallUpdatedByRemote notification **/ -LINPHONE_PUBLIC int linphone_call_defer_update(LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_call_defer_update(LinphoneCall *call); /** * Accept call modifications initiated by other end. @@ -493,7 +493,7 @@ LINPHONE_PUBLIC int linphone_call_defer_update(LinphoneCall *call); * @param[in] params A LinphoneCallParams object describing the call parameters to accept * @return 0 if successful, -1 otherwise (actually when this function call is performed outside ot #LinphoneCallUpdatedByRemote state) **/ -LINPHONE_PUBLIC int linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *params); +LINPHONE_PUBLIC LinphoneStatus linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *params); /** * Performs a simple call transfer to the specified destination. @@ -506,7 +506,7 @@ LINPHONE_PUBLIC int linphone_call_accept_update(LinphoneCall *call, const Linpho * @param[in] refer_to The destination the call is to be refered to * @return 0 on success, -1 on failure **/ -LINPHONE_PUBLIC int linphone_call_transfer(LinphoneCall *call, const char *refer_to); +LINPHONE_PUBLIC LinphoneStatus linphone_call_transfer(LinphoneCall *call, const char *refer_to); /** * Transfers a call to destination of another running call. This is used for "attended transfer" scenarios. @@ -522,7 +522,7 @@ LINPHONE_PUBLIC int linphone_call_transfer(LinphoneCall *call, const char *refer * @param[in] dest A running call whose remote person will receive the transfer * @return 0 on success, -1 on failure **/ -LINPHONE_PUBLIC int linphone_call_transfer_to_another(LinphoneCall *call, LinphoneCall *dest); +LINPHONE_PUBLIC LinphoneStatus linphone_call_transfer_to_another(LinphoneCall *call, LinphoneCall *dest); /** @@ -812,7 +812,7 @@ LINPHONE_PUBLIC void linphone_call_ogl_render(LinphoneCall *call, bool_t is_prev * @param call the call * @param info the info message **/ -LINPHONE_PUBLIC int linphone_call_send_info_message(LinphoneCall *call, const LinphoneInfoMessage *info); +LINPHONE_PUBLIC LinphoneStatus linphone_call_send_info_message(LinphoneCall *call, const LinphoneInfoMessage *info); /** * Return call statistics for a particular stream type. diff --git a/include/linphone/call_params.h b/include/linphone/call_params.h index 1b828a77d..838292583 100644 --- a/include/linphone/call_params.h +++ b/include/linphone/call_params.h @@ -397,7 +397,7 @@ LINPHONE_PUBLIC bool_t linphone_call_params_video_multicast_enabled(const Linpho * @param yesno if yes, subsequent outgoing calls will propose rtt * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_call_params_enable_realtime_text(LinphoneCallParams *params, bool_t yesno); +LINPHONE_PUBLIC LinphoneStatus linphone_call_params_enable_realtime_text(LinphoneCallParams *params, bool_t yesno); /** * Use to get real time text following rfc4103. diff --git a/include/linphone/chat.h b/include/linphone/chat.h index 704339753..c3d6ab006 100644 --- a/include/linphone/chat.h +++ b/include/linphone/chat.h @@ -396,7 +396,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_message_start_file_downlo * Start the download of the file referenced in a LinphoneChatMessage from remote server. * @param[in] message LinphoneChatMessage object. */ -LINPHONE_PUBLIC int linphone_chat_message_download_file(LinphoneChatMessage *message); +LINPHONE_PUBLIC LinphoneStatus linphone_chat_message_download_file(LinphoneChatMessage *message); /** * Cancel an ongoing file transfer attached to this message.(upload or download) @@ -537,7 +537,7 @@ LINPHONE_PUBLIC const char * linphone_chat_message_get_file_transfer_filepath(Li * @param[in] character T.140 char * @returns 0 if succeed. */ -LINPHONE_PUBLIC int linphone_chat_message_put_char(LinphoneChatMessage *msg,uint32_t character); +LINPHONE_PUBLIC LinphoneStatus linphone_chat_message_put_char(LinphoneChatMessage *msg,uint32_t character); /** * Get the message identifier. diff --git a/include/linphone/conference.h b/include/linphone/conference.h index 1334da06c..c7f7702aa 100644 --- a/include/linphone/conference.h +++ b/include/linphone/conference.h @@ -106,7 +106,7 @@ LINPHONE_PUBLIC void linphone_conference_unref(LinphoneConference *conf); * @warning The passed SIP URI must be one of the URIs returned by linphone_conference_get_participants() * @return 0 if succeeded, -1 if failed */ -LINPHONE_PUBLIC int linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri); +LINPHONE_PUBLIC LinphoneStatus linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri); /** * Get URIs of all participants of one conference diff --git a/include/linphone/core.h b/include/linphone/core.h index e25a26b4c..1a98e371b 100644 --- a/include/linphone/core.h +++ b/include/linphone/core.h @@ -1017,7 +1017,7 @@ LINPHONE_PUBLIC LinphoneCall * linphone_core_invite_address_with_params(Linphone * @ingroup call_control * @deprecated Use linphone_call_transfer() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char *refer_to); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char *refer_to); /** * Transfers a call to destination of another running call. This is used for "attended transfer" scenarios. @@ -1036,7 +1036,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_transfer_call(LinphoneCore * @ingroup call_control * @deprecated Use linphone_call_transfer_to_another() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_transfer_call_to_another(LinphoneCore *lc, LinphoneCall *call, LinphoneCall *dest); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_transfer_call_to_another(LinphoneCore *lc, LinphoneCall *call, LinphoneCall *dest); /** * Start a new call as a consequence of a transfer request received from a call. @@ -1090,7 +1090,7 @@ LINPHONE_PUBLIC LinphoneCall *linphone_core_get_current_call(const LinphoneCore * @ingroup call_control * @deprecated Use linphone_call_accept() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call); /** * Accept an incoming call, with parameters. @@ -1107,7 +1107,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_call(LinphoneCore * * @ingroup call_control * @deprecated Use linphone_call_accept_with_params() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params); /** * When receiving an incoming, accept to start a media session as early-media. @@ -1121,7 +1121,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_call_with_params(Li * @ingroup call_control * @deprecated Use linphone_call_accept_early_media_with_params() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_early_media_with_params(LinphoneCore* lc, LinphoneCall* call, const LinphoneCallParams* params); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_accept_early_media_with_params(LinphoneCore* lc, LinphoneCall* call, const LinphoneCallParams* params); /** * Accept an early media session for an incoming call. @@ -1133,7 +1133,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_early_media_with_pa * @see linphone_core_accept_early_media_with_params() * @deprecated Use linphone_call_accept_early_media() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_early_media(LinphoneCore* lc, LinphoneCall* call); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_accept_early_media(LinphoneCore* lc, LinphoneCall* call); /** * Terminates a call. @@ -1143,7 +1143,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_early_media(Linphon * @ingroup call_control * @deprecated Use linphone_call_terminate() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call); /** * Redirect the specified call to the given redirect URI. @@ -1154,7 +1154,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_terminate_call(LinphoneCor * @ingroup call_control * @deprecated Use linphone_call_redirect() instead */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri); /** * Decline a pending incoming call, with a reason. @@ -1165,7 +1165,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_redirect_call(LinphoneCore * @ingroup call_control * @deprecated Use linphone_call_decline() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, LinphoneReason reason); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, LinphoneReason reason); /** * Terminates all the calls. @@ -1173,7 +1173,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_decline_call(LinphoneCore * @return 0 * @ingroup call_control **/ -LINPHONE_PUBLIC int linphone_core_terminate_all_calls(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_terminate_all_calls(LinphoneCore *lc); /** * Pauses the call. If a music file has been setup using linphone_core_set_play_file(), @@ -1186,7 +1186,7 @@ LINPHONE_PUBLIC int linphone_core_terminate_all_calls(LinphoneCore *lc); * @see linphone_core_resume_call() * @deprecated Use linphone_call_pause() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call); /** * Pause all currently running calls. @@ -1194,7 +1194,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_pause_call(LinphoneCore *l * @return 0 * @ingroup call_control **/ -LINPHONE_PUBLIC int linphone_core_pause_all_calls(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_pause_all_calls(LinphoneCore *lc); /** * Resumes a call. @@ -1206,7 +1206,7 @@ LINPHONE_PUBLIC int linphone_core_pause_all_calls(LinphoneCore *lc); * @see linphone_core_pause_call() * @deprecated Use linphone_call_resume() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call); /** * Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore. @@ -1224,7 +1224,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_resume_call(LinphoneCore * * @ingroup call_control * @deprecated Use linphone_call_update() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params); /** * When receiving a #LinphoneCallUpdatedByRemote state notification, prevent LinphoneCore from performing an automatic answer. @@ -1248,7 +1248,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_update_call(LinphoneCore * * @ingroup call_control * @deprecated Use linphone_call_defer_update() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call); /** * Accept call modifications initiated by other end. @@ -1270,7 +1270,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_defer_call_update(Linphone * @ingroup call_control * @deprecated Use linphone_call_accept_update() instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params); /** * Create a LinphoneCallParams suitable for linphone_core_invite_with_params(), linphone_core_accept_call_with_params(), linphone_core_accept_early_media_with_params(), @@ -1322,7 +1322,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_send_dtmf(LinphoneCore *l * This data is used in absence of any proxy configuration or when no * default proxy configuration is set. See LinphoneProxyConfig **/ -LINPHONE_PUBLIC int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact); /** * Returns the default identity when no proxy configuration is used. @@ -1613,7 +1613,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t *linphone_core_get_audio_ * @deprecated Use linphone_core_set_audio_payload_types() instead. * @donotwrap **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_set_audio_codecs(LinphoneCore *lc, bctbx_list_t *codecs); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_audio_codecs(LinphoneCore *lc, bctbx_list_t *codecs); /** * Return the list of the available video payload types. @@ -1660,7 +1660,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t *linphone_core_get_video_ * @deprecated Use linphone_core_set_video_payload_types() instead. * @donotwrap **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_set_video_codecs(LinphoneCore *lc, bctbx_list_t *codecs); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_video_codecs(LinphoneCore *lc, bctbx_list_t *codecs); /** * Return the list of the available text payload types. @@ -1707,7 +1707,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t *linphone_core_get_text_c * @deprecated Use linphone_core_set_text_payload_types() instead. * @donotwrap **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_set_text_codecs(LinphoneCore *lc, bctbx_list_t *codecs); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_text_codecs(LinphoneCore *lc, bctbx_list_t *codecs); /** * Enable RFC3389 generic comfort noise algorithm (CN payload type). @@ -1795,7 +1795,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_payload_type_bitrate(L * @deprecated Use linphone_payload_type_enable(). * @donotwrap */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_enable_payload_type(LinphoneCore *lc, OrtpPayloadType *pt, bool_t enable); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_enable_payload_type(LinphoneCore *lc, OrtpPayloadType *pt, bool_t enable); /** * Wildcard value used by #linphone_core_find_payload_type to ignore rate in search algorithm @@ -1887,7 +1887,7 @@ LINPHONE_PUBLIC LinphoneProxyConfig * linphone_core_create_proxy_config(Linphone * Add a proxy configuration. * This will start registration on the proxy, if registration is enabled. **/ -LINPHONE_PUBLIC int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config); +LINPHONE_PUBLIC LinphoneStatus linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config); /** * Erase all proxies from config. @@ -2296,7 +2296,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_sip_port(LinphoneCore * @return 0 * @ingroup network_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_sip_transports(LinphoneCore *lc, const LinphoneSipTransports *transports); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_sip_transports(LinphoneCore *lc, const LinphoneSipTransports *transports); /** * Retrieves the port configuration used for each transport (udp, tcp, tls). @@ -2308,7 +2308,7 @@ LINPHONE_PUBLIC int linphone_core_set_sip_transports(LinphoneCore *lc, const Lin * @ingroup network_parameters * @donotwrap **/ -LINPHONE_PUBLIC int linphone_core_get_sip_transports(LinphoneCore *lc, LinphoneSipTransports *transports); +LINPHONE_PUBLIC LinphoneStatus linphone_core_get_sip_transports(LinphoneCore *lc, LinphoneSipTransports *transports); /** * Retrieves the real port number assigned for each sip transport (udp, tcp, tls). @@ -2649,7 +2649,7 @@ LINPHONE_PUBLIC const char * linphone_core_get_capture_device(LinphoneCore *lc); * @return 0 * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid); /** * Sets the sound device used for playback. @@ -2658,7 +2658,7 @@ LINPHONE_PUBLIC int linphone_core_set_ringer_device(LinphoneCore *lc, const char * @return 0 * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_playback_device(LinphoneCore *lc, const char * devid); /** * Sets the sound device used for capture. @@ -2667,7 +2667,7 @@ LINPHONE_PUBLIC int linphone_core_set_playback_device(LinphoneCore *lc, const ch * @return 0 * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_capture_device(LinphoneCore *lc, const char * devid); /** * Whenever the liblinphone is playing a ring to advertise an incoming call or ringback of an outgoing call, this function stops @@ -2792,7 +2792,7 @@ LINPHONE_PUBLIC void linphone_core_set_ring_during_incoming_early_media(Linphone */ LINPHONE_PUBLIC bool_t linphone_core_get_ring_during_incoming_early_media(const LinphoneCore *lc); -LINPHONE_PUBLIC int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata); +LINPHONE_PUBLIC LinphoneStatus linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata); /** * Returns the MSFactory (mediastreamer2 factory) used by the LinphoneCore to control mediastreamer2 library. @@ -2808,7 +2808,7 @@ LINPHONE_PUBLIC MSFactory* linphone_core_get_ms_factory(LinphoneCore* lc); * @return 0 on success, -1 on error * @ingroup misc **/ -LINPHONE_PUBLIC int linphone_core_play_local(LinphoneCore *lc, const char *audiofile); +LINPHONE_PUBLIC LinphoneStatus linphone_core_play_local(LinphoneCore *lc, const char *audiofile); /** * Enables or disable echo cancellation. Value is saved and used for subsequent calls. @@ -3209,7 +3209,7 @@ LINPHONE_PUBLIC bool_t linphone_core_video_preview_enabled(const LinphoneCore *l * @param file a path where to write the jpeg content. * @return 0 if successfull, -1 otherwise (typically if jpeg format is not supported). **/ -LINPHONE_PUBLIC int linphone_core_take_preview_snapshot(LinphoneCore *lc, const char *file); +LINPHONE_PUBLIC LinphoneStatus linphone_core_take_preview_snapshot(LinphoneCore *lc, const char *file); /** * Enables or disable self view during calls. @@ -3255,7 +3255,7 @@ LINPHONE_PUBLIC const char** linphone_core_get_video_devices(const LinphoneCore * @param id The name of the video device to use as returned by linphone_core_get_video_devices() * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_video_device(LinphoneCore *lc, const char *id); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_video_device(LinphoneCore *lc, const char *id); /** * Returns the name of the currently active video device. @@ -3271,7 +3271,7 @@ LINPHONE_PUBLIC const char *linphone_core_get_video_device(const LinphoneCore *l * @param[in] path The path to the image file to use. * @ingroup media_parameters */ -LINPHONE_PUBLIC int linphone_core_set_static_picture(LinphoneCore *lc, const char *path); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_static_picture(LinphoneCore *lc, const char *path); /** * Get the path to the image file streamed when "Static picture" is set as the video device. @@ -3287,7 +3287,7 @@ LINPHONE_PUBLIC const char *linphone_core_get_static_picture(LinphoneCore *lc); * @param[in] fps The new frame rate to use for static picture. * @ingroup media_parameters */ -LINPHONE_PUBLIC int linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps); /** * Get the frame rate for static picture @@ -3739,7 +3739,7 @@ LINPHONE_PUBLIC LinphoneConference *linphone_core_create_conference_with_params( * @param call The current call with the participant to add * @return 0 if succeeded. Negative number if failed */ -LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call); /** * Add all current calls into the conference. If no conference is running @@ -3748,7 +3748,7 @@ LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCa * @param lc #LinphoneCore * @return 0 if succeeded. Negative number if failed */ -LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_add_all_to_conference(LinphoneCore *lc); /** * Remove a call from the conference. @@ -3765,7 +3765,7 @@ LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc); * * @return 0 if successful, -1 otherwise. **/ -LINPHONE_PUBLIC int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call); +LINPHONE_PUBLIC LinphoneStatus linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call); /** * Indicates whether the local participant is part of a conference. @@ -3782,14 +3782,14 @@ LINPHONE_PUBLIC bool_t linphone_core_is_in_conference(const LinphoneCore *lc); * @param lc #LinphoneCore * @return 0 if succeeded. Negative number if failed */ -LINPHONE_PUBLIC int linphone_core_enter_conference(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_enter_conference(LinphoneCore *lc); /** * Make the local participant leave the running conference * @param lc #LinphoneCore * @return 0 if succeeded. Negative number if failed */ -LINPHONE_PUBLIC int linphone_core_leave_conference(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_leave_conference(LinphoneCore *lc); /** * Get the set input volume of the local participant @@ -3806,7 +3806,7 @@ LINPHONE_PUBLIC float linphone_core_get_conference_local_input_volume(LinphoneCo * @param lc #LinphoneCore * @return 0 if succeeded. Negative number if failed */ -LINPHONE_PUBLIC int linphone_core_terminate_conference(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_terminate_conference(LinphoneCore *lc); /** * Get the number of participant in the running conference. The local @@ -3822,14 +3822,14 @@ LINPHONE_PUBLIC int linphone_core_get_conference_size(LinphoneCore *lc); * @param path Path to the file where the recording will be written * @return 0 if succeeded. Negative number if failed */ -LINPHONE_PUBLIC int linphone_core_start_conference_recording(LinphoneCore *lc, const char *path); +LINPHONE_PUBLIC LinphoneStatus linphone_core_start_conference_recording(LinphoneCore *lc, const char *path); /** * Stop recording the running conference * @param lc #LinphoneCore * @return 0 if succeeded. Negative number if failed */ -LINPHONE_PUBLIC int linphone_core_stop_conference_recording(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_stop_conference_recording(LinphoneCore *lc); /** * Get a pointer on the internal conference object. @@ -3887,7 +3887,7 @@ LINPHONE_PUBLIC bool_t linphone_core_media_encryption_supported(const LinphoneCo * @return 0 if successful, any other value otherwise. * @ingroup media_parameters */ -LINPHONE_PUBLIC int linphone_core_set_media_encryption(LinphoneCore *lc, LinphoneMediaEncryption menc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_media_encryption(LinphoneCore *lc, LinphoneMediaEncryption menc); /** * Get the media encryption policy being used for RTP packets. @@ -4031,7 +4031,7 @@ typedef void (*ContactSearchCallback)( LinphoneContactSearch* id, bctbx_list_t* * @return -1 if uri could not be parsed, 0 otherwise. Note that this does not check validity of URI endpoint nor scheme and download may still fail. * @ingroup initializing **/ -LINPHONE_PUBLIC int linphone_core_set_provisioning_uri(LinphoneCore *lc, const char*uri); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_provisioning_uri(LinphoneCore *lc, const char*uri); /** * Get provisioning URI. @@ -4058,7 +4058,7 @@ LINPHONE_PUBLIC bool_t linphone_core_is_provisioning_transient(LinphoneCore *lc) * @return 1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error. * @ingroup initializing **/ -LINPHONE_PUBLIC int linphone_core_migrate_to_multi_transport(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_migrate_to_multi_transport(LinphoneCore *lc); /** @@ -4188,7 +4188,7 @@ LINPHONE_PUBLIC int linphone_core_get_avpf_rr_interval(const LinphoneCore *lc); * @return 0 in case of success * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_audio_multicast_addr(LinphoneCore *core, const char* ip); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_audio_multicast_addr(LinphoneCore *lc, const char *ip); /** * Use to set multicast address to be used for video stream. @@ -4197,7 +4197,7 @@ LINPHONE_PUBLIC int linphone_core_set_audio_multicast_addr(LinphoneCore *core, c * @return 0 in case of success * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_video_multicast_addr(LinphoneCore *lc, const char *ip); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_video_multicast_addr(LinphoneCore *lc, const char *ip); /** * Use to get multicast address to be used for audio stream. @@ -4222,7 +4222,7 @@ LINPHONE_PUBLIC const char* linphone_core_get_video_multicast_addr(const Linphon * @return 0 in case of success * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_audio_multicast_ttl(LinphoneCore *core, int ttl); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_audio_multicast_ttl(LinphoneCore *core, int ttl); /** * Use to set multicast ttl to be used for video stream. @@ -4231,7 +4231,7 @@ LINPHONE_PUBLIC int linphone_core_set_audio_multicast_ttl(LinphoneCore *core, in * @return 0 in case of success * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_video_multicast_ttl(LinphoneCore *lc, int ttl); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_video_multicast_ttl(LinphoneCore *lc, int ttl); /** * Use to get multicast ttl to be used for audio stream. @@ -4297,7 +4297,7 @@ LINPHONE_PUBLIC bool_t linphone_core_video_multicast_enabled(const LinphoneCore * @return 0 if successful, -1 otherwise. * @ingroup media_parameters **/ -LINPHONE_PUBLIC int linphone_core_set_network_simulator_params(LinphoneCore *lc, const OrtpNetworkSimulatorParams *params); +LINPHONE_PUBLIC LinphoneStatus linphone_core_set_network_simulator_params(LinphoneCore *lc, const OrtpNetworkSimulatorParams *params); /** * Get the previously set network simulation parameters. diff --git a/include/linphone/core_utils.h b/include/linphone/core_utils.h index 441b53550..5f7a97bab 100644 --- a/include/linphone/core_utils.h +++ b/include/linphone/core_utils.h @@ -33,8 +33,8 @@ typedef void (*LsdEndOfPlayCallback)(LsdPlayer *p); LINPHONE_PUBLIC void lsd_player_set_callback(LsdPlayer *p, LsdEndOfPlayCallback cb); LINPHONE_PUBLIC void lsd_player_set_user_pointer(LsdPlayer *p, void *up); LINPHONE_PUBLIC void *lsd_player_get_user_pointer(const LsdPlayer *p); -LINPHONE_PUBLIC int lsd_player_play(LsdPlayer *p, const char *filename); -LINPHONE_PUBLIC int lsd_player_stop(LsdPlayer *p); +LINPHONE_PUBLIC LinphoneStatus lsd_player_play(LsdPlayer *p, const char *filename); +LINPHONE_PUBLIC LinphoneStatus lsd_player_stop(LsdPlayer *p); LINPHONE_PUBLIC void lsd_player_enable_loop(LsdPlayer *p, bool_t loopmode); LINPHONE_PUBLIC bool_t lsd_player_loop_enabled(const LsdPlayer *p); LINPHONE_PUBLIC void lsd_player_set_gain(LsdPlayer *p, float gain); @@ -64,11 +64,11 @@ LINPHONE_PUBLIC int linphone_core_start_echo_calibration(LinphoneCore *lc, Linph * @param lc The core. * @param rate Sound sample rate. **/ -LINPHONE_PUBLIC int linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate); +LINPHONE_PUBLIC LinphoneStatus linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate); /** * Stop the simulation of call **/ -LINPHONE_PUBLIC int linphone_core_stop_echo_tester(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneStatus linphone_core_stop_echo_tester(LinphoneCore *lc); /** * @ingroup IOS * Special function to warm up dtmf feeback stream. #linphone_core_stop_dtmf_stream must() be called before entering FG mode diff --git a/include/linphone/dictionary.h b/include/linphone/dictionary.h index d57b8c1f3..43216c01d 100644 --- a/include/linphone/dictionary.h +++ b/include/linphone/dictionary.h @@ -46,11 +46,11 @@ LINPHONE_PUBLIC void linphone_dictionary_set_int64(LinphoneDictionary* obj, cons LINPHONE_PUBLIC int64_t linphone_dictionary_get_int64(LinphoneDictionary* obj, const char* key, int64_t default_value); -LINPHONE_PUBLIC int linphone_dictionary_remove(LinphoneDictionary* obj, const char* key); +LINPHONE_PUBLIC LinphoneStatus linphone_dictionary_remove(LinphoneDictionary* obj, const char* key); LINPHONE_PUBLIC void linphone_dictionary_clear(LinphoneDictionary* obj); -LINPHONE_PUBLIC int linphone_dictionary_haskey(const LinphoneDictionary* obj, const char* key); +LINPHONE_PUBLIC LinphoneStatus linphone_dictionary_haskey(const LinphoneDictionary* obj, const char* key); LINPHONE_PUBLIC void linphone_dictionary_foreach( const LinphoneDictionary* obj, void (*apply_func)(const char*key, void* value, void* userdata), void* userdata); diff --git a/include/linphone/event.h b/include/linphone/event.h index 609b6a1e6..b9b34686f 100644 --- a/include/linphone/event.h +++ b/include/linphone/event.h @@ -37,32 +37,32 @@ extern "C" { * @param body optional content to attach with the subscription. * @return 0 if successful, -1 otherwise. **/ -LINPHONE_PUBLIC int linphone_event_send_subscribe(LinphoneEvent *ev, const LinphoneContent *body); +LINPHONE_PUBLIC LinphoneStatus linphone_event_send_subscribe(LinphoneEvent *ev, const LinphoneContent *body); /** * Update (refresh) an outgoing subscription, changing the body. * @param lev a LinphoneEvent * @param body an optional body to include in the subscription update, may be NULL. **/ -LINPHONE_PUBLIC int linphone_event_update_subscribe(LinphoneEvent *lev, const LinphoneContent *body); +LINPHONE_PUBLIC LinphoneStatus linphone_event_update_subscribe(LinphoneEvent *lev, const LinphoneContent *body); /** * Refresh an outgoing subscription keeping the same body. * @param lev LinphoneEvent object. * @return 0 if successful, -1 otherwise. */ -LINPHONE_PUBLIC int linphone_event_refresh_subscribe(LinphoneEvent *lev); +LINPHONE_PUBLIC LinphoneStatus linphone_event_refresh_subscribe(LinphoneEvent *lev); /** * Accept an incoming subcription. **/ -LINPHONE_PUBLIC int linphone_event_accept_subscription(LinphoneEvent *lev); +LINPHONE_PUBLIC LinphoneStatus linphone_event_accept_subscription(LinphoneEvent *lev); /** * Deny an incoming subscription with given reason. **/ -LINPHONE_PUBLIC int linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason); +LINPHONE_PUBLIC LinphoneStatus linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason); /** * Send a notification. @@ -70,28 +70,28 @@ LINPHONE_PUBLIC int linphone_event_deny_subscription(LinphoneEvent *lev, Linphon * @param body an optional body containing the actual notification data. * @return 0 if successful, -1 otherwise. **/ -LINPHONE_PUBLIC int linphone_event_notify(LinphoneEvent *lev, const LinphoneContent *body); +LINPHONE_PUBLIC LinphoneStatus linphone_event_notify(LinphoneEvent *lev, const LinphoneContent *body); /** * Send a publish created by linphone_core_create_publish(). * @param lev the #LinphoneEvent * @param body the new data to be published **/ -LINPHONE_PUBLIC int linphone_event_send_publish(LinphoneEvent *lev, const LinphoneContent *body); +LINPHONE_PUBLIC LinphoneStatus linphone_event_send_publish(LinphoneEvent *lev, const LinphoneContent *body); /** * Update (refresh) a publish. * @param lev the #LinphoneEvent * @param body the new data to be published **/ -LINPHONE_PUBLIC int linphone_event_update_publish(LinphoneEvent *lev, const LinphoneContent *body); +LINPHONE_PUBLIC LinphoneStatus linphone_event_update_publish(LinphoneEvent *lev, const LinphoneContent *body); /** * Refresh an outgoing publish keeping the same body. * @param lev LinphoneEvent object. * @return 0 if successful, -1 otherwise. */ -LINPHONE_PUBLIC int linphone_event_refresh_publish(LinphoneEvent *lev); +LINPHONE_PUBLIC LinphoneStatus linphone_event_refresh_publish(LinphoneEvent *lev); /** * Prevent an event from refreshing its publish. diff --git a/include/linphone/friend.h b/include/linphone/friend.h index 3c1e5d1b5..a8136b978 100644 --- a/include/linphone/friend.h +++ b/include/linphone/friend.h @@ -67,7 +67,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_friend_destroy(LinphoneFriend * @param fr #LinphoneFriend object * @param address #LinphoneAddress */ -LINPHONE_PUBLIC int linphone_friend_set_address(LinphoneFriend *fr, const LinphoneAddress* address); +LINPHONE_PUBLIC LinphoneStatus linphone_friend_set_address(LinphoneFriend *fr, const LinphoneAddress* address); /** * Set #LinphoneAddress for this friend @@ -130,7 +130,7 @@ LINPHONE_PUBLIC void linphone_friend_remove_phone_number(LinphoneFriend *lf, con * @param lf #LinphoneFriend object * @param name */ -LINPHONE_PUBLIC int linphone_friend_set_name(LinphoneFriend *lf, const char *name); +LINPHONE_PUBLIC LinphoneStatus linphone_friend_set_name(LinphoneFriend *lf, const char *name); /** * Get the display name for this friend @@ -154,7 +154,7 @@ LINPHONE_PUBLIC bool_t linphone_friend_subscribes_enabled(const LinphoneFriend * * @param val if TRUE this friend will receive subscription message */ -LINPHONE_PUBLIC int linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val); +LINPHONE_PUBLIC LinphoneStatus linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val); #define linphone_friend_send_subscribe linphone_friend_enable_subscribes /** @@ -162,7 +162,7 @@ LINPHONE_PUBLIC int linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t * @param fr #LinphoneFriend object * @param pol #LinphoneSubscribePolicy policy to apply. */ -LINPHONE_PUBLIC int linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol); +LINPHONE_PUBLIC LinphoneStatus linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol); /** * get current subscription policy for this #LinphoneFriend diff --git a/include/linphone/friendlist.h b/include/linphone/friendlist.h index b41cff4d5..f8093db2d 100644 --- a/include/linphone/friendlist.h +++ b/include/linphone/friendlist.h @@ -309,7 +309,7 @@ LINPHONE_PUBLIC LinphoneCore* linphone_friend_list_get_core(const LinphoneFriend * @param[in] vcard_file the path to a file that contains the vCard(s) to parse * @return the amount of linphone friends created */ -LINPHONE_PUBLIC int linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *list, const char *vcard_file); +LINPHONE_PUBLIC LinphoneStatus linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *list, const char *vcard_file); /** * Creates and adds LinphoneFriend objects to LinphoneFriendList from a buffer that contains the vCard(s) to parse @@ -317,7 +317,7 @@ LINPHONE_PUBLIC int linphone_friend_list_import_friends_from_vcard4_file(Linphon * @param[in] vcard_buffer the buffer that contains the vCard(s) to parse * @return the amount of linphone friends created */ -LINPHONE_PUBLIC int linphone_friend_list_import_friends_from_vcard4_buffer(LinphoneFriendList *list, const char *vcard_buffer); +LINPHONE_PUBLIC LinphoneStatus linphone_friend_list_import_friends_from_vcard4_buffer(LinphoneFriendList *list, const char *vcard_buffer); /** * Creates and export LinphoneFriend objects from LinphoneFriendList to a file using vCard 4 format diff --git a/include/linphone/lpconfig.h b/include/linphone/lpconfig.h index 1acd25104..d178dab2d 100644 --- a/include/linphone/lpconfig.h +++ b/include/linphone/lpconfig.h @@ -80,7 +80,7 @@ LINPHONE_PUBLIC LinphoneConfig * linphone_config_new_with_factory(const char *co * @param lpconfig The LinphoneConfig object to fill with the content of the file * @param filename The filename of the config file to read to fill the LinphoneConfig */ -LINPHONE_PUBLIC int linphone_config_read_file(LinphoneConfig *lpconfig, const char *filename); +LINPHONE_PUBLIC LinphoneStatus linphone_config_read_file(LinphoneConfig *lpconfig, const char *filename); /** * Retrieves a configuration item as a string, given its section, key, and default value. @@ -171,7 +171,7 @@ LINPHONE_PUBLIC void linphone_config_set_float(LinphoneConfig *lpconfig,const ch /** * Writes the config file to disk. **/ -LINPHONE_PUBLIC int linphone_config_sync(LinphoneConfig *lpconfig); +LINPHONE_PUBLIC LinphoneStatus linphone_config_sync(LinphoneConfig *lpconfig); /** * Returns 1 if a given section is present in the configuration. @@ -278,7 +278,7 @@ LINPHONE_PUBLIC void linphone_config_write_relative_file(const LinphoneConfig *l * @return 0 on success, -1 on failure * @donotwrap */ -LINPHONE_PUBLIC int linphone_config_read_relative_file(const LinphoneConfig *lpconfig, const char *filename, char *data, size_t max_length); +LINPHONE_PUBLIC LinphoneStatus linphone_config_read_relative_file(const LinphoneConfig *lpconfig, const char *filename, char *data, size_t max_length); /** * @return TRUE if file exists relative to the to the current location diff --git a/include/linphone/player.h b/include/linphone/player.h index 4cac075cf..332cab738 100644 --- a/include/linphone/player.h +++ b/include/linphone/player.h @@ -38,13 +38,13 @@ extern "C" { **/ typedef void (*LinphonePlayerEofCallback)(LinphonePlayer *obj, void *user_data); -LINPHONE_PUBLIC int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data); +LINPHONE_PUBLIC LinphoneStatus linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data); -LINPHONE_PUBLIC int linphone_player_start(LinphonePlayer *obj); +LINPHONE_PUBLIC LinphoneStatus linphone_player_start(LinphonePlayer *obj); -LINPHONE_PUBLIC int linphone_player_pause(LinphonePlayer *obj); +LINPHONE_PUBLIC LinphoneStatus linphone_player_pause(LinphonePlayer *obj); -LINPHONE_PUBLIC int linphone_player_seek(LinphonePlayer *obj, int time_ms); +LINPHONE_PUBLIC LinphoneStatus linphone_player_seek(LinphonePlayer *obj, int time_ms); LINPHONE_PUBLIC MSPlayerState linphone_player_get_state(LinphonePlayer *obj); diff --git a/include/linphone/presence.h b/include/linphone/presence.h index f9de05c7a..455508d7e 100644 --- a/include/linphone/presence.h +++ b/include/linphone/presence.h @@ -101,7 +101,7 @@ LINPHONE_PUBLIC char * linphone_presence_model_get_contact(const LinphonePresenc * @param[in] contact The contact string to set. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_set_contact(LinphonePresenceModel *model, const char *contact); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_set_contact(LinphonePresenceModel *model, const char *contact); /** * Sets the presentity of a presence model. @@ -109,7 +109,7 @@ LINPHONE_PUBLIC int linphone_presence_model_set_contact(LinphonePresenceModel *m * @param[in] presentity The presentity address to set (presentity is copied). * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_set_presentity(LinphonePresenceModel *model, const LinphoneAddress *presentity); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_set_presentity(LinphonePresenceModel *model, const LinphoneAddress *presentity); /** * Gets the presentity of a presence model. @@ -137,7 +137,7 @@ LINPHONE_PUBLIC LinphonePresenceActivity * linphone_presence_model_get_activity( * If you don't want the basic status to be modified automatically, you can use the combination of linphone_presence_model_set_basic_status(), * linphone_presence_model_clear_activities() and linphone_presence_model_add_activity(). */ -LINPHONE_PUBLIC int linphone_presence_model_set_activity(LinphonePresenceModel *model, LinphonePresenceActivityType activity, const char *description); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_set_activity(LinphonePresenceModel *model, LinphonePresenceActivityType activity, const char *description); /** * Gets the number of activities included in the presence model. @@ -160,14 +160,14 @@ LINPHONE_PUBLIC LinphonePresenceActivity * linphone_presence_model_get_nth_activ * @param[in] activity The #LinphonePresenceActivity object to add to the model. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_add_activity(LinphonePresenceModel *model, LinphonePresenceActivity *activity); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_add_activity(LinphonePresenceModel *model, LinphonePresenceActivity *activity); /** * Clears the activities of a presence model. * @param[in] model The #LinphonePresenceModel object for which to clear the activities. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_clear_activities(LinphonePresenceModel *model); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_clear_activities(LinphonePresenceModel *model); /** * Gets the first note of a presence model (there is usually only one). @@ -186,14 +186,14 @@ LINPHONE_PUBLIC LinphonePresenceNote * linphone_presence_model_get_note(const Li * * Only one note for each language can be set, so e.g. setting a note for the 'fr' language if there is only one will replace the existing one. */ -LINPHONE_PUBLIC int linphone_presence_model_add_note(LinphonePresenceModel *model, const char *note_content, const char *lang); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_add_note(LinphonePresenceModel *model, const char *note_content, const char *lang); /** * Clears all the notes of a presence model. * @param[in] model The #LinphonePresenceModel for which to clear notes. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_clear_notes(LinphonePresenceModel *model); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_clear_notes(LinphonePresenceModel *model); /** * Get the consolidated presence from a presence model. @@ -238,14 +238,14 @@ LINPHONE_PUBLIC LinphonePresenceService * linphone_presence_model_get_nth_servic * @param[in] service The #LinphonePresenceService object to add to the model. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_add_service(LinphonePresenceModel *model, LinphonePresenceService *service); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_add_service(LinphonePresenceModel *model, LinphonePresenceService *service); /** * Clears the services of a presence model. * @param[in] model The #LinphonePresenceModel object for which to clear the services. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_clear_services(LinphonePresenceModel *model); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_clear_services(LinphonePresenceModel *model); /** * Gets the number of persons included in the presence model. @@ -268,14 +268,14 @@ LINPHONE_PUBLIC LinphonePresencePerson * linphone_presence_model_get_nth_person( * @param[in] person The #LinphonePresencePerson object to add to the model. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_add_person(LinphonePresenceModel *model, LinphonePresencePerson *person); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_add_person(LinphonePresenceModel *model, LinphonePresencePerson *person); /** * Clears the persons of a presence model. * @param[in] model The #LinphonePresenceModel object for which to clear the persons. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_model_clear_persons(LinphonePresenceModel *model); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_model_clear_persons(LinphonePresenceModel *model); /** * Tells whether a presence model is considered online. @@ -327,7 +327,7 @@ LINPHONE_PUBLIC char * linphone_presence_service_get_id(const LinphonePresenceSe * @param[in] id The id string to set. Can be NULL to generate it automatically. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_service_set_id(LinphonePresenceService *service, const char *id); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_service_set_id(LinphonePresenceService *service, const char *id); /** * Gets the basic status of a presence service. @@ -342,7 +342,7 @@ LINPHONE_PUBLIC LinphonePresenceBasicStatus linphone_presence_service_get_basic_ * @param[in] basic_status The #LinphonePresenceBasicStatus to set for the #LinphonePresenceService object. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_service_set_basic_status(LinphonePresenceService *service, LinphonePresenceBasicStatus basic_status); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_service_set_basic_status(LinphonePresenceService *service, LinphonePresenceBasicStatus basic_status); /** * Gets the contact of a presence service. @@ -359,7 +359,7 @@ LINPHONE_PUBLIC char * linphone_presence_service_get_contact(const LinphonePrese * @param[in] contact The contact string to set. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_service_set_contact(LinphonePresenceService *service, const char *contact); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_service_set_contact(LinphonePresenceService *service, const char *contact); /** * Gets the number of notes included in the presence service. @@ -382,14 +382,14 @@ LINPHONE_PUBLIC LinphonePresenceNote * linphone_presence_service_get_nth_note(co * @param[in] note The #LinphonePresenceNote object to add to the service. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_service_add_note(LinphonePresenceService *service, LinphonePresenceNote *note); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_service_add_note(LinphonePresenceService *service, LinphonePresenceNote *note); /** * Clears the notes of a presence service. * @param[in] service The #LinphonePresenceService object for which to clear the notes. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_service_clear_notes(LinphonePresenceService *service); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_service_clear_notes(LinphonePresenceService *service); /***************************************************************************** @@ -418,7 +418,7 @@ LINPHONE_PUBLIC char * linphone_presence_person_get_id(const LinphonePresencePer * @param[in] id The id string to set. Can be NULL to generate it automatically. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_person_set_id(LinphonePresencePerson *person, const char *id); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_person_set_id(LinphonePresencePerson *person, const char *id); /** * Gets the number of activities included in the presence person. @@ -441,14 +441,14 @@ LINPHONE_PUBLIC LinphonePresenceActivity * linphone_presence_person_get_nth_acti * @param[in] activity The #LinphonePresenceActivity object to add to the person. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_person_add_activity(LinphonePresencePerson *person, LinphonePresenceActivity *activity); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_person_add_activity(LinphonePresencePerson *person, LinphonePresenceActivity *activity); /** * Clears the activities of a presence person. * @param[in] person The #LinphonePresencePerson object for which to clear the activities. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_person_clear_activities(LinphonePresencePerson *person); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_person_clear_activities(LinphonePresencePerson *person); /** * Gets the number of notes included in the presence person. @@ -471,14 +471,14 @@ LINPHONE_PUBLIC LinphonePresenceNote * linphone_presence_person_get_nth_note(con * @param[in] note The #LinphonePresenceNote object to add to the person. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_person_add_note(LinphonePresencePerson *person, LinphonePresenceNote *note); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_person_add_note(LinphonePresencePerson *person, LinphonePresenceNote *note); /** * Clears the notes of a presence person. * @param[in] person The #LinphonePresencePerson object for which to clear the notes. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_person_clear_notes(LinphonePresencePerson *person); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_person_clear_notes(LinphonePresencePerson *person); /** * Gets the number of activities notes included in the presence person. @@ -501,14 +501,14 @@ LINPHONE_PUBLIC LinphonePresenceNote * linphone_presence_person_get_nth_activiti * @param[in] note The #LinphonePresenceNote object to add to the person. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_person_add_activities_note(LinphonePresencePerson *person, LinphonePresenceNote *note); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_person_add_activities_note(LinphonePresencePerson *person, LinphonePresenceNote *note); /** * Clears the activities notes of a presence person. * @param[in] person The #LinphonePresencePerson object for which to clear the activities notes. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_person_clear_activities_notes(LinphonePresencePerson *person); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_person_clear_activities_notes(LinphonePresencePerson *person); /***************************************************************************** @@ -545,7 +545,7 @@ LINPHONE_PUBLIC LinphonePresenceActivityType linphone_presence_activity_get_type * @param[in] acttype The activity type to set for the activity. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_activity_set_type(LinphonePresenceActivity *activity, LinphonePresenceActivityType acttype); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_activity_set_type(LinphonePresenceActivity *activity, LinphonePresenceActivityType acttype); /** * Gets the description of a presence activity. @@ -560,7 +560,7 @@ LINPHONE_PUBLIC const char * linphone_presence_activity_get_description(const Li * @param[in] description An additional description of the activity. Can be NULL if no additional description is to be added. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_activity_set_description(LinphonePresenceActivity *activity, const char *description); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_activity_set_description(LinphonePresenceActivity *activity, const char *description); /***************************************************************************** @@ -588,7 +588,7 @@ LINPHONE_PUBLIC const char * linphone_presence_note_get_content(const LinphonePr * @param[in] content The content of the note. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_note_set_content(LinphonePresenceNote *note, const char *content); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_note_set_content(LinphonePresenceNote *note, const char *content); /** * Gets the language of a presence note. @@ -603,7 +603,7 @@ LINPHONE_PUBLIC const char * linphone_presence_note_get_lang(const LinphonePrese * @param[in] lang The language of the note. * @return 0 if successful, a value < 0 in case of error. */ -LINPHONE_PUBLIC int linphone_presence_note_set_lang(LinphonePresenceNote *note, const char *lang); +LINPHONE_PUBLIC LinphoneStatus linphone_presence_note_set_lang(LinphonePresenceNote *note, const char *lang); /***************************************************************************** diff --git a/include/linphone/proxy_config.h b/include/linphone/proxy_config.h index ba93f4919..238cc4b00 100644 --- a/include/linphone/proxy_config.h +++ b/include/linphone/proxy_config.h @@ -72,13 +72,13 @@ LINPHONE_PUBLIC void linphone_proxy_config_set_user_data(LinphoneProxyConfig *cf * - IP address with port: sip:87.98.157.38:5062 * - hostnames : sip:sip.example.net **/ -LINPHONE_PUBLIC int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *cfg, const char *server_addr); +LINPHONE_PUBLIC LinphoneStatus linphone_proxy_config_set_server_addr(LinphoneProxyConfig *cfg, const char *server_addr); /** * @deprecated Use linphone_proxy_config_set_identity_address() * @donotwrap **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_proxy_config_set_identity(LinphoneProxyConfig *cfg, const char *identity); +LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_proxy_config_set_identity(LinphoneProxyConfig *cfg, const char *identity); /** * Sets the user identity as a SIP address. @@ -89,7 +89,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_proxy_config_set_identity(Linph * The REGISTER messages will have from and to set to this identity. * **/ -LINPHONE_PUBLIC int linphone_proxy_config_set_identity_address(LinphoneProxyConfig *cfg, const LinphoneAddress *identity); +LINPHONE_PUBLIC LinphoneStatus linphone_proxy_config_set_identity_address(LinphoneProxyConfig *cfg, const LinphoneAddress *identity); /** * Sets a SIP route. @@ -97,7 +97,7 @@ LINPHONE_PUBLIC int linphone_proxy_config_set_identity_address(LinphoneProxyConf * is the default one (see linphone_core_set_default_proxy() ). * @return -1 if route is invalid, 0 otherwise. **/ -LINPHONE_PUBLIC int linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const char *route); +LINPHONE_PUBLIC LinphoneStatus linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const char *route); /** * Sets the registration expiration time in seconds. @@ -130,7 +130,7 @@ LINPHONE_PUBLIC void linphone_proxy_config_edit(LinphoneProxyConfig *cfg); /** * Commits modification made to the proxy configuration. **/ -LINPHONE_PUBLIC int linphone_proxy_config_done(LinphoneProxyConfig *cfg); +LINPHONE_PUBLIC LinphoneStatus linphone_proxy_config_done(LinphoneProxyConfig *cfg); /** * Indicates either or not, PUBLISH must be issued for this #LinphoneProxyConfig . diff --git a/include/linphone/ringtoneplayer.h b/include/linphone/ringtoneplayer.h index 7f20f199b..81dc5f45d 100644 --- a/include/linphone/ringtoneplayer.h +++ b/include/linphone/ringtoneplayer.h @@ -31,7 +31,7 @@ typedef void (*LinphoneRingtonePlayerFunc)(LinphoneRingtonePlayer* rp, void* use LINPHONE_PUBLIC LinphoneRingtonePlayer* linphone_ringtoneplayer_new(void); LINPHONE_PUBLIC void linphone_ringtoneplayer_destroy(LinphoneRingtonePlayer* rp); -LINPHONE_PUBLIC int linphone_ringtoneplayer_start(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms); +LINPHONE_PUBLIC LinphoneStatus linphone_ringtoneplayer_start(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms); /** * Start a ringtone player * @param factory A MSFactory object @@ -43,10 +43,10 @@ LINPHONE_PUBLIC int linphone_ringtoneplayer_start(MSFactory *factory, LinphoneRi * @param user_data A user data passed to the callback function called when the ringtone ends * @return 0 if the player successfully started, positive error code otherwise */ -LINPHONE_PUBLIC int linphone_ringtoneplayer_start_with_cb(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, +LINPHONE_PUBLIC LinphoneStatus linphone_ringtoneplayer_start_with_cb(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms, LinphoneRingtonePlayerFunc end_of_ringtone, void * user_data); LINPHONE_PUBLIC bool_t linphone_ringtoneplayer_is_started(LinphoneRingtonePlayer* rp); -LINPHONE_PUBLIC int linphone_ringtoneplayer_stop(LinphoneRingtonePlayer* rp); +LINPHONE_PUBLIC LinphoneStatus linphone_ringtoneplayer_stop(LinphoneRingtonePlayer* rp); #ifdef __cplusplus } diff --git a/include/linphone/sipsetup.h b/include/linphone/sipsetup.h index 6dc50c4bb..b3b14356b 100644 --- a/include/linphone/sipsetup.h +++ b/include/linphone/sipsetup.h @@ -136,23 +136,23 @@ LINPHONE_PUBLIC unsigned int sip_setup_get_capabilities(SipSetup *s); SipSetupContext * sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg); int sip_setup_context_account_exists(SipSetupContext *ctx, const char *uri); int sip_setup_context_account_validated(SipSetupContext *ctx, const char *uri); -int sip_setup_context_create_account(SipSetupContext *ctx, const char *uri, const char *passwd, const char *email, int suscribe); +LinphoneStatus sip_setup_context_create_account(SipSetupContext *ctx, const char *uri, const char *passwd, const char *email, int suscribe); LINPHONE_PUBLIC int sip_setup_context_get_capabilities(SipSetupContext *ctx); -LINPHONE_PUBLIC int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd, const char *userid); -int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz); -int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size); -int sip_setup_context_get_relay(SipSetupContext *ctx, char *relay, size_t size); +LINPHONE_PUBLIC LinphoneStatus sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd, const char *userid); +LinphoneStatus sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz); +LinphoneStatus sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size); +LinphoneStatus sip_setup_context_get_relay(SipSetupContext *ctx, char *relay, size_t size); LINPHONE_PUBLIC BuddyLookupRequest *sip_setup_context_create_buddy_lookup_request(SipSetupContext *ctx); -LINPHONE_PUBLIC int sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req); -LINPHONE_PUBLIC int sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req); +LINPHONE_PUBLIC LinphoneStatus sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req); +LINPHONE_PUBLIC LinphoneStatus sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req); const char * sip_setup_context_get_notice(SipSetupContext *ctx); const char ** sip_setup_context_get_domains(SipSetupContext *ctx); void sip_setup_context_free(SipSetupContext *ctx); -LINPHONE_PUBLIC int sip_setup_context_logout(SipSetupContext *ctx); +LINPHONE_PUBLIC LinphoneStatus sip_setup_context_logout(SipSetupContext *ctx); /*internal methods for use WITHIN plugins: do not use elsewhere*/ struct _LinphoneProxyConfig *sip_setup_context_get_proxy_config(const SipSetupContext *ctx);