NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_sysmsg_def.h
浏览该文件的文档.
1
7#ifndef NIM_SDK_DLL_EXPORT_HEADERS_SYSMSG_DEF_H_
8#define NIM_SDK_DLL_EXPORT_HEADERS_SYSMSG_DEF_H_
9
10#include "public_defines.h"
11
12#ifdef __cplusplus
13extern "C" {
14#endif
21typedef void (*nim_custom_sysmsg_ack_cb_func)(const char* result, const void* user_data);
22
30typedef void (*nim_sysmsg_receive_cb_func)(const char* content, const char* json_extension, const void* user_data);
31
40typedef void (*nim_sysmsg_query_cb_func)(int count, const char* result, const char* json_extension, const void* user_data);
41
50typedef void (*nim_sysmsg_res_cb_func)(int res_code, int unread_count, const char* json_extension, const void* user_data);
51
61typedef void (*nim_sysmsg_res_ex_cb_func)(int res_code, int64_t msg_id, int unread_count, const char* json_extension, const void* user_data);
62
72static const char* kNIMSysMsglogQueryKeyCount = "count";
74static const char* kNIMSysMsglogQueryKeyUnreadCount = "unread_count";
76static const char* kNIMSysMsglogQueryKeyContent = "content"; // 查询系统消息历史结果Json Keys
78
88static const char* kNIMSendSysMsgAckKeyMsgId = "msg_id";
90static const char* kNIMSendSysMsgAckKeyTalkId = "talk_id";
92static const char* kNIMSendSysMsgAckKeyRescode = "rescode"; // 发送透传的系统消息回执Json Keys
94
105static const char* kNIMSysMsgKeyLocalRescode = "rescode";
107static const char* kNIMSysMsgKeyLocalFeature = "feature";
109static const char* kNIMSysMsgKeyLocalUnreadCount = "unread_count";
111static const char* kNIMSysMsgKeyLocalContent = "content"; // 接收系统消息Json Keys,本地定义
113
118static const char* kNIMSysMsgKeyTime = "msg_time";
120static const char* kNIMSysMsgKeyType = "msg_type";
122static const char* kNIMSysMsgKeyToAccount = "to_account";
124static const char* kNIMSysMsgKeyFromAccount = "from_account";
126static const char* kNIMSysMsgKeyMsg = "msg";
128static const char* kNIMSysMsgKeyAttach = "attach";
130static const char* kNIMSysMsgKeyMsgId = "msg_id";
132static const char* kNIMSysMsgKeyLocalStatus = "log_status";
134static const char* kNIMSysMsgKeyLocalClientMsgId = "client_msg_id";
136static const char* kNIMSysMsgKeyLocalNotificationId = "client_notification_id";
138static const char* kNIMSysMsgKeyCustomSaveFlag = "custom_save_flag";
140static const char* kNIMSysMsgKeyCustomApnsText = "custom_apns_text";
142static const char* kNIMSysMsgKeyPushPayload = "push_payload";
144static const char* kNIMSysMsgKeyPushEnable = "push_enable";
146static const char* kNIMSysMsgKeyPushNeedBadge = "push_need_badge";
148static const char* kNIMSysMsgKeyPushNeedPrefix = "push_prefix";
150static const char* kNIMSysMsgKeyAntiSpamEnable = "anti_spam_enable";
152static const char* kNIMSysMsgKeyAntiSpamContent = "anti_spam_content";
154static const char* kNIMSysMsgKeyEnvConfig = "env_config";
156static const char* kNIMSysMsgKeyCallbackExt = "callback_ext";
157 // 接收系统消息Json Keys,协议定义
159
174};
175
198};
199
200#ifdef __cplusplus
201};
202#endif //__cplusplus
203#endif // NIM_SDK_DLL_EXPORT_HEADERS_SYSMSG_DEF_H_
static const char * kNIMSysMsgKeyMsgId
long 服务器消息id(自定义通知消息,必须填0),发送方不需要填写
Definition: nim_sysmsg_def.h:130
static const char * kNIMSysMsgKeyAntiSpamEnable
int, (功能暂时不开放)是否需要过易盾反垃圾, 0:不需要,1:需要, 默认0
Definition: nim_sysmsg_def.h:150
static const char * kNIMSysMsgKeyLocalNotificationId
string 本地定义的通知 id, 选填, 建议使用uuid
Definition: nim_sysmsg_def.h:136
NIMSysMsgStatus
Definition: nim_sysmsg_def.h:161
@ kNIMSysMsgStatusNone
默认,未读
Definition: nim_sysmsg_def.h:163
@ kNIMSysMsgStatusDecline
收到消息,拒绝
Definition: nim_sysmsg_def.h:167
@ kNIMSysMsgStatusRead
收到消息,已读
Definition: nim_sysmsg_def.h:169
@ kNIMSysMsgStatusInvalid
已失效
Definition: nim_sysmsg_def.h:173
@ kNIMSysMsgStatusDeleted
已删
Definition: nim_sysmsg_def.h:171
@ kNIMSysMsgStatusPass
收到消息,通过
Definition: nim_sysmsg_def.h:165
static const char * kNIMSysMsgKeyLocalStatus
int 本地定义的系统消息状态,见NIMSysMsgStatus,发送方不需要填写
Definition: nim_sysmsg_def.h:132
static const char * kNIMSysMsgKeyFromAccount
string 自己id,选填
Definition: nim_sysmsg_def.h:124
static const char * kNIMSysMsgKeyCustomSaveFlag
int (可选)自定义通知消息是否存离线:0-不存(只发给在线用户),1-存(可发给离线用户)
Definition: nim_sysmsg_def.h:138
static const char * kNIMSysMsgKeyCallbackExt
string, (可选) 第三方回调返回的自定义字段
Definition: nim_sysmsg_def.h:156
static const char * kNIMSysMsgKeyPushPayload
json string, (可选)第三方自定义的推送属性,必须为可以解析为Json的非格式化的字符串,长度2048
Definition: nim_sysmsg_def.h:142
static const char * kNIMSysMsgKeyPushEnable
int (可选)是否需要推送, 0:不需要,1:需要,默认1
Definition: nim_sysmsg_def.h:144
void(* nim_custom_sysmsg_ack_cb_func)(const char *result, const void *user_data)
Definition: nim_sysmsg_def.h:21
static const char * kNIMSysMsgKeyAntiSpamContent
string, (功能暂时不开放)(可选)开发者自定义的反垃圾字段
Definition: nim_sysmsg_def.h:152
void(* nim_sysmsg_res_ex_cb_func)(int res_code, int64_t msg_id, int unread_count, const char *json_extension, const void *user_data)
Definition: nim_sysmsg_def.h:61
static const char * kNIMSysMsgKeyPushNeedPrefix
int (可选)推送需要前缀,0:不需要,1:需要,默认0
Definition: nim_sysmsg_def.h:148
static const char * kNIMSendSysMsgAckKeyRescode
int, 返回的错误码,见NIMResCode
Definition: nim_sysmsg_def.h:92
static const char * kNIMSysMsgKeyLocalContent
json string, 协议定义的系统消息结构
Definition: nim_sysmsg_def.h:111
static const char * kNIMSysMsgKeyLocalRescode
int, 返回的错误码,见NIMResCode
Definition: nim_sysmsg_def.h:105
static const char * kNIMSysMsglogQueryKeyCount
int, 查询得到的数量
Definition: nim_sysmsg_def.h:72
void(* nim_sysmsg_res_cb_func)(int res_code, int unread_count, const char *json_extension, const void *user_data)
Definition: nim_sysmsg_def.h:50
static const char * kNIMSysMsgKeyMsg
string 只读字段,SDK不转发该字段
Definition: nim_sysmsg_def.h:126
static const char * kNIMSysMsglogQueryKeyContent
json object array 协议定义的系统消息结构
Definition: nim_sysmsg_def.h:76
static const char * kNIMSysMsgKeyEnvConfig
string, (可选) 指向自定义抄送的配置
Definition: nim_sysmsg_def.h:154
static const char * kNIMSysMsglogQueryKeyUnreadCount
int, 每次查询带回的是当前的总的未读数
Definition: nim_sysmsg_def.h:74
static const char * kNIMSysMsgKeyTime
long 时间戳,选填
Definition: nim_sysmsg_def.h:118
static const char * kNIMSysMsgKeyLocalFeature
int, 本地定义的消息特征,见NIMMessageFeature
Definition: nim_sysmsg_def.h:107
static const char * kNIMSendSysMsgAckKeyMsgId
string, 本地定义的消息id,返回的是发送方发送时填写的id
Definition: nim_sysmsg_def.h:88
void(* nim_sysmsg_query_cb_func)(int count, const char *result, const char *json_extension, const void *user_data)
Definition: nim_sysmsg_def.h:40
static const char * kNIMSysMsgKeyAttach
string 消息内容,规定是可以解析为Json格式的字符串,必须为非格式化形式
Definition: nim_sysmsg_def.h:128
NIMSysMsgType
Definition: nim_sysmsg_def.h:177
@ kNIMSysMsgTypeTeamInvite
邀请进群
Definition: nim_sysmsg_def.h:183
@ kNIMSysMsgTypeFriendDel
删除好友
Definition: nim_sysmsg_def.h:189
@ kNIMSysMsgTypeFriendAdd
加好友, kNIMSysMsgKeyAttach: {"vt":verifyType}
Definition: nim_sysmsg_def.h:187
@ kNIMSysMsgTypeTeamApply
申请入群
Definition: nim_sysmsg_def.h:179
@ kNIMSysMsgTypeCustomSuperTeamMsg
超大群透传消息(透传消息的内容放到kNIMSysMsgKeyAttach),SDK对该类消息不计入未读数, 即使kNIMSysMsgKeyPushNeedBadge为1
Definition: nim_sysmsg_def.h:195
@ kNIMSysMsgTypeTeamReject
拒绝入群申请
Definition: nim_sysmsg_def.h:181
@ kNIMSysMsgTypeCustomP2PMsg
点对点透传消息(透传消息的内容放到kNIMSysMsgKeyAttach),SDK对该类消息不计入未读数, 即使kNIMSysMsgKeyPushNeedBadge为1
Definition: nim_sysmsg_def.h:191
@ kNIMSysMsgTypeCustomTeamMsg
群透传消息(透传消息的内容放到kNIMSysMsgKeyAttach),SDK对该类消息不计入未读数, 即使kNIMSysMsgKeyPushNeedBadge为1
Definition: nim_sysmsg_def.h:193
@ kNIMSysMsgTypeTeamInviteReject
拒绝邀请
Definition: nim_sysmsg_def.h:185
@ kNIMSysMsgTypeUnknown
未知类型,本地使用,发送时勿使用,作为默认
Definition: nim_sysmsg_def.h:197
static const char * kNIMSysMsgKeyLocalUnreadCount
int, 每次带回的是当前的总的未读数
Definition: nim_sysmsg_def.h:109
static const char * kNIMSendSysMsgAckKeyTalkId
string, 会话id,消息接收者id
Definition: nim_sysmsg_def.h:90
static const char * kNIMSysMsgKeyPushNeedBadge
int (可选)推送是否要做消息计数(角标),0:不需要,1:需要,默认1
Definition: nim_sysmsg_def.h:146
static const char * kNIMSysMsgKeyLocalClientMsgId
string 本地定义的消息 id, 发送方必填,建议使用uuid
Definition: nim_sysmsg_def.h:134
static const char * kNIMSysMsgKeyToAccount
string 接收者id,如果是个人,则是对方用户id,如果是群,则是群id,必填
Definition: nim_sysmsg_def.h:122
static const char * kNIMSysMsgKeyType
int 通知类型,NIMSysMsgType,必填
Definition: nim_sysmsg_def.h:120
static const char * kNIMSysMsgKeyCustomApnsText
string (可选)自定义通知消息推送文本,不填则不推送
Definition: nim_sysmsg_def.h:140
void(* nim_sysmsg_receive_cb_func)(const char *content, const char *json_extension, const void *user_data)
Definition: nim_sysmsg_def.h:30
NIM SDK 及 NIM ChatRoom SDK 公用头文件