Commit 6a9b199a authored by Ghislain MARY's avatar Ghislain MARY

Remove a lot of deprecation warnings.

parent 480724b1
......@@ -677,13 +677,13 @@ lpc_cmd_transfer(LinphoneCore *lc, char *args)
linphonec_out("No active call, please specify a call id among the ones listed by 'calls' command.\n");
return 0;
}
linphone_core_transfer_call(lc, call, refer_to);
linphone_call_transfer(call, refer_to);
}else if (n==2){
long id=atoi(arg1);
refer_to=args+strlen(arg1)+1;
call=linphonec_get_call(id);
if (call==NULL) return 0;
linphone_core_transfer_call(lc, call, refer_to);
linphone_call_transfer(call, refer_to);
}else if (n==3){
long id=atoi(arg1);
call=linphonec_get_call(id);
......@@ -693,7 +693,7 @@ lpc_cmd_transfer(LinphoneCore *lc, char *args)
return 0;
}
linphonec_out("Performing attended transfer of call %i to call %i",id,id2);
linphone_core_transfer_call_to_another (lc,call,call2);
linphone_call_transfer_to_another(call,call2);
}else return 0;
}else{
linphonec_out("Transfer command requires at least one argument\n");
......@@ -726,7 +726,7 @@ lpc_cmd_terminate(LinphoneCore *lc, char *args)
long id=atoi(args);
LinphoneCall *call=linphonec_get_call(id);
if (call){
if (linphone_core_terminate_call(lc,call)==-1){
if (linphone_call_terminate(call)==-1){
linphonec_out("Could not stop the call with id %li\n",id);
}
}else return 0;
......@@ -749,7 +749,7 @@ lpc_cmd_redirect(LinphoneCore *lc, char *args){
while(elem!=NULL){
LinphoneCall *call=(LinphoneCall*)elem->data;
if (linphone_call_get_state(call)==LinphoneCallIncomingReceived){
if (linphone_core_redirect_call(lc,call,args+4) != 0) {
if (linphone_call_redirect(call,args+4) != 0) {
linphonec_out("Could not redirect call.\n");
elem=elem->next;
} else {
......@@ -771,7 +771,7 @@ lpc_cmd_redirect(LinphoneCore *lc, char *args){
if ( call != NULL ) {
if (linphone_call_get_state(call)!=LinphoneCallIncomingReceived) {
linphonec_out("The state of the call is not incoming, can't be redirected.\n");
} else if (linphone_core_redirect_call(lc,call,args+charRead) != 0) {
} else if (linphone_call_redirect(call,args+charRead) != 0) {
linphonec_out("Could not redirect call.\n");
}
}
......@@ -802,7 +802,7 @@ lpc_cmd_answer(LinphoneCore *lc, char *args){
long id;
if (sscanf(args,"%li",&id)==1){
LinphoneCall *call=linphonec_get_call (id);
if (linphone_core_accept_call (lc,call)==-1){
if (linphone_call_accept(call)==-1){
linphonec_out("Fail to accept call %i\n",id);
}
}else return 0;
......@@ -1454,7 +1454,7 @@ static int lpc_cmd_pause(LinphoneCore *lc, char *args){
if(linphone_core_in_call(lc))
{
linphone_core_pause_call(lc,linphone_core_get_current_call(lc));
linphone_call_pause(linphone_core_get_current_call(lc));
return 1;
}
linphonec_out("you can only pause when a call is in process\n");
......@@ -1475,7 +1475,7 @@ static int lpc_cmd_resume(LinphoneCore *lc, char *args){
if (n == 1){
LinphoneCall *call=linphonec_get_call (id);
if (call){
if(linphone_core_resume_call(lc,call)==-1){
if(linphone_call_resume(call)==-1){
linphonec_out("There was a problem to resume the call check the remote address you gave %s\n",args);
}
}
......@@ -1488,7 +1488,7 @@ static int lpc_cmd_resume(LinphoneCore *lc, char *args){
int nbcalls=(int)bctbx_list_size(calls);
if( nbcalls == 1)
{
if(linphone_core_resume_call(lc,calls->data) < 0)
if(linphone_call_resume(calls->data) < 0)
{
linphonec_out("There was a problem to resume the unique call.\n");
}
......@@ -2573,7 +2573,7 @@ static int lpc_cmd_camera(LinphoneCore *lc, char *args){
/*update the call to add the video stream*/
LinphoneCallParams *ncp=linphone_call_params_copy(cp);
linphone_call_params_enable_video(ncp,TRUE);
linphone_core_update_call(lc,call,ncp);
linphone_call_update(call,ncp);
linphone_call_params_unref (ncp);
linphonec_out("Trying to bring up video stream...\n");
}
......
......@@ -367,7 +367,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L
linphonec_out("Sending early media using real hardware\n");
linphone_call_params_enable_early_media_sending(callparams, TRUE);
if (vcap_enabled) linphone_call_params_enable_video(callparams, TRUE);
linphone_core_accept_early_media_with_params(lc, call, callparams);
linphone_call_accept_early_media_with_params(call, callparams);
linphone_call_params_unref(callparams);
}
break;
......
......@@ -663,7 +663,7 @@ static void call_updated_by_remote(LinphoneCore *lc, LinphoneCall *call){
linphone_call_set_state(call, LinphoneCallUpdatedByRemote,"Call updated by remote");
if (call->defer_update == FALSE){
if (call->state == LinphoneCallUpdatedByRemote){
linphone_core_accept_call_update(lc,call,NULL);
linphone_call_accept_update(call, NULL);
}else{
/*otherwise it means that the app responded by linphone_core_accept_call_update
* within the callback, so job is already done.*/
......@@ -848,7 +848,7 @@ static int resume_call_after_failed_transfer(LinphoneCall *call){
if (call->was_automatically_paused && call->state==LinphoneCallPaused){
if (sal_op_is_idle(call->op)){
linphone_core_resume_call(call->core,call);
linphone_call_resume(call);
}else {
ms_message("resume_call_after_failed_transfer(), salop was busy");
return BELLE_SIP_CONTINUE;
......@@ -1286,7 +1286,6 @@ static bool_t auth_requested(Sal* sal, SalAuthInfo* sai) {
}
static void notify_refer(SalOp *op, SalReferStatus status){
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op));
LinphoneCall *call=(LinphoneCall*) sal_op_get_user_pointer(op);
LinphoneCallState cstate;
if (call==NULL) {
......@@ -1309,7 +1308,7 @@ static void notify_refer(SalOp *op, SalReferStatus status){
linphone_call_set_transfer_state(call, cstate);
if (cstate==LinphoneCallConnected){
/*automatically terminate the call as the transfer is complete.*/
linphone_core_terminate_call(lc,call);
linphone_call_terminate(call);
}
}
......
......@@ -389,7 +389,7 @@ int LocalConference::addParticipant(LinphoneCall *call) {
if (call->state==LinphoneCallPaused){
call->params->in_conference=TRUE;
call->params->has_video=FALSE;
linphone_core_resume_call(m_core,call);
linphone_call_resume(call);
}else if (call->state==LinphoneCallStreamsRunning){
LinphoneCallParams *params=linphone_call_params_copy(linphone_call_get_current_params(call));
params->in_conference=TRUE;
......@@ -404,7 +404,7 @@ int LocalConference::addParticipant(LinphoneCall *call) {
}
/*this will trigger a reINVITE that will later redraw the streams */
/*FIXME probably a bit too much to just redraw streams !*/
linphone_core_update_call(m_core,call,params);
linphone_call_update(call,params);
linphone_call_params_unref(params);
addLocalEndpoint();
}else{
......@@ -441,7 +441,7 @@ int LocalConference::removeFromConference(LinphoneCall *call, bool_t active){
leave();
}
ms_message("Updating call to actually remove from conference");
err=linphone_core_update_call(m_core,call,params);
err=linphone_call_update(call,params);
linphone_call_params_unref(params);
} else{
ms_message("Pausing call to actually remove from conference");
......@@ -514,7 +514,7 @@ int LocalConference::terminate() {
LinphoneCall *call=(LinphoneCall*)calls->data;
calls=calls->next;
if (call->current_params->in_conference) {
linphone_core_terminate_call(m_core, call);
linphone_call_terminate(call);
}
}
......@@ -725,7 +725,7 @@ int RemoteConference::terminate() {
switch(m_state) {
case LinphoneConferenceRunning:
case LinphoneConferenceStarting:
linphone_core_terminate_call(m_core, m_focusCall);
linphone_call_terminate(m_focusCall);
break;
default: break;
......@@ -742,7 +742,7 @@ int RemoteConference::enter() {
switch(callState) {
case LinphoneCallStreamsRunning: break;
case LinphoneCallPaused:
linphone_core_resume_call(m_core, m_focusCall);
linphone_call_resume(m_focusCall);
break;
default:
ms_error("Could not join the conference: bad focus call state (%s)", linphone_call_state_to_string(callState));
......@@ -760,7 +760,7 @@ int RemoteConference::leave() {
switch(callState) {
case LinphoneCallPaused: break;
case LinphoneCallStreamsRunning:
linphone_core_pause_call(m_core, m_focusCall);
linphone_call_pause(m_focusCall);
break;
default:
ms_error("Could not leave the conference: bad focus call state (%s)", linphone_call_state_to_string(callState));
......@@ -783,7 +783,7 @@ bool RemoteConference::focusIsReady() const {
}
bool RemoteConference::transferToFocus(LinphoneCall *call) {
if(linphone_core_transfer_call(m_core, call, m_focusContact) == 0) {
if(linphone_call_transfer(call, m_focusContact) == 0) {
m_transferingCalls.push_back(call);
return true;
} else {
......@@ -847,7 +847,7 @@ void RemoteConference::onPendingCallStateChanged(LinphoneCall *call, LinphoneCal
if(m_state == LinphoneConferenceRunning) {
m_pendingCalls.remove(call);
m_transferingCalls.push_back(call);
linphone_core_transfer_call(m_core, call, m_focusContact);
linphone_call_transfer(call, m_focusContact);
}
break;
......
......@@ -4326,7 +4326,7 @@ static void linphone_call_lost(LinphoneCall *call){
ms_message("LinphoneCall [%p]: %s", call, temp);
linphone_core_notify_display_warning(lc, temp);
sal_error_info_set(&call->non_op_error, SalReasonIOError, 503, "IO error", NULL);
linphone_core_terminate_call(lc, call);
linphone_call_terminate(call);
linphone_core_play_named_tone(lc, LinphoneToneCallLost);
ms_free(temp);
}
......@@ -4360,7 +4360,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
if (ice_session_role(call->ice_session) == IR_Controlling && current_param->update_call_when_ice_completed ) {
LinphoneCallParams *params = linphone_core_create_call_params(call->core, call);
params->internal_call_update = TRUE;
linphone_core_update_call(call->core, call, params);
linphone_call_update(call, params);
linphone_call_params_unref(params);
}
start_dtls_on_all_streams(call);
......@@ -4402,7 +4402,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
}
} else if (evt == ORTP_EVENT_ICE_RESTART_NEEDED) {
ice_session_restart(call->ice_session, IR_Controlling);
linphone_core_update_call(call->core, call, call->current_params);
linphone_call_update(call, call->current_params);
}
}
......@@ -5695,7 +5695,7 @@ void linphone_call_reinvite_to_recover_from_connection_loss(LinphoneCall *call)
ice_session_reset(call->ice_session, IR_Controlling);
}
params = linphone_core_create_call_params(call->core, call);
linphone_core_update_call(call->core, call, params);
linphone_call_update(call, params);
linphone_call_params_unref(params);
}
......
......@@ -2980,7 +2980,7 @@ void linphone_core_iterate(LinphoneCore *lc){
decline_reason = (lc->current_call != call) ? LinphoneReasonBusy : LinphoneReasonDeclined;
call->log->status=LinphoneCallMissed;
sal_error_info_set(&call->non_op_error,SalReasonRequestTimeout,408,"Not answered",NULL);
linphone_core_decline_call(lc,call,decline_reason);
linphone_call_decline(call, decline_reason);
}
}
if ( (lc->sip_conf.in_call_timeout > 0)
......@@ -2988,7 +2988,7 @@ void linphone_core_iterate(LinphoneCore *lc){
&& ((current_real_time - call->log->connected_date_time) > lc->sip_conf.in_call_timeout))
{
ms_message("in call timeout (%i)",lc->sip_conf.in_call_timeout);
linphone_core_terminate_call(lc,call);
linphone_call_terminate(call);
}
}
......@@ -3429,11 +3429,11 @@ void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call){
linphone_call_set_contact_op(call);
if (propose_early_media){
linphone_core_accept_early_media(lc,call);
linphone_call_accept_early_media(call);
}else sal_call_notify_ringing(call->op,FALSE);
if (sal_call_get_replaces(call->op)!=NULL && lp_config_get_int(lc->config,"sip","auto_answer_replacing_calls",1)){
linphone_core_accept_call(lc,call);
linphone_call_accept(call);
}
}
linphone_call_unref(call);
......@@ -3505,7 +3505,7 @@ int linphone_core_terminate_all_calls(LinphoneCore *lc){
while(calls) {
LinphoneCall *c=(LinphoneCall*)calls->data;
calls=calls->next;
linphone_core_terminate_call(lc,c);
linphone_call_terminate(c);
}
return 0;
}
......@@ -5631,7 +5631,7 @@ static void linphone_core_uninit(LinphoneCore *lc)
while(lc->calls) {
LinphoneCall *the_call = lc->calls->data;
linphone_core_terminate_call(lc,the_call);
linphone_call_terminate(the_call);
linphone_core_iterate(lc);
ms_usleep(10000);
}
......
......@@ -184,7 +184,7 @@ static int lookup_vbr_typical_bitrate(int maxbw, int clock_rate){
}
static int get_audio_payload_bandwidth(LinphoneCore *lc, const PayloadType *pt, int maxbw){
if (linphone_core_payload_type_is_vbr(lc,pt)){
if (linphone_payload_type_is_vbr(pt)){
if (pt->flags & PAYLOAD_TYPE_BITRATE_OVERRIDE){
ms_debug("PayloadType %s/%i has bitrate override",pt->mime_type,pt->clock_rate);
return pt->normal_bitrate/1000;
......
......@@ -49,7 +49,7 @@ void AnswerCommand::exec(Daemon *app, const string& args) {
call = (LinphoneCall*)elem->data;
LinphoneCallState cstate = linphone_call_get_state(call);
if (cstate == LinphoneCallIncomingReceived || cstate == LinphoneCallIncomingEarlyMedia) {
if (linphone_core_accept_call(lc, call) == 0) {
if (linphone_call_accept(call) == 0) {
app->sendResponse(Response());
return;
}
......@@ -64,7 +64,7 @@ void AnswerCommand::exec(Daemon *app, const string& args) {
LinphoneCallState cstate = linphone_call_get_state(call);
if (cstate == LinphoneCallIncomingReceived || cstate == LinphoneCallIncomingEarlyMedia) {
if (linphone_core_accept_call(lc, call) == 0) {
if (linphone_call_accept(call) == 0) {
app->sendResponse(Response());
return;
}
......
......@@ -71,7 +71,7 @@ static PayloadType *findPayload(LinphoneCore *lc, int payload_type, int *index){
for (const bctbx_list_t *node = linphone_core_get_audio_codecs(lc); node != NULL; node = bctbx_list_next(node)) {
PayloadType *payload = reinterpret_cast<PayloadType*>(node->data);
if (index) (*index)++;
if (payload_type == linphone_core_get_payload_type_number(lc, payload)) {
if (payload_type == linphone_payload_type_get_number(payload)) {
return payload;
}
}
......@@ -127,7 +127,7 @@ void AudioCodecSetCommand::exec(Daemon *app, const string& args) {
if (conflict) {
app->sendResponse(Response("New payload type number is already used.", Response::Error));
} else {
linphone_core_set_payload_type_number(app->getCore(),payload, idx);
linphone_payload_type_set_number(payload, idx);
app->sendResponse(PayloadTypeResponse(app->getCore(), payload, parser.getPosition()));
}
return;
......
......@@ -33,7 +33,7 @@ static PayloadType *getPayloadType(LinphoneCore *lc, const MSList *codecs, int n
const MSList *elem;
for (elem = codecs; elem != NULL; elem = elem->next) {
PayloadType *pt = (PayloadType*)elem->data;
if (linphone_core_get_payload_type_number(lc, pt) == number)
if (linphone_payload_type_get_number(pt) == number)
return pt;
}
return NULL;
......
......@@ -62,7 +62,7 @@ void CallPauseCommand::exec(Daemon* app, const string& args)
}
}
if (linphone_core_pause_call(lc, call) == 0) {
if (linphone_call_pause(call) == 0) {
app->sendResponse(Response(current ? "Current call was paused" : "Call was paused", Response::Ok));
} else {
app->sendResponse(Response("Error pausing call"));
......
......@@ -60,7 +60,7 @@ void CallResumeCommand::exec(Daemon* app, const string& args)
}
}
if (linphone_core_resume_call(lc, call) == 0) {
if (linphone_call_resume(call) == 0) {
app->sendResponse(Response(current ? "Current call was resumed" : "Call was resumed", Response::Ok));
} else {
app->sendResponse(Response("Error pausing call"));
......
......@@ -43,7 +43,6 @@ CallTransferCommand::CallTransferCommand() :
void CallTransferCommand::exec(Daemon* app, const string& args)
{
LinphoneCore *lc = app->getCore();
LinphoneCall *call_to_transfer = NULL;
LinphoneCall *call_to_transfer_to = NULL;
istringstream ist(args);
......@@ -85,7 +84,7 @@ void CallTransferCommand::exec(Daemon* app, const string& args)
app->sendResponse(Response("No call with such id."));
return;
}
if (linphone_core_transfer_call_to_another(lc, call_to_transfer, call_to_transfer_to) == 0) {
if (linphone_call_transfer_to_another(call_to_transfer, call_to_transfer_to) == 0) {
std::ostringstream ostr;
ostr << "Call ID: " << call_to_transfer_id << "\n";
ostr << "Transfer to: " << call_to_transfer_to_id << "\n";
......@@ -93,7 +92,7 @@ void CallTransferCommand::exec(Daemon* app, const string& args)
return;
}
} else {
if (linphone_core_transfer_call(lc, call_to_transfer, sip_uri_to_transfer_to.c_str()) == 0) {
if (linphone_call_transfer(call_to_transfer, sip_uri_to_transfer_to.c_str()) == 0) {
std::ostringstream ostr;
ostr << "Call ID: " << call_to_transfer_id << "\n";
ostr << "Transfer to: " << sip_uri_to_transfer_to << "\n";
......
......@@ -56,6 +56,6 @@ void TerminateCommand::exec(Daemon *app, const string& args) {
app->sendResponse(Response("No active call."));
return;
}
linphone_core_terminate_call(app->getCore(), call);
linphone_call_terminate(call);
app->sendResponse(Response());
}
......@@ -71,8 +71,8 @@ void Video::exec(Daemon* app, const string& args)
activate = !linphone_call_params_video_enabled(new_params);
linphone_call_params_enable_video(new_params, activate);
linphone_core_update_call(lc, call, new_params);
linphone_call_params_destroy(new_params);
linphone_call_update(call, new_params);
linphone_call_params_unref(new_params);
} else {
app->sendResponse(Response("No streams running: can't [de]activate video"));
......
......@@ -251,7 +251,7 @@ PayloadTypeResponse::PayloadTypeResponse(LinphoneCore *core, const PayloadType *
if (payloadType != NULL) {
if (index >= 0)
ostr << prefix << "Index: " << index << "\n";
ostr << prefix << "Payload-type-number: " << linphone_core_get_payload_type_number(core, payloadType) << "\n";
ostr << prefix << "Payload-type-number: " << linphone_payload_type_get_number(payloadType) << "\n";
ostr << prefix << "Clock-rate: " << payloadType->clock_rate << "\n";
ostr << prefix << "Bitrate: " << payloadType->normal_bitrate << "\n";
ostr << prefix << "Mime: " << payloadType->mime_type << "\n";
......@@ -284,7 +284,7 @@ PayloadTypeParser::PayloadTypeParser(LinphoneCore *core, const string &mime_type
}else if (number!=-1){
const bctbx_list_t *elem;
for(elem=linphone_core_get_audio_codecs(core);elem!=NULL;elem=elem->next){
if (number==linphone_core_get_payload_type_number(core,(PayloadType*)elem->data)){
if (number==linphone_payload_type_get_number((PayloadType*)elem->data)){
mPayloadType=(PayloadType*)elem->data;
break;
}
......
......@@ -126,7 +126,7 @@ static void linphone_gtk_in_call_set_animation_spinner(GtkWidget *callview){
static void linphone_gtk_transfer_call(LinphoneCall *dest_call){
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
if (call) linphone_core_transfer_call_to_another(linphone_gtk_get_core(),call,dest_call);
if (call) linphone_call_transfer_to_another(call,dest_call);
}
void transfer_button_clicked(GtkWidget *button, gpointer call_ref){
......@@ -464,7 +464,7 @@ static void video_button_clicked(GtkWidget *button, LinphoneCall *call){
LinphoneCallParams *params = linphone_core_create_call_params(lc, call);
gtk_widget_set_sensitive(button,FALSE);
linphone_call_params_enable_video(params, adding);
linphone_core_update_call(lc,call,params);
linphone_call_update(call,params);
linphone_call_params_unref(params);
}
......@@ -949,11 +949,11 @@ void linphone_gtk_hold_clicked(GtkButton *button){
if (!call) return;
if(!active)
{
linphone_core_pause_call(linphone_gtk_get_core(),call);
linphone_call_pause(call);
}
else
{
linphone_core_resume_call(linphone_gtk_get_core(),call);
linphone_call_resume(call);
}
}
......
......@@ -942,7 +942,7 @@ static void accept_incoming_call(LinphoneCall *call){
LinphoneCallParams *params = linphone_core_create_call_params(lc, call);
gchar *record_file=linphone_gtk_get_record_path(linphone_call_get_remote_address(call),FALSE);
linphone_call_params_set_record_file(params,record_file);
linphone_core_accept_call_with_params(lc,call,params);
linphone_call_accept_with_params(call,params);
linphone_call_params_unref(params);
}
......@@ -992,7 +992,7 @@ void linphone_gtk_terminate_call(GtkWidget *button){
gboolean is_conf;
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(&is_conf);
if (call){
linphone_core_terminate_call(linphone_gtk_get_core(),call);
linphone_call_terminate(call);
}else if (is_conf){
linphone_core_terminate_conference(linphone_gtk_get_core());
}
......@@ -1001,7 +1001,7 @@ void linphone_gtk_terminate_call(GtkWidget *button){
void linphone_gtk_decline_clicked(GtkWidget *button){
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
if (call)
linphone_core_terminate_call(linphone_gtk_get_core(),call);
linphone_call_terminate(call);
}
void linphone_gtk_answer_clicked(GtkWidget *button){
......@@ -1333,7 +1333,7 @@ static void on_call_updated_response(GtkWidget *dialog, gint responseid, gpointe
LinphoneCore *lc=linphone_call_get_core(call);
LinphoneCallParams *params = linphone_core_create_call_params(lc, call);
linphone_call_params_enable_video(params,responseid==GTK_RESPONSE_YES);
linphone_core_accept_call_update(lc,call,params);
linphone_call_accept_update(call,params);
linphone_call_params_unref(params);
}
g_source_remove_by_user_data(dialog);
......@@ -1354,7 +1354,7 @@ static void linphone_gtk_call_updated_by_remote(LinphoneCall *call){
g_message("Video used=%i, video requested=%i, automatically_accept=%i",
video_used,video_requested,pol->automatically_accept);
if (!video_used && video_requested && !pol->automatically_accept){
linphone_core_defer_call_update(lc,call);
linphone_call_defer_update(call);
{
const LinphoneAddress *addr=linphone_call_get_remote_address(call);
GtkWidget *dialog;
......
......@@ -471,7 +471,7 @@ void linphone_gtk_cam_changed(GtkWidget *w){
if (strcmp(sel, linphone_core_get_video_device(lc)) != 0){
linphone_core_set_video_device(lc,sel);
if ((call = linphone_core_get_current_call(lc)) != NULL) {
linphone_core_update_call(lc, call, NULL);
linphone_call_update(call, NULL);
}
}
}
......
......@@ -183,7 +183,7 @@ static void on_controls_response(GtkWidget *dialog, int response_id, GtkWidget *
case GTK_RESPONSE_REJECT:
{
LinphoneCall *call=(LinphoneCall*)g_object_get_data(G_OBJECT(video_window),"call");
linphone_core_terminate_call(linphone_gtk_get_core(),call);
linphone_call_terminate(call);
}
break;
case GTK_RESPONSE_APPLY:
......
......@@ -77,7 +77,7 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
if (call != pauline_called_by_marie) {
/*fine, this is the call waiting*/
pauline_called_by_laure=call;
linphone_core_accept_call(pauline->lc,pauline_called_by_laure);
linphone_call_accept(pauline_called_by_laure);
}
}
......@@ -150,7 +150,7 @@ static void second_call_rejection(bool_t second_without_audio){
pauline_call = linphone_core_get_current_call(pauline->lc);
BC_ASSERT_PTR_NOT_NULL(pauline_call);
if (pauline_call){
linphone_core_accept_call(pauline->lc, pauline_call);
linphone_call_accept(pauline_call);
}
BC_ASSERT_TRUE(wait_for(marie->lc
,pauline->lc
......@@ -195,7 +195,7 @@ static void incoming_call_accepted_when_outgoing_call_in_state(LinphoneCallState
,1));
if (state==LinphoneCallOutgoingEarlyMedia)
linphone_core_accept_early_media(pauline->lc,linphone_core_get_current_call(pauline->lc));
linphone_call_accept_early_media(linphone_core_get_current_call(pauline->lc));
BC_ASSERT_EQUAL(marie->stat.number_of_LinphoneCallOutgoingProgress,1, int, "%d");
BC_ASSERT_TRUE(wait_for(marie->lc
......@@ -288,8 +288,8 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallError, initial_marie_stat.number_of_LinphoneCallError+1, 5000));
BC_ASSERT_PTR_NULL(linphone_core_get_conference(marie->lc));
BC_ASSERT_EQUAL(linphone_core_terminate_conference(marie->lc), -1, int, "%d");
linphone_core_terminate_call(marie->lc, marie_call_pauline);
linphone_core_terminate_call(marie->lc, marie_call_laure);
linphone_call_terminate(marie_call_pauline);
linphone_call_terminate(marie_call_laure);
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallEnd, initial_marie_stat.number_of_LinphoneCallEnd+2, 10000));
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallEnd, initial_pauline_stat.number_of_LinphoneCallEnd+1, 5000));
BC_ASSERT_TRUE(wait_for_list(lcs, &laure->stat.number_of_LinphoneCallEnd, initial_laure_stat.number_of_LinphoneCallEnd+1, 5000));
......@@ -431,7 +431,7 @@ static void simple_call_transfer(void) {
reset_counters(&laure->stat);
linphone_core_transfer_call(pauline->lc,pauline_called_by_marie,laure_identity);
linphone_call_transfer(pauline_called_by_marie,laure_identity);
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallRefered,1,2000));
/*marie pausing pauline*/
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallPausing,1,2000));
......@@ -446,7 +446,7 @@ static void simple_call_transfer(void) {
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallIncomingReceived,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallOutgoingRinging,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneTransferCallOutgoingProgress,1,2000));
linphone_core_accept_call(laure->lc,linphone_core_get_current_call(laure->lc));
linphone_call_accept(linphone_core_get_current_call(laure->lc));
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallConnected,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallStreamsRunning,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallConnected,1,2000));
......@@ -491,11 +491,11 @@ static void unattended_call_transfer(void) {
reset_counters(&pauline->stat);
reset_counters(&laure->stat);
linphone_core_transfer_call(marie->lc,pauline_called_by_marie,laure_identity);
linphone_call_transfer(pauline_called_by_marie,laure_identity);
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallRefered,1,2000));
/*marie ends the call */
linphone_core_terminate_call(marie->lc,pauline_called_by_marie);
linphone_call_terminate(pauline_called_by_marie);
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallEnd,1,2000));
/*Pauline starts the transfer*/
......@@ -503,7 +503,7 @@ static void unattended_call_transfer(void) {
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOutgoingProgress,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallIncomingReceived,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOutgoingRinging,1,2000));
linphone_core_accept_call(laure->lc,linphone_core_get_current_call(laure->lc));
linphone_call_accept(linphone_core_get_current_call(laure->lc));
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallConnected,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&laure->stat.number_of_LinphoneCallStreamsRunning,1,2000));
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallConnected,1,2000));
......@@ -535,7 +535,7 @@ static void unattended_call_transfer_with_error(void) {
reset_counters(&marie->stat);
reset_counters(&pauline->stat);
linphone_core_transfer_call(marie->lc,pauline_called_by_marie,"unknown_user");
linphone_call_transfer(pauline_called_by_marie,"unknown_user");
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallRefered,1,2000));
/*Pauline starts the transfer*/
......@@ -611,7 +611,7 @@ static void call_transfer_existing_call(bool_t outgoing_call) {
reset_counters(&laure->stat);
linphone_core_transfer_call_to_another(marie->lc,marie_call_pauline,marie_call_laure);
linphone_call_transfer_to_another(marie_call_pauline,marie_call_laure);
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallRefered,1,2000));
/*pauline pausing marie*/
......@@ -629,7 +629,7 @@ static void call_transfer_existing_call(bool_t outgoing_call) {
lcall = (LinphoneCall*)calls->data;
if (linphone_call_get_state(lcall) == LinphoneCallIncomingReceived) {
BC_ASSERT_PTR_EQUAL(linphone_call_get_replaced_call(lcall),laure_called_by_marie);
linphone_core_accept_call(laure->lc,lcall);
linphone_call_accept(lcall);
break;
}
}
......@@ -688,7 +688,7 @@ static void call_transfer_existing_ringing_call(void) {
BC_ASSERT_PTR_NOT_NULL((marie_call_laure = linphone_core_invite_address(marie->lc, laure->identity)));
if (!marie_call_laure) goto end;
BC_ASSERT_TRUE(wait_for(marie->lc, laure->lc, &marie->stat.number_of_LinphoneCallOutgoingRinging, initial_marie_stats.number_of_LinphoneCallOutgoingRinging + 1));
linphone_core_transfer_call_to_another(marie->lc, marie_call_pauline, marie_call_laure);
linphone_call_transfer_to_another(marie_call_pauline, marie_call_laure);
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallRefered, 1, 2000));
/* pauline pausing marie */
......@@ -705,7 +705,7 @@ static void call_transfer_existing_ringing_call(void) {
for (calls = linphone_core_get_calls(laure->lc); calls != NULL; calls = calls->next) {
lcall = (LinphoneCall*)calls->data;
if (linphone_call_get_state(lcall) == LinphoneCallIncomingReceived) {
linphone_core_accept_call(laure->lc, lcall);
linphone_call_accept(lcall);
break;
}
}
......
......@@ -149,7 +149,7 @@ static void early_media_with_multicast_base(bool_t video) {
/*check video path*/
linphone_call_set_next_video_frame_decoded_callback(linphone_core_get_current_call(pauline->lc),linphone_call_iframe_decoded_cb,pauline->lc);
}
linphone_core_accept_early_media(pauline->lc, linphone_core_get_current_call(pauline->lc));
linphone_call_accept_early_media(linphone_core_get_current_call(pauline->lc));
BC_ASSERT_TRUE( wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallIncomingEarlyMedia,1,2000) );
BC_ASSERT_TRUE( wait_for_list(lcs, &marie->stat.number_of_LinphoneCallOutgoingEarlyMedia,1,2000) );
......@@ -160,7 +160,7 @@ static void early_media_with_multicast_base(bool_t video) {
/*check video path*/
linphone_call_set_next_video_frame_decoded_callback(linphone_core_get_current_call(pauline2->lc),linphone_call_iframe_decoded_cb,pauline2->lc);
}
linphone_core_accept_early_media(pauline2->lc, linphone_core_get_current_call(pauline2->lc));
linphone_call_accept_early_media(linphone_core_get_current_call(pauline2->lc));
BC_ASSERT_TRUE( wait_for_list(lcs, &pauline2->stat.number_of_LinphoneCallIncomingEarlyMedia,1,2000) );
}
......@@ -185,7 +185,7 @@ static void early_media_with_multicast_base(bool_t video) {
BC_ASSERT_TRUE( wait_for_list(lcs,&pauline2->stat.number_of_IframeDecoded,1,2000));
}
linphone_core_accept_call(pauline->lc, linphone_core_get_current_call(pauline->lc));
linphone_call_accept(linphone_core_get_current_call(pauline->lc));
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallConnected, 1,1000));
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallStreamsRunning, 1,1000));
......@@ -206,9 +206,7 @@ static void early_media_with_multicast_base(bool_t video) {
linphone_core_enable_video_capture(marie->lc, TRUE);
linphone_core_enable_video_display(marie->lc, TRUE);
linphone_core_update_call( pauline->lc
, linphone_core_get_current_call(pauline->lc)
, params);
linphone_call_update(linphone_core_get_current_call(pauline->lc), params);
linphone_call_params_unref(params);
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2,1000));
......
This diff is collapsed.
This diff is collapsed.
......@@ -132,7 +132,7 @@ static void sip_update_within_icoming_reinvite_with_no_sdp(void) {
if (sipp_out) {
BC_ASSERT_TRUE(wait_for(mgr->lc, mgr->lc, &mgr->stat.number_of_LinphoneCallIncomingReceived, 1));
linphone_core_accept_call(mgr->lc, linphone_core_get_current_call(mgr->lc));
linphone_call_accept(linphone_core_get_current_call(mgr->lc));
BC_ASSERT_TRUE(wait_for(mgr->lc, mgr->lc, &mgr->stat.number_of_LinphoneCallStreamsRunning, 2));
BC_ASSERT_TRUE(wait_for(mgr->lc, mgr->lc, &mgr->stat.number_of_LinphoneCallEnd, 1));
pclose(sipp_out);
......@@ -165,7 +165,7 @@ static void call_with_audio_mline_before_video_in_sdp(void) {
call = linphone_core_get_current_call(mgr->lc);