ContentType 枚举(Native (C ABI) IMLib)

消息内容类型枚举:共 9 个取值,定义来自 domain.json → enums.ContentType。

基本信息​

项值
枚举ContentType
取值数9
本平台常量名int(数值常量)
IDL 来源domain.json → enums.ContentType
跨端一致性取值跨端一致;常量名与成员名按平台绑定
平台状态已交付
C ABI 取值

C ABI 以数值常量表达枚举;头文件 include/im_sdk.h 中提供对应宏定义。

枚举常量摘要​

取值序号说明
text0文本消息
image1图片消息
file2文件消息
voice3语音消息
location4位置消息
custom5自定义消息(data 任意 JSON 透传)
recall6撤回占位消息(服务端生成,客户端只读)
system7系统通知消息
combine8—

使用说明​

MessageContent.type 的取值;发送时按 type 校验必填字段,未知类型按 custom 透传。

示例​

C
int value = 0; /* ContentType.text */

相关链接​