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

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

parent 69e19e22
......@@ -64,27 +64,27 @@ int linphone_address_get_port(const LinphoneAddress *u) {
return sal_address_get_port(u);
}
int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){
LinphoneStatus linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){
sal_address_set_display_name(u,display_name);
return 0;
}
int linphone_address_set_username(LinphoneAddress *uri, const char *username){
LinphoneStatus linphone_address_set_username(LinphoneAddress *uri, const char *username) {
sal_address_set_username(uri,username);
return 0;
}
int linphone_address_set_domain(LinphoneAddress *uri, const char *host){
LinphoneStatus linphone_address_set_domain(LinphoneAddress *uri, const char *host){
sal_address_set_domain(uri,host);
return 0;
}
int linphone_address_set_port(LinphoneAddress *uri, int port){
LinphoneStatus linphone_address_set_port(LinphoneAddress *uri, int port){
sal_address_set_port(uri,port);
return 0;
}
int linphone_address_set_transport(LinphoneAddress *uri, LinphoneTransportType tp){
LinphoneStatus linphone_address_set_transport(LinphoneAddress *uri, LinphoneTransportType tp){
sal_address_set_transport(uri,(SalTransport)tp);
return 0;
}
......
......@@ -150,7 +150,7 @@ void linphone_call_params_enable_audio(LinphoneCallParams *cp, bool_t enabled){
cp->audio_dir=LinphoneMediaDirectionSendRecv;
}
int linphone_call_params_enable_realtime_text(LinphoneCallParams *params, bool_t yesno) {
LinphoneStatus linphone_call_params_enable_realtime_text(LinphoneCallParams *params, bool_t yesno) {
params->realtimetext_enabled=yesno;
return 0;
}
......
......@@ -1384,7 +1384,7 @@ uint32_t linphone_chat_room_get_char(const LinphoneChatRoom *cr) {
return 0;
}
int linphone_chat_message_put_char(LinphoneChatMessage *msg, uint32_t character) {
LinphoneStatus linphone_chat_message_put_char(LinphoneChatMessage *msg, uint32_t character) {
LinphoneChatRoom *cr = linphone_chat_message_get_chat_room(msg);
LinphoneCall *call = cr->call;
LinphoneCore *lc = cr->lc;
......
......@@ -587,7 +587,7 @@ int linphone_chat_room_upload_file(LinphoneChatMessage *msg) {
return err;
}
int linphone_chat_message_download_file(LinphoneChatMessage *msg) {
LinphoneStatus linphone_chat_message_download_file(LinphoneChatMessage *msg) {
belle_http_request_listener_callbacks_t cbs = {0};
int err;
......
......@@ -1035,7 +1035,7 @@ int linphone_conference_add_participant(LinphoneConference *obj, LinphoneCall *c
return obj->conf->addParticipant(call);
}
int linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri) {
LinphoneStatus linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri) {
return obj->conf->removeParticipant(uri);
}
......
......@@ -86,7 +86,7 @@ int64_t linphone_dictionary_get_int64(LinphoneDictionary* obj, const char* key,
return belle_sip_dict_get_int64(obj, key, default_value);
}
int linphone_dictionary_remove(LinphoneDictionary* obj, const char* key)
LinphoneStatus linphone_dictionary_remove(LinphoneDictionary* obj, const char* key)
{
return belle_sip_dict_remove(obj, key);
}
......@@ -96,7 +96,7 @@ void linphone_dictionary_clear(LinphoneDictionary* obj)
belle_sip_dict_clear(obj);
}
int linphone_dictionary_haskey(const LinphoneDictionary* obj, const char* key)
LinphoneStatus linphone_dictionary_haskey(const LinphoneDictionary* obj, const char* key)
{
return belle_sip_dict_haskey(obj, key);
}
......
......@@ -79,7 +79,7 @@ void ec_tester_destroy(EchoTester *ect) {
ms_free(ect);
}
int linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate) {
LinphoneStatus linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate) {
if (lc->ect != NULL) {
ms_error("Echo tester is still on going !");
return -1;
......@@ -91,7 +91,7 @@ int linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate) {
return 1;
}
int linphone_core_stop_echo_tester(LinphoneCore *lc) {
LinphoneStatus linphone_core_stop_echo_tester(LinphoneCore *lc) {
if (lc->ect == NULL) {
ms_error("Echo tester is not running !");
return -1;
......@@ -101,4 +101,4 @@ int linphone_core_stop_echo_tester(LinphoneCore *lc) {
ec_tester_destroy(lc->ect);
lc->ect = NULL;
return 1;
}
\ No newline at end of file
}
......@@ -187,7 +187,7 @@ LinphoneEvent *linphone_core_subscribe(LinphoneCore *lc, const LinphoneAddress *
return lev;
}
int linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneContent *body){
SalBodyHandler *body_handler;
int err;
......@@ -226,15 +226,15 @@ int linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneContent *bod
return err;
}
int linphone_event_update_subscribe(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus linphone_event_update_subscribe(LinphoneEvent *lev, const LinphoneContent *body){
return linphone_event_send_subscribe(lev,body);
}
int linphone_event_refresh_subscribe(LinphoneEvent *lev) {
LinphoneStatus linphone_event_refresh_subscribe(LinphoneEvent *lev) {
return sal_op_refresh(lev->op);
}
int linphone_event_accept_subscription(LinphoneEvent *lev){
LinphoneStatus linphone_event_accept_subscription(LinphoneEvent *lev){
int err;
if (lev->subscription_state!=LinphoneSubscriptionIncomingReceived){
ms_error("linphone_event_accept_subscription(): cannot accept subscription if subscription wasn't just received.");
......@@ -247,7 +247,7 @@ int linphone_event_accept_subscription(LinphoneEvent *lev){
return err;
}
int linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason){
LinphoneStatus linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason){
int err;
if (lev->subscription_state!=LinphoneSubscriptionIncomingReceived){
ms_error("linphone_event_deny_subscription(): cannot deny subscription if subscription wasn't just received.");
......@@ -258,7 +258,7 @@ int linphone_event_deny_subscription(LinphoneEvent *lev, LinphoneReason reason){
return err;
}
int linphone_event_notify(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus linphone_event_notify(LinphoneEvent *lev, const LinphoneContent *body){
SalBodyHandler *body_handler;
if (lev->subscription_state!=LinphoneSubscriptionActive && lev->subscription_state!=LinphoneSubscriptionIncomingReceived){
ms_error("linphone_event_notify(): cannot notify if subscription is not active.");
......@@ -320,15 +320,15 @@ LinphoneEvent *linphone_core_publish(LinphoneCore *lc, const LinphoneAddress *re
}
int linphone_event_send_publish(LinphoneEvent *lev, const LinphoneContent *body){
LinphoneStatus linphone_event_send_publish(LinphoneEvent *lev, const LinphoneContent *body){
return _linphone_event_send_publish(lev,body,TRUE);
}
int linphone_event_update_publish(LinphoneEvent* lev, const LinphoneContent* body ) {
LinphoneStatus linphone_event_update_publish(LinphoneEvent* lev, const LinphoneContent* body ) {
return linphone_event_send_publish(lev,body);
}
int linphone_event_refresh_publish(LinphoneEvent *lev) {
LinphoneStatus linphone_event_refresh_publish(LinphoneEvent *lev) {
return sal_op_refresh(lev->op);
}
void linphone_event_pause_publish(LinphoneEvent *lev) {
......
......@@ -290,7 +290,7 @@ const LinphoneAddress * linphone_friend_get_address(const LinphoneFriend *lf) {
return NULL;
}
int linphone_friend_set_address(LinphoneFriend *lf, const LinphoneAddress *addr) {
LinphoneStatus linphone_friend_set_address(LinphoneFriend *lf, const LinphoneAddress *addr) {
LinphoneAddress *fr = linphone_address_clone(addr);
char *address;
const LinphoneAddress *mAddr = linphone_friend_get_address(lf);
......@@ -431,7 +431,7 @@ void linphone_friend_remove_phone_number(LinphoneFriend *lf, const char *phone)
}
}
int linphone_friend_set_name(LinphoneFriend *lf, const char *name){
LinphoneStatus linphone_friend_set_name(LinphoneFriend *lf, const char *name){
if (linphone_core_vcard_supported()) {
if (!lf->vcard) linphone_friend_create_vcard(lf, name);
linphone_vcard_set_full_name(lf->vcard, name);
......@@ -445,12 +445,12 @@ int linphone_friend_set_name(LinphoneFriend *lf, const char *name){
return 0;
}
int linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val){
LinphoneStatus linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val){
fr->subscribe=val;
return 0;
}
int linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol) {
LinphoneStatus linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol) {
fr->pol=pol;
return 0;
}
......
......@@ -993,7 +993,7 @@ LinphoneCore* linphone_friend_list_get_core(const LinphoneFriendList *list) {
return list->lc;
}
int linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *list, const char *vcard_file) {
LinphoneStatus linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *list, const char *vcard_file) {
bctbx_list_t *vcards = NULL;
bctbx_list_t *vcards_iterator = NULL;
int count = 0;
......@@ -1033,7 +1033,7 @@ int linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *lis
return count;
}
int linphone_friend_list_import_friends_from_vcard4_buffer(LinphoneFriendList *list, const char *vcard_buffer) {
LinphoneStatus linphone_friend_list_import_friends_from_vcard4_buffer(LinphoneFriendList *list, const char *vcard_buffer) {
bctbx_list_t *vcards = NULL;
bctbx_list_t *vcards_iterator = NULL;
int count = 0;
......
......@@ -76,7 +76,7 @@ LinphoneInfoMessage *linphone_core_create_info_message(LinphoneCore *lc){
return belle_sip_object_new(LinphoneInfoMessage);
}
int linphone_call_send_info_message(LinphoneCall *call, const LinphoneInfoMessage *info) {
LinphoneStatus linphone_call_send_info_message(LinphoneCall *call, const LinphoneInfoMessage *info) {
SalBodyHandler *body_handler = sal_body_handler_from_content(info->content);
sal_op_set_sent_custom_header(call->op, info->headers);
return sal_send_info(call->op,NULL, NULL, body_handler);
......
......@@ -2245,7 +2245,7 @@ void linphone_call_send_vfu_request(LinphoneCall *call) {
#endif
}
int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file){
LinphoneStatus linphone_call_take_video_snapshot(LinphoneCall *call, const char *file) {
#ifdef VIDEO_ENABLED
if (call->videostream!=NULL && call->videostream->jpegwriter!=NULL){
return ms_filter_call_method(call->videostream->jpegwriter,MS_JPEG_WRITER_TAKE_SNAPSHOT,(void*)file);
......@@ -2255,7 +2255,7 @@ int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file){
return -1;
}
int linphone_call_take_preview_snapshot(LinphoneCall *call, const char *file){
LinphoneStatus linphone_call_take_preview_snapshot(LinphoneCall *call, const char *file) {
#ifdef VIDEO_ENABLED
if (call->videostream!=NULL && call->videostream->local_jpegwriter!=NULL){
return ms_filter_call_method(call->videostream->local_jpegwriter,MS_JPEG_WRITER_TAKE_SNAPSHOT,(void*)file);
......@@ -4853,7 +4853,7 @@ static int send_dtmf_handler(void *data, unsigned int revents){
}
}
int linphone_call_send_dtmf(LinphoneCall *call,char dtmf){
LinphoneStatus linphone_call_send_dtmf(LinphoneCall *call, char dtmf) {
if (call==NULL){
ms_warning("linphone_call_send_dtmf(): invalid call, canceling DTMF.");
return -1;
......@@ -4864,7 +4864,7 @@ int linphone_call_send_dtmf(LinphoneCall *call,char dtmf){
return 0;
}
int linphone_call_send_dtmfs(LinphoneCall *call,const char *dtmfs) {
LinphoneStatus linphone_call_send_dtmfs(LinphoneCall *call,const char *dtmfs) {
if (call==NULL){
ms_warning("linphone_call_send_dtmfs(): invalid call, canceling DTMF sequence.");
return -1;
......@@ -4992,7 +4992,7 @@ RtpTransport* linphone_call_get_meta_rtcp_transport(LinphoneCall *call, int stre
return meta_rtcp;
}
int linphone_call_pause(LinphoneCall *call) {
LinphoneStatus linphone_call_pause(LinphoneCall *call) {
int err = _linphone_call_pause(call);
if (err == 0) call->paused_by_app = TRUE;
return err;
......@@ -5037,7 +5037,7 @@ int _linphone_call_pause(LinphoneCall *call) {
return 0;
}
int linphone_call_resume(LinphoneCall *call) {
LinphoneStatus linphone_call_resume(LinphoneCall *call) {
LinphoneCore *lc;
const char *subject = "Call resuming";
char *remote_address;
......@@ -5117,7 +5117,7 @@ static void terminate_call(LinphoneCall *call) {
linphone_call_set_state(call, LinphoneCallEnd, "Call terminated");
}
int linphone_call_terminate(LinphoneCall *call) {
LinphoneStatus linphone_call_terminate(LinphoneCall *call) {
ms_message("Terminate call [%p] which is currently in state %s", call, linphone_call_state_to_string(call->state));
switch (call->state) {
case LinphoneCallReleased:
......@@ -5141,7 +5141,7 @@ int linphone_call_terminate(LinphoneCall *call) {
return 0;
}
int linphone_call_redirect(LinphoneCall *call, const char *redirect_uri) {
LinphoneStatus linphone_call_redirect(LinphoneCall *call, const char *redirect_uri) {
char *real_url = NULL;
LinphoneCore *lc;
LinphoneAddress *real_parsed_url;
......@@ -5169,7 +5169,7 @@ int linphone_call_redirect(LinphoneCall *call, const char *redirect_uri) {
return 0;
}
int linphone_call_decline(LinphoneCall * call, LinphoneReason reason) {
LinphoneStatus linphone_call_decline(LinphoneCall * call, LinphoneReason reason) {
if ((call->state != LinphoneCallIncomingReceived) && (call->state != LinphoneCallIncomingEarlyMedia)) {
ms_error("Cannot decline a call that is in state %s", linphone_call_state_to_string(call->state));
return -1;
......@@ -5180,11 +5180,11 @@ int linphone_call_decline(LinphoneCall * call, LinphoneReason reason) {
return 0;
}
int linphone_call_accept(LinphoneCall *call) {
LinphoneStatus linphone_call_accept(LinphoneCall *call) {
return linphone_call_accept_with_params(call, NULL);
}
int linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneCore *lc;
SalOp *replaced;
SalMediaDescription *new_md;
......@@ -5287,11 +5287,11 @@ int linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParam
return 0;
}
int linphone_call_accept_early_media(LinphoneCall* call) {
LinphoneStatus linphone_call_accept_early_media(LinphoneCall* call) {
return linphone_call_accept_early_media_with_params(call, NULL);
}
int linphone_call_accept_early_media_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus linphone_call_accept_early_media_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
SalMediaDescription* md;
if (call->state != LinphoneCallIncomingReceived) {
......@@ -5318,7 +5318,7 @@ int linphone_call_accept_early_media_with_params(LinphoneCall *call, const Linph
return 0;
}
int linphone_call_update(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus linphone_call_update(LinphoneCall *call, const LinphoneCallParams *params) {
int err = 0;
LinphoneCallState nextstate;
LinphoneCallState initial_state = call->state;
......@@ -5465,7 +5465,7 @@ int linphone_call_start_update(LinphoneCall *call) {
return err;
}
int linphone_call_defer_update(LinphoneCall *call) {
LinphoneStatus linphone_call_defer_update(LinphoneCall *call) {
if (call->state != LinphoneCallUpdatedByRemote) {
ms_error("linphone_call_defer_update() not done in state LinphoneCallUpdatedByRemote");
return -1;
......@@ -5564,7 +5564,7 @@ int _linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *p
return 0;
}
int linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *params) {
LinphoneStatus linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *params) {
if (call->state != LinphoneCallUpdatedByRemote) {
ms_error("linphone_call_accept_update(): invalid state %s to call this function.", linphone_call_state_to_string(call->state));
return -1;
......@@ -5576,7 +5576,7 @@ int linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *pa
return _linphone_call_accept_update(call, params, call->prevstate, linphone_call_state_to_string(call->prevstate));
}
int linphone_call_transfer(LinphoneCall *call, const char *refer_to) {
LinphoneStatus linphone_call_transfer(LinphoneCall *call, const char *refer_to) {
char *real_url = NULL;
LinphoneCore *lc = linphone_call_get_core(call);
LinphoneAddress *real_parsed_url = linphone_core_interpret_url(lc, refer_to);
......@@ -5594,7 +5594,7 @@ int linphone_call_transfer(LinphoneCall *call, const char *refer_to) {
return 0;
}
int linphone_call_transfer_to_another(LinphoneCall *call, LinphoneCall *dest) {
LinphoneStatus linphone_call_transfer_to_another(LinphoneCall *call, LinphoneCall *dest) {
int result = sal_call_refer_with_replaces (call->op, dest->op);
linphone_call_set_transfer_state(call, LinphoneCallOutgoingInit);
return result;
......
This diff is collapsed.
......@@ -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;
......
......@@ -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);
......
......@@ -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*/
......
......@@ -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);
......
......@@ -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);
}
......
This diff is collapsed.
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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.
......
......@@ -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()