9#import <Foundation/Foundation.h>
12NS_ASSUME_NONNULL_BEGIN
73typedef void(^
NIMImportRecentSessionsBlock)(NSError * __nullable error, NSArray<NIMImportedRecentSession *> * __nullable failedImportedRecentSessions);
173 NSArray<NIMRecentSession *> * __nullable recentSessions,
246@protocol NIMConversationManagerDelegate <NSObject>
256- (void)didLoadAllRecentSessionCompletion;
267 totalUnreadCount:(NSInteger)totalUnreadCount;
290 totalUnreadCount:(NSInteger)totalUnreadCount;
311 totalUnreadCount:(NSInteger)totalUnreadCount;
318- (void)didUpdateUnreadCountDic:(NSDictionary *)unreadCountDic;
325- (void)messagesDeletedInSession:(
NIMSession *)session;
330- (void)allMessagesDeleted;
341- (void)allMessagesRead;
364- (void)onRecvMessageDeleted:(
NIMMessage *)message ext:(nullable NSString *)ext __attribute__((deprecated("请使用 - onRecvMessagesDeleted: exts:")));
372- (void)onRecvMessagesDeleted:(NSArray<
NIMMessage *> *)messages exts:(nullable NSDictionary<NSString *, NSString *> *)exts;
385- (void)onMarkMessageReadCompleteInSession:(
NIMSession *)session error:(nullable NSError *)error;
391- (void)onBatchMarkMessagesReadInSessions:(NSArray<
NIMSession *> *)sessions;
404@protocol NIMExportMessageDelegate <NSObject>
414- (BOOL)shouldExportMessage:(
NIMMessage *)message;
421- (void)onMessageWillExport:(
NIMMessage *)message;
428@protocol NIMImportMessageDelegate <NSObject>
438- (BOOL)shouldImportMessage:(
NIMMessage *)message;
445- (void)onMessageWillImport:(
NIMMessage *)message;
452@protocol NIMConversationManager <NSObject>
477- (void)deleteMessageFromServer:(
NIMMessage *)message
478 ext:(nullable NSString *)ext
487- (void)deleteAllmessagesInSession:(
NIMSession *)session
506- (void)deleteMessagesInSession:(
NIMSession *)session
517- (void)deleteAllRemoteMessagesInSession:(
NIMSession *)session
528- (void)deleteRemoteMessages:(NSArray<
NIMMessage *> *)messages
529 exts:(nullable NSDictionary<NSString *,NSString *> *)exts
538- (void)addEmptyRecentSessionBySession:(
NIMSession *)session;
547- (void)addEmptyRecentSessionBySession:(
NIMSession *)session
573- (void)markAllMessagesRead;
588- (void)batchMarkMessagesReadInSessions:(NSArray<
NIMSession *> *)sessions;
604- (void)markAllMessagesReadInSession:(
NIMSession *)session;
666 limit:(NSInteger)limit;
676- (void)messagesInSession:(
NIMSession *)session
678 limit:(NSInteger)limit
700 messageIds:(NSArray<NSString *> *)messageIds;
707- (NSInteger)allUnreadCount;
723- (NSInteger)allUnreadCount:(BOOL)notify;
726- (NSArray *)allUnreadMessagesInSession: (
NIMSession *)session;
778- (void)fetchServerSessionBySession:(
NIMSession *)session
791- (void)updateServerSessionExt:(NSString *)ext
802- (void)deleteServerSessions:(NSArray<
NIMSession *> *)sessions
815- (void)fetchMessageHistory:(
NIMSession *)session
831- (void)retrieveServerMessages:(
NIMSession *)session
889- (void)deleteRemoteSessions:(NSArray<
NIMSession *> *)sessions
900- (void)deleteSelfRemoteSession:(
NIMSession *)session
911- (void)updateRecentLocalExt:(nullable NSDictionary *)ext
922- (void)exportMeessageInfosWithDelegate:(
id<NIMExportMessageDelegate>)delegate
935- (void)importMessageInfosAtPath:(NSString *)infoFilePath
936 delegate:(
id<NIMImportMessageDelegate>)delegate
944- (void)cancelMigrateMessages;
971- (
NIMMessage *)decodeMessageFromData:(NSData *)encodeData;
980- (NSData *)encodeMessageToData:(
NIMMessage *)message;
983#pragma mark - 漫游消息未完整会话接口
991- (void)incompleteSessionInfoBySession:(
NIMSession *)session
1006- (void)updateIncompleteSessions:(NSArray<
NIMMessage *> *)messages
1014- (void)removeIncompleteSessionInfoBySession:(
NIMSession *)session;
1019- (void)removeAllIncompleteSessionInfos;
1027- (void)addDelegate:(
id<NIMConversationManagerDelegate>)delegate;
1034- (void)removeDelegate:(
id<NIMConversationManagerDelegate>)delegate;
1038NS_ASSUME_NONNULL_END
void(^ NIMRemoteRecentSessionBlock)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:190
NIMClearMessagesStatus
Definition: NIMConversationManagerProtocol.h:237
@ NIMClearMessagesStatusServerFailed
Definition: NIMConversationManagerProtocol.h:240
@ NIMClearMessagesStatusServerCleared
Definition: NIMConversationManagerProtocol.h:239
@ NIMClearMessagesStatusLocalCleared
Definition: NIMConversationManagerProtocol.h:238
void(^ NIMUpdateMigrateMessageCompletion)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:153
void(^ NIMRetrieveServerMessagesBlock)(NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
Definition: NIMConversationManagerProtocol.h:51
void(^ NIMSendACKSessionsBlock)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:223
void(^ NIMImportRecentSessionsBlock)(NSError *__nullable error, NSArray< NIMImportedRecentSession * > *__nullable failedImportedRecentSessions)
Definition: NIMConversationManagerProtocol.h:73
void(^ NIMSessionDeleteAllRemoteMessagesCompletionBlock)(NSError *_Nullable error)
Definition: NIMConversationManagerProtocol.h:95
void(^ NIMIncompleteSessionsBlock)(NSError *__nullable error, NSArray< NIMIncompleteSessionInfo * > *__nullable result)
Definition: NIMConversationManagerProtocol.h:208
void(^ NIMImportMessageCompletion)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:146
void(^ NIMGetMessagesDynamicallyBlock)(NSError *__nullable error, BOOL isReliable, NSArray< NIMMessage * > *__nullable messages)
Definition: NIMConversationManagerProtocol.h:232
void(^ NIMDeleteRemoteMessagesCompletionBlock)(NSError *_Nullable error)
Definition: NIMConversationManagerProtocol.h:100
void(^ NIMUpdateMessageBlock)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:65
void(^ NIMRemoveRemoteMessageBlock)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:81
void(^ NIMBatchSendACKSessionsBlock)(NSError *__nullable error, NSArray< NIMSession * > *_Nullable sessions)
Definition: NIMConversationManagerProtocol.h:216
void(^ NIMUpdateIncompleteSessionsBlock)(NSError *__nullable error, NSArray< NIMImportedRecentSession * > *__nullable faileds)
Definition: NIMConversationManagerProtocol.h:200
void(^ NIMRemoveRemoteSessionBlock)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:88
void(^ NIMFetchMigrateMessageCompletion)(NSError *__nullable error, NSString *__nullable remoteFilePath, NSString *__nullable secureKey)
Definition: NIMConversationManagerProtocol.h:162
void(^ NIMFetchRecentSessionHistoryBlock)(NSError *__nullable error, NIMRecentSession *_Nullable recentSession)
Definition: NIMConversationManagerProtocol.h:182
void(^ NIMImportMessageProgress)(float progress)
Definition: NIMConversationManagerProtocol.h:139
void(^ NIMExportMessageComletion)(NSError *__nullable error, NSString *__nullable resultFilePath)
Definition: NIMConversationManagerProtocol.h:132
void(^ NIMBatchDeleteMessagesBlock)(NSError *__nullable error)
Definition: NIMConversationManagerProtocol.h:58
void(^ NIMGlobalSearchMessageBlock)(NSError *__nullable error, NSDictionary< NIMSession *, NSArray< NIMMessage * > * > *__nullable messages)
Definition: NIMConversationManagerProtocol.h:117
void(^ NIMExportMessageProgress)(float progress)
Definition: NIMConversationManagerProtocol.h:124
void(^ NIMSearchMessageBlock)(NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
Definition: NIMConversationManagerProtocol.h:109
void(^ NIMFetchMessageHistoryBlock)(NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
Definition: NIMConversationManagerProtocol.h:43
void(^ NIMFetchRecentSessionsHistoryBlock)(NSError *__nullable error, NSArray< NIMRecentSession * > *__nullable recentSessions, BOOL hasMore)
Definition: NIMConversationManagerProtocol.h:172
NIMSessionType
Definition: NIMSession.h:17
Definition: NIMAddEmptyRecentSessionBySessionOption.h:11
Definition: NIMBatchDeleteMessagesOption.h:17
Definition: NIMClearMessagesOption.h:17
Definition: NIMDeleteMessageOption.h:14
Definition: NIMDeleteMessagesOption.h:17
Definition: NIMDeleteRecentSessionOption.h:14
Definition: NIMRecentSession.h:102
Definition: NIMMessageSearchOption.h:367
Definition: NIMMessageSearchOption.h:111
Definition: NIMImportedRecentSession.h:19
Definition: NIMIncompleteSessionInfo.h:17
Definition: NIMMessageSearchOption.h:230
Definition: NIMMessageSearchOption.h:304
Definition: NIMMessage.h:91
Definition: NIMMessageReceipt.h:21
Definition: NIMMessageSearchOption.h:46
Definition: NIMMessageSearchOption.h:193
Definition: NIMRecentSession.h:37
Definition: NIMRecentSession.h:88
Definition: NIMSessionDeleteAllRemoteMessagesInfo.h:16
Definition: NIMSessionDeleteAllRemoteMessagesOptions.h:14
Definition: NIMSession.h:49
Definition: NIMTeamMessageReceiptDetail.h:19