NIMIndexManager Protocol Reference

Conforms to NSObject
Declared in NIMIndexManagerProtocol.h

Overview

索引协议

– syncMsgIndex:session:completion: required method

同步消息索引

- (void)syncMsgIndex:(BOOL)old session:(nullable NIMSession *)session completion:(nullable NIMSyncMsgIndexBlock)completion

Parameters

old

同步方向,YES往老方向,NO往新方向

session

指定会话,不传表示所有

completion

完成回调

Discussion

同步消息索引

老方向和新方向不代表消息产生时间,而是指存入本地的时间

Declared In

NIMIndexManagerProtocol.h

– queryMsgIndex:session:option:withMessage:completion: required method

查询消息索引

- (void)queryMsgIndex:(nonnull NSString *)text session:(nullable NIMSession *)session option:(nullable NIMMsgIndexQueryOption *)option withMessage:(BOOL)withMessage completion:(nullable NIMQueryMsgIndexBlock)completion

Parameters

text

查询文本

session

指定会话,不传表示所有

option

查询选项

completion

完成回调

withMesssage

是否查询消息

Discussion

查询消息索引

老方向和新方向不代表消息产生时间,而是指存入本地的时间

Declared In

NIMIndexManagerProtocol.h

– resetMsgIndex: required method

重置消息索引

- (void)resetMsgIndex:(nullable NIMResetMsgIndexBlock)completion

Parameters

completion

完成回调

Discussion

重置消息索引

Declared In

NIMIndexManagerProtocol.h

– addDelegate: required method

添加索引委托

- (void)addDelegate:(id<NIMIndexManagerDelegate>)delegate

Parameters

delegate

检索委托

Discussion

添加索引委托

Declared In

NIMIndexManagerProtocol.h

– removeDelegate: required method

移除索引委托

- (void)removeDelegate:(id<NIMIndexManagerDelegate>)delegate

Parameters

delegate

检索委托

Discussion

移除索引委托

Declared In

NIMIndexManagerProtocol.h