NIM SDK API  9.0.0
nim_talk_def.h
Go to the documentation of this file.
1 
7 #ifndef NIM_SDK_DLL_EXPORT_HEADERS_TALK_DEF_H_
8 #define NIM_SDK_DLL_EXPORT_HEADERS_TALK_DEF_H_
9 
10 #include "public_defines.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
21 typedef void (*nim_talk_ack_cb_func)(const char* result, const void* user_data);
22 
30 typedef void (*nim_talk_receive_cb_func)(const char* content, const char* json_extension, const void* user_data);
31 
39 typedef bool (*nim_talk_team_notification_filter_func)(const char* content, const char* json_extension, const void* user_data);
40 
48 typedef bool (*nim_talk_message_filter_func)(const char* content, const char* json_extension, const void* user_data);
49 
58 typedef void (*nim_talk_recall_msg_func)(int rescode, const char* content, const char* json_extension, const void* user_data);
59 
67 typedef void (*nim_talk_receive_broadcast_cb_func)(const char* content, const char* json_extension, const void* user_data);
68 
73  const char* apnstext;
74  const char* pushpayload;
75  const char* json_extension;
76  const char* env_config;
77  const char* attach; /* v8.2.0 第三方回调回来的自定义字段 */
79 
83 static const char* kNIMRecallMsgKeyToType = "to_type";
86 static const char* kNIMRecallMsgKeyFromAccID = "from_id";
88 static const char* kNIMRecallMsgKeyToAccID = "to_id";
90 static const char* kNIMRecallMsgKeyMsgId = "msg_id";
92 static const char* kNIMRecallMsgKeyNotify = "notify";
94 static const char* kNIMRecallMsgKeyTime = "time";
96 static const char* kNIMRecallMsgKeyNotifyFeature = "feature";
98 static const char* kNIMRecallMsgKeyMsgExist = "msg_exist";
100 static const char* kNIMRecallMsgKeyMsgTime = "msg_time";
102 static const char* kNIMRecallMsgKeyMsgFromNick = "from_nick";
104 static const char* kNIMRecallMsgKeyOpeAccID = "operator_id";
106 static const char* kNIMRecallMsgTagCallbackExt = "callback_ext";
108 static const char* kNIMRecallMsgTagAttach = "attach"; // 消息撤回通知Json Keys
110 
123 static const char* kNIMMsgKeyLocalRescode = "rescode";
126 static const char* kNIMMsgKeyLocalMsgFeature = "feature";
128 static const char* kNIMMsgKeyLocalReceiveMsgContent = "content"; // 接收消息Json Keys
130 
136 // 协议定义
138 static const char* kNIMMsgKeyToType = "to_type";
140 static const char* kNIMMsgKeyToAccount = "to_accid";
142 static const char* kNIMMsgKeyFromAccount = "from_id";
144 static const char* kNIMMsgKeyFromClientType = "from_client_type";
146 static const char* kNIMMsgKeyFromDeviceId = "from_device_id";
148 static const char* kNIMMsgKeyFromNick = "from_nick";
150 static const char* kNIMMsgKeyTime = "time";
152 static const char* kNIMMsgKeyType = "msg_type";
154 static const char* kNIMMsgKeyBody = "msg_body";
156 static const char* kNIMMsgKeyAttach = "msg_attach";
158 static const char* kNIMMsgKeyClientMsgid = "client_msg_id";
160 static const char* kNIMMsgKeyServerMsgid = "server_msg_id";
162 static const char* kNIMMsgKeyResendFlag = "resend_flag";
164 static const char* kNIMMsgKeyHistorySave = "cloud_history";
166 static const char* kNIMMsgKeyMsgRoaming = "roam_msg";
168 static const char* kNIMMsgKeyMsgSync = "sync_msg";
170 static const char* kNIMMsgKeyPushNeedBadge = "push_need_badge";
172 static const char* kNIMMsgKeyServerExt = "server_ext";
174 static const char* kNIMMsgKeyPushPayload = "push_payload";
176 static const char* kNIMMsgKeyPushContent = "push_content";
178 static const char* kNIMMsgKeyPushEnable = "push_enable";
180 static const char* kNIMMsgKeyPushNeedPrefix = "push_prefix";
182 static const char* kNIMMsgKeyMsgRoutable = "routable_msg";
184 static const char* kNIMMsgKeySetMsgOffline = "offline_msg";
186 static const char* kNIMMsgKeyForcePushList = "force_push_list";
188 static const char* kNIMMsgKeyForcePushContent = "force_push_content";
190 static const char* kNIMMsgKeyIsForcePush = "is_force_push";
192 static const char* kNIMMsgKeyAntiSpamEnable = "anti_spam_enable";
195 static const char* kNIMMsgKeyAntiSpamContent = "anti_spam_content";
197 static const char* kNIMMsgKeyClientAntiSpam = "client_anti_spam_hitting";
199 static const char* kNIMMsgKeyAntiSpamBizId = "anti_spam_business_id";
201 static const char* kNIMMsgKeyAntiSpamUsingYiDun = "anti_spam_using_yidun";
203 static const char* kNIMMsgKeyTeamMsgAck = "team_msg_ack";
205 static const char* kNIMMsgKeyIsUpdateSession = "is_update_session";
207 static const char* kNIMMsgKeyAntiCheatingYiDun = "yidun_anti_cheating";
209 static const char* kNIMMsgKeyAntiSpamExt = "anti_spam_ext";
211 static const char* kNIMMsgKeyAntiSpamRes = "anti_spam_res";
212 
213 // thread 消息信息
215 static const char* kNIMMsgKeyThreadInfo = "thread_info";
217 static const char* kNIMMsgKeyReplyMsgFromAccount = "reply_msg_from_account";
219 static const char* kNIMMsgKeyReplyMsgToAccount = "replymsg_to_account";
221 static const char* kNIMMsgKeyReplyMsgTime = "reply_msg_time";
223 static const char* kNIMMsgKeyReplyMsgIdServer = "reply_msg_id_server";
225 static const char* kNIMMsgKeyReplyMsgIdClient = "reply_msg_id_client";
227 static const char* kNIMMsgKeyThreadMsgFromAccount = "thread_msg_from_account";
229 static const char* kNIMMsgKeyThreadMsgToAccount = "thread_msg_to_account";
231 static const char* kNIMMsgKeyThreadMsgTime = "thread_msg_time";
233 static const char* kNIMMsgKeyThreadMsgIdServer = "thread_msg_id_server";
235 static const char* kNIMMsgKeyThreadMsgIdClient = "thread_msg_id_client";
238 static const char* kNIMMsgKeyDeleted = "deleted";
239 // v7.8 新增
241 static const char* kNIMMsgKeyThirdPartyCBEXT = "third_party_callback_ext";
242 static const char* kNIMMsgKeySubType = "msg_sub_type";
244 // v8.0.0新增
245 static const char* kNIMMsgKeyEnv = "env_config";
247 // 本地定义
249 static const char* kNIMMsgKeyLocalKeyTeamMsgAckSent = "team_msg_ack_sent";
251 static const char* kNIMMsgKeyLocalKeyTeamMsgUnreadCount = "team_msg_unread_count";
253 static const char* kNIMMsgKeyLocalFilePath = "local_res_path";
255 static const char* kNIMMsgKeyLocalTalkId = "talk_id";
257 static const char* kNIMMsgKeyLocalResId = "res_id";
259 static const char* kNIMMsgKeyLocalLogStatus = "log_status";
261 static const char* kNIMMsgKeyLocalLogSubStatus = "log_sub_status";
263 static const char* kNIMMsgKeyLocalExt = "local_ext"; // 消息结构 Json Keys
265 
269 static const char* kNIMSendAckKeyMsgId = "msg_id";
272 static const char* kNIMSendAckKeyTalkId = "talk_id";
274 static const char* kNIMSendAckKeyRescode = "rescode";
276 static const char* kNIMSendAckKeyTimetag = "msg_timetag";
278 static const char* kNIMSendAckKeyCallbackExt = "third_party_callback_ext";
280 static const char* kNIMSendAckKeyAntiSpamRes = "anti_spam_res";
281  // 发送消息回执Json Keys
283 
287 static const char* kNIMMsgAttachKeyMd5 = "md5";
290 static const char* kNIMMsgAttachKeySize = "size";
292 static const char* kNIMMsgAttachKeyUrl = "url";
294 static const char* kNIMMsgAttachKeyExt = "ext";
296 static const char* kNIMMsgAttachKeyDisplayName = "name";
298 static const char* kNIMMsgAttachKeyTag = "upload_tag"; // attach多媒体资源参数通用键名定义,可替代不同类型多媒体所使用的相同的参数的键名.
300 
304 static const char* kNIMImgMsgKeyMd5 = "md5";
307 static const char* kNIMImgMsgKeySize = "size";
309 static const char* kNIMImgMsgKeyWidth = "w";
311 static const char* kNIMImgMsgKeyHeight = "h";
313 static const char* kNIMImgMsgKeyUrl = "url";
315 static const char* kNIMImgMsgKeyExt = "ext";
317 static const char* kNIMImgMsgKeyDisplayName = "name"; // attach图片类型多媒体资源参数键名定义
319 
323 static const char* kNIMAudioMsgKeyMd5 = "md5";
326 static const char* kNIMAudioMsgKeySize = "size";
328 static const char* kNIMAudioMsgKeyDuration = "dur";
330 static const char* kNIMAudioMsgKeyUrl = "url";
332 static const char* kNIMAudioMsgKeyExt = "ext";
334 static const char* kNIMAudioMsgKeyDisplayName = "name"; // attach语音类型多媒体资源参数键名定义
336 
340 static const char* kNIMVideoMsgKeyMd5 = "md5";
343 static const char* kNIMVideoMsgKeySize = "size";
345 static const char* kNIMVideoMsgKeyDisplayName = "name";
347 static const char* kNIMVideoMsgKeyDuration = "dur";
349 static const char* kNIMVideoMsgKeyWidth = "w";
351 static const char* kNIMVideoMsgKeyHeight = "h";
353 static const char* kNIMVideoMsgKeyUrl = "url";
355 static const char* kNIMVideoMsgKeyExt = "ext"; // attach短视频类型多媒体资源参数键名定义
357 
361 static const char* kNIMFileMsgKeyMd5 = "md5";
364 static const char* kNIMFileMsgKeySize = "size";
366 static const char* kNIMFileMsgKeyDisplayName = "name";
368 static const char* kNIMFileMsgKeyUrl = "url";
370 static const char* kNIMFileMsgKeyExt = "ext"; // attach文件类型多媒体资源参数键名定义
372 
376 static const char* kNIMLocationMsgKeyLatitude = "lat";
379 static const char* kNIMLocationMsgKeyLongitude = "lng";
381 static const char* kNIMLocationMsgKeyTitle = "title"; // attach位置类型多媒体资源参数键名定义
383 
387 static const char* kNIMBotRobotMsgKeyRobotID = "robotAccid";
390 static const char* kNIMBotRobotSentMsgKeyParam = "param";
392 static const char* kNIMBotRobotReceivedMsgKeyClientMsgID = "clientMsgId";
394 static const char* kNIMBotRobotReceivedMsgKeyMsgOut = "msgOut";
396 static const char* kNIMBotRobotReceivedMsgKeyRobotMsg = "robotMsg";
398 static const char* kNIMBotRobotReceivedMsgKeyRobotMsgFlag = "flag";
400 static const char* kNIMBotRobotReceivedMsgKeyRobotMsgMessage = "message"; // attach波特机器人类型多媒体资源参数键名定义
402 
406 static const char* kNIMBroadcastMsgKeyID = "id";
409 static const char* kNIMBroadcastMsgKeyFromAccid = "from_accid";
411 static const char* kNIMBroadcastMsgKeyTime = "time";
413 static const char* kNIMBroadcastMsgKeyBody = "body"; // 广播消息 Json Keys
415 
419 static const char* kNIMQueryMsgByOptionsAsyncKeyQueryRange = "query_range";
422 static const char* kNIMQueryMsgByOptionsAsyncKeyIDS = "ids";
424 static const char* kNIMQueryMsgByOptionsAsyncKeyLimit = "limit_count";
426 static const char* kNIMQueryMsgByOptionsAsyncKeyFromTime = "from_time";
428 static const char* kNIMQueryMsgByOptionsAsyncKeyEndTime = "end_time";
430 static const char* kNIMQueryMsgByOptionsAsyncKeyEndClientMSGID = "end_client_msg_id";
432 static const char* kNIMQueryMsgByOptionsAsyncKeyReverse = "reverse";
434 static const char* kNIMQueryMsgByOptionsAsyncKeyMsgType = "msg_type";
436 static const char* kNIMQueryMsgByOptionsAsyncKeyMsgSubType = "msg_sub_type";
438 static const char* kNIMQueryMsgByOptionsAsyncKeySearchContent = "search_content"; // 根据指定条件查询本地消息参数 Json Keys
440 
441 #ifdef __cplusplus
442 };
443 #endif //__cplusplus
444 #endif // NIM_SDK_DLL_EXPORT_HEADERS_TALK_DEF_H_
kNIMMsgKeyAntiSpamUsingYiDun
static const char * kNIMMsgKeyAntiSpamUsingYiDun
int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾而是通用反垃圾 其他都是按照原来的规则
Definition: nim_talk_def.h:201
kNIMMsgAttachKeyDisplayName
static const char * kNIMMsgAttachKeyDisplayName
string,用于显示的文件名,发送方选填,默认文件名
Definition: nim_talk_def.h:296
kNIMMsgKeyMsgSync
static const char * kNIMMsgKeyMsgSync
int,(可选)该消息是否支持发送者多端同步,可选,0:不支持,1:支持, 默认1
Definition: nim_talk_def.h:168
kNIMMsgKeyPushNeedPrefix
static const char * kNIMMsgKeyPushNeedPrefix
int,(可选)推送是否需要前缀,0:不需要,1:需要,默认1
Definition: nim_talk_def.h:180
kNIMVideoMsgKeyDuration
static const char * kNIMVideoMsgKeyDuration
int,短视频资源时间长度(毫秒),发送方必填
Definition: nim_talk_def.h:347
kNIMMsgKeyAntiCheatingYiDun
static const char * kNIMMsgKeyAntiCheatingYiDun
(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024
Definition: nim_talk_def.h:207
kNIMLocationMsgKeyLongitude
static const char * kNIMLocationMsgKeyLongitude
double,经度
Definition: nim_talk_def.h:379
nim_talk_receive_broadcast_cb_func
void(* nim_talk_receive_broadcast_cb_func)(const char *content, const char *json_extension, const void *user_data)
Definition: nim_talk_def.h:67
kNIMMsgKeyAntiSpamBizId
static const char * kNIMMsgKeyAntiSpamBizId
string, (可选)用户配置的对某些单条消息另外的反垃圾的业务ID
Definition: nim_talk_def.h:199
kNIMBotRobotReceivedMsgKeyRobotMsg
static const char * kNIMBotRobotReceivedMsgKeyRobotMsg
json string,机器人回复时带的字段,波特机器人消息
Definition: nim_talk_def.h:396
kNIMBroadcastMsgKeyID
static const char * kNIMBroadcastMsgKeyID
int64,消息ID
Definition: nim_talk_def.h:407
kNIMRecallMsgKeyTime
static const char * kNIMRecallMsgKeyTime
long,撤回操作的消息时间戳(毫秒)
Definition: nim_talk_def.h:94
kNIMFileMsgKeyExt
static const char * kNIMFileMsgKeyExt
string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名
Definition: nim_talk_def.h:370
kNIMMsgKeyClientMsgid
static const char * kNIMMsgKeyClientMsgid
string,客户端消息id
Definition: nim_talk_def.h:158
kNIMMsgKeyReplyMsgFromAccount
static const char * kNIMMsgKeyReplyMsgFromAccount
(可选)string,从属thread_info节点,被回复消息的消息发送者
Definition: nim_talk_def.h:217
kNIMAudioMsgKeyMd5
static const char * kNIMAudioMsgKeyMd5
string,资源MD5,发送方选填
Definition: nim_talk_def.h:324
nim_talk_ack_cb_func
void(* nim_talk_ack_cb_func)(const char *result, const void *user_data)
Definition: nim_talk_def.h:21
kNIMMsgKeyHistorySave
static const char * kNIMMsgKeyHistorySave
int,(可选)该消息是否存储云端历史,可选,0:不支持,1:支持, 默认1
Definition: nim_talk_def.h:164
kNIMMsgKeyReplyMsgTime
static const char * kNIMMsgKeyReplyMsgTime
(可选)long,从属thread_info节点,被回复消息的消息发送时间
Definition: nim_talk_def.h:221
kNIMMsgKeyAttach
static const char * kNIMMsgKeyAttach
string,消息多媒体资源参数,不同类型多媒体参数不同,发送非多媒体消息时不需要填写,如需使用json string,必须为可以解析为json的非格式化的字符串
Definition: nim_talk_def.h:156
kNIMMsgKeyFromDeviceId
static const char * kNIMMsgKeyFromDeviceId
string,消息发送方设备id,服务器填写,发送方不需要填写
Definition: nim_talk_def.h:146
kNIMMsgKeyThreadMsgTime
static const char * kNIMMsgKeyThreadMsgTime
(可选)long,从属thread_info节点,thread消息的消息发送时间
Definition: nim_talk_def.h:231
kNIMQueryMsgByOptionsAsyncKeyReverse
static const char * kNIMQueryMsgByOptionsAsyncKeyReverse
bool,true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false)
Definition: nim_talk_def.h:432
kNIMQueryMsgByOptionsAsyncKeySearchContent
static const char * kNIMQueryMsgByOptionsAsyncKeySearchContent
string,检索文本(目前只支持kNIMMessageTypeText和kNIMMessageTypeFile这两种类型消息的文本关键字检索,即支持文字消息和文件名的检索
Definition: nim_talk_def.h:438
kNIMMsgKeyTime
static const char * kNIMMsgKeyTime
long,消息时间戳(毫秒)
Definition: nim_talk_def.h:150
kNIMQueryMsgByOptionsAsyncKeyQueryRange
static const char * kNIMQueryMsgByOptionsAsyncKeyQueryRange
enum NIMMsgLogQueryRange,消息历史的检索范围(目前暂不支持某些范围的组合检索,详见NIMMsgLogQueryRange说明)
Definition: nim_talk_def.h:420
kNIMMsgKeyLocalResId
static const char * kNIMMsgKeyLocalResId
string,多媒体资源id,发送方选填,接收方收到的是客户端消息id
Definition: nim_talk_def.h:257
kNIMLocationMsgKeyLatitude
static const char * kNIMLocationMsgKeyLatitude
double,纬度
Definition: nim_talk_def.h:377
kNIMSendAckKeyRescode
static const char * kNIMSendAckKeyRescode
int,消息错误码(NIMResCode)
Definition: nim_talk_def.h:274
kNIMBroadcastMsgKeyTime
static const char * kNIMBroadcastMsgKeyTime
int64, 时间戳
Definition: nim_talk_def.h:411
kNIMAudioMsgKeyDisplayName
static const char * kNIMAudioMsgKeyDisplayName
string,用于显示的文件名,发送方选填,默认文件名
Definition: nim_talk_def.h:334
kNIMVideoMsgKeyExt
static const char * kNIMVideoMsgKeyExt
string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名
Definition: nim_talk_def.h:355
kNIMQueryMsgByOptionsAsyncKeyMsgType
static const char * kNIMQueryMsgByOptionsAsyncKeyMsgType
enum NIMMessageType 检索的消息类型(目前只支持kNIMMessageTypeText、kNIMMessageTypeImage和kNIMMessageTypeFile这三种类型消息)
Definition: nim_talk_def.h:434
kNIMMsgKeyLocalKeyTeamMsgUnreadCount
static const char * kNIMMsgKeyLocalKeyTeamMsgUnreadCount
int, 群消息未读数
Definition: nim_talk_def.h:251
kNIMMsgKeyReplyMsgToAccount
static const char * kNIMMsgKeyReplyMsgToAccount
(可选)string,从属thread_info节点,被回复消息的消息接受者,群的话是tid
Definition: nim_talk_def.h:219
kNIMQueryMsgByOptionsAsyncKeyIDS
static const char * kNIMQueryMsgByOptionsAsyncKeyIDS
jsonstring 会话id(对方的account id或者群组tid)的集合,目前暂不支持多个的组合检索,详见NIMMsgLogQueryRange说明
Definition: nim_talk_def.h:422
kNIMImgMsgKeySize
static const char * kNIMImgMsgKeySize
long,资源大小(KB),发送方选填
Definition: nim_talk_def.h:307
kNIMMsgKeySetMsgOffline
static const char * kNIMMsgKeySetMsgOffline
int,(可选)消息是否要存离线,0:不需要, 1:需要,默认1
Definition: nim_talk_def.h:184
kNIMQueryMsgByOptionsAsyncKeyLimit
static const char * kNIMQueryMsgByOptionsAsyncKeyLimit
int32, 本次查询的消息条数上限(最多100条)
Definition: nim_talk_def.h:424
kNIMAudioMsgKeyDuration
static const char * kNIMAudioMsgKeyDuration
int,语音资源时间长度(毫秒),发送方必填
Definition: nim_talk_def.h:328
nim_talk_team_notification_filter_func
bool(* nim_talk_team_notification_filter_func)(const char *content, const char *json_extension, const void *user_data)
Definition: nim_talk_def.h:39
kNIMBotRobotSentMsgKeyParam
static const char * kNIMBotRobotSentMsgKeyParam
json string,给机器人发送时需要填的字段,字段内容定义可见Demo源码或参考波特开发文档
Definition: nim_talk_def.h:390
kNIMMsgKeyThirdPartyCBEXT
static const char * kNIMMsgKeyThirdPartyCBEXT
(可选)string第三方回调回来的自定义扩展字段
Definition: nim_talk_def.h:241
kNIMImgMsgKeyWidth
static const char * kNIMImgMsgKeyWidth
int,图片宽度,发送方必填
Definition: nim_talk_def.h:309
kNIMRecallMsgKeyMsgTime
static const char * kNIMRecallMsgKeyMsgTime
long,要撤回消息的创建时间戳(毫秒)
Definition: nim_talk_def.h:100
kNIMMsgKeyType
static const char * kNIMMsgKeyType
int,消息类型(NIMMessageType)
Definition: nim_talk_def.h:152
kNIMMsgKeyReplyMsgIdServer
static const char * kNIMMsgKeyReplyMsgIdServer
(可选)long,从属thread_info节点,被回复消息的消息ID)serverId)
Definition: nim_talk_def.h:223
kNIMSendAckKeyCallbackExt
static const char * kNIMSendAckKeyCallbackExt
string,第三方回调回来的自定义扩展字段 v7.8
Definition: nim_talk_def.h:278
kNIMMsgKeyLocalRescode
static const char * kNIMMsgKeyLocalRescode
int,消息错误码(NIMResCode)
Definition: nim_talk_def.h:124
kNIMMsgKeyIsForcePush
static const char * kNIMMsgKeyIsForcePush
int,(可选)群组消息是否强推,0:不强推, 1:强推,属性只针对群组消息强推列表
Definition: nim_talk_def.h:190
kNIMQueryMsgByOptionsAsyncKeyEndClientMSGID
static const char * kNIMQueryMsgByOptionsAsyncKeyEndClientMSGID
string,结束查询的最后一条消息的end_client_msg_id(不包含在查询结果中)
Definition: nim_talk_def.h:430
kNIMImgMsgKeyHeight
static const char * kNIMImgMsgKeyHeight
int,图片高度,发送方必填
Definition: nim_talk_def.h:311
kNIMMsgKeyToType
static const char * kNIMMsgKeyToType
int,会话类型(NIMSessionType)
Definition: nim_talk_def.h:138
kNIMRecallMsgKeyFromAccID
static const char * kNIMRecallMsgKeyFromAccID
string,消息发送方ID
Definition: nim_talk_def.h:86
kNIMBotRobotReceivedMsgKeyClientMsgID
static const char * kNIMBotRobotReceivedMsgKeyClientMsgID
string,机器人回复时带的字段,表示该条回复相关联的消息ID
Definition: nim_talk_def.h:392
kNIMFileMsgKeyUrl
static const char * kNIMFileMsgKeyUrl
string,资源URL, 发送方不需要填写
Definition: nim_talk_def.h:368
kNIMMsgKeyAntiSpamExt
static const char * kNIMMsgKeyAntiSpamExt
(可选)String, 易盾反垃圾扩展字段,限制json,长度限制1024
Definition: nim_talk_def.h:209
kNIMRecallMsgKeyToAccID
static const char * kNIMRecallMsgKeyToAccID
string,消息接收方ID
Definition: nim_talk_def.h:88
kNIMMsgAttachKeyUrl
static const char * kNIMMsgAttachKeyUrl
long,资源URL, 发送方不需要填写
Definition: nim_talk_def.h:292
kNIMImgMsgKeyUrl
static const char * kNIMImgMsgKeyUrl
string,资源URL, 发送方不需要填写
Definition: nim_talk_def.h:313
kNIMQueryMsgByOptionsAsyncKeyFromTime
static const char * kNIMQueryMsgByOptionsAsyncKeyFromTime
int64,起始时间点,单位:毫秒
Definition: nim_talk_def.h:426
kNIMRecallMsgKeyNotify
static const char * kNIMRecallMsgKeyNotify
string,自定义通知文案,按需填
Definition: nim_talk_def.h:92
kNIMSendAckKeyAntiSpamRes
static const char * kNIMSendAckKeyAntiSpamRes
string,易盾反垃圾返回的结果字段
Definition: nim_talk_def.h:280
kNIMMsgKeyFromNick
static const char * kNIMMsgKeyFromNick
string,消息发送方昵称,服务器填写,发送方不需要填写
Definition: nim_talk_def.h:148
kNIMMsgKeyThreadMsgIdServer
static const char * kNIMMsgKeyThreadMsgIdServer
(可选)long,从属thread_info节点,thread消息的消息ID)serverId)
Definition: nim_talk_def.h:233
kNIMSendAckKeyMsgId
static const char * kNIMSendAckKeyMsgId
string,客户端消息id
Definition: nim_talk_def.h:270
kNIMMsgKeyLocalLogSubStatus
static const char * kNIMMsgKeyLocalLogSubStatus
int,消息二级状态(NIMMsgLogSubStatus)
Definition: nim_talk_def.h:261
kNIMMsgKeyToAccount
static const char * kNIMMsgKeyToAccount
string,消息接收方id,给自己发送消息时填写自己id
Definition: nim_talk_def.h:140
kNIMMsgKeyIsUpdateSession
static const char * kNIMMsgKeyIsUpdateSession
(可选)bool, 消息是否需要刷新到session服务,false:否,true:是;只有消息存离线的情况下,才会判断该参数,缺省:true
Definition: nim_talk_def.h:205
kNIMLocationMsgKeyTitle
static const char * kNIMLocationMsgKeyTitle
string,位置信息
Definition: nim_talk_def.h:381
nim_talk_recall_msg_func
void(* nim_talk_recall_msg_func)(int rescode, const char *content, const char *json_extension, const void *user_data)
Definition: nim_talk_def.h:58
kNIMMsgKeyFromAccount
static const char * kNIMMsgKeyFromAccount
string,消息发送方id,服务器填写,发送方不需要填写
Definition: nim_talk_def.h:142
nim_talk_recall_extra_params
struct _nim_talk_recall_extra_params_ nim_talk_recall_extra_params
kNIMMsgKeyLocalExt
static const char * kNIMMsgKeyLocalExt
string,只维护在本地的扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_talk_def.h:263
kNIMMsgKeySubType
static const char * kNIMMsgKeySubType
Definition: nim_talk_def.h:242
kNIMMsgKeyThreadMsgIdClient
static const char * kNIMMsgKeyThreadMsgIdClient
(可选)string,从属thread_info节点,thread消息的消息ID)clientId)
Definition: nim_talk_def.h:235
kNIMMsgKeyThreadInfo
static const char * kNIMMsgKeyThreadInfo
(可选) json object,被回复消息的消息发送者
Definition: nim_talk_def.h:215
kNIMMsgKeyAntiSpamContent
static const char * kNIMMsgKeyAntiSpamContent
Definition: nim_talk_def.h:195
kNIMBotRobotReceivedMsgKeyRobotMsgFlag
static const char * kNIMBotRobotReceivedMsgKeyRobotMsgFlag
string,机器人回复时带的字段,表示该条回复类型,类型定义可见Demo源码或参考波特开发文档,bot或faq
Definition: nim_talk_def.h:398
kNIMQueryMsgByOptionsAsyncKeyMsgSubType
static const char * kNIMQueryMsgByOptionsAsyncKeyMsgSubType
int32,消息的子类型
Definition: nim_talk_def.h:436
kNIMMsgKeyLocalKeyTeamMsgAckSent
static const char * kNIMMsgKeyLocalKeyTeamMsgAckSent
bool 是否已经发送群消息已读回执
Definition: nim_talk_def.h:249
kNIMMsgAttachKeyExt
static const char * kNIMMsgAttachKeyExt
string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名
Definition: nim_talk_def.h:294
kNIMRecallMsgTagAttach
static const char * kNIMRecallMsgTagAttach
string,v8.2.0
Definition: nim_talk_def.h:108
kNIMBotRobotReceivedMsgKeyMsgOut
static const char * kNIMBotRobotReceivedMsgKeyMsgOut
bool,是否为机器人回复,默认为true
Definition: nim_talk_def.h:394
kNIMRecallMsgKeyNotifyFeature
static const char * kNIMRecallMsgKeyNotifyFeature
int,撤回通知种类(NIMMessageFeature)
Definition: nim_talk_def.h:96
kNIMMsgKeyBody
static const char * kNIMMsgKeyBody
string,消息正文,长度限制:5000字符
Definition: nim_talk_def.h:154
kNIMFileMsgKeySize
static const char * kNIMFileMsgKeySize
long,资源大小(KB),发送方选填
Definition: nim_talk_def.h:364
kNIMMsgKeyReplyMsgIdClient
static const char * kNIMMsgKeyReplyMsgIdClient
(可选)string,从属thread_info节点,被回复消息的消息ID)clientId)
Definition: nim_talk_def.h:225
_nim_talk_recall_extra_params_
Definition: nim_talk_def.h:72
kNIMMsgKeyServerMsgid
static const char * kNIMMsgKeyServerMsgid
long,服务器端消息id
Definition: nim_talk_def.h:160
kNIMMsgKeyForcePushList
static const char * kNIMMsgKeyForcePushList
string,(可选)群组消息强推列表,推送指定账号id string array json, 如果推送全员不填
Definition: nim_talk_def.h:186
kNIMRecallMsgKeyMsgFromNick
static const char * kNIMRecallMsgKeyMsgFromNick
string,要撤回消息的发送者昵称
Definition: nim_talk_def.h:102
kNIMMsgKeyDeleted
static const char * kNIMMsgKeyDeleted
Definition: nim_talk_def.h:238
kNIMMsgKeyLocalFilePath
static const char * kNIMMsgKeyLocalFilePath
string,多媒体消息资源本地绝对路径,SDK本地维护,发送多媒体消息时必填
Definition: nim_talk_def.h:253
kNIMSendAckKeyTalkId
static const char * kNIMSendAckKeyTalkId
string,会话id
Definition: nim_talk_def.h:272
kNIMMsgKeyLocalTalkId
static const char * kNIMMsgKeyLocalTalkId
string,会话id,发送方选填,接收方收到的是消息发送方id
Definition: nim_talk_def.h:255
nim_talk_receive_cb_func
void(* nim_talk_receive_cb_func)(const char *content, const char *json_extension, const void *user_data)
Definition: nim_talk_def.h:30
kNIMMsgKeyAntiSpamEnable
static const char * kNIMMsgKeyAntiSpamEnable
int, 是否需要过易盾反垃圾, 0:不需要,1:需要, 默认0
Definition: nim_talk_def.h:192
kNIMFileMsgKeyMd5
static const char * kNIMFileMsgKeyMd5
string,资源MD5,发送方选填
Definition: nim_talk_def.h:362
kNIMRecallMsgKeyMsgExist
static const char * kNIMRecallMsgKeyMsgExist
bool,撤回的消息本地是否存在,比如对方离线时发一条消息又撤回,对方上线收到离线撤回通知该tag为false
Definition: nim_talk_def.h:98
kNIMMsgKeyForcePushContent
static const char * kNIMMsgKeyForcePushContent
string,(可选)群组消息强推文本
Definition: nim_talk_def.h:188
public_defines.h
NIM SDK 及 NIM ChatRoom SDK 公用头文件
kNIMRecallMsgTagCallbackExt
static const char * kNIMRecallMsgTagCallbackExt
string,v8.2.0 第三方回调回来的自定义字段
Definition: nim_talk_def.h:106
kNIMMsgKeyLocalReceiveMsgContent
static const char * kNIMMsgKeyLocalReceiveMsgContent
json string,消息内容,协议定义的消息结构
Definition: nim_talk_def.h:128
kNIMMsgKeyPushContent
static const char * kNIMMsgKeyPushContent
string,(可选)自定义推送文案,长度限制200字节
Definition: nim_talk_def.h:176
kNIMAudioMsgKeyExt
static const char * kNIMAudioMsgKeyExt
string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名
Definition: nim_talk_def.h:332
kNIMMsgAttachKeySize
static const char * kNIMMsgAttachKeySize
long,资源大小(KB),发送方选填
Definition: nim_talk_def.h:290
kNIMVideoMsgKeyHeight
static const char * kNIMVideoMsgKeyHeight
int,短视频画面高度,发送方必填
Definition: nim_talk_def.h:351
kNIMVideoMsgKeySize
static const char * kNIMVideoMsgKeySize
long,资源大小(KB),发送方选填
Definition: nim_talk_def.h:343
kNIMBroadcastMsgKeyBody
static const char * kNIMBroadcastMsgKeyBody
string,内容
Definition: nim_talk_def.h:413
kNIMBotRobotReceivedMsgKeyRobotMsgMessage
static const char * kNIMBotRobotReceivedMsgKeyRobotMsgMessage
json object,机器人回复时带的字段,表示该条回复内容,字段内容定义可见Demo源码或参考波特开发文档
Definition: nim_talk_def.h:400
kNIMMsgKeyServerExt
static const char * kNIMMsgKeyServerExt
string,(可选)自定义扩展字段,必须为可以解析为json的非格式化的字符串,长度限制1024
Definition: nim_talk_def.h:172
kNIMVideoMsgKeyMd5
static const char * kNIMVideoMsgKeyMd5
string,资源MD5,发送方选填
Definition: nim_talk_def.h:341
kNIMMsgKeyResendFlag
static const char * kNIMMsgKeyResendFlag
int,消息重发标记位,第一次发送0,重发1
Definition: nim_talk_def.h:162
kNIMMsgKeyLocalLogStatus
static const char * kNIMMsgKeyLocalLogStatus
int,消息状态(NIMMsgLogStatus)
Definition: nim_talk_def.h:259
kNIMVideoMsgKeyUrl
static const char * kNIMVideoMsgKeyUrl
string,资源URL, 发送方不需要填写
Definition: nim_talk_def.h:353
nim_talk_message_filter_func
bool(* nim_talk_message_filter_func)(const char *content, const char *json_extension, const void *user_data)
Definition: nim_talk_def.h:48
kNIMMsgKeyTeamMsgAck
static const char * kNIMMsgKeyTeamMsgAck
(可选)int, 群消息是否需要已读业务,0:不需要,1:需要
Definition: nim_talk_def.h:203
kNIMVideoMsgKeyDisplayName
static const char * kNIMVideoMsgKeyDisplayName
string,用于显示的文件名,发送方选填,默认文件名
Definition: nim_talk_def.h:345
kNIMQueryMsgByOptionsAsyncKeyEndTime
static const char * kNIMQueryMsgByOptionsAsyncKeyEndTime
int64,结束时间点,单位:毫秒
Definition: nim_talk_def.h:428
kNIMVideoMsgKeyWidth
static const char * kNIMVideoMsgKeyWidth
int,短视频画面宽度,发送方必填
Definition: nim_talk_def.h:349
kNIMAudioMsgKeyUrl
static const char * kNIMAudioMsgKeyUrl
string,资源URL, 发送方不需要填写
Definition: nim_talk_def.h:330
kNIMMsgKeyAntiSpamRes
static const char * kNIMMsgKeyAntiSpamRes
String, 易盾反垃圾返回的结果字段
Definition: nim_talk_def.h:211
kNIMRecallMsgKeyToType
static const char * kNIMRecallMsgKeyToType
int,会话类型(NIMSessionType)
Definition: nim_talk_def.h:84
kNIMMsgKeyThreadMsgToAccount
static const char * kNIMMsgKeyThreadMsgToAccount
(可选)string,t从属thread_info节点,hread消息的消息接受者,群的话是tid
Definition: nim_talk_def.h:229
kNIMImgMsgKeyMd5
static const char * kNIMImgMsgKeyMd5
string,资源MD5,发送方选填
Definition: nim_talk_def.h:305
kNIMBotRobotMsgKeyRobotID
static const char * kNIMBotRobotMsgKeyRobotID
string,机器人云信ID
Definition: nim_talk_def.h:388
kNIMRecallMsgKeyMsgId
static const char * kNIMRecallMsgKeyMsgId
string,客户端消息ID
Definition: nim_talk_def.h:90
kNIMMsgKeyLocalMsgFeature
static const char * kNIMMsgKeyLocalMsgFeature
int,消息种类(NIMMessageFeature),SDK本地维护
Definition: nim_talk_def.h:126
kNIMImgMsgKeyDisplayName
static const char * kNIMImgMsgKeyDisplayName
string,用于显示的文件名,发送方选填,默认文件名
Definition: nim_talk_def.h:317
kNIMImgMsgKeyExt
static const char * kNIMImgMsgKeyExt
string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名
Definition: nim_talk_def.h:315
kNIMMsgKeyClientAntiSpam
static const char * kNIMMsgKeyClientAntiSpam
int, (可选) 是否命中客户端反垃圾,命中:1 未命中:0 或者不填写
Definition: nim_talk_def.h:197
kNIMFileMsgKeyDisplayName
static const char * kNIMFileMsgKeyDisplayName
string,用于显示的文件名,发送方选填,默认文件名
Definition: nim_talk_def.h:366
kNIMSendAckKeyTimetag
static const char * kNIMSendAckKeyTimetag
long,消息时间戳(毫秒),收到ack包时更新上层缓存的消息时间戳
Definition: nim_talk_def.h:276
kNIMRecallMsgKeyOpeAccID
static const char * kNIMRecallMsgKeyOpeAccID
string,操作者ID
Definition: nim_talk_def.h:104
kNIMMsgAttachKeyMd5
static const char * kNIMMsgAttachKeyMd5
string,资源MD5,发送方选填
Definition: nim_talk_def.h:288
kNIMMsgKeyThreadMsgFromAccount
static const char * kNIMMsgKeyThreadMsgFromAccount
(可选)string,从属thread_info节点,thread消息的消息发送者
Definition: nim_talk_def.h:227
kNIMMsgKeyFromClientType
static const char * kNIMMsgKeyFromClientType
int,消息发送方客户端类型(NIMClientType),服务器填写,发送方不需要填写
Definition: nim_talk_def.h:144
kNIMMsgKeyPushPayload
static const char * kNIMMsgKeyPushPayload
string,(可选)第三方自定义的推送属性,必须为可以解析为json的非格式化的字符串,长度2048
Definition: nim_talk_def.h:174
kNIMMsgKeyPushEnable
static const char * kNIMMsgKeyPushEnable
int,(可选)是否需要推送, 0:不需要,1:需要,默认1,aos在收到0是不要模拟本地推送
Definition: nim_talk_def.h:178
kNIMMsgKeyPushNeedBadge
static const char * kNIMMsgKeyPushNeedBadge
int,(可选)推送是否要做消息计数(角标),0:不需要,1:需要,默认1
Definition: nim_talk_def.h:170
kNIMAudioMsgKeySize
static const char * kNIMAudioMsgKeySize
long,资源大小(KB),发送方选填
Definition: nim_talk_def.h:326
kNIMMsgAttachKeyTag
static const char * kNIMMsgAttachKeyTag
string, (可选)发送含有附件的消息时使用的场景标签(可参见nos删除策略) ,Audio Image Video File 或者可以被SDK解析到本地文件路径的自定义消息
Definition: nim_talk_def.h:298
kNIMMsgKeyMsgRoaming
static const char * kNIMMsgKeyMsgRoaming
int,(可选)该消息是否支持漫游,可选,0:不支持,1:支持, 默认1
Definition: nim_talk_def.h:166
kNIMBroadcastMsgKeyFromAccid
static const char * kNIMBroadcastMsgKeyFromAccid
jstring,发送者accid,可能不存在
Definition: nim_talk_def.h:409
kNIMMsgKeyMsgRoutable
static const char * kNIMMsgKeyMsgRoutable
int,(可选)该消息是否抄送,0:不支持,1:支持,默认按照app的路由开关
Definition: nim_talk_def.h:182