mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
not use deprecated functions
This commit is contained in:
parent
a88c501154
commit
0fdfc24b44
11 changed files with 22 additions and 22 deletions
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:address];
|
||||
[LinphoneManager.instance call:addr];
|
||||
if (addr)
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue