diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index bd9763a04..3401ed6ac 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -378,9 +378,9 @@ static UICompositeViewDescription *compositeDescription = nil; } // we must ref & unref message because in case of error, it will be destroy otherwise - linphone_chat_room_send_chat_message(_chatRoom, msg); + linphone_chat_message_send(msg); - if (linphone_core_lime_enabled(LC) == LinphoneLimeMandatory && !linphone_chat_room_lime_available(_chatRoom)) { + if (linphone_core_lime_x3dh_enabled(LC) && !linphone_chat_room_lime_available(_chatRoom)) { [LinphoneManager.instance alertLIME:_chatRoom]; } diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index 660dd0afd..4b0e60206 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -212,7 +212,7 @@ default: break; } - linphone_address_destroy(proxy_addr); + linphone_address_unref(proxy_addr); [self setCString:tname forKey:@"account_transport_preference"]; } @@ -429,7 +429,7 @@ if (parsed != NULL) { [self setCString:linphone_address_get_display_name(parsed) forKey:@"primary_displayname_preference"]; [self setCString:linphone_address_get_username(parsed) forKey:@"primary_username_preference"]; - linphone_address_destroy(parsed); + linphone_address_unref(parsed); } } @@ -629,7 +629,7 @@ linphone_proxy_config_get_domain(proxyCfg)); } - linphone_address_destroy(from); + linphone_address_unref(from); linphone_core_add_auth_info(LC, info); linphone_auth_info_destroy(info); ms_free(realm); diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 728db0d97..806afe63e 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -2437,9 +2437,9 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { - (void)send:(NSString *)replyText toChatRoom:(LinphoneChatRoom *)room { LinphoneChatMessage *msg = linphone_chat_room_create_message(room, replyText.UTF8String); - linphone_chat_room_send_chat_message(room, msg); + linphone_chat_message_send(msg); - if (linphone_core_lime_enabled(LC) == LinphoneLimeMandatory && !linphone_chat_room_lime_available(room)) + if (linphone_core_lime_x3dh_enabled(LC) && !linphone_chat_room_lime_available(room)) [LinphoneManager.instance alertLIME:room]; [ChatConversationView markAsRead:room]; diff --git a/Classes/LinphoneUI/UICallButton.m b/Classes/LinphoneUI/UICallButton.m index b31256721..6d1bab3d6 100644 --- a/Classes/LinphoneUI/UICallButton.m +++ b/Classes/LinphoneUI/UICallButton.m @@ -89,7 +89,7 @@ LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:address]; [LinphoneManager.instance call:addr]; if (addr) - linphone_address_destroy(addr); + linphone_address_unref(addr); } } diff --git a/Classes/LinphoneUI/UICamSwitch.m b/Classes/LinphoneUI/UICamSwitch.m index b7493fd57..7730f625e 100644 --- a/Classes/LinphoneUI/UICamSwitch.m +++ b/Classes/LinphoneUI/UICamSwitch.m @@ -52,7 +52,7 @@ INIT_WITH_COMMON_CF { linphone_core_set_video_device(LC, newCamId); LinphoneCall *call = linphone_core_get_current_call(LC); if (call != NULL) { - linphone_core_update_call(LC, call, NULL); + linphone_call_update(call, NULL); } } } diff --git a/Classes/LinphoneUI/UIContactDetailsCell.m b/Classes/LinphoneUI/UIContactDetailsCell.m index 74dac0352..4610e1eaa 100644 --- a/Classes/LinphoneUI/UIContactDetailsCell.m +++ b/Classes/LinphoneUI/UIContactDetailsCell.m @@ -75,7 +75,7 @@ } if (addr) { - linphone_address_destroy(addr); + linphone_address_unref(addr); } } @@ -113,7 +113,7 @@ } if (addr) { - linphone_address_destroy(addr); + linphone_address_unref(addr); } } @@ -147,19 +147,19 @@ LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:_addressLabel.text]; [LinphoneManager.instance call:addr]; if (addr) - linphone_address_destroy(addr); + linphone_address_unref(addr); } - (IBAction)onChatClick:(id)event { LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:_addressLabel.text]; [PhoneMainView.instance getOrCreateOneToOneChatRoom:addr waitView:_waitView isEncrypted:FALSE]; - linphone_address_destroy(addr); + linphone_address_unref(addr); } - (IBAction)onEncrptedChatClick:(id)sender { LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:_addressLabel.text]; [PhoneMainView.instance getOrCreateOneToOneChatRoom:addr waitView:_waitView isEncrypted:TRUE]; - linphone_address_destroy(addr); + linphone_address_unref(addr); } - (IBAction)onDeleteClick:(id)sender { diff --git a/Classes/LinphoneUI/UIVideoButton.m b/Classes/LinphoneUI/UIVideoButton.m index 6e36247b1..c0431b6bd 100644 --- a/Classes/LinphoneUI/UIVideoButton.m +++ b/Classes/LinphoneUI/UIVideoButton.m @@ -47,8 +47,8 @@ INIT_WITH_COMMON_CF { TRUE; /* will be used later to notify user if video was not activated because of the linphone core*/ LinphoneCallParams *call_params = linphone_core_create_call_params(LC,call); linphone_call_params_enable_video(call_params, TRUE); - linphone_core_update_call(LC, call, call_params); - linphone_call_params_destroy(call_params); + linphone_call_update(call, call_params); + linphone_call_params_unref(call_params); } else { LOGW(@"Cannot toggle video button, because no current call"); } diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 606ac1568..3c421795d 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -833,7 +833,7 @@ static RootViewManager *rootViewManagerInstance = nil; linphone_core_create_call_params(LC,call); // stop video linphone_call_params_enable_video(params, FALSE); - linphone_core_update_call(LC, call, params); + linphone_call_update(call, params); }]; [sheet showInView:self.view]; callData->batteryWarningShown = TRUE; diff --git a/Classes/SideMenuView.m b/Classes/SideMenuView.m index 501198d43..483d9e150 100644 --- a/Classes/SideMenuView.m +++ b/Classes/SideMenuView.m @@ -66,7 +66,7 @@ if (default_proxy != NULL) { const LinphoneAddress *addr = linphone_proxy_config_get_identity_address(default_proxy); [ContactDisplay setDisplayNameLabel:_nameLabel forAddress:addr]; - _addressLabel.text = [NSString stringWithUTF8String:linphone_proxy_config_get_identity(default_proxy)]; + _addressLabel.text = addr? [NSString stringWithUTF8String:linphone_address_as_string(addr)] : NSLocalizedString(@"No address", nil); _presenceImage.image = [StatusBarView imageForState:linphone_proxy_config_get_state(default_proxy)]; } else { _nameLabel.text = linphone_core_get_proxy_config_list(LC) ? NSLocalizedString(@"No default account", nil) : NSLocalizedString(@"No account", nil); @@ -76,7 +76,7 @@ char *as_string = linphone_address_as_string(addr); _addressLabel.text = [NSString stringWithFormat:@"%s", as_string]; ms_free(as_string); - linphone_address_destroy(addr); + linphone_address_unref(addr); } else { _addressLabel.text = NSLocalizedString(@"No address", nil); } diff --git a/Classes/Utils/FileTransferDelegate.m b/Classes/Utils/FileTransferDelegate.m index 7ac5b11be..acc1faf2b 100644 --- a/Classes/Utils/FileTransferDelegate.m +++ b/Classes/Utils/FileTransferDelegate.m @@ -289,9 +289,9 @@ static LinphoneBuffer *linphone_iphone_file_transfer_send(LinphoneChatMessage *m [LinphoneManager setValueInMessageAppData:qualityData forKey:@"uploadQuality" inMessage:_message]; LOGI(@"%p Uploading content from message %p", self, _message); - linphone_chat_room_send_chat_message(chatRoom, _message); + linphone_chat_message_send(_message); - if (linphone_core_lime_enabled(LC) == LinphoneLimeMandatory && !linphone_chat_room_lime_available(chatRoom)) { + if (linphone_core_lime_x3dh_enabled(LC) && !linphone_chat_room_lime_available(chatRoom)) { [LinphoneManager.instance alertLIME:chatRoom]; } } diff --git a/Classes/Utils/Utils.m b/Classes/Utils/Utils.m index d4d751714..116bb13d1 100644 --- a/Classes/Utils/Utils.m +++ b/Classes/Utils/Utils.m @@ -476,7 +476,7 @@ if (contact) { LinphoneAddress *contact_addr = linphone_address_new(contact); if (contact_addr) { - linphone_address_destroy(addr); + linphone_address_unref(addr); return contact_addr; } }