BMXMessage Class Reference
Inherits from BMXBaseObject :
NSObject
Declared in floo_proxy.h
Overview
@interface 消息
Class Methods
createCommandMessageWithFrom:to:type:conversationId:content:
创建发送命令消息(命令消息通过content字段或者extension字段存放命令信息)
+ (BMXMessage *)createCommandMessageWithFrom:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* content:(NSString *)*content*
Parameters
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
content
消息内容
Declared In
floo_proxy.h
createCommandMessageWithMsgId:from:to:type:conversationId:content:serverTimestamp:
创建收到的命令消息(命令消息通过content字段或者extension字段存放命令信息)
+ (BMXMessage *)createCommandMessageWithMsgId:(long long)*msgId* from:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* content:(NSString *)*content* serverTimestamp:(long long)*serverTimestamp*
Parameters
msgId
消息id
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
content
消息内容
serverTimestamp
服务器时间戳
Declared In
floo_proxy.h
createForwardMessageWithMsg:from:to:type:conversationId:
创建转发消息
+ (BMXMessage *)createForwardMessageWithMsg:(BMXMessage *)*msg* from:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId*
Parameters
msg
要转发的消息
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
Declared In
floo_proxy.h
createMessageWithFrom:to:type:conversationId:attachment:
创建发送附件消息
+ (BMXMessage *)createMessageWithFrom:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* attachment:(BMXMessageAttachment *)*attachment*
Parameters
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
attachment
附件
Declared In
floo_proxy.h
createMessageWithFrom:to:type:conversationId:content:
创建发送文本消息
+ (BMXMessage *)createMessageWithFrom:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* content:(NSString *)*content*
Parameters
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
content
消息内容
Declared In
floo_proxy.h
createMessageWithMsgId:from:to:type:conversationId:attachment:serverTimestamp:
创建收到的消息
+ (BMXMessage *)createMessageWithMsgId:(long long)*msgId* from:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* attachment:(BMXMessageAttachment *)*attachment* serverTimestamp:(long long)*serverTimestamp*
Parameters
msgId
消息id
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
attachment
附件
serverTimestamp
服务器时间戳
Declared In
floo_proxy.h
createMessageWithMsgId:from:to:type:conversationId:content:serverTimestamp:
创建收到的消息
+ (BMXMessage *)createMessageWithMsgId:(long long)*msgId* from:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* content:(NSString *)*content* serverTimestamp:(long long)*serverTimestamp*
Parameters
msgId
消息id
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
content
消息内容
serverTimestamp
服务器时间戳
Declared In
floo_proxy.h
createRTCMessageWithFrom:to:type:conversationId:content:
创建发送RTC消息
+ (BMXMessage *)createRTCMessageWithFrom:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* content:(NSString *)*content*
Parameters
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
content
消息内容
Declared In
floo_proxy.h
createRTCMessageWithMsgId:from:to:type:conversationId:content:serverTimestamp:
创建收到的RTC消息
+ (BMXMessage *)createRTCMessageWithMsgId:(long long)*msgId* from:(long long)*from* to:(long long)*to* type:(BMXMessage_MessageType)*type* conversationId:(long long)*conversationId* content:(NSString *)*content* serverTimestamp:(long long)*serverTimestamp*
Parameters
msgId
消息id
from
消息发送者
to
消息接收者
type
消息类型
conversationId
会话id
content
消息内容
serverTimestamp
服务器时间戳
Declared In
floo_proxy.h
Instance Methods
attachment
消息附件,BMXMessage拥有附件的所有权,负责释放
- (BMXMessageAttachment *)attachment
Return Value
Declared In
floo_proxy.h
clientMsgId
消息客户端ID,仅在消息发送端存在
- (long long)clientMsgId
Return Value
long long
Declared In
floo_proxy.h
clientTimestamp
本地时间戳(消息创建或者收到时的本地时间)
- (long long)clientTimestamp
Return Value
long long
Declared In
floo_proxy.h
config
消息的配置信息
- (BMXMessageConfig *)config
Return Value
Declared In
floo_proxy.h
content
消息文本内容
- (NSString *)content
Return Value
NSString
Declared In
floo_proxy.h
contentType
消息内容类型,如果带附件就表示附件类型,不带附件就是文本类型
- (BMXMessage_ContentType)contentType
Return Value
ContentType
Declared In
floo_proxy.h
conversationId
消息所属会话ID
- (long long)conversationId
Return Value
long long
Declared In
floo_proxy.h
dealloc
- (void)dealloc
deliveryQos
消息投递QOS
- (BMXMessage_DeliveryQos)deliveryQos
Return Value
Declared In
floo_proxy.h
deliveryStatus
消息投递状态
- (BMXMessage_DeliveryStatus)deliveryStatus
Return Value
Declared In
floo_proxy.h
extension
消息扩展信息
- (NSString *)extension
Return Value
NSString
Declared In
floo_proxy.h
fromId
消息发送方ID
- (long long)fromId
Return Value
long long
Declared In
floo_proxy.h
groupAckCount
群消息已读AckCount数目
- (int)groupAckCount
Return Value
int
Declared In
floo_proxy.h
groupAckReadAll
群消息是否全部已读
- (BOOL)groupAckReadAll
Return Value
BOOL
Declared In
floo_proxy.h
groupAckUnreadCount
群消息未读AckCount数目
- (int)groupAckUnreadCount
Return Value
int
Declared In
floo_proxy.h
groupPlayAckCount
群消息已播放AckCount数目(仅用于音频/视频附件消息)
- (int)groupPlayAckCount
Return Value
int
Declared In
floo_proxy.h
groupPlayAckReadAll
群消息是否全部已播放
- (BOOL)groupPlayAckReadAll
Return Value
BOOL
Declared In
floo_proxy.h
groupPlayAckUnreadCount
群消息未播放AckCount数目(仅用于音频/视频附件消息)
- (int)groupPlayAckUnreadCount
Return Value
int
Declared In
floo_proxy.h
isDeliveryAcked
对于发送方表示消息是否已投递到对方,对于接收方表示是否发送了消息已到达回执
- (BOOL)isDeliveryAcked
Return Value
BOOL
Declared In
floo_proxy.h
isPlayAcked
对于发送方表示是否收到了已播放回执,对于接收方表示是否发送了已播放回执
- (BOOL)isPlayAcked
Return Value
BOOL
Declared In
floo_proxy.h
isPlayed
语音或者视频消息是否播放过,仅对收到的音视频消息有效
- (BOOL)isPlayed
Return Value
BOOL
Declared In
floo_proxy.h
isPushMessage
消息是否是推送消息
- (BOOL)isPushMessage
Return Value
BOOL
Declared In
floo_proxy.h
isRead
消息是否已读标志
- (BOOL)isRead
Return Value
BOOL
Declared In
floo_proxy.h
isReadAcked
对于发送方表示是否收到了已读回执,对于接收方表示是否发送了已读回执
- (BOOL)isReadAcked
Return Value
BOOL
Declared In
floo_proxy.h
isReceiveMsg
是否接收的消息
- (BOOL)isReceiveMsg
Return Value
BOOL
Declared In
floo_proxy.h
msgId
消息唯一ID
- (long long)msgId
Return Value
long long
Declared In
floo_proxy.h
priority
消息的扩散优先级
- (int)priority
Return Value
int
Declared In
floo_proxy.h
senderName
消息发送者的显示名称
- (NSString *)senderName
Return Value
NSString
Declared In
floo_proxy.h
serverTimestamp
消息时间戳(服务端收到时的时间)
- (long long)serverTimestamp
Return Value
long long
Declared In
floo_proxy.h
setClientTimestamp:
设置消息本地时间戳
- (void)setClientTimestamp:(long long)*arg1*
Declared In
floo_proxy.h
setConfig:
设置消息配置信息
- (void)setConfig:(BMXMessageConfig *)*arg1*
Declared In
floo_proxy.h
setContent:
消息文本内容
- (void)setContent:(NSString *)*content*
Parameters
content
消息文本内容
Declared In
floo_proxy.h
setDeliveryQos:
设置消息投递QOS
- (void)setDeliveryQos:(BMXMessage_DeliveryQos)*qos*
Parameters
qos
消息投递QOS
Declared In
floo_proxy.h
setDeliveryStatus:
设置消息投递状态
- (void)setDeliveryStatus:(BMXMessage_DeliveryStatus)*arg1*
Declared In
floo_proxy.h
setExtension:
设置消息扩展信息
- (void)setExtension:(NSString *)*arg1*
Declared In
floo_proxy.h
setGroupAckCount:
设置消息已读groupAckCount数目(SDK 内部调用接口,上层不应该调用)
- (void)setGroupAckCount:(int)*count*
Parameters
count
设置群消息已读数目
Declared In
floo_proxy.h
setGroupAckUnreadCount:
设置消息未读groupAckCount数目(SDK 内部调用接口,上层不应该调用)
- (void)setGroupAckUnreadCount:(int)*count*
Parameters
count
设置群消息未读数目
Declared In
floo_proxy.h
setGroupPlayAckCount:
设置消息已播放groupAckCount数目(SDK 内部调用接口,上层不应该调用)(仅用于音频/视频附件消息)
- (void)setGroupPlayAckCount:(int)*count*
Parameters
count
设置群消息已读数目
Declared In
floo_proxy.h
setGroupPlayAckUnreadCount:
设置消息未播放groupAckCount数目(SDK 内部调用接口,上层不应该调用)(仅用于音频/视频附件消息)
- (void)setGroupPlayAckUnreadCount:(int)*count*
Parameters
count
设置群消息未播放数目
Declared In
floo_proxy.h
setIsDeliveryAcked:
设置投递回执
- (void)setIsDeliveryAcked:(BOOL)*arg1*
Declared In
floo_proxy.h
setIsPlayAcked:
设置已播放回执
- (void)setIsPlayAcked:(BOOL)*arg1*
Declared In
floo_proxy.h
setIsPlayed:
设置语音或者视频消息是否播放过,仅对收到的音视频消息有效
- (void)setIsPlayed:(BOOL)*arg1*
Declared In
floo_proxy.h
setIsRead:
消息是否已读标志
- (void)setIsRead:(BOOL)*arg1*
Declared In
floo_proxy.h
setIsReadAcked:
设置已读回执
- (void)setIsReadAcked:(BOOL)*arg1*
Declared In
floo_proxy.h
setIsReceiveMsg:
设置是否接收的消息
- (void)setIsReceiveMsg:(BOOL)*arg1*
Declared In
floo_proxy.h
setPriority:
取值范围0-10。普通人在聊天室发送的消息级别默认为5,可以丢弃。管理员默认为0不会丢弃。其它值可以根据业务自行设置。
- (void)setPriority:(int)*priority*
Parameters
priority
优先级
Declared In
floo_proxy.h
setPushMessageMode:
设置消息是否为推送消息。
- (void)setPushMessageMode:(BOOL)*arg1*
Declared In
floo_proxy.h
setSenderName:
设置消息的发送者显示名称
- (void)setSenderName:(NSString *)*senderName*
Parameters
senderName
消息文本内容
Declared In
floo_proxy.h
setServerTimestamp:
设置时间戳(服务端收到时的时间)
- (void)setServerTimestamp:(long long)*arg1*
Declared In
floo_proxy.h
toId
消息接收方ID
- (long long)toId
Return Value
long long
Declared In
floo_proxy.h
type
消息类型
- (BMXMessage_MessageType)type
Return Value
Declared In
floo_proxy.h
Example: