diff --git a/Classes/CallOutgoingView.m b/Classes/CallOutgoingView.m index 3cce9420e..a18ebff95 100644 --- a/Classes/CallOutgoingView.m +++ b/Classes/CallOutgoingView.m @@ -121,19 +121,7 @@ static UICompositeViewDescription *compositeDescription = nil; - (IBAction)onDeclineClick:(id)sender { LinphoneCall *call = linphone_core_get_current_call(LC); if (call) { - /*if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_9_x_Max) { - NSUUID *uuid = [LinphoneManager.instance.providerDelegate.uuids objectForKey:[NSString - stringWithUTF8String:linphone_call_log_get_call_id(linphone_call_get_call_log(call))]]; - if(!uuid) { - linphone_core_terminate_call(LC, call); - return; - } - CXEndCallAction *act = [[CXEndCallAction alloc] initWithCallUUID:uuid]; - CXTransaction *tr = [[CXTransaction alloc] initWithAction:act]; - [LinphoneManager.instance.providerDelegate.controller requestTransaction:tr completion:^(NSError *err){}]; - } else {*/ - linphone_core_terminate_call(LC, call); - //} + linphone_call_terminate(call); } } diff --git a/Classes/CallView.m b/Classes/CallView.m index 18f53aa60..94744a9e9 100644 --- a/Classes/CallView.m +++ b/Classes/CallView.m @@ -630,7 +630,7 @@ static void hideSpinner(LinphoneCall *call, void *user_data) { LOGI(@"User declined video proposal"); if (call == linphone_core_get_current_call(LC)) { LinphoneCallParams *params = linphone_core_create_call_params(LC, call); - linphone_core_accept_call_update(LC, call, params); + linphone_call_accept_update(call, params); linphone_call_params_destroy(params); [videoDismissTimer invalidate]; videoDismissTimer = nil; @@ -641,7 +641,7 @@ static void hideSpinner(LinphoneCall *call, void *user_data) { if (call == linphone_core_get_current_call(LC)) { LinphoneCallParams *params = linphone_core_create_call_params(LC, call); linphone_call_params_enable_video(params, TRUE); - linphone_core_accept_call_update(LC, call, params); + linphone_call_accept_update(call, params); linphone_call_params_destroy(params); [videoDismissTimer invalidate]; videoDismissTimer = nil; diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 20ccfe720..eefab7b09 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -117,7 +117,7 @@ } if ((floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max)) { if ([LinphoneManager.instance lpConfigBoolForKey:@"autoanswer_notif_preference"]) { - linphone_core_accept_call(LC, call); + linphone_call_accept(call); [PhoneMainView.instance changeCurrentView:CallView.compositeViewDescription]; } else { [PhoneMainView.instance displayIncomingCall:call]; @@ -724,9 +724,9 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response if ([response.actionIdentifier isEqual:@"Answer"]) { // use the standard handler [PhoneMainView.instance changeCurrentView:CallView.compositeViewDescription]; - linphone_core_accept_call(LC, call); + linphone_call_accept(call); } else if ([response.actionIdentifier isEqual:@"Decline"]) { - linphone_core_decline_call(LC, call, LinphoneReasonDeclined); + linphone_call_decline(call, LinphoneReasonDeclined); } else if ([response.actionIdentifier isEqual:@"Reply"]) { LinphoneCore *lc = [LinphoneManager getLc]; NSString *replyText = [(UNTextInputNotificationResponse *)response userText]; @@ -760,7 +760,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response LOGI(@"User declined video proposal"); if (call == linphone_core_get_current_call(LC)) { LinphoneCallParams *params = linphone_core_create_call_params(LC, call); - linphone_core_accept_call_update(LC, call, params); + linphone_call_accept_update(call, params); linphone_call_params_destroy(params); } } else if ([response.actionIdentifier isEqual:@"Accept"]) { @@ -770,7 +770,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response [PhoneMainView.instance changeCurrentView:CallView.compositeViewDescription]; LinphoneCallParams *params = linphone_core_create_call_params(LC, call); linphone_call_params_enable_video(params, TRUE); - linphone_core_accept_call_update(LC, call, params); + linphone_call_accept_update(call, params); linphone_call_params_destroy(params); } } else if ([response.actionIdentifier isEqual:@"Confirm"]) { @@ -800,7 +800,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response LOGI(@"User declined video proposal"); if (call == linphone_core_get_current_call(LC)) { LinphoneCallParams *params = linphone_core_create_call_params(LC, call); - linphone_core_accept_call_update(LC, call, params); + linphone_call_accept_update(call, params); linphone_call_params_destroy(params); [videoDismissTimer invalidate]; } @@ -810,7 +810,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response if (call == linphone_core_get_current_call(LC)) { LinphoneCallParams *params = linphone_core_create_call_params(LC, call); linphone_call_params_enable_video(params, TRUE); - linphone_core_accept_call_update(LC, call, params); + linphone_call_accept_update(call, params); linphone_call_params_destroy(params); [videoDismissTimer invalidate]; } @@ -886,11 +886,11 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response if ([identifier isEqualToString:@"answer"]) { // use the standard handler [PhoneMainView.instance changeCurrentView:CallView.compositeViewDescription]; - linphone_core_accept_call(LC, call); + linphone_call_accept(call); } else if ([identifier isEqualToString:@"decline"]) { LinphoneCall *call = linphone_core_get_current_call(LC); if (call) - linphone_core_decline_call(LC, call, LinphoneReasonDeclined); + linphone_call_decline(call, LinphoneReasonDeclined); } } else if ([notification.category isEqualToString:@"incoming_msg"]) { if ([identifier isEqualToString:@"reply"]) { @@ -930,11 +930,11 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response if ([identifier isEqualToString:@"answer"]) { // use the standard handler [PhoneMainView.instance changeCurrentView:CallView.compositeViewDescription]; - linphone_core_accept_call(LC, call); + linphone_call_accept(call); } else if ([identifier isEqualToString:@"decline"]) { LinphoneCall *call = linphone_core_get_current_call(LC); if (call) - linphone_core_decline_call(LC, call, LinphoneReasonDeclined); + linphone_call_decline(call, LinphoneReasonDeclined); } } else if ([notification.category isEqualToString:@"incoming_msg"] && [identifier isEqualToString:@"reply_inline"]) { diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index f9b42be15..08cce12d4 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -694,7 +694,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore *lc, const char LOGI(@"Mobile call ongoing... rejecting call from [%s]", tmp); ms_free(tmp); } - linphone_core_decline_call(theLinphoneCore, call, LinphoneReasonBusy); + linphone_call_decline(call, LinphoneReasonBusy); return; } @@ -2453,7 +2453,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { LinphoneCall *c = linphone_core_get_current_call(theLinphoneCore); LOGI(@"Sound interruption detected!"); if (c && linphone_call_get_state(c) == LinphoneCallStreamsRunning) { - linphone_core_pause_call(theLinphoneCore, c); + linphone_call_pause(c); } } @@ -2618,7 +2618,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { } linphone_call_params_enable_video(lcallParams, video); - linphone_core_accept_call_with_params(theLinphoneCore, call, lcallParams); + linphone_call_accept_with_params(call, lcallParams); } - (void)call:(const LinphoneAddress *)iaddr { @@ -2712,7 +2712,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { if (LinphoneManager.instance.nextCallIsTransfer) { char *caddr = linphone_address_as_string(addr); call = linphone_core_get_current_call(theLinphoneCore); - linphone_core_transfer_call(theLinphoneCore, call, caddr); + linphone_call_transfer(call, caddr); LinphoneManager.instance.nextCallIsTransfer = NO; ms_free(caddr); } else { @@ -3043,7 +3043,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { if ([ct currentCalls] != nil) { if (call) { LOGI(@"Pausing SIP call because GSM call"); - linphone_core_pause_call(theLinphoneCore, call); + linphone_call_pause(call); [self startCallPausedLongRunningTask]; } else if (linphone_core_is_in_conference(theLinphoneCore)) { LOGI(@"Leaving conference call because GSM call"); diff --git a/Classes/LinphoneUI/UIHangUpButton.m b/Classes/LinphoneUI/UIHangUpButton.m index 69d4c729d..48bd64528 100644 --- a/Classes/LinphoneUI/UIHangUpButton.m +++ b/Classes/LinphoneUI/UIHangUpButton.m @@ -97,11 +97,11 @@ LinphoneManager.instance.conf = TRUE; linphone_core_terminate_conference(LC); } else if (currentcall != NULL) { - linphone_core_terminate_call(LC, currentcall); + linphone_call_terminate(currentcall); } else { const MSList *calls = linphone_core_get_calls(LC); if (bctbx_list_size(calls) == 1) { // Only one call - linphone_core_terminate_call(LC, (LinphoneCall *)(calls->data)); + linphone_call_terminate((LinphoneCall *)(calls->data)); } } } diff --git a/Classes/LinphoneUI/UIPauseButton.m b/Classes/LinphoneUI/UIPauseButton.m index 9e0254c3c..b7c7ff508 100644 --- a/Classes/LinphoneUI/UIPauseButton.m +++ b/Classes/LinphoneUI/UIPauseButton.m @@ -82,7 +82,7 @@ switch (type) { case UIPauseButtonType_Call: { if (call != nil) { - linphone_core_pause_call(LC, call); + linphone_call_pause(call); } else { LOGW(@"Cannot toggle pause buttton, because no current call"); } @@ -98,7 +98,7 @@ case UIPauseButtonType_CurrentCall: { LinphoneCall *currentCall = [UIPauseButton getCall]; if (currentCall != nil) { - linphone_core_pause_call(LC, currentCall); + linphone_call_pause(currentCall); } else { LOGW(@"Cannot toggle pause buttton, because no current call"); } @@ -111,7 +111,7 @@ switch (type) { case UIPauseButtonType_Call: { if (call != nil) { - linphone_core_resume_call(LC, call); + linphone_call_resume(call); } else { LOGW(@"Cannot toggle pause buttton, because no current call"); } @@ -137,7 +137,7 @@ } case UIPauseButtonType_CurrentCall: { LinphoneCall *currentCall = [UIPauseButton getCall]; - linphone_core_resume_call(LC, currentCall); + linphone_call_resume(currentCall); break; } } diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 7df81214e..aa873f26a 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -389,7 +389,7 @@ static RootViewManager *rootViewManagerInstance = nil; [self popCurrentView]; } } else { - linphone_core_resume_call(LC, (LinphoneCall *)calls->data); + linphone_call_resume((LinphoneCall *)calls->data); [self changeCurrentView:CallView.compositeViewDescription]; } break; @@ -795,7 +795,7 @@ static RootViewManager *rootViewManagerInstance = nil; } - (void)incomingCallDeclined:(LinphoneCall *)call { - linphone_core_terminate_call(LC, call); + linphone_call_terminate(call); } @end diff --git a/Classes/ProviderDelegate.m b/Classes/ProviderDelegate.m index 6bd90c350..232829f31 100644 --- a/Classes/ProviderDelegate.m +++ b/Classes/ProviderDelegate.m @@ -131,7 +131,7 @@ NSString *callID = [self.calls objectForKey:uuid]; LinphoneCall *call = [LinphoneManager.instance callByCallId:callID]; if (call) { - linphone_core_terminate_call(LC, (LinphoneCall *)call); + linphone_call_terminate((LinphoneCall *)call); } } } @@ -167,7 +167,7 @@ LinphoneCall *call = [LinphoneManager.instance callByCallId:callID]; if (call) { if (action.isOnHold) { - linphone_core_pause_call(LC, (LinphoneCall *)call); + linphone_call_pause((LinphoneCall *)call); } else { [self configAudioSession:[AVAudioSession sharedInstance]]; if (linphone_core_get_conference(LC)) { @@ -200,7 +200,7 @@ [LinphoneManager.instance acceptCall:(LinphoneCall *)_pendingCall evenWithVideo:_pendingCallVideo]; break; case LinphoneCallPaused: - linphone_core_resume_call(LC, (LinphoneCall *)_pendingCall); + linphone_call_resume((LinphoneCall *)_pendingCall); break; case LinphoneCallStreamsRunning: // May happen when multiple calls