NIM PC Cross Platform SDK
nim_qchat_public_def.h
Go to the documentation of this file.
1
11#ifndef __NIM_QCHAT_PUBLIC_DEF_H__
12#define __NIM_QCHAT_PUBLIC_DEF_H__
13
14#include <stddef.h>
15#include <cstdint>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
26};
27
34};
35
42};
43
58};
59
60static inline bool NIMQChatSubscribeTypeIsServer(NIMQChatSubscribeType type) {
62};
63
64static inline bool NIMQChatSubscribeTypeIsChannel(NIMQChatSubscribeType type) {
67};
68
69static inline bool NIMQChatSubscribeTypeIsMsg(NIMQChatSubscribeType type) {
71};
72
79};
80
87};
88
97};
98
105};
106
111};
112
116 uint32_t res_code;
119};
120
124 char* text_bid;
126 char* pic_bid;
127};
128
132 uint64_t server_id;
134 uint64_t channel_id;
135};
136
148 char* env;
151 // 以下字段仅在收到消息时有效
156};
157
174};
175
183 char* cursor;
184};
185
188 // 通用错误码
227 // 群错误码
252 // 数据整解编错误代码
261 // 客户端自定义的错误号
268 // 客户端自定义的消息错误号
293 // 客户端自定义的RTS错误号
314 // 客户端自定义的api调用问题
327};
328
332 uint64_t server_id;
334 uint64_t channel_id;
338 uint64_t unread_count;
345};
346
350 uint64_t server_id;
352 uint64_t unread_count;
357};
358
359#ifdef __cplusplus
360}
361#endif
362
363#endif // __NIM_QCHAT_PUBLIC_DEF_H__
NIMResCode
Definition: nim_chatroom_res_code_def.h:15
NIMQChatChannelViewMode
Definition: nim_qchat_public_def.h:21
@ kNIMQChatChannelViewModePublic
公开模式
Definition: nim_qchat_public_def.h:23
@ kNIMQChatChannelViewModePrivate
私密模式
Definition: nim_qchat_public_def.h:25
NIMQChatChannelSyncMode
Definition: nim_qchat_public_def.h:29
@ kNIMQChatChannelSyncModeNoSync
不与频道分组同步
Definition: nim_qchat_public_def.h:31
@ kNIMQChatChannelSyncModeSync
与频道分组同步
Definition: nim_qchat_public_def.h:33
@ kNIMResEPacket
打包错误
Definition: nim_qchat_public_def.h:258
@ kNIMResAccountBlock
帐号被禁用
Definition: nim_qchat_public_def.h:216
@ kNIMLocalResRtsVChatExist
rts会话 音视频已存在
Definition: nim_qchat_public_def.h:299
@ kNIMLocalResNetworkError
客户端本地错误号,本地网络错误,需要检查本地网络
Definition: nim_qchat_public_def.h:267
@ kNIMLocalResAPIErrorInitUndone
还未初始化或初始化未正常完成
Definition: nim_qchat_public_def.h:316
@ kNIMLocalResRtsChannelNotExist
rts会话 通道不存在
Definition: nim_qchat_public_def.h:303
@ kNIMResTeamInviteSuccess
邀请成功
Definition: nim_qchat_public_def.h:247
@ kNIMResTimeoutError
请求过程超时
Definition: nim_qchat_public_def.h:204
@ kNIMLocalResRtsError
rts会话 未知错误
Definition: nim_qchat_public_def.h:295
@ kNIMLocalResAPIErrorVersionError
SDK版本不对,可能会引发其他问题
Definition: nim_qchat_public_def.h:322
@ kNIMLocalResFrequently
本地错误码,操作太过频繁
Definition: nim_qchat_public_def.h:282
@ kNIMResTeamMemberLimit
操作成功,但部分成员的群数量超限
Definition: nim_qchat_public_def.h:251
@ kNIMResExceedLimit
超过配置有效期
Definition: nim_qchat_public_def.h:224
@ kNIMResExist
对象已经存在/重复操作
Definition: nim_qchat_public_def.h:212
@ kNIMResTeamLimit
创建群数量限制
Definition: nim_qchat_public_def.h:239
@ kNIMResTeamENotExist
群不存在
Definition: nim_qchat_public_def.h:233
@ kNIMLocalResRtsStatusError
rts会话 通道状态不正确
Definition: nim_qchat_public_def.h:301
@ kNIMLocalResAPIErrorLoginUndone
还未登陆或登录未完成
Definition: nim_qchat_public_def.h:318
@ kNIMLocalResMsgNosDownloadCheckError
收到文件消息,NOS下载完成后本地文件检查错误,一般为下载的文件大小与文件信息不符
Definition: nim_qchat_public_def.h:274
@ kNIMResTeamUserStatusErr
群成员状态不对
Definition: nim_qchat_public_def.h:241
@ kNIMLocalResParameterError
本地错误码,参数错误,(收到消息,资源下载地址无效,无法下载)
Definition: nim_qchat_public_def.h:280
@ kNIMResForcePushCountLimit
强推列表账号数量超限
Definition: nim_qchat_public_def.h:249
@ kNIMResEUnpacket
解包错误
Definition: nim_qchat_public_def.h:256
@ kNIMResFrequently
操作太过频繁
Definition: nim_qchat_public_def.h:210
@ kNIMResForbidden
禁止操作
Definition: nim_qchat_public_def.h:198
@ kNIMLocalResRtsIdNotExist
rts会话 id不存在
Definition: nim_qchat_public_def.h:297
@ kNIMLocalRes
值大于该错误号的都是客户端自定义的错误号。不能随意更改其值!
Definition: nim_qchat_public_def.h:263
@ kNIMLocalResMsgSendNosError
发送消息,上传NOS失败
Definition: nim_qchat_public_def.h:286
@ kNIMLocalResAPIErrorChatroomMixError
聊天室模式混用错误,不支持同时以登陆状态和匿名状态登陆聊天室
Definition: nim_qchat_public_def.h:324
@ kNIMResRoomBlackBeOut
黑名单用户禁止进入
Definition: nim_qchat_public_def.h:309
@ kNIMResRoomLinkError
主链接错误
Definition: nim_qchat_public_def.h:305
@ kNIMResInvalid
协议无效, 不允许访问的协议
Definition: nim_qchat_public_def.h:226
@ kNIMLocalResMsgNosDownloadCancel
(收到文件消息或者stop_download_ex)HTTP download from NOS下载暂停
Definition: nim_qchat_public_def.h:272
@ kNIMResParameterError
参数错误
Definition: nim_qchat_public_def.h:206
@ kNIMLocalResMsgNosUploadCancel
(发送文件消息或者stop_upload_ex)HTTP upload to NOS上传暂停
Definition: nim_qchat_public_def.h:270
@ kNIMResUnknownError
未知错误,或者不方便告诉你
Definition: nim_qchat_public_def.h:218
@ kNIMLocalResExceedLimit
本地错误码,超过配置有效期或者所需参数不存在
Definition: nim_qchat_public_def.h:288
@ kNIMLocalResCheckMsgDBFailed
导入消息历史时验证身份和加密密钥不通过
Definition: nim_qchat_public_def.h:290
@ kNIMResTooBuzy
服务器太忙
Definition: nim_qchat_public_def.h:222
@ kNIMLocalResAPIErrorRunOutOfLinkAddress
连接地址用完了
Definition: nim_qchat_public_def.h:326
@ kNIMResTeamENAccess
没有权限
Definition: nim_qchat_public_def.h:231
@ kNIMResError
错误
Definition: nim_qchat_public_def.h:190
@ kNIMResConnectionError
网络连接出现错误
Definition: nim_qchat_public_def.h:208
@ kNIMResTeamApplySuccess
申请成功
Definition: nim_qchat_public_def.h:243
@ kNIMResOverrun
超限
Definition: nim_qchat_public_def.h:214
@ kNIMResTeamEMemberNotExist
用户不在兴趣组里面
Definition: nim_qchat_public_def.h:235
@ kNIMResRoomBeMuted
被禁言
Definition: nim_qchat_public_def.h:311
@ kNIMResVersionError
客户端版本不正确
Definition: nim_qchat_public_def.h:194
@ kNIMResInBlack
被接收方加入黑名单 SDK版本大于2.5.0支持
Definition: nim_qchat_public_def.h:260
@ kNIMLocalResAPIErrorLogined
已经登录
Definition: nim_qchat_public_def.h:320
@ kNIMResUidPassError
用户名或密码错误
Definition: nim_qchat_public_def.h:196
@ kNIMResRoomAllMuted
聊天室处于整体禁言状态,只有管理员能发言
Definition: nim_qchat_public_def.h:313
@ kNIMResServerDataError
服务器数据错误
Definition: nim_qchat_public_def.h:220
@ kNIMLocalResExist
本地错误码,对象已经存在/重复操作,(收到消息,本地资源已存在,不需要重复下载)
Definition: nim_qchat_public_def.h:284
@ kNIMLocalResMsgFileNotExist
本地资源不存在
Definition: nim_qchat_public_def.h:278
@ kNIMResNoModify
数据自上次查询以来未发生变化(用于增量更新)
Definition: nim_qchat_public_def.h:202
@ kNIMResRoomError
聊天室状态异常
Definition: nim_qchat_public_def.h:307
@ kNIMResTeamECountLimit
已达到人数限制
Definition: nim_qchat_public_def.h:229
@ kNIMResNotExist
请求的目标(用户或对象)不存在
Definition: nim_qchat_public_def.h:200
@ kNIMLocalResImportMsgDBFailed
导入消息历史时写记录失败
Definition: nim_qchat_public_def.h:292
@ kNIMResTeamAlreadyIn
已经在群里
Definition: nim_qchat_public_def.h:245
@ kNIMResTeamErrType
群类型不对
Definition: nim_qchat_public_def.h:237
@ kNIMResSuccess
没有错误,一切正常
Definition: nim_qchat_public_def.h:192
@ kNIMLocalResMsgAccessDenied
禁止访问
Definition: nim_qchat_public_def.h:276
@ kNIMResInvalidProtocol
协议已失效
Definition: nim_qchat_public_def.h:254
@ kNIMResRoomLocalNeedRequestAgain
客户端本地错误号,需要重新向IM服务器获取进入聊天室权限
Definition: nim_qchat_public_def.h:265
NIMQChatMessageSearchSort
消息搜索排序规则
Definition: nim_qchat_public_def.h:108
@ kNIMQChatMessageSearchSortCreateTime
创建时间排序
Definition: nim_qchat_public_def.h:110
NIMQChatSubscribeType
Definition: nim_qchat_public_def.h:45
@ kNIMQChatSubscribeTypeUnreadCount
订阅某个channel的【消息未读数】/【通知】
Definition: nim_qchat_public_def.h:51
@ kNIMQChatSubscribeTypeTypingEvent
订阅某个channel的【正在输入事件】
Definition: nim_qchat_public_def.h:57
@ kNIMQChatSubscribeTypeMsg
订阅某个channel的【消息】/【通知】
Definition: nim_qchat_public_def.h:49
@ kNIMQChatSubscribeTypeUnknow
未知
Definition: nim_qchat_public_def.h:47
@ kNIMQChatSubscribeTypeUnreadStatus
订阅某个channel的【消息未读状态】/【通知】
Definition: nim_qchat_public_def.h:53
@ kNIMQChatSubscribeTypeServerNotification
订阅某个server的【通知】
Definition: nim_qchat_public_def.h:55
NIMQChatServerSearchSort
服务器搜索排序规则
Definition: nim_qchat_public_def.h:90
@ kNIMQChatServerSearchSortMemberCOunt
服务器总人数排序
Definition: nim_qchat_public_def.h:96
@ kNIMQChatServerSearchSortCreateTime
创建时间排序
Definition: nim_qchat_public_def.h:94
@ kNIMQChatServerSearchSortCustom
自定义权重排序(详见服务器端文档)
Definition: nim_qchat_public_def.h:92
NIMQChatSearchOrder
搜索排序顺序
Definition: nim_qchat_public_def.h:82
@ kNIMQChatSearchOrderAsc
按时间正序
Definition: nim_qchat_public_def.h:84
@ kNIMQChatSearchOrderDesc
按时间倒序
Definition: nim_qchat_public_def.h:86
NIMQChatChannelSearchSort
频道搜索排序规则
Definition: nim_qchat_public_def.h:100
@ kNIMQChatChannelSearchSortCreateTime
创建时间排序
Definition: nim_qchat_public_def.h:104
@ kNIMQChatChannelSearchSortCustom
自定义权重排序(详见服务器端文档)
Definition: nim_qchat_public_def.h:102
NIMQChatBanMemberOpeType
圈组封禁操作类型
Definition: nim_qchat_public_def.h:74
@ kNIMQChatBanMemberOpeTypeBan
封禁
Definition: nim_qchat_public_def.h:76
@ kNIMQChatBanMemberOpeTypeUnban
解除封禁
Definition: nim_qchat_public_def.h:78
NIMQChatSubscribeOpeType
Definition: nim_qchat_public_def.h:37
@ kNIMQChatSubscribeOpeTypeUnsubscribe
取消订阅
Definition: nim_qchat_public_def.h:41
@ kNIMQChatSubscribeOpeTypeSubscribe
订阅
Definition: nim_qchat_public_def.h:39
Definition: nim_qchat_public_def.h:114
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_public_def.h:116
void * user_data
自定义用户数据
Definition: nim_qchat_public_def.h:118
Definition: nim_qchat_public_def.h:122
char * pic_bid
反垃圾图片业务id
Definition: nim_qchat_public_def.h:126
char * text_bid
反垃圾文本业务id
Definition: nim_qchat_public_def.h:124
Definition: nim_qchat_public_def.h:130
uint64_t server_id
server id
Definition: nim_qchat_public_def.h:132
uint64_t channel_id
channel id
Definition: nim_qchat_public_def.h:134
Definition: nim_qchat_public_def.h:159
bool use_custom_content
是否需要使用自定义反垃圾字段(即antiSpamContent), false:不需要, true:需要, 默认0, 一般使用的情况是通用反垃圾转易盾
Definition: nim_qchat_public_def.h:161
bool anti_spam_using_yidun
单条消息是否使用易盾反垃圾, false:(在开通易盾的情况下)不过易盾反垃圾, 其他都是按照原来的规则
Definition: nim_qchat_public_def.h:163
char * yidun_anti_spam_ext
易盾反垃圾扩展字段, 限制json, 长度限制1024
Definition: nim_qchat_public_def.h:173
char * anti_spam_content
反垃圾内容, 开发者自定义的反垃圾字段, 如果提供了这个字段, 在过反垃圾时不会再使用body或者attach
Definition: nim_qchat_public_def.h:165
char * anti_spam_bussiness_id
反垃圾业务ID, 对某些单条消息另外的反垃圾的业务ID
Definition: nim_qchat_public_def.h:167
char * yidun_callback_url
易盾check的回调URL
Definition: nim_qchat_public_def.h:169
char * yidun_anti_cheating
易盾反垃圾增强反作弊专属字段, 限制json, 长度限制1024
Definition: nim_qchat_public_def.h:171
Definition: nim_qchat_public_def.h:138
char * push_content
推送文案
Definition: nim_qchat_public_def.h:144
char * push_payload
推送payload
Definition: nim_qchat_public_def.h:146
bool route_enable
是否需要抄送
Definition: nim_qchat_public_def.h:150
char * extension
操作扩展字段
Definition: nim_qchat_public_def.h:142
char * operator_id
操作者账号
Definition: nim_qchat_public_def.h:153
char * env
环境变量,用于指向不同的抄送、第三方回调等配置
Definition: nim_qchat_public_def.h:148
uint32_t operator_client_type
操作者客户端类型
Definition: nim_qchat_public_def.h:155
char * postscript
操作附言
Definition: nim_qchat_public_def.h:140
Definition: nim_qchat_public_def.h:177
uint64_t next_timestamp
下一次分页起始时间
Definition: nim_qchat_public_def.h:181
bool has_more
是否还有更多
Definition: nim_qchat_public_def.h:179
char * cursor
下一次分页起始游标
Definition: nim_qchat_public_def.h:183
Definition: nim_qchat_public_def.h:348
uint64_t server_id
服务器ID
Definition: nim_qchat_public_def.h:350
uint64_t max_unread_count
订阅未读数时的最大未读数
Definition: nim_qchat_public_def.h:356
uint64_t unread_count
未读数
Definition: nim_qchat_public_def.h:352
uint64_t mentioned_unread_count
被@未读数
Definition: nim_qchat_public_def.h:354
Definition: nim_qchat_public_def.h:330
uint64_t mentioned_unread_count
被@未读数
Definition: nim_qchat_public_def.h:340
uint64_t unread_count
未读数
Definition: nim_qchat_public_def.h:338
uint64_t max_unread_count
订阅未读数时的最大未读数
Definition: nim_qchat_public_def.h:342
uint64_t channel_id
频道ID
Definition: nim_qchat_public_def.h:334
uint64_t ack_timestamp
已读时间戳
Definition: nim_qchat_public_def.h:336
uint64_t last_msg_timestamp
最后一条消息时间戳
Definition: nim_qchat_public_def.h:344
uint64_t server_id
服务器ID
Definition: nim_qchat_public_def.h:332