NIM PC Cross Platform SDK
nim_qchat_client_cpp_def.h
Go to the documentation of this file.
1
11#ifndef __NIM_QCHAT_CLIENT_CPP_DEF_H__
12#define __NIM_QCHAT_CLIENT_CPP_DEF_H__
13
16#include "nim_qchat_helper.h"
17
18namespace nim_qchat {
20struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatCustomTokenResp {
22 std::string appkey;
24 std::string accid;
26 std::string token;
27 QChatCustomTokenResp() = default;
29 appkey = c_resp.appkey;
30 accid = c_resp.accid;
31 token = "";
32 }
33 NIMQChatCustomTokenResp ToCParam() const {
35 c_resp.appkey = const_cast<char*>(appkey.c_str());
36 c_resp.accid = const_cast<char*>(accid.c_str());
37 c_resp.token = const_cast<char*>(token.c_str());
38 return c_resp;
39 }
40};
41
43struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatLoginClientInfo {
45 NIMQChatClientType client_type{kQChatClientTypeUnknown};
47 std::string device_id{""};
49 std::string client_ip{""};
51 uint16_t client_port{0};
53 std::string consid{""};
55 uint64_t timestamp{0};
57 uint32_t custom_client_type{0};
59 std::string custom_tag{""};
61 std::string os_name{""};
62 QChatLoginClientInfo() = default;
64 client_type = c_param.client_type;
65 device_id = c_param.device_id;
66 client_ip = c_param.client_ip ? c_param.client_ip : "";
67 client_port = c_param.client_port;
68 consid = c_param.consid_ ? c_param.consid_ : "";
69 timestamp = c_param.timestamp;
70 custom_client_type = c_param.custom_client_type_;
71 custom_tag = c_param.custom_tag_ ? c_param.custom_tag_ : "";
72 os_name = c_param.os_name_ ? c_param.os_name_ : "";
73 }
74 const NIMQChatLoginClientInfo ToCParam() const {
75 NIMQChatLoginClientInfo c_param = {};
76 c_param.client_type = client_type;
77 c_param.device_id = const_cast<char*>(device_id.c_str());
78 c_param.client_ip = const_cast<char*>(client_ip.c_str());
79 c_param.client_port = client_port;
80 c_param.consid_ = const_cast<char*>(consid.c_str());
81 c_param.timestamp = timestamp;
82 c_param.custom_client_type_ = custom_client_type;
83 c_param.custom_tag_ = const_cast<char*>(custom_tag.c_str());
84 c_param.os_name_ = const_cast<char*>(os_name.c_str());
85 return c_param;
86 }
87};
88
90struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatKickedResp {
92 uint32_t client_type{0};
94 uint32_t kick_reason{0};
96 std::string ext{""};
98 uint32_t custom_client_type{0};
99 QChatKickedResp() = default;
100 QChatKickedResp(const NIMQChatKickedResp& c_resp) {
101 client_type = c_resp.client_type;
102 kick_reason = c_resp.kick_reason;
103 ext = c_resp.ext ? c_resp.ext : "";
104 custom_client_type = c_resp.custom_client_type;
105 }
106};
107
109struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatLoginStatusResp {
111 NIMQChatLoginStatus login_status{kLoginStatusUnlogin};
112 QChatLoginStatusResp() = default;
113 QChatLoginStatusResp(const NIMQChatLoginStatusResp& c_resp) { login_status = c_resp.login_status; }
114};
115
117struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatMultispotLoginResp {
119 uint32_t res_code{0};
121 uint32_t notify_type{0};
123 QChatLoginClientInfo client_info{};
124 QChatMultispotLoginResp() = default;
126 notify_type = c_resp.notify_type;
127 client_info = c_resp.client_info;
128 }
129};
130
132struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatLoginResp {
134 uint32_t res_code{0};
136 QChatLoginClientInfo client_info{};
138 std::list<QChatLoginClientInfo> other_clients{};
139 QChatLoginResp() = default;
140 QChatLoginResp(const NIMQChatLoginResp& c_resp) {
141 res_code = c_resp.res_code;
142 if (c_resp.res_code != kNIMResSuccess)
143 return;
144 client_info = c_resp.client_info;
145 for (size_t i = 0; i < c_resp.other_clients_count; i++) {
146 other_clients.emplace_back(c_resp.other_clients[i]);
147 }
148 }
149};
150
152struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatLogoutResp {
154 uint32_t res_code{0};
155 QChatLogoutResp() = default;
156 QChatLogoutResp(const NIMQChatLogoutResp& c_resp) { res_code = c_resp.res_code; }
157};
158
160struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatKickResp {
162 uint32_t res_code{0};
164 std::list<std::string> kicked_device_ids{};
165 QChatKickResp() = default;
166 QChatKickResp(const NIMQChatKickResp& c_resp) {
167 res_code = c_resp.res_code;
168 if (c_resp.res_code != kNIMResSuccess)
169 return;
170 for (size_t i = 0; i < c_resp.kicked_device_ids_count; i++)
171 kicked_device_ids.push_back(c_resp.kicked_device_ids[i]);
172 }
173 NIMQChatKickResp ToCParam() const {
174 NIMQChatKickResp c_param = {};
175 c_param.res_code = res_code;
176 vec_kicked_device_ids.clear();
177 for (auto&& device_id : kicked_device_ids)
178 vec_kicked_device_ids.push_back(const_cast<char*>(device_id.c_str()));
179 c_param.kicked_device_ids_count = vec_kicked_device_ids.size();
180 c_param.kicked_device_ids = vec_kicked_device_ids.data();
181 return c_param;
182 }
183
184protected:
185 // 以下字段为内部使用
186 mutable std::vector<char*> vec_kicked_device_ids;
187};
188
190struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSDKLogResp {
192 std::string log_content{""};
193 QChatSDKLogResp() = default;
194 QChatSDKLogResp(const NIMQChatSDKLogResp& c_resp) { log_content = c_resp.log_content ? c_resp.log_content : ""; }
195};
196
198struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatGetRTCTokenResp {
200 uint32_t res_code;
202 std::string token;
204 uint32_t ttl{0};
205 QChatGetRTCTokenResp() = default;
207 res_code = c_resp.res_code;
208 token = c_resp.token ? c_resp.token : "";
209 ttl = c_resp.ttl;
210 }
211 const NIMQChatGetRTCTokenResp ToCParam() const {
212 NIMQChatGetRTCTokenResp c_response{};
213 c_response.res_code = res_code;
214 c_response.token = const_cast<char*>(token.c_str());
215 c_response.ttl = ttl;
216 return c_response;
217 }
218};
219
223typedef std::function<void(const QChatKickedResp&)> KickedCallback;
225typedef std::function<void(const QChatLoginStatusResp&)> LoginStatusCallback;
227typedef std::function<void(const QChatMultispotLoginResp&)> MultispotLoginCallback;
229typedef std::function<void(const QChatSDKLogResp&)> SDKLogCallback;
231typedef std::function<void(const QChatLoginResp&)> LoginCallback;
233typedef std::function<void(const QChatLogoutResp&)> LogoutCallback;
235typedef std::function<void(const QChatKickResp&)> KickCallback;
237using GetRTCTokenCallback = std::function<void(const QChatGetRTCTokenResp&)>;
238
240struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRegCustomTokenCbParam {
243 const NIMQChatRegCustomTokenCbParam ToCParam() const {
244 static CustomTokenCallback cb_holder = nullptr;
245 static QChatCustomTokenResp resp_holder{};
246 cb_holder = cb;
248 param.cb = [](const NIMQChatCustomTokenResp& resp) {
249 if (cb_holder)
250 resp_holder = cb_holder(resp);
251 return resp_holder.ToCParam();
252 };
253 return param;
254 }
255};
256
260struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatEncryptionConfiguration {
272 uint32_t nego_key_neca_key_version = 0;
273};
274
278struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatFCSConfiguration {
280 uint32_t thumbnail_width = 150;
282 uint32_t thumbnail_height = 100;
284 bool auto_download_history_msg_attach_ = false;
286 bool auto_download_image_thumb = true;
288 bool auto_download_video_thumb = true;
290 bool auto_download_image = false;
292 bool auto_download_audio = false;
294 bool auto_download_video = false;
296 bool auto_download_file = false;
298 NIMQChatFCSAuthenticationType fcs_auth_type = kNIMQChatFCSAuthenticationTypeToken;
300 std::string mock_ua;
302 std::string mock_refer;
303};
304
306struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatMessageCacheConfiguration {
308 bool enable_message_cache = false;
309};
310
312struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatInitParam {
314 std::string app_data_path{""};
316 uint32_t custom_timeout{0};
318 uint32_t auth_timeout{0};
327 const NIMQChatInitParam ToCParam() const {
328 NIMQChatInitParam param = {};
329 param.app_data_path = const_cast<char*>(app_data_path.c_str());
330 param.custom_timeout = custom_timeout;
331 param.auth_timeout = auth_timeout;
332 param.database_encrypt_key = const_cast<char*>(database_encrypt_key.c_str());
333 param.encrypt_configuration.nego_key_neca = encryption_configuration.nego_key_neca;
334 param.encrypt_configuration.comm_neca = encryption_configuration.comm_neca;
335 param.encrypt_configuration.hand_shake_type = encryption_configuration.hand_shake_type;
336 param.encrypt_configuration.nego_key_neca_key_parta = const_cast<char*>(encryption_configuration.nego_key_neca_key_parta.c_str());
337 param.encrypt_configuration.nego_key_neca_key_partb = const_cast<char*>(encryption_configuration.nego_key_neca_key_partb.c_str());
339 param.fcs_configuration.thumbnail_width = fcs_configuration.thumbnail_width;
340 param.fcs_configuration.thumbnail_height = fcs_configuration.thumbnail_height;
348 param.fcs_configuration.fcs_auth_type = fcs_configuration.fcs_auth_type;
349 param.fcs_configuration.mock_ua = const_cast<char*>(fcs_configuration.mock_ua.c_str());
350 param.fcs_configuration.mock_refer = const_cast<char*>(fcs_configuration.mock_refer.c_str());
352 return param;
353 }
354};
355
357struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRegKickedCbParam {
359 KickedCallback cb{nullptr};
360 const NIMQChatRegKickedCbParam ToCParam() const {
361 static KickedCallback cb_holder = nullptr;
362 cb_holder = cb;
363 NIMQChatRegKickedCbParam param = {};
364 param.cb = [](const NIMQChatKickedResp& resp) {
365 if (cb_holder)
366 cb_holder(resp);
367 };
368 return param;
369 }
370};
371
373struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRegLoginStatusCbParam {
376 const NIMQChatRegLoginStatusCbParam ToCParam() const {
377 static LoginStatusCallback cb_holder = nullptr;
378 cb_holder = cb;
380 param.cb = [](const NIMQChatLoginStatusResp& resp) {
381 if (cb_holder)
382 cb_holder(resp);
383 };
384 return param;
385 }
386};
387
389struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRegMultispotLoginCbParam {
392 const NIMQChatRegMultispotLoginCbParam ToCParam() const {
393 static MultispotLoginCallback cb_holder = nullptr;
394 cb_holder = cb;
396 param.cb = [](const NIMQChatMultispotLoginResp& resp) {
397 if (cb_holder)
398 cb_holder(resp);
399 };
400 return param;
401 }
402};
403
405struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatCleanupParam {
406 const NIMQChatCleanupParam ToCParam() const {
407 NIMQChatCleanupParam param = {};
408 return param;
409 }
410};
411
413struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatLoginParam {
415 LoginCallback cb{nullptr};
417 std::string appkey{""};
419 std::string accid{""};
423 std::string login_token{""};
425 std::string login_ext{""};
427 std::list<std::string> link_address{};
428 const NIMQChatLoginParam ToCParam() const {
429 static LoginCallback cb_holder = nullptr;
430 cb_holder = cb;
431 link_address_json_array.clear();
432 nim::StrListToJsonString(link_address, link_address_json_array);
433 NIMQChatLoginParam param = {};
434 param.cb = [](const NIMQChatLoginResp& resp) {
435 if (cb_holder)
436 cb_holder(resp);
437 };
438 param.appkey = const_cast<char*>(appkey.c_str());
439 param.accid = const_cast<char*>(accid.c_str());
440 param.auth_type = auth_type;
441 param.login_token = const_cast<char*>(login_token.c_str());
442 param.login_ext = const_cast<char*>(login_ext.c_str());
443 param.link_address = const_cast<char*>(link_address_json_array.c_str());
444 return param;
445 }
446
447protected:
448 // 以下字段为内部使用
449 mutable std::string link_address_json_array;
450};
451
453struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatLogoutParam {
455 LogoutCallback cb{nullptr};
456 const NIMQChatLogoutParam ToCParam() const {
457 static LogoutCallback cb_holder = nullptr;
458 cb_holder = cb;
459 NIMQChatLogoutParam param = {};
460 param.cb = [](const NIMQChatLogoutResp& resp) {
461 if (cb_holder)
462 cb_holder(resp);
463 };
464 return param;
465 }
466};
467
469struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatKickParam {
471 KickCallback cb{nullptr};
473 std::list<std::string> device_ids{};
474 QChatKickParam() = default;
475 QChatKickParam(const NIMQChatKickParam& c_param) {
476 for (size_t i = 0; i < c_param.device_ids_count; i++)
477 device_ids.push_back(c_param.device_ids[i]);
478 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatKickResp& response) {
479 auto c_response = response.ToCParam();
480 c_response.user_data = user_data;
481 c_callback(c_response);
482 };
483 }
484 const NIMQChatKickParam ToCParam() const {
485 auto cb_holder = new KickCallback(cb);
486 NIMQChatKickParam param = {};
487 vec_device_ids.clear();
488 for (auto&& accid : device_ids)
489 vec_device_ids.push_back(const_cast<char*>(accid.c_str()));
490 param.device_ids_count = vec_device_ids.size();
491 param.device_ids = vec_device_ids.data();
492 param.user_data = cb_holder;
493 param.cb = [](const NIMQChatKickResp& resp) {
494 InvokeCallback<KickCallback, NIMQChatKickResp>(resp);
495 };
496 return param;
497 }
498
499protected:
500 // 以下字段为内部使用
501 mutable std::vector<char*> vec_device_ids;
502};
503
505struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatGetRTCTokenParam {
509 std::string device_id{""};
510 QChatGetRTCTokenParam() = default;
512 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetRTCTokenResp& response) {
513 auto c_response = response.ToCParam();
514 c_response.user_data = user_data;
515 c_callback(c_response);
516 };
517 device_id = c_param.device_id ? c_param.device_id : "";
518 }
519 const NIMQChatGetRTCTokenParam ToCParam() const {
520 auto cb_holder = new GetRTCTokenCallback(cb);
521 NIMQChatGetRTCTokenParam param = {};
522 param.user_data = cb_holder;
523 param.cb = [](const NIMQChatGetRTCTokenResp& resp) {
524 InvokeCallback<GetRTCTokenCallback, NIMQChatGetRTCTokenResp>(resp);
525 };
526 param.device_id = const_cast<char*>(device_id.c_str());
527 return param;
528 }
529};
530
531} // namespace nim_qchat
532
533#endif // __NIM_QCHAT_CLIENT_CPP_DEF_H__
namespace nim_qchat
std::function< void(const QChatMultispotLoginResp &)> MultispotLoginCallback
多点登录回调
Definition: nim_qchat_client_cpp_def.h:227
std::function< void(const QChatLoginStatusResp &)> LoginStatusCallback
被踢回调
Definition: nim_qchat_client_cpp_def.h:225
std::function< QChatCustomTokenResp(const QChatCustomTokenResp &)> CustomTokenCallback
获取自定义token回调
Definition: nim_qchat_client_cpp_def.h:221
std::function< void(const QChatKickResp &)> KickCallback
踢掉自己其他端回调
Definition: nim_qchat_client_cpp_def.h:235
std::function< void(const QChatKickedResp &)> KickedCallback
被踢回调
Definition: nim_qchat_client_cpp_def.h:223
std::function< void(const QChatSDKLogResp &)> SDKLogCallback
SDK系统日志回调模板
Definition: nim_qchat_client_cpp_def.h:229
std::function< void(const QChatLogoutResp &)> LogoutCallback
登出回调
Definition: nim_qchat_client_cpp_def.h:233
std::function< void(const QChatLoginResp &)> LoginCallback
登录回调
Definition: nim_qchat_client_cpp_def.h:231
std::function< void(const QChatGetRTCTokenResp &)> GetRTCTokenCallback
获取RTC频道token回调
Definition: nim_qchat_client_cpp_def.h:237
bool StrListToJsonString(const std::list< std::string > &list, std::string &out)
将一个string类型的list组装成一个Json Array
Definition: nim_json_util.cpp:12
@ kNIMResSuccess
Definition: nim_chatroom_res_code_def.h:18
@ kNIMQChatCommEncryptionAlgorithmRC4
RC4 加密
Definition: nim_qchat_client_def.h:255
NIMQChatHandShakeType
Definition: nim_qchat_client_def.h:262
@ kNIMQChatHandShakeTypeMulti
支持配置多种对称与非对称加密算法
Definition: nim_qchat_client_def.h:264
@ kNIMQChatEncryptionAlgorithmRSA
RSA 加密
Definition: nim_qchat_client_def.h:244
NIMQChatLoginAuthType
Definition: nim_qchat_client_def.h:21
@ kNIMQChatLoginAuthTypeDefault
默认login token鉴权方式
Definition: nim_qchat_client_def.h:23
NIMQChatClientType
Definition: nim_qchat_client_def.h:31
圈组CPP wrapper helpers
Definition: nim_qchat_client_def.h:356
通信协议加密算法
Definition: nim_qchat_client_def.h:107
char * appkey
appkey
Definition: nim_qchat_client_def.h:111
char * accid
accid
Definition: nim_qchat_client_def.h:113
char * token
将该指针指向零结尾的token字符串的起始地址
Definition: nim_qchat_client_def.h:115
char * nego_key_neca_key_partb
非对称加密算法 key
Definition: nim_qchat_client_def.h:281
NIMQChatCommEncryptionAlgorithm comm_neca
通信加密算法 {1(RC4),2(AES128),4(SM4)} def:1(RC4) 对称加密
Definition: nim_qchat_client_def.h:275
uint32_t nego_key_neca_key_version
非对称加密算法的 key version
Definition: nim_qchat_client_def.h:283
NIMQChatExchangeKeyEncryptionAlgorithm nego_key_neca
"交换密钥"协议加密算法
Definition: nim_qchat_client_def.h:273
NIMQChatHandShakeType hand_shake_type
握手协议类型 0:支持配置多种对称与非对称加密算法,1:只支持RAS + RC4
Definition: nim_qchat_client_def.h:277
char * nego_key_neca_key_parta
"交换密钥"协议加密算法密钥, 为空使用默认值
Definition: nim_qchat_client_def.h:279
握手协议加密算法枚举
bool auto_download_video
是否自动下载视频
Definition: nim_qchat_client_def.h:313
uint32_t thumbnail_width
缩略图宽度
Definition: nim_qchat_client_def.h:299
bool auto_download_image_thumb
是否自动下载图片缩略图
Definition: nim_qchat_client_def.h:305
bool auto_download_image
是否自动下载图片
Definition: nim_qchat_client_def.h:309
NIMQChatFCSAuthenticationType fcs_auth_type
下载附件类数据的鉴权方式
Definition: nim_qchat_client_def.h:317
uint32_t thumbnail_height
缩略图高度
Definition: nim_qchat_client_def.h:301
char * mock_refer
mock refer
Definition: nim_qchat_client_def.h:321
char * mock_ua
mock user-agent
Definition: nim_qchat_client_def.h:319
bool auto_download_history_msg_attach_
是否自动下载历史消息附件
Definition: nim_qchat_client_def.h:303
bool auto_download_file
是否自动下载文件
Definition: nim_qchat_client_def.h:315
bool auto_download_video_thumb
是否自动下载视频缩略图
Definition: nim_qchat_client_def.h:307
bool auto_download_audio
是否自动下载音频
Definition: nim_qchat_client_def.h:311
Definition: nim_qchat_client_def.h:407
void * user_data
自定义用户数据
Definition: nim_qchat_client_def.h:411
nim_qchat_get_rtc_token_cb_func cb
获取RTC token回调
Definition: nim_qchat_client_def.h:409
char * device_id
device_id
Definition: nim_qchat_client_def.h:413
Definition: nim_qchat_client_def.h:173
uint32_t ttl
ttl, 单位秒
Definition: nim_qchat_client_def.h:181
char * token
token
Definition: nim_qchat_client_def.h:179
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_client_def.h:175
Definition: nim_qchat_client_def.h:338
char * app_data_path
APP 数据存储路径,如果为空,则使用系统默认路径
Definition: nim_qchat_client_def.h:340
NIMQChatMessageChacheConfiguration message_cache_configuration
圈组消息缓存配置
Definition: nim_qchat_client_def.h:352
char * database_encrypt_key
数据库加密密钥,如果为空,则使用默认值
Definition: nim_qchat_client_def.h:346
uint32_t custom_timeout
自定义通信超时时间,单位秒, 为 0 使用默认值
Definition: nim_qchat_client_def.h:342
NIMQChatEncryptionConfiguration encrypt_configuration
圈组协议加密配置
Definition: nim_qchat_client_def.h:348
uint32_t auth_timeout
自定义鉴权超时时间,单位秒, 为 0 使用默认值
Definition: nim_qchat_client_def.h:344
NIMQChatFCSConfiguration fcs_configuration
圈组云端数据存储配置信息
Definition: nim_qchat_client_def.h:350
Definition: nim_qchat_client_def.h:387
nim_qchat_kick_cb_func cb
踢掉自己其他端回调
Definition: nim_qchat_client_def.h:389
char ** device_ids
被踢的设备id
Definition: nim_qchat_client_def.h:393
void * user_data
自定义用户数据
Definition: nim_qchat_client_def.h:391
size_t device_ids_count
被踢的设备数量
Definition: nim_qchat_client_def.h:395
Definition: nim_qchat_client_def.h:161
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_client_def.h:163
char ** kicked_device_ids
被踢的设备id列表
Definition: nim_qchat_client_def.h:167
size_t kicked_device_ids_count
被踢的设备数量
Definition: nim_qchat_client_def.h:169
Definition: nim_qchat_client_def.h:85
NIMQChatClientType client_type
客户端类型
Definition: nim_qchat_client_def.h:89
uint32_t custom_client_type
自定义客户端类型
Definition: nim_qchat_client_def.h:95
char * ext
扩展字段
Definition: nim_qchat_client_def.h:93
uint32_t kick_reason
被踢原因
Definition: nim_qchat_client_def.h:91
Definition: nim_qchat_client_def.h:63
char * client_ip
客户端 IP
Definition: nim_qchat_client_def.h:69
char * os_name_
操作系统名称
Definition: nim_qchat_client_def.h:81
uint32_t custom_client_type_
自定义终端类型
Definition: nim_qchat_client_def.h:77
char * custom_tag_
自定义标签
Definition: nim_qchat_client_def.h:79
uint64_t timestamp
时间戳
Definition: nim_qchat_client_def.h:75
char * device_id
设备 ID
Definition: nim_qchat_client_def.h:67
uint16_t client_port
客户端端口
Definition: nim_qchat_client_def.h:73
NIMQChatClientType client_type
终端类型
Definition: nim_qchat_client_def.h:65
char * consid_
会话 ID
Definition: nim_qchat_client_def.h:71
Definition: nim_qchat_client_def.h:359
char * login_token
登陆的token
Definition: nim_qchat_client_def.h:371
char * login_ext
登录自定义字段
Definition: nim_qchat_client_def.h:373
nim_qchat_login_cb_func cb
登录异步回调
Definition: nim_qchat_client_def.h:361
char * accid
用户帐号
Definition: nim_qchat_client_def.h:367
char * appkey
app唯一标识符
Definition: nim_qchat_client_def.h:365
NIMQChatLoginAuthType auth_type
鉴权方式
Definition: nim_qchat_client_def.h:369
char * link_address
链接地址 json array
Definition: nim_qchat_client_def.h:375
Definition: nim_qchat_client_def.h:137
NIMQChatLoginClientInfo client_info
客户端信息
Definition: nim_qchat_client_def.h:145
NIMQChatLoginClientInfo * other_clients
其他客户端信息
Definition: nim_qchat_client_def.h:149
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_client_def.h:139
size_t other_clients_count
其他客户端数量
Definition: nim_qchat_client_def.h:147
Definition: nim_qchat_client_def.h:99
NIMQChatLoginStatus login_status
登录状态
Definition: nim_qchat_client_def.h:103
Definition: nim_qchat_client_def.h:379
nim_qchat_logout_cb_func cb
登出异步回调
Definition: nim_qchat_client_def.h:381
Definition: nim_qchat_client_def.h:153
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_client_def.h:155
bool enable_message_cache
是否开启缓存消息,默认开启
Definition: nim_qchat_client_def.h:330
Definition: nim_qchat_client_def.h:119
NIMQChatLoginClientInfo client_info
客户端信息
Definition: nim_qchat_client_def.h:125
uint32_t notify_type
通知类型 1:登录 2:登出
Definition: nim_qchat_client_def.h:123
Definition: nim_qchat_client_def.h:208
nim_qchat_custom_token_cb_func cb
自定义token回调
Definition: nim_qchat_client_def.h:210
Definition: nim_qchat_client_def.h:216
nim_qchat_kicked_cb_func cb
被踢异步回调
Definition: nim_qchat_client_def.h:218
Definition: nim_qchat_client_def.h:224
nim_qchat_login_status_cb_func cb
登录状态回调
Definition: nim_qchat_client_def.h:226
Definition: nim_qchat_client_def.h:232
nim_qchat_multispot_login_cb_func cb
多端登录异步回调
Definition: nim_qchat_client_def.h:234
Definition: nim_qchat_client_def.h:129
char * log_content
日志内容
Definition: nim_qchat_client_def.h:133
Definition: nim_qchat_client_cpp_def.h:405
Definition: nim_qchat_client_cpp_def.h:20
std::string appkey
appkey
Definition: nim_qchat_client_cpp_def.h:22
std::string token
自定义token
Definition: nim_qchat_client_cpp_def.h:26
std::string accid
accid
Definition: nim_qchat_client_cpp_def.h:24
Definition: nim_qchat_client_cpp_def.h:260
NIMQChatHandShakeType hand_shake_type
握手协议类型 0:支持配置多种对称与非对称加密算法,1:只支持RAS + RC4
Definition: nim_qchat_client_cpp_def.h:266
std::string nego_key_neca_key_partb
非对称加密算法 key
Definition: nim_qchat_client_cpp_def.h:270
uint32_t nego_key_neca_key_version
非对称加密算法的 key version
Definition: nim_qchat_client_cpp_def.h:272
std::string nego_key_neca_key_parta
"交换密钥"协议加密算法密钥, 为空使用默认值
Definition: nim_qchat_client_cpp_def.h:268
NIMQChatCommEncryptionAlgorithm comm_neca
通信加密算法 {1(RC4),2(AES128),4(SM4)} def:1(RC4) 对称加密
Definition: nim_qchat_client_cpp_def.h:264
NIMQChatExchangeKeyEncryptionAlgorithm nego_key_neca
"交换密钥"协议加密算法 {1(RSA),2(SM2)}, def:1(RSA) 非对称加密
Definition: nim_qchat_client_cpp_def.h:262
Definition: nim_qchat_client_cpp_def.h:278
uint32_t thumbnail_height
缩略图高度
Definition: nim_qchat_client_cpp_def.h:282
bool auto_download_audio
是否自动下载音频
Definition: nim_qchat_client_cpp_def.h:292
bool auto_download_history_msg_attach_
是否自动下载历史消息附件
Definition: nim_qchat_client_cpp_def.h:284
std::string mock_ua
mock user-agent
Definition: nim_qchat_client_cpp_def.h:300
bool auto_download_video
是否自动下载视频
Definition: nim_qchat_client_cpp_def.h:294
bool auto_download_image_thumb
是否自动下载图片缩略图
Definition: nim_qchat_client_cpp_def.h:286
bool auto_download_video_thumb
是否自动下载视频缩略图
Definition: nim_qchat_client_cpp_def.h:288
NIMQChatFCSAuthenticationType fcs_auth_type
下载附件类数据的鉴权方式
Definition: nim_qchat_client_cpp_def.h:298
std::string mock_refer
mock refer
Definition: nim_qchat_client_cpp_def.h:302
bool auto_download_image
是否自动下载图片
Definition: nim_qchat_client_cpp_def.h:290
uint32_t thumbnail_width
缩略图宽度
Definition: nim_qchat_client_cpp_def.h:280
bool auto_download_file
是否自动下载文件
Definition: nim_qchat_client_cpp_def.h:296
Definition: nim_qchat_client_cpp_def.h:505
Definition: nim_qchat_client_cpp_def.h:198
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_client_cpp_def.h:200
std::string token
token
Definition: nim_qchat_client_cpp_def.h:202
Definition: nim_qchat_client_cpp_def.h:312
QChatEncryptionConfiguration encryption_configuration
加密配置
Definition: nim_qchat_client_cpp_def.h:322
QChatFCSConfiguration fcs_configuration
FCS配置
Definition: nim_qchat_client_cpp_def.h:324
std::string database_encrypt_key
数据库加密密钥,如果为空,则使用默认值
Definition: nim_qchat_client_cpp_def.h:320
QChatMessageCacheConfiguration message_cache_configuration
消息缓存配置
Definition: nim_qchat_client_cpp_def.h:326
Definition: nim_qchat_client_cpp_def.h:469
Definition: nim_qchat_client_cpp_def.h:160
Definition: nim_qchat_client_cpp_def.h:90
Definition: nim_qchat_client_cpp_def.h:43
Definition: nim_qchat_client_cpp_def.h:413
Definition: nim_qchat_client_cpp_def.h:132
Definition: nim_qchat_client_cpp_def.h:109
Definition: nim_qchat_client_cpp_def.h:453
Definition: nim_qchat_client_cpp_def.h:152
Definition: nim_qchat_client_cpp_def.h:306
bool enable_message_cache
是否开启缓存消息,默认不开启
Definition: nim_qchat_client_cpp_def.h:308
Definition: nim_qchat_client_cpp_def.h:117
Definition: nim_qchat_client_cpp_def.h:240
Definition: nim_qchat_client_cpp_def.h:357
Definition: nim_qchat_client_cpp_def.h:373
Definition: nim_qchat_client_cpp_def.h:389
Definition: nim_qchat_client_cpp_def.h:190