NIM SDK API  7.8.1
Typedefs
nim_talk_def.h File Reference

P2P和群组聊天 接口相关的常量函数等定义头文件 More...

#include "public_define/nim_util_include.h"

Go to the source code of this file.

Typedefs

typedef void(* nim_talk_ack_cb_func) (const char *result, const void *user_data)
 
typedef void(* nim_talk_receive_cb_func) (const char *content, const char *json_extension, const void *user_data)
 
typedef bool(* nim_talk_team_notification_filter_func) (const char *content, const char *json_extension, const void *user_data)
 
typedef bool(* nim_talk_message_filter_func) (const char *content, const char *json_extension, const void *user_data)
 
typedef void(* nim_talk_recall_msg_func) (int rescode, const char *content, const char *json_extension, const void *user_data)
 
typedef void(* nim_talk_receive_broadcast_cb_func) (const char *content, const char *json_extension, const void *user_data)
 

Variables

消息撤回通知Json Keys
static const char * kNIMRecallMsgKeyToType = "to_type"
 
static const char * kNIMRecallMsgKeyFromAccID = "from_id"
 
static const char * kNIMRecallMsgKeyToAccID = "to_id"
 
static const char * kNIMRecallMsgKeyMsgId = "msg_id"
 
static const char * kNIMRecallMsgKeyNotify = "notify"
 
static const char * kNIMRecallMsgKeyTime = "time"
 
static const char * kNIMRecallMsgKeyNotifyFeature = "feature"
 
static const char * kNIMRecallMsgKeyMsgExist = "msg_exist"
 
static const char * kNIMRecallMsgKeyMsgTime = "msg_time"
 
static const char * kNIMRecallMsgKeyMsgFromNick = "from_nick"
 
static const char * kNIMRecallMsgKeyOpeAccID = "operator_id"
 
接收消息Json Keys

本地定义的error code如下: kNIMResSuccess(200) : no error kNIMLocalResParameterError(414) : url invalid kNIMLocalResExist(417) : local file has exists for example: {"rescode": 200, "feature": 1, "content": "***" }

static const char * kNIMMsgKeyLocalRescode = "rescode"
 
static const char * kNIMMsgKeyLocalMsgFeature = "feature"
 
static const char * kNIMMsgKeyLocalReceiveMsgContent = "content"
 
消息结构 Json Keys

例子 {"client_msg_id" : "c0d1167459fc754098a531482b51a1da","local_res_path" : "","log_status" : 4,"log_sub_status" : 0,"msg_attach" : "","msg_body" : "发送文本消息正文", "msg_type" : 0, "resend_flag" : 0, "time" : 1437014897000, "to_accid" : "4045", "to_type" : 1}

static const char * kNIMMsgKeyToType = "to_type"
 
static const char * kNIMMsgKeyToAccount = "to_accid"
 
static const char * kNIMMsgKeyFromAccount = "from_id"
 
static const char * kNIMMsgKeyFromClientType = "from_client_type"
 
static const char * kNIMMsgKeyFromDeviceId = "from_device_id"
 
static const char * kNIMMsgKeyFromNick = "from_nick"
 
static const char * kNIMMsgKeyTime = "time"
 
static const char * kNIMMsgKeyType = "msg_type"
 
static const char * kNIMMsgKeyBody = "msg_body"
 
static const char * kNIMMsgKeyAttach = "msg_attach"
 
static const char * kNIMMsgKeyClientMsgid = "client_msg_id"
 
static const char * kNIMMsgKeyServerMsgid = "server_msg_id"
 
static const char * kNIMMsgKeyResendFlag = "resend_flag"
 
static const char * kNIMMsgKeyHistorySave = "cloud_history"
 
static const char * kNIMMsgKeyMsgRoaming = "roam_msg"
 
static const char * kNIMMsgKeyMsgSync = "sync_msg"
 
static const char * kNIMMsgKeyPushNeedBadge = "push_need_badge"
 
static const char * kNIMMsgKeyServerExt = "server_ext"
 
static const char * kNIMMsgKeyPushPayload = "push_payload"
 
static const char * kNIMMsgKeyPushContent = "push_content"
 
static const char * kNIMMsgKeyPushEnable = "push_enable"
 
static const char * kNIMMsgKeyPushNeedPrefix = "push_prefix"
 
static const char * kNIMMsgKeyMsgRoutable = "routable_msg"
 
static const char * kNIMMsgKeySetMsgOffline = "offline_msg"
 
static const char * kNIMMsgKeyForcePushList = "force_push_list"
 
static const char * kNIMMsgKeyForcePushContent = "force_push_content"
 
static const char * kNIMMsgKeyIsForcePush = "is_force_push"
 
static const char * kNIMMsgKeyAntiSpamEnable = "anti_spam_enable"
 
static const char * kNIMMsgKeyAntiSpamContent = "anti_spam_content"
 
static const char * kNIMMsgKeyClientAntiSpam = "client_anti_spam_hitting"
 
static const char * kNIMMsgKeyAntiSpamBizId = "anti_spam_business_id"
 
static const char * kNIMMsgKeyAntiSpamUsingYiDun = "anti_spam_using_yidun"
 
static const char * kNIMMsgKeyTeamMsgAck = "team_msg_ack"
 
static const char * kNIMMsgKeyIsUpdateSession = "is_update_session"
 
static const char * kNIMMsgKeyYiDunAntiCheating = "yidun_anti_cheating"
 
static const char * kNIMMsgKeyThreadInfo = "thread_info"
 
static const char * kNIMMsgKeyReplyMsgFromAccount = "reply_msg_from_account"
 
static const char * kNIMMsgKeyReplyMsgToAccount = "replymsg_to_account"
 
static const char * kNIMMsgKeyReplyMsgTime = "reply_msg_time"
 
static const char * kNIMMsgKeyReplyMsgIdServer = "reply_msg_id_server"
 
static const char * kNIMMsgKeyReplyMsgIdClient = "reply_msg_id_client"
 
static const char * kNIMMsgKeyThreadMsgFromAccount = "thread_msg_from_account"
 
static const char * kNIMMsgKeyThreadMsgToAccount = "thread_msg_to_account"
 
static const char * kNIMMsgKeyThreadMsgTime = "thread_msg_time"
 
static const char * kNIMMsgKeyThreadMsgIdServer = "thread_msg_id_server"
 
static const char * kNIMMsgKeyThreadMsgIdClient = "thread_msg_id_client"
 
static const char * kNIMMsgKeyDeleted = "deleted"
 
static const char * kNIMMsgKeyThirdPartyCBEXT = "third_party_callback_ext"
 
static const char * kNIMMsgKeySubType = "msg_sub_type"
 
static const char * kNIMMsgKeyAntiCheatingYiDun = "yidun_anti_cheating"
 
static const char * kNIMMsgKeyLocalKeyTeamMsgAckSent = "team_msg_ack_sent"
 
static const char * kNIMMsgKeyLocalKeyTeamMsgUnreadCount = "team_msg_unread_count"
 
static const char * kNIMMsgKeyLocalFilePath = "local_res_path"
 
static const char * kNIMMsgKeyLocalTalkId = "talk_id"
 
static const char * kNIMMsgKeyLocalResId = "res_id"
 
static const char * kNIMMsgKeyLocalLogStatus = "log_status"
 
static const char * kNIMMsgKeyLocalLogSubStatus = "log_sub_status"
 
static const char * kNIMMsgKeyLocalExt = "local_ext"
 
发送消息回执Json Keys
static const char * kNIMSendAckKeyMsgId = "msg_id"
 
static const char * kNIMSendAckKeyTalkId = "talk_id"
 
static const char * kNIMSendAckKeyRescode = "rescode"
 
static const char * kNIMSendAckKeyTimetag = "msg_timetag"
 
static const char * kNIMSendAckKeyCallbackExt = "third_party_callback_ext"
 
attach多媒体资源参数通用键名定义,可替代不同类型多媒体所使用的相同的参数的键名.
static const char * kNIMMsgAttachKeyMd5 = "md5"
 
static const char * kNIMMsgAttachKeySize = "size"
 
static const char * kNIMMsgAttachKeyUrl = "url"
 
static const char * kNIMMsgAttachKeyExt = "ext"
 
static const char * kNIMMsgAttachKeyDisplayName = "name"
 
static const char * kNIMMsgAttachKeyTag = "upload_tag"
 
attach图片类型多媒体资源参数键名定义
static const char * kNIMImgMsgKeyMd5 = "md5"
 
static const char * kNIMImgMsgKeySize = "size"
 
static const char * kNIMImgMsgKeyWidth = "w"
 
static const char * kNIMImgMsgKeyHeight = "h"
 
static const char * kNIMImgMsgKeyUrl = "url"
 
static const char * kNIMImgMsgKeyExt = "ext"
 
static const char * kNIMImgMsgKeyDisplayName = "name"
 
attach语音类型多媒体资源参数键名定义
static const char * kNIMAudioMsgKeyMd5 = "md5"
 
static const char * kNIMAudioMsgKeySize = "size"
 
static const char * kNIMAudioMsgKeyDuration = "dur"
 
static const char * kNIMAudioMsgKeyUrl = "url"
 
static const char * kNIMAudioMsgKeyExt = "ext"
 
static const char * kNIMAudioMsgKeyDisplayName = "name"
 
attach短视频类型多媒体资源参数键名定义
static const char * kNIMVideoMsgKeyMd5 = "md5"
 
static const char * kNIMVideoMsgKeySize = "size"
 
static const char * kNIMVideoMsgKeyDisplayName = "name"
 
static const char * kNIMVideoMsgKeyDuration = "dur"
 
static const char * kNIMVideoMsgKeyWidth = "w"
 
static const char * kNIMVideoMsgKeyHeight = "h"
 
static const char * kNIMVideoMsgKeyUrl = "url"
 
static const char * kNIMVideoMsgKeyExt = "ext"
 
attach文件类型多媒体资源参数键名定义
static const char * kNIMFileMsgKeyMd5 = "md5"
 
static const char * kNIMFileMsgKeySize = "size"
 
static const char * kNIMFileMsgKeyDisplayName = "name"
 
static const char * kNIMFileMsgKeyUrl = "url"
 
static const char * kNIMFileMsgKeyExt = "ext"
 
attach位置类型多媒体资源参数键名定义
static const char * kNIMLocationMsgKeyLatitude = "lat"
 
static const char * kNIMLocationMsgKeyLongitude = "lng"
 
static const char * kNIMLocationMsgKeyTitle = "title"
 
attach波特机器人类型多媒体资源参数键名定义
static const char * kNIMBotRobotMsgKeyRobotID = "robotAccid"
 
static const char * kNIMBotRobotSentMsgKeyParam = "param"
 
static const char * kNIMBotRobotReceivedMsgKeyClientMsgID = "clientMsgId"
 
static const char * kNIMBotRobotReceivedMsgKeyMsgOut = "msgOut"
 
static const char * kNIMBotRobotReceivedMsgKeyRobotMsg = "robotMsg"
 
static const char * kNIMBotRobotReceivedMsgKeyRobotMsgFlag = "flag"
 
static const char * kNIMBotRobotReceivedMsgKeyRobotMsgMessage = "message"
 
广播消息 Json Keys
static const char * kNIMBroadcastMsgKeyID = "id"
 
static const char * kNIMBroadcastMsgKeyFromAccid = "from_accid"
 
static const char * kNIMBroadcastMsgKeyTime = "time"
 
static const char * kNIMBroadcastMsgKeyBody = "body"
 
根据指定条件查询本地消息参数 Json Keys
static const char * kNIMQueryMsgByOptionsAsyncKeyQueryRange = "query_range"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyIDS = "ids"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyLimit = "limit_count"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyFromTime = "from_time"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyEndTime = "end_time"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyEndClientMSGID = "end_client_msg_id"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyReverse = "reverse"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyMsgType = "msg_type"
 
static const char * kNIMQueryMsgByOptionsAsyncKeyMsgSubType = "msg_sub_type"
 
static const char * kNIMQueryMsgByOptionsAsyncKeySearchContent = "search_content"
 

Detailed Description

P2P和群组聊天 接口相关的常量函数等定义头文件

Author
Oleg
Date
2015/02/02

Typedef Documentation

◆ nim_talk_ack_cb_func

void(* nim_talk_ack_cb_func)(const char *result, const void *user_data)

发送消息回执的回调函数定义

Parameters
[out]resultjson string (Keys SEE MORE 『发送消息回执Json Keys』 as follows)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_talk_message_filter_func

bool(* nim_talk_message_filter_func)(const char *content, const char *json_extension, const void *user_data)

接收消息是否需要过滤的函数定义(堵塞线程,谨慎使用,避免耗时行为)

Parameters
[out]contentjson string (Keys SEE MORE 『接收消息Json Keys』),批量接口回调时,内容为json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
bool true:APP已处理,SDK对这条消息不进行处理;false:APP未处理,SDK按正常逻辑处理

◆ nim_talk_recall_msg_func

void(* nim_talk_recall_msg_func)(int rescode, const char *content, const char *json_extension, const void *user_data)

消息撤回通知

Parameters
[out]rescode错误码
[out]contentjson string array string(Keys 『消息撤回通知Json Keys』)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_talk_receive_broadcast_cb_func

void(* nim_talk_receive_broadcast_cb_func)(const char *content, const char *json_extension, const void *user_data)

接收广播消息的回调函数定义

Parameters
[out]contentjson string (Keys SEE MORE 『接收广播消息Json Keys』),批量接口回调时,内容为json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_talk_receive_cb_func

void(* nim_talk_receive_cb_func)(const char *content, const char *json_extension, const void *user_data)

接收消息的回调函数定义(如果是初始化时设置了自动下载图片和语音附件,开发者需要通过监听nim_nos_reg_download_cb返回的事件来保证附件已经成功缓存到本地)

Parameters
[out]contentjson string (Keys SEE MORE 『接收消息Json Keys』),批量接口回调时,内容为json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_talk_team_notification_filter_func

bool(* nim_talk_team_notification_filter_func)(const char *content, const char *json_extension, const void *user_data)

接收群通知是否需要过滤的函数定义(堵塞线程,谨慎使用,避免耗时行为)

Parameters
[out]contentjson string (Keys SEE MORE 『接收消息Json Keys』),批量接口回调时,内容为json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

Variable Documentation

◆ kNIMAudioMsgKeyDisplayName

const char* kNIMAudioMsgKeyDisplayName = "name"
static

string,用于显示的文件名,发送方选填,默认文件名

◆ kNIMAudioMsgKeyDuration

const char* kNIMAudioMsgKeyDuration = "dur"
static

int,语音资源时间长度(毫秒),发送方必填

◆ kNIMAudioMsgKeyExt

const char* kNIMAudioMsgKeyExt = "ext"
static

string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名

◆ kNIMAudioMsgKeyMd5

const char* kNIMAudioMsgKeyMd5 = "md5"
static

string,资源MD5,发送方选填

◆ kNIMAudioMsgKeySize

const char* kNIMAudioMsgKeySize = "size"
static

long,资源大小(KB),发送方选填

◆ kNIMAudioMsgKeyUrl

const char* kNIMAudioMsgKeyUrl = "url"
static

string,资源URL, 发送方不需要填写

◆ kNIMBotRobotMsgKeyRobotID

const char* kNIMBotRobotMsgKeyRobotID = "robotAccid"
static

string,机器人云信ID

◆ kNIMBotRobotReceivedMsgKeyClientMsgID

const char* kNIMBotRobotReceivedMsgKeyClientMsgID = "clientMsgId"
static

string,机器人回复时带的字段,表示该条回复相关联的消息ID

◆ kNIMBotRobotReceivedMsgKeyMsgOut

const char* kNIMBotRobotReceivedMsgKeyMsgOut = "msgOut"
static

bool,是否为机器人回复,默认为true

◆ kNIMBotRobotReceivedMsgKeyRobotMsg

const char* kNIMBotRobotReceivedMsgKeyRobotMsg = "robotMsg"
static

json string,机器人回复时带的字段,波特机器人消息

◆ kNIMBotRobotReceivedMsgKeyRobotMsgFlag

const char* kNIMBotRobotReceivedMsgKeyRobotMsgFlag = "flag"
static

string,机器人回复时带的字段,表示该条回复类型,类型定义可见Demo源码或参考波特开发文档,bot或faq

◆ kNIMBotRobotReceivedMsgKeyRobotMsgMessage

const char* kNIMBotRobotReceivedMsgKeyRobotMsgMessage = "message"
static

json object,机器人回复时带的字段,表示该条回复内容,字段内容定义可见Demo源码或参考波特开发文档

◆ kNIMBotRobotSentMsgKeyParam

const char* kNIMBotRobotSentMsgKeyParam = "param"
static

json string,给机器人发送时需要填的字段,字段内容定义可见Demo源码或参考波特开发文档

◆ kNIMBroadcastMsgKeyBody

const char* kNIMBroadcastMsgKeyBody = "body"
static

string,内容

◆ kNIMBroadcastMsgKeyFromAccid

const char* kNIMBroadcastMsgKeyFromAccid = "from_accid"
static

jstring,发送者accid,可能不存在

◆ kNIMBroadcastMsgKeyID

const char* kNIMBroadcastMsgKeyID = "id"
static

int64,消息ID

◆ kNIMBroadcastMsgKeyTime

const char* kNIMBroadcastMsgKeyTime = "time"
static

int64, 时间戳

◆ kNIMFileMsgKeyDisplayName

const char* kNIMFileMsgKeyDisplayName = "name"
static

string,用于显示的文件名,发送方选填,默认文件名

◆ kNIMFileMsgKeyExt

const char* kNIMFileMsgKeyExt = "ext"
static

string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名

◆ kNIMFileMsgKeyMd5

const char* kNIMFileMsgKeyMd5 = "md5"
static

string,资源MD5,发送方选填

◆ kNIMFileMsgKeySize

const char* kNIMFileMsgKeySize = "size"
static

long,资源大小(KB),发送方选填

◆ kNIMFileMsgKeyUrl

const char* kNIMFileMsgKeyUrl = "url"
static

string,资源URL, 发送方不需要填写

◆ kNIMImgMsgKeyDisplayName

const char* kNIMImgMsgKeyDisplayName = "name"
static

string,用于显示的文件名,发送方选填,默认文件名

◆ kNIMImgMsgKeyExt

const char* kNIMImgMsgKeyExt = "ext"
static

string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名

◆ kNIMImgMsgKeyHeight

const char* kNIMImgMsgKeyHeight = "h"
static

int,图片高度,发送方必填

◆ kNIMImgMsgKeyMd5

const char* kNIMImgMsgKeyMd5 = "md5"
static

string,资源MD5,发送方选填

◆ kNIMImgMsgKeySize

const char* kNIMImgMsgKeySize = "size"
static

long,资源大小(KB),发送方选填

◆ kNIMImgMsgKeyUrl

const char* kNIMImgMsgKeyUrl = "url"
static

string,资源URL, 发送方不需要填写

◆ kNIMImgMsgKeyWidth

const char* kNIMImgMsgKeyWidth = "w"
static

int,图片宽度,发送方必填

◆ kNIMLocationMsgKeyLatitude

const char* kNIMLocationMsgKeyLatitude = "lat"
static

double,纬度

◆ kNIMLocationMsgKeyLongitude

const char* kNIMLocationMsgKeyLongitude = "lng"
static

double,经度

◆ kNIMLocationMsgKeyTitle

const char* kNIMLocationMsgKeyTitle = "title"
static

string,位置信息

◆ kNIMMsgAttachKeyDisplayName

const char* kNIMMsgAttachKeyDisplayName = "name"
static

string,用于显示的文件名,发送方选填,默认文件名

◆ kNIMMsgAttachKeyExt

const char* kNIMMsgAttachKeyExt = "ext"
static

string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名

◆ kNIMMsgAttachKeyMd5

const char* kNIMMsgAttachKeyMd5 = "md5"
static

string,资源MD5,发送方选填

◆ kNIMMsgAttachKeySize

const char* kNIMMsgAttachKeySize = "size"
static

long,资源大小(KB),发送方选填

◆ kNIMMsgAttachKeyTag

const char* kNIMMsgAttachKeyTag = "upload_tag"
static

string, (可选)发送含有附件的消息时使用的场景标签(可参见nos删除策略) ,Audio Image Video File 或者可以被SDK解析到本地文件路径的自定义消息

◆ kNIMMsgAttachKeyUrl

const char* kNIMMsgAttachKeyUrl = "url"
static

long,资源URL, 发送方不需要填写

◆ kNIMMsgKeyAntiCheatingYiDun

const char* kNIMMsgKeyAntiCheatingYiDun = "yidun_anti_cheating"
static

(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024

◆ kNIMMsgKeyAntiSpamBizId

const char* kNIMMsgKeyAntiSpamBizId = "anti_spam_business_id"
static

string, (可选)用户配置的对某些单条消息另外的反垃圾的业务ID

◆ kNIMMsgKeyAntiSpamContent

const char* kNIMMsgKeyAntiSpamContent = "anti_spam_content"
static

string, (可选)开发者自定义的反垃圾字段,长度限制:5000字符, 格式为json string,{"type" : 1:文本,2:图片,3视频, "data" : "文本内容or图片地址or视频地址"}

◆ kNIMMsgKeyAntiSpamEnable

const char* kNIMMsgKeyAntiSpamEnable = "anti_spam_enable"
static

int, 是否需要过易盾反垃圾, 0:不需要,1:需要, 默认0

◆ kNIMMsgKeyAntiSpamUsingYiDun

const char* kNIMMsgKeyAntiSpamUsingYiDun = "anti_spam_using_yidun"
static

int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾而是通用反垃圾 其他都是按照原来的规则

◆ kNIMMsgKeyAttach

const char* kNIMMsgKeyAttach = "msg_attach"
static

string,消息多媒体资源参数,不同类型多媒体参数不同,发送非多媒体消息时不需要填写,如需使用json string,必须为可以解析为json的非格式化的字符串

◆ kNIMMsgKeyBody

const char* kNIMMsgKeyBody = "msg_body"
static

string,消息正文,长度限制:5000字符

◆ kNIMMsgKeyClientAntiSpam

const char* kNIMMsgKeyClientAntiSpam = "client_anti_spam_hitting"
static

int, (可选) 是否命中客户端反垃圾,命中:1 未命中:0 或者不填写

◆ kNIMMsgKeyClientMsgid

const char* kNIMMsgKeyClientMsgid = "client_msg_id"
static

string,客户端消息id

◆ kNIMMsgKeyDeleted

const char* kNIMMsgKeyDeleted = "deleted"
static

int 从属thread_info节点,消息是否已经被删除(可能是撤回,也可能是单向删除),查询thread消息历史时可能会有这个字段,大于0表示已经删除(目前撤回和单向删除都是1,未来可能区分)

◆ kNIMMsgKeyForcePushContent

const char* kNIMMsgKeyForcePushContent = "force_push_content"
static

string,(可选)群组消息强推文本

◆ kNIMMsgKeyForcePushList

const char* kNIMMsgKeyForcePushList = "force_push_list"
static

string,(可选)群组消息强推列表,推送指定账号id string array json, 如果推送全员不填

◆ kNIMMsgKeyFromAccount

const char* kNIMMsgKeyFromAccount = "from_id"
static

string,消息发送方id,服务器填写,发送方不需要填写

◆ kNIMMsgKeyFromClientType

const char* kNIMMsgKeyFromClientType = "from_client_type"
static

int,消息发送方客户端类型(NIMClientType),服务器填写,发送方不需要填写

◆ kNIMMsgKeyFromDeviceId

const char* kNIMMsgKeyFromDeviceId = "from_device_id"
static

string,消息发送方设备id,服务器填写,发送方不需要填写

◆ kNIMMsgKeyFromNick

const char* kNIMMsgKeyFromNick = "from_nick"
static

string,消息发送方昵称,服务器填写,发送方不需要填写

◆ kNIMMsgKeyHistorySave

const char* kNIMMsgKeyHistorySave = "cloud_history"
static

int,(可选)该消息是否存储云端历史,可选,0:不支持,1:支持, 默认1

◆ kNIMMsgKeyIsForcePush

const char* kNIMMsgKeyIsForcePush = "is_force_push"
static

int,(可选)群组消息是否强推,0:不强推, 1:强推,属性只针对群组消息强推列表

◆ kNIMMsgKeyIsUpdateSession

const char* kNIMMsgKeyIsUpdateSession = "is_update_session"
static

(可选)bool, 消息是否需要刷新到session服务,false:否,true:是;只有消息存离线的情况下,才会判断该参数,缺省:true

◆ kNIMMsgKeyLocalExt

const char* kNIMMsgKeyLocalExt = "local_ext"
static

string,只维护在本地的扩展字段,必须为可以解析为json的非格式化的字符串

◆ kNIMMsgKeyLocalFilePath

const char* kNIMMsgKeyLocalFilePath = "local_res_path"
static

string,多媒体消息资源本地绝对路径,SDK本地维护,发送多媒体消息时必填

◆ kNIMMsgKeyLocalKeyTeamMsgAckSent

const char* kNIMMsgKeyLocalKeyTeamMsgAckSent = "team_msg_ack_sent"
static

bool 是否已经发送群消息已读回执

◆ kNIMMsgKeyLocalKeyTeamMsgUnreadCount

const char* kNIMMsgKeyLocalKeyTeamMsgUnreadCount = "team_msg_unread_count"
static

int, 群消息未读数

◆ kNIMMsgKeyLocalLogStatus

const char* kNIMMsgKeyLocalLogStatus = "log_status"
static

int,消息状态(NIMMsgLogStatus)

◆ kNIMMsgKeyLocalLogSubStatus

const char* kNIMMsgKeyLocalLogSubStatus = "log_sub_status"
static

int,消息二级状态(NIMMsgLogSubStatus)

◆ kNIMMsgKeyLocalMsgFeature

const char* kNIMMsgKeyLocalMsgFeature = "feature"
static

int,消息种类(NIMMessageFeature),SDK本地维护

◆ kNIMMsgKeyLocalReceiveMsgContent

const char* kNIMMsgKeyLocalReceiveMsgContent = "content"
static

json string,消息内容,协议定义的消息结构

◆ kNIMMsgKeyLocalRescode

const char* kNIMMsgKeyLocalRescode = "rescode"
static

int,消息错误码(NIMResCode)

◆ kNIMMsgKeyLocalResId

const char* kNIMMsgKeyLocalResId = "res_id"
static

string,多媒体资源id,发送方选填,接收方收到的是客户端消息id

◆ kNIMMsgKeyLocalTalkId

const char* kNIMMsgKeyLocalTalkId = "talk_id"
static

string,会话id,发送方选填,接收方收到的是消息发送方id

◆ kNIMMsgKeyMsgRoaming

const char* kNIMMsgKeyMsgRoaming = "roam_msg"
static

int,(可选)该消息是否支持漫游,可选,0:不支持,1:支持, 默认1

◆ kNIMMsgKeyMsgRoutable

const char* kNIMMsgKeyMsgRoutable = "routable_msg"
static

int,(可选)该消息是否抄送,0:不支持,1:支持,默认按照app的路由开关

◆ kNIMMsgKeyMsgSync

const char* kNIMMsgKeyMsgSync = "sync_msg"
static

int,(可选)该消息是否支持发送者多端同步,可选,0:不支持,1:支持, 默认1

◆ kNIMMsgKeyPushContent

const char* kNIMMsgKeyPushContent = "push_content"
static

string,(可选)自定义推送文案,长度限制200字节

◆ kNIMMsgKeyPushEnable

const char* kNIMMsgKeyPushEnable = "push_enable"
static

int,(可选)是否需要推送, 0:不需要,1:需要,默认1,aos在收到0是不要模拟本地推送

◆ kNIMMsgKeyPushNeedBadge

const char* kNIMMsgKeyPushNeedBadge = "push_need_badge"
static

int,(可选)推送是否要做消息计数(角标),0:不需要,1:需要,默认1

◆ kNIMMsgKeyPushNeedPrefix

const char* kNIMMsgKeyPushNeedPrefix = "push_prefix"
static

int,(可选)推送是否需要前缀,0:不需要,1:需要,默认1

◆ kNIMMsgKeyPushPayload

const char* kNIMMsgKeyPushPayload = "push_payload"
static

string,(可选)第三方自定义的推送属性,必须为可以解析为json的非格式化的字符串,长度2048

◆ kNIMMsgKeyReplyMsgFromAccount

const char* kNIMMsgKeyReplyMsgFromAccount = "reply_msg_from_account"
static

(可选)string,从属thread_info节点,被回复消息的消息发送者

◆ kNIMMsgKeyReplyMsgIdClient

const char* kNIMMsgKeyReplyMsgIdClient = "reply_msg_id_client"
static

(可选)string,从属thread_info节点,被回复消息的消息ID)clientId)

◆ kNIMMsgKeyReplyMsgIdServer

const char* kNIMMsgKeyReplyMsgIdServer = "reply_msg_id_server"
static

(可选)long,从属thread_info节点,被回复消息的消息ID)serverId)

◆ kNIMMsgKeyReplyMsgTime

const char* kNIMMsgKeyReplyMsgTime = "reply_msg_time"
static

(可选)long,从属thread_info节点,被回复消息的消息发送时间

◆ kNIMMsgKeyReplyMsgToAccount

const char* kNIMMsgKeyReplyMsgToAccount = "replymsg_to_account"
static

(可选)string,从属thread_info节点,被回复消息的消息接受者,群的话是tid

◆ kNIMMsgKeyResendFlag

const char* kNIMMsgKeyResendFlag = "resend_flag"
static

int,消息重发标记位,第一次发送0,重发1

◆ kNIMMsgKeyServerExt

const char* kNIMMsgKeyServerExt = "server_ext"
static

string,(可选)自定义扩展字段,必须为可以解析为json的非格式化的字符串,长度限制1024

◆ kNIMMsgKeyServerMsgid

const char* kNIMMsgKeyServerMsgid = "server_msg_id"
static

long,服务器端消息id

◆ kNIMMsgKeySetMsgOffline

const char* kNIMMsgKeySetMsgOffline = "offline_msg"
static

int,(可选)消息是否要存离线,0:不需要, 1:需要,默认1

◆ kNIMMsgKeySubType

const char* kNIMMsgKeySubType = "msg_sub_type"
static

(可选)int,消息的子类型,客户端定义,服务器透传

◆ kNIMMsgKeyTeamMsgAck

const char* kNIMMsgKeyTeamMsgAck = "team_msg_ack"
static

(可选)int, 群消息是否需要已读业务,0:不需要,1:需要

◆ kNIMMsgKeyThirdPartyCBEXT

const char* kNIMMsgKeyThirdPartyCBEXT = "third_party_callback_ext"
static

(可选)string第三方回调回来的自定义扩展字段

◆ kNIMMsgKeyThreadInfo

const char* kNIMMsgKeyThreadInfo = "thread_info"
static

(可选) json object,被回复消息的消息发送者

◆ kNIMMsgKeyThreadMsgFromAccount

const char* kNIMMsgKeyThreadMsgFromAccount = "thread_msg_from_account"
static

(可选)string,从属thread_info节点,thread消息的消息发送者

◆ kNIMMsgKeyThreadMsgIdClient

const char* kNIMMsgKeyThreadMsgIdClient = "thread_msg_id_client"
static

(可选)string,从属thread_info节点,thread消息的消息ID)clientId)

◆ kNIMMsgKeyThreadMsgIdServer

const char* kNIMMsgKeyThreadMsgIdServer = "thread_msg_id_server"
static

(可选)long,从属thread_info节点,thread消息的消息ID)serverId)

◆ kNIMMsgKeyThreadMsgTime

const char* kNIMMsgKeyThreadMsgTime = "thread_msg_time"
static

(可选)long,从属thread_info节点,thread消息的消息发送时间

◆ kNIMMsgKeyThreadMsgToAccount

const char* kNIMMsgKeyThreadMsgToAccount = "thread_msg_to_account"
static

(可选)string,t从属thread_info节点,hread消息的消息接受者,群的话是tid

◆ kNIMMsgKeyTime

const char* kNIMMsgKeyTime = "time"
static

long,消息时间戳(毫秒)

◆ kNIMMsgKeyToAccount

const char* kNIMMsgKeyToAccount = "to_accid"
static

string,消息接收方id,给自己发送消息时填写自己id

◆ kNIMMsgKeyToType

const char* kNIMMsgKeyToType = "to_type"
static

int,会话类型(NIMSessionType)

◆ kNIMMsgKeyType

const char* kNIMMsgKeyType = "msg_type"
static

int,消息类型(NIMMessageType)

◆ kNIMMsgKeyYiDunAntiCheating

const char* kNIMMsgKeyYiDunAntiCheating = "yidun_anti_cheating"
static

(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024

◆ kNIMQueryMsgByOptionsAsyncKeyEndClientMSGID

const char* kNIMQueryMsgByOptionsAsyncKeyEndClientMSGID = "end_client_msg_id"
static

string,结束查询的最后一条消息的end_client_msg_id(不包含在查询结果中)

◆ kNIMQueryMsgByOptionsAsyncKeyEndTime

const char* kNIMQueryMsgByOptionsAsyncKeyEndTime = "end_time"
static

int64,结束时间点,单位:毫秒

◆ kNIMQueryMsgByOptionsAsyncKeyFromTime

const char* kNIMQueryMsgByOptionsAsyncKeyFromTime = "from_time"
static

int64,起始时间点,单位:毫秒

◆ kNIMQueryMsgByOptionsAsyncKeyIDS

const char* kNIMQueryMsgByOptionsAsyncKeyIDS = "ids"
static

jsonstring 会话id(对方的account id或者群组tid)的集合,目前暂不支持多个的组合检索,详见NIMMsgLogQueryRange说明

◆ kNIMQueryMsgByOptionsAsyncKeyLimit

const char* kNIMQueryMsgByOptionsAsyncKeyLimit = "limit_count"
static

int32, 本次查询的消息条数上限(最多100条)

◆ kNIMQueryMsgByOptionsAsyncKeyMsgSubType

const char* kNIMQueryMsgByOptionsAsyncKeyMsgSubType = "msg_sub_type"
static

int32,消息的子类型

◆ kNIMQueryMsgByOptionsAsyncKeyMsgType

const char* kNIMQueryMsgByOptionsAsyncKeyMsgType = "msg_type"
static

enum NIMMessageType 检索的消息类型(目前只支持kNIMMessageTypeText、kNIMMessageTypeImage和kNIMMessageTypeFile这三种类型消息)

◆ kNIMQueryMsgByOptionsAsyncKeyQueryRange

const char* kNIMQueryMsgByOptionsAsyncKeyQueryRange = "query_range"
static

enum NIMMsgLogQueryRange,消息历史的检索范围(目前暂不支持某些范围的组合检索,详见NIMMsgLogQueryRange说明)

◆ kNIMQueryMsgByOptionsAsyncKeyReverse

const char* kNIMQueryMsgByOptionsAsyncKeyReverse = "reverse"
static

bool,true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false)

◆ kNIMQueryMsgByOptionsAsyncKeySearchContent

const char* kNIMQueryMsgByOptionsAsyncKeySearchContent = "search_content"
static

string,检索文本(目前只支持kNIMMessageTypeText和kNIMMessageTypeFile这两种类型消息的文本关键字检索,即支持文字消息和文件名的检索

◆ kNIMRecallMsgKeyFromAccID

const char* kNIMRecallMsgKeyFromAccID = "from_id"
static

string,消息发送方ID

◆ kNIMRecallMsgKeyMsgExist

const char* kNIMRecallMsgKeyMsgExist = "msg_exist"
static

bool,撤回的消息本地是否存在,比如对方离线时发一条消息又撤回,对方上线收到离线撤回通知该tag为false

◆ kNIMRecallMsgKeyMsgFromNick

const char* kNIMRecallMsgKeyMsgFromNick = "from_nick"
static

string,要撤回消息的发送者昵称

◆ kNIMRecallMsgKeyMsgId

const char* kNIMRecallMsgKeyMsgId = "msg_id"
static

string,客户端消息ID

◆ kNIMRecallMsgKeyMsgTime

const char* kNIMRecallMsgKeyMsgTime = "msg_time"
static

long,要撤回消息的创建时间戳(毫秒)

◆ kNIMRecallMsgKeyNotify

const char* kNIMRecallMsgKeyNotify = "notify"
static

string,自定义通知文案,按需填

◆ kNIMRecallMsgKeyNotifyFeature

const char* kNIMRecallMsgKeyNotifyFeature = "feature"
static

int,撤回通知种类(NIMMessageFeature)

◆ kNIMRecallMsgKeyOpeAccID

const char* kNIMRecallMsgKeyOpeAccID = "operator_id"
static

string,操作者ID

◆ kNIMRecallMsgKeyTime

const char* kNIMRecallMsgKeyTime = "time"
static

long,撤回操作的消息时间戳(毫秒)

◆ kNIMRecallMsgKeyToAccID

const char* kNIMRecallMsgKeyToAccID = "to_id"
static

string,消息接收方ID

◆ kNIMRecallMsgKeyToType

const char* kNIMRecallMsgKeyToType = "to_type"
static

int,会话类型(NIMSessionType)

◆ kNIMSendAckKeyCallbackExt

const char* kNIMSendAckKeyCallbackExt = "third_party_callback_ext"
static

string,第三方回调回来的自定义扩展字段 v7.8

◆ kNIMSendAckKeyMsgId

const char* kNIMSendAckKeyMsgId = "msg_id"
static

string,客户端消息id

◆ kNIMSendAckKeyRescode

const char* kNIMSendAckKeyRescode = "rescode"
static

int,消息错误码(NIMResCode)

◆ kNIMSendAckKeyTalkId

const char* kNIMSendAckKeyTalkId = "talk_id"
static

string,会话id

◆ kNIMSendAckKeyTimetag

const char* kNIMSendAckKeyTimetag = "msg_timetag"
static

long,消息时间戳(毫秒),收到ack包时更新上层缓存的消息时间戳

◆ kNIMVideoMsgKeyDisplayName

const char* kNIMVideoMsgKeyDisplayName = "name"
static

string,用于显示的文件名,发送方选填,默认文件名

◆ kNIMVideoMsgKeyDuration

const char* kNIMVideoMsgKeyDuration = "dur"
static

int,短视频资源时间长度(毫秒),发送方必填

◆ kNIMVideoMsgKeyExt

const char* kNIMVideoMsgKeyExt = "ext"
static

string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名

◆ kNIMVideoMsgKeyHeight

const char* kNIMVideoMsgKeyHeight = "h"
static

int,短视频画面高度,发送方必填

◆ kNIMVideoMsgKeyMd5

const char* kNIMVideoMsgKeyMd5 = "md5"
static

string,资源MD5,发送方选填

◆ kNIMVideoMsgKeySize

const char* kNIMVideoMsgKeySize = "size"
static

long,资源大小(KB),发送方选填

◆ kNIMVideoMsgKeyUrl

const char* kNIMVideoMsgKeyUrl = "url"
static

string,资源URL, 发送方不需要填写

◆ kNIMVideoMsgKeyWidth

const char* kNIMVideoMsgKeyWidth = "w"
static

int,短视频画面宽度,发送方必填