NIM PC Cross Platform SDK
nim_qchat::QChatMessageSend Struct Reference
Inheritance diagram for nim_qchat::QChatMessageSend:
nim_qchat::QChatMessage

Public Types

using AttachRawCreateFunc = std::function< std::shared_ptr< IQChatAttachInterface >(const std::string &)>
 
using AttachCreateFunc = std::function< std::shared_ptr< IQChatAttachInterface >(const NIMQChatMessage &)>
 
using AttachParseFunc = std::function< void(const std::shared_ptr< IQChatAttachInterface > &, NIMQChatMessage &)>
 

Public Member Functions

 QChatMessageSend (const NIMQChatMessage &c_param)
 
const NIMQChatMessage ToCParam () const
 

Static Public Member Functions

static std::shared_ptr< IQChatAttachInterfaceCreateAttachWithRawData (NIMQChatMsgType type, const std::string &raw_data)
 

Public Attributes

uint64_t server_id {0}
 消息所属的server id
 
uint64_t channel_id {0}
 消息所属的channel id
 
NIMQChatMsgType msg_type {kNIMQChatMsgTypeUnknown}
 消息类型
 
uint32_t msg_sub_type {0}
 可选, 消息子类型
 
std::string msg_body {""}
 消息内容
 
std::shared_ptr< IQChatAttachInterfacemsg_attach {std::make_shared<QChatDefaultAttach>()}
 消息附件
 
std::string msg_ext {""}
 消息扩展字段
 
std::string msg_id {""}
 消息重发时需要指定此参数
 
bool resend_flag {false}
 重发标记,false:不是重发,true:是重发
 
bool mention_all {false}
 是否@所有人,false:否,true:是
 
std::vector< std::string > mention_accids {}
 @成员列表
 
std::vector< uint64_t > mention_role_ids {}
 @身份组列表
 
bool history_enable {true}
 该消息是否存储云端历史,0:不支持,1:支持
 
std::string push_payload {""}
 自定义的推送属性,限制json
 
std::string push_content {""}
 自定义的推送内容
 
bool push_enable {false}
 是否需要推送, false: 不需要, true: 需要, 默认 false
 
bool need_badge {true}
 是否需要消息计数, false: 不需要, true: 需要, 默认 true
 
bool need_push_nick {true}
 是否需要推送昵称, false: 不需要, true: 需要, 默认 true
 
bool route_enable {true}
 是否需要抄送, false: 不需要, true: 需要, 默认 true
 
QChatMessageThreadInfo thread_info
 thread 消息相关信息
 
QChatMessageAntiSpamInfo anti_spam_info
 反垃圾信息
 
std::string env
 环境变量
 

Static Public Attributes

static std::map< NIMQChatMsgType, AttachRawCreateFunc > attach_raw_create_function_
 

Protected Attributes

std::vector< char * > c_mention_accids
 

Member Data Documentation

◆ attach_raw_create_function_

std::map< NIMQChatMsgType, QChatMessageSend::AttachRawCreateFunc > nim_qchat::QChatMessageSend::attach_raw_create_function_
static
Initial value:
= {
{ kNIMQChatMsgTypeText, [](const std::string& r) { return std::make_shared<QChatDefaultAttach>(r); } },
{ kNIMQChatMsgTypeImage, [](const std::string& r) { return std::make_shared<QChatImageAttach>(r); } },
{ kNIMQChatMsgTypeAudio, [](const std::string& r) { return std::make_shared<QChatAudioAttach>(r); } },
{ kNIMQChatMsgTypeVideo, [](const std::string& r) { return std::make_shared<QChatVideoAttach>(r); } },
{ kNIMQChatMsgTypeFile, [](const std::string& r) { return std::make_shared<QChatFileAttach>(r); } },
{ kNIMQChatMsgTypeLocation, [](const std::string& r) { return std::make_shared<QChatLocationAttach>(r); } },
{ kNIMQChatMsgTypeNotification, [](const std::string& r) { return std::make_shared<QChatNotificationAttach>(r); } },
{ kNIMQChatMsgTypeTips, [](const std::string& r) { return std::make_shared<QChatTipsAttach>(r); } }
}
@ kNIMQChatMsgTypeNotification
通知类型消息
Definition: nim_qchat_message_def.h:56
@ kNIMQChatMsgTypeVideo
视频类型消息
Definition: nim_qchat_message_def.h:52
@ kNIMQChatMsgTypeText
文本类型消息
Definition: nim_qchat_message_def.h:46
@ kNIMQChatMsgTypeTips
提醒类型消息
Definition: nim_qchat_message_def.h:60
@ kNIMQChatMsgTypeAudio
音频类型消息
Definition: nim_qchat_message_def.h:50
@ kNIMQChatMsgTypeLocation
位置类型消息
Definition: nim_qchat_message_def.h:54
@ kNIMQChatMsgTypeFile
文件类型消息
Definition: nim_qchat_message_def.h:58
@ kNIMQChatMsgTypeImage
图片类型消息
Definition: nim_qchat_message_def.h:48

The documentation for this struct was generated from the following files: