NIMIndexManager Protocol Reference

Conforms to NSObject
Declared in NIMIndexManagerProtocol.h

Overview

Index protocol

– syncMsgIndex:session:completion: required method

Sync message index

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

Parameters

old

synchronization direction, YES: to the old direction, NO: to the new direction

session

specified session. If no value is specified, all sessions are queried.

completion

Completion callback

Discussion

Sync message index

The old direction and the new direction do not represent the time the message was generated, but the time the message was stored locally.

Declared In

NIMIndexManagerProtocol.h

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

Query a message index

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

Parameters

text

text for search

session

specified session. If no value is specified, all sessions are queried.

option

Search option

completion

Completion callback

withMesssage

Specify whether to search messages

Discussion

Query a message index

The old direction and the new direction do not represent the time the message was generated, but the time the message was stored locally.

Declared In

NIMIndexManagerProtocol.h

– resetMsgIndex: required method

Reset the message index

- (void)resetMsgIndex:(nullable NIMResetMsgIndexBlock)completion

Parameters

completion

Completion callback

Discussion

Reset the message index

Declared In

NIMIndexManagerProtocol.h

– addDelegate: required method

Add an index delegate

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

Parameters

delegate

index delegate

Discussion

Add an index delegate

Declared In

NIMIndexManagerProtocol.h

– removeDelegate: required method

Remove an index delegate

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

Parameters

delegate

index delegate

Discussion

Remove an index delegate

Declared In

NIMIndexManagerProtocol.h