NIMSDK-iOS
载入中...
搜索中...
未找到
NIMConversationManagerProtocol.h 文件参考
#import <Foundation/Foundation.h>
#import "NIMSession.h"

浏览源代码.

protocol  <NIMConversationManagerDelegate>
 
protocol  <NIMExportMessageDelegate>
 
protocol  <NIMImportMessageDelegate>
 
protocol  <NIMConversationManager>
 

类型定义

typedef void(^ NIMFetchMessageHistoryBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
 
typedef void(^ NIMRetrieveServerMessagesBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
 
typedef void(^ NIMBatchDeleteMessagesBlock) (NSError *__nullable error)
 
typedef void(^ NIMUpdateMessageBlock) (NSError *__nullable error)
 
typedef void(^ NIMImportRecentSessionsBlock) (NSError *__nullable error, NSArray< NIMImportedRecentSession * > *__nullable failedImportedRecentSessions)
 
typedef void(^ NIMRemoveRemoteMessageBlock) (NSError *__nullable error)
 
typedef void(^ NIMRemoveRemoteSessionBlock) (NSError *__nullable error)
 
typedef void(^ NIMSessionDeleteAllRemoteMessagesCompletionBlock) (NSError *_Nullable error)
 
typedef void(^ NIMDeleteRemoteMessagesCompletionBlock) (NSError *_Nullable error)
 
typedef void(^ NIMSearchMessageBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
 
typedef void(^ NIMGlobalSearchMessageBlock) (NSError *__nullable error, NSDictionary< NIMSession *, NSArray< NIMMessage * > * > *__nullable messages)
 
typedef void(^ NIMExportMessageProgress) (float progress)
 
typedef void(^ NIMExportMessageComletion) (NSError *__nullable error, NSString *__nullable resultFilePath)
 
typedef void(^ NIMImportMessageProgress) (float progress)
 
typedef void(^ NIMImportMessageCompletion) (NSError *__nullable error)
 
typedef void(^ NIMUpdateMigrateMessageCompletion) (NSError *__nullable error)
 
typedef void(^ NIMFetchMigrateMessageCompletion) (NSError *__nullable error, NSString *__nullable remoteFilePath, NSString *__nullable secureKey)
 
typedef void(^ NIMFetchRecentSessionsHistoryBlock) (NSError *__nullable error, NSArray< NIMRecentSession * > *__nullable recentSessions, BOOL hasMore)
 
typedef void(^ NIMFetchRecentSessionHistoryBlock) (NSError *__nullable error, NIMRecentSession *_Nullable recentSession)
 
typedef void(^ NIMRemoteRecentSessionBlock) (NSError *__nullable error)
 
typedef void(^ NIMUpdateIncompleteSessionsBlock) (NSError *__nullable error, NSArray< NIMImportedRecentSession * > *__nullable faileds)
 
typedef void(^ NIMIncompleteSessionsBlock) (NSError *__nullable error, NSArray< NIMIncompleteSessionInfo * > *__nullable result)
 
typedef void(^ NIMBatchSendACKSessionsBlock) (NSError *__nullable error, NSArray< NIMSession * > *_Nullable sessions)
 
typedef void(^ NIMSendACKSessionsBlock) (NSError *__nullable error)
 
typedef void(^ NIMGetMessagesDynamicallyBlock) (NSError *__nullable error, BOOL isReliable, NSArray< NIMMessage * > *__nullable messages)
 

枚举

enum  NIMClearMessagesStatus { NIMClearMessagesStatusLocalCleared = 0 , NIMClearMessagesStatusServerCleared , NIMClearMessagesStatusServerFailed }
 

类型定义说明

◆ NIMBatchDeleteMessagesBlock

typedef void(^ NIMBatchDeleteMessagesBlock) (NSError *__nullable error)

删除本地消息记录block

参数
error错误,如果成功则error为nil

◆ NIMBatchSendACKSessionsBlock

typedef void(^ NIMBatchSendACKSessionsBlock) (NSError *__nullable error, NSArray< NIMSession * > *_Nullable sessions)

批量发送会话已读回调

参数
error错误,如果成功则error为nil
result发送失败的会话

◆ NIMDeleteRemoteMessagesCompletionBlock

typedef void(^ NIMDeleteRemoteMessagesCompletionBlock) (NSError *_Nullable error)

批量单向删除消息的回调block

◆ NIMExportMessageComletion

typedef void(^ NIMExportMessageComletion) (NSError *__nullable error, NSString *__nullable resultFilePath)

导出历史消息完成回调

参数
error错误,如果成功则为 nil
resultFilePath如果成功,则为结果文件路径

◆ NIMExportMessageProgress

typedef void(^ NIMExportMessageProgress) (float progress)

导出历史消息进度回调

参数
progress进度 0-100

◆ NIMFetchMessageHistoryBlock

typedef void(^ NIMFetchMessageHistoryBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)

读取服务器消息记录block

参数
error错误,如果成功则error为nil
messages读取的消息列表

◆ NIMFetchMigrateMessageCompletion

typedef void(^ NIMFetchMigrateMessageCompletion) (NSError *__nullable error, NSString *__nullable remoteFilePath, NSString *__nullable secureKey)

获取历史备份文件结果回调

参数
error错误,如果成功则为 nil
remoteFilePath备份文件远端路径
secureKey备份文件解密的 key

◆ NIMFetchRecentSessionHistoryBlock

typedef void(^ NIMFetchRecentSessionHistoryBlock) (NSError *__nullable error, NIMRecentSession *_Nullable recentSession)

读取服务器会话block

参数
error错误,如果成功则error为nil
recentSession结果会话

◆ NIMFetchRecentSessionsHistoryBlock

typedef void(^ NIMFetchRecentSessionsHistoryBlock) (NSError *__nullable error, NSArray< NIMRecentSession * > *__nullable recentSessions, BOOL hasMore)

读取服务器会话列表block

参数
error错误,如果成功则error为nil
recentSessions读取的消息列表
hasMore最小时间戳只有请求第一页时会返回这个参数,表示下一次增量同步时带在请求参数里

◆ NIMGetMessagesDynamicallyBlock

typedef void(^ NIMGetMessagesDynamicallyBlock) (NSError *__nullable error, BOOL isReliable, NSArray< NIMMessage * > *__nullable messages)

动态获取消息的回调

参数
error错误,如果成功则error为nil
isReliable是否可靠(是否一定符合输入条件的)
messages消息

◆ NIMGlobalSearchMessageBlock

typedef void(^ NIMGlobalSearchMessageBlock) (NSError *__nullable error, NSDictionary< NIMSession *, NSArray< NIMMessage * > * > *__nullable messages)

全局搜索本地消息记录Block

参数
error错误,如果成功则error为nil
messages读取的消息列表

◆ NIMImportMessageCompletion

typedef void(^ NIMImportMessageCompletion) (NSError *__nullable error)

导入历史消息完成回调

参数
error错误,如果成功则为 nil

◆ NIMImportMessageProgress

typedef void(^ NIMImportMessageProgress) (float progress)

导入历史消息进度回调

参数
progress进度 0-100

◆ NIMImportRecentSessionsBlock

typedef void(^ NIMImportRecentSessionsBlock) (NSError *__nullable error, NSArray< NIMImportedRecentSession * > *__nullable failedImportedRecentSessions)

导入本地最近会话 Block

参数
error错误,如果成功则error为nil
failedImportedRecentSessions导入失败的最近会话

◆ NIMIncompleteSessionsBlock

typedef void(^ NIMIncompleteSessionsBlock) (NSError *__nullable error, NSArray< NIMIncompleteSessionInfo * > *__nullable result)

未完整会话信息

参数
error错误,如果成功则error为nil
result更新失败的会话

◆ NIMRemoteRecentSessionBlock

typedef void(^ NIMRemoteRecentSessionBlock) (NSError *__nullable error)

更新服务端端会话扩展

参数
error错误,如果成功则error为nil

◆ NIMRemoveRemoteMessageBlock

typedef void(^ NIMRemoveRemoteMessageBlock) (NSError *__nullable error)

标记远端会话Block

参数
error错误,如果成功则error为nil

◆ NIMRemoveRemoteSessionBlock

typedef void(^ NIMRemoveRemoteSessionBlock) (NSError *__nullable error)

标记远端会话Block

参数
error错误,如果成功则error为nil

◆ NIMRetrieveServerMessagesBlock

typedef void(^ NIMRetrieveServerMessagesBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)

服务器消息检索记录block

参数
error错误,如果成功则error为nil
messages读取的消息列表

◆ NIMSearchMessageBlock

typedef void(^ NIMSearchMessageBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)

搜索本地消息记录Block

参数
error错误,如果成功则error为nil
messages读取的消息列表 @discussion 只有在传入参数错误时才会有error产生

◆ NIMSendACKSessionsBlock

typedef void(^ NIMSendACKSessionsBlock) (NSError *__nullable error)

发送会话已读回调

参数
error错误,如果成功则error为nil

◆ NIMSessionDeleteAllRemoteMessagesCompletionBlock

typedef void(^ NIMSessionDeleteAllRemoteMessagesCompletionBlock) (NSError *_Nullable error)

清空历史消息block

参数
error错误,如果成功则error为nil

◆ NIMUpdateIncompleteSessionsBlock

typedef void(^ NIMUpdateIncompleteSessionsBlock) (NSError *__nullable error, NSArray< NIMImportedRecentSession * > *__nullable faileds)

批量更新未完整会话列表

参数
error错误,如果成功则error为nil
faileds更新失败的会话

◆ NIMUpdateMessageBlock

typedef void(^ NIMUpdateMessageBlock) (NSError *__nullable error)

更新本地消息 Block

参数
error错误,如果成功则error为nil

◆ NIMUpdateMigrateMessageCompletion

typedef void(^ NIMUpdateMigrateMessageCompletion) (NSError *__nullable error)

更新服务器历史备份文件结果回调

参数
error错误,如果成功则为 nil

枚举类型说明

◆ NIMClearMessagesStatus

清空会话消息完成时状态回调

枚举值
NIMClearMessagesStatusLocalCleared 
NIMClearMessagesStatusServerCleared 
NIMClearMessagesStatusServerFailed