BMXConversation Class Reference

Inherits from BMXBaseObject :
NSObject
Declared in floo_proxy.h

Overview

@interface 会话

Instance Methods

conversationId

会话Id

- (long long)conversationId

Return Value

long long

Declared In

  • floo_proxy.h

Example:

dealloc

- (void)dealloc

Example:

editMessage

编辑消息

- (NSString *)editMessage

Return Value

NSString

Declared In

  • floo_proxy.h

Example:

extension

扩展信息

- (NSString *)extension

Return Value

NSString

Declared In

  • floo_proxy.h

Example:

insertMessageWithMsg:

插入一条消息

- (BMXErrorCode)insertMessageWithMsg:(BMXMessage *)*msg*

Parameters

msg
插入的消息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

insertMessageWithMsg:completion:

插入一条消息

- (void)insertMessageWithMsg:(BMXMessage *)*msg* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

msg
插入的消息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

isMuteNotification

是否提醒用户消息,不提醒的情况下会话总未读数不会统计该会话计数。

- (BOOL)isMuteNotification

Return Value

BOOL

Declared In

  • floo_proxy.h

Example:

lastMsg

最新消息

- (BMXMessage *)lastMsg

Return Value

BMXMessage

Declared In

  • floo_proxy.h

Example:

loadMessageWithMsgId:

读取一条消息

- (BMXMessage *)loadMessageWithMsgId:(long long)*msgId*

Parameters

msgId
需要读取的消息的消息id

Return Value

BMXMessage

Declared In

  • floo_proxy.h

Example:

loadMessageWithMsgId:completion:

读取一条消息

- (void)loadMessageWithMsgId:(long long)*msgId* completion:(void ( ^ ) ( BMXMessage *res , BMXError *aError ))*resBlock*

Parameters

msgId
需要读取的消息的消息id

Return Value

BMXMessage

Declared In

  • floo_proxy.h

Example:

loadMessagesWithRefMsgId:size:arg4:completion:

加载消息,如果不指定则从最新消息开始

- (void)loadMessagesWithRefMsgId:(long long)*refMsgId* size:(unsigned long)*size* arg4:(BMXConversation_Direction)*arg4* completion:(void ( ^ ) ( BMXMessageList *result , BMXError *aError ))*resBlock*

Parameters

refMsgId
加载消息的起始id

size
最大加载消息条数

result
数据库返回的加载消息列表

Direction
加载消息的方向,默认是加载更早的消息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

loadMessagesWithRefMsgId:size:completion:

搜索消息,如果不指定则从最新消息开始

- (void)loadMessagesWithRefMsgId:(long long)*refMsgId* size:(unsigned long)*size* completion:(void ( ^ ) ( BMXMessageList *result , BMXError *aError ))*resBlock*

Parameters

size
最大加载消息条数

refTime
搜索消息的起始时间

result
搜索到的消息结果列表

keywords
搜索消息的关键字

Direction
消息搜索方向,默认(Direction::Up)是从更早的消息中搜索

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

loadMessagesWithRefMsgId:size:result:

- (BMXErrorCode)loadMessagesWithRefMsgId:(long long)*refMsgId* size:(unsigned long)*size* result:(BMXMessageList *)*result*

Example:

loadMessagesWithRefMsgId:size:result:arg4:

加载消息,如果不指定则从最新消息开始

- (BMXErrorCode)loadMessagesWithRefMsgId:(long long)*refMsgId* size:(unsigned long)*size* result:(BMXMessageList *)*result* arg4:(BMXConversation_Direction)*arg4*

Parameters

refMsgId
加载消息的起始id

size
最大加载消息条数

result
数据库返回的加载消息列表

Direction
加载消息的方向,默认是加载更早的消息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

messageCount

会话中所有消息的数量

- (int)messageCount

Return Value

int

Declared In

  • floo_proxy.h

Example:

refreshConversation

读取数据库当前会话所有消息数量,强制更新conversation的消息总数和未读消息数。

- (BMXErrorCode)refreshConversation

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

refreshConversationWithCompletion:

读取数据库当前会话所有消息数量,强制更新conversation的消息总数和未读消息数。

- (void)refreshConversationWithCompletion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

removeAllMessages

删除会话中的所有消息

- (BMXErrorCode)removeAllMessages

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

removeAllMessagesWithCompletion:

删除会话中的所有消息

- (void)removeAllMessagesWithCompletion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

searchMessagesByKeyWordsWithKeywords:refTime:size:arg5:completion:

搜索消息,如果不指定则从最新消息开始

- (void)searchMessagesByKeyWordsWithKeywords:(NSString *)*keywords* refTime:(long long)*refTime* size:(unsigned long)*size* arg5:(BMXConversation_Direction)*arg5* completion:(void ( ^ ) ( BMXMessageList *result , BMXError *aError ))*resBlock*

Parameters

keywords
搜索消息的关键字

refTime
搜索消息的起始时间

size
最大加载消息条数

result
搜索到的消息结果列表

Direction
消息搜索方向,默认(Direction::Up)是从更早的消息中搜索

Return Value

BMXErrorCode

Discussion

Deprecated. use searchMessagesByKeyWords instead.

Declared In

  • floo_proxy.h

Example:

searchMessagesByKeyWordsWithKeywords:refTime:size:completion:

- (void)searchMessagesByKeyWordsWithKeywords:(NSString *)*keywords* refTime:(long long)*refTime* size:(unsigned long)*size* completion:(void ( ^ ) ( BMXMessageList *result , BMXError *aError ))*resBlock*

Example:

searchMessagesByKeyWordsWithKeywords:refTime:size:result:

- (BMXErrorCode)searchMessagesByKeyWordsWithKeywords:(NSString *)*keywords* refTime:(long long)*refTime* size:(unsigned long)*size* result:(BMXMessageList *)*result*

Example:

searchMessagesByKeyWordsWithKeywords:refTime:size:result:arg5:

搜索消息,如果不指定则从最新消息开始

- (BMXErrorCode)searchMessagesByKeyWordsWithKeywords:(NSString *)*keywords* refTime:(long long)*refTime* size:(unsigned long)*size* result:(BMXMessageList *)*result* arg5:(BMXConversation_Direction)*arg5*

Parameters

keywords
搜索消息的关键字

refTime
搜索消息的起始时间

size
最大加载消息条数

result
搜索到的消息结果列表

arg5
消息搜索方向,默认(Direction::Up)是从更早的消息中搜索

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

searchMessagesByTypeWithType:refTime:size:arg5:completion:

按照类型搜索消息,如果不指定则从最新消息开始

- (void)searchMessagesByTypeWithType:(BMXMessage_ContentType)*type* refTime:(long long)*refTime* size:(unsigned long)*size* arg5:(BMXConversation_Direction)*arg5* completion:(void ( ^ ) ( BMXMessageList *result , BMXError *aError ))*resBlock*

Parameters

type
搜索消息的类型

refTime
搜索消息的起始时间

size
最大加载消息条数

result
搜索到的消息结果列表

Direction
消息搜索方向,默认(Direction::Up)是从更早的消息中搜索

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

searchMessagesByTypeWithType:refTime:size:completion:

- (void)searchMessagesByTypeWithType:(BMXMessage_ContentType)*type* refTime:(long long)*refTime* size:(unsigned long)*size* completion:(void ( ^ ) ( BMXMessageList *result , BMXError *aError ))*resBlock*

Example:

searchMessagesByTypeWithType:refTime:size:result:

- (BMXErrorCode)searchMessagesByTypeWithType:(BMXMessage_ContentType)*type* refTime:(long long)*refTime* size:(unsigned long)*size* result:(BMXMessageList *)*result*

Example:

searchMessagesByTypeWithType:refTime:size:result:arg5:

按照类型搜索消息,如果不指定则从最新消息开始

- (BMXErrorCode)searchMessagesByTypeWithType:(BMXMessage_ContentType)*type* refTime:(long long)*refTime* size:(unsigned long)*size* result:(BMXMessageList *)*result* arg5:(BMXConversation_Direction)*arg5*

Parameters

type
搜索消息的类型

refTime
搜索消息的起始时间

size
最大加载消息条数

result
搜索到的消息结果列表

Direction
消息搜索方向,默认(Direction::Up)是从更早的消息中搜索

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setAllMessagesRead

把所有消息设置为已读,更新未读消息数

- (BMXErrorCode)setAllMessagesRead

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setAllMessagesReadWithCompletion:

把所有消息设置为已读,更新未读消息数

- (void)setAllMessagesReadWithCompletion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setEditMessage:

设置编辑消息

- (BMXErrorCode)setEditMessage:(NSString *)*editMessage*

Parameters

editMessage
会话正在编辑的文本消息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setExtension:

设置扩展信息

- (BMXErrorCode)setExtension:(NSString *)*ext*

Parameters

ext
会话扩展消息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setMessagePlayedStatus:status:

设置消息播放状态(只对语音/视频消息有效)

- (BMXErrorCode)setMessagePlayedStatus:(BMXMessage *)*msg* status:(BOOL)*status*

Parameters

msg
需要设置播放状态的消息

status
消息是否已经播放

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setMessagePlayedStatus:status:completion:

设置消息播放状态(只对语音/视频消息有效)

- (void)setMessagePlayedStatus:(BMXMessage *)*msg* status:(BOOL)*status* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

msg
需要设置播放状态的消息

status
消息是否已经播放

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setMessageReadStatus:status:

设置消息未读状态,更新未读消息数

- (BMXErrorCode)setMessageReadStatus:(BMXMessage *)*msg* status:(BOOL)*status*

Parameters

msg
需要设置消息已读状态的消息

status
消息是否设置已读

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

setMessageReadStatus:status:completion:

设置消息未读状态,更新未读消息数

- (void)setMessageReadStatus:(BMXMessage *)*msg* status:(BOOL)*status* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

msg
需要设置消息已读状态的消息

status
消息是否设置已读

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

type

会话类型

- (BMXConversation_Type)type

Return Value

BMXConversation_Type

Declared In

  • floo_proxy.h

Example:

unreadNumber

未读消息数

- (int)unreadNumber

Return Value

int

Declared In

  • floo_proxy.h

Example:

updateMessageExtensionWithMsg:

更新一条数据库存储消息的扩展字段信息

- (BMXErrorCode)updateMessageExtensionWithMsg:(BMXMessage *)*msg*

Parameters

msg
需要更改扩展信息的消息此时msg部分已经更新扩展字椴信息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

updateMessageExtensionWithMsg:completion:

更新一条数据库存储消息的扩展字段信息

- (void)updateMessageExtensionWithMsg:(BMXMessage *)*msg* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

msg
需要更改扩展信息的消息此时msg部分已经更新扩展字椴信息

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

© 2019-2023 美信拓扑 | 官网 该文件修订时间: 2023-05-17 17:35:58

results matching ""

    No results matching ""