diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index e5a82f276..2b34ba9e1 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -2137,19 +2137,19 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { // TODO PAUL : fonctions a enlever + (NSString *)preferenceFile:(NSString *)file { LinphoneFactory *factory = linphone_factory_get(); - NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_config_path(factory, kLinphoneMsgNotificationGroupId.UTF8String)]; + NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_config_dir(factory, kLinphoneMsgNotificationGroupId.UTF8String)]; return [fullPath stringByAppendingPathComponent:file]; } + (NSString *)dataFile:(NSString *)file { LinphoneFactory *factory = linphone_factory_get(); - NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_data_path(factory, kLinphoneMsgNotificationGroupId.UTF8String)]; + NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_data_dir(factory, kLinphoneMsgNotificationGroupId.UTF8String)]; return [fullPath stringByAppendingPathComponent:file]; } + (NSString *)cacheDirectory { LinphoneFactory *factory = linphone_factory_get(); - NSString *cachePath = [NSString stringWithUTF8String:linphone_factory_get_download_path(factory, kLinphoneMsgNotificationGroupId.UTF8String)]; + NSString *cachePath = [NSString stringWithUTF8String:linphone_factory_get_download_dir(factory, kLinphoneMsgNotificationGroupId.UTF8String)]; BOOL isDir = NO; NSError *error; // cache directory must be created if not existing @@ -2165,14 +2165,14 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { + (NSString *)oldPreferenceFile:(NSString *)file { // migration LinphoneFactory *factory = linphone_factory_get(); - NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_config_path(factory, nil)]; + NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_config_dir(factory, nil)]; return [fullPath stringByAppendingPathComponent:file]; } + (NSString *)oldDataFile:(NSString *)file { // migration LinphoneFactory *factory = linphone_factory_get(); - NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_data_path(factory, nil)]; + NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_data_dir(factory, nil)]; return [fullPath stringByAppendingPathComponent:file]; } diff --git a/msgNotification/Utils.swift b/msgNotification/Utils.swift index b71cf93af..66954a4c8 100644 --- a/msgNotification/Utils.swift +++ b/msgNotification/Utils.swift @@ -32,7 +32,7 @@ class LinphoneLoggingServiceManager: LoggingServiceDelegate { let debugEnabled = (debugLevel >= LogLevel.Debug.rawValue && debugLevel < LogLevel.Error.rawValue) if (debugEnabled) { - Factory.Instance.logCollectionPath = Factory.Instance.getDownloadPath(context: UnsafeMutablePointer(mutating: (GROUP_ID as NSString).utf8String)) + Factory.Instance.logCollectionPath = Factory.Instance.getDownloadDir(context: UnsafeMutablePointer(mutating: (GROUP_ID as NSString).utf8String)) Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled) log.domain = domain log.logLevel = LogLevel(rawValue: debugLevel) diff --git a/msgNotificationService/NotificationService.swift b/msgNotificationService/NotificationService.swift index 25be51be1..079b1979a 100644 --- a/msgNotificationService/NotificationService.swift +++ b/msgNotificationService/NotificationService.swift @@ -51,7 +51,7 @@ class NotificationService: UNNotificationServiceExtension { if let chatRoomInviteAddr = bestAttemptContent.userInfo["chat-room-addr"] as? String, !chatRoomInviteAddr.isEmpty { NotificationService.log.message(msg: "fetch chat room for invite, addr: \(chatRoomInviteAddr)") - let chatRoom = lc!.getPushNotificationChatRoomInvite(chatRoomAddr: chatRoomInviteAddr) + let chatRoom = lc!.getNewChatRoomFromConfAddr(chatRoomAddr: chatRoomInviteAddr) if let chatRoom = chatRoom { stopCore() @@ -68,7 +68,7 @@ class NotificationService: UNNotificationServiceExtension { } } else if let callId = bestAttemptContent.userInfo["call-id"] as? String { NotificationService.log.message(msg: "fetch msg") - let message = lc!.getPushNotificationMessage(callId: callId) + let message = lc!.getNewMessageFromCallid(callId: callId) if let message = message, let chatRoom = message.chatRoom { let msgData = parseMessage(room: chatRoom, message: message)