NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_qchat_client_cpp_def.h
浏览该文件的文档.
1
11#ifndef __NIM_QCHAT_CLIENT_CPP_DEF_H__
12#define __NIM_QCHAT_CLIENT_CPP_DEF_H__
13
15
16namespace nim {
20 std::string appkey;
22 std::string accid;
24 std::string token;
27 appkey = c_resp.appkey;
28 accid = c_resp.accid;
29 token = "";
30 }
33 c_resp.appkey = const_cast<char*>(appkey.c_str());
34 c_resp.accid = const_cast<char*>(accid.c_str());
35 c_resp.token = const_cast<char*>(token.c_str());
36 return c_resp;
37 }
38};
39
45 std::string device_id{""};
47 std::string client_ip{""};
49 uint16_t client_port{0};
51 std::string consid{""};
53 uint64_t timestamp{0};
55 uint32_t custom_client_type{0};
57 std::string custom_tag{""};
59 std::string os_name{""};
62 client_type = c_param.client_type;
63 device_id = c_param.device_id;
64 client_ip = c_param.client_ip ? c_param.client_ip : "";
65 client_port = c_param.client_port;
66 consid = c_param.consid_ ? c_param.consid_ : "";
67 timestamp = c_param.timestamp;
68 custom_client_type = c_param.custom_client_type_;
69 custom_tag = c_param.custom_tag_ ? c_param.custom_tag_ : "";
70 os_name = c_param.os_name_ ? c_param.os_name_ : "";
71 }
73 NIMQChatLoginClientInfo c_param = {};
74 c_param.client_type = client_type;
75 c_param.device_id = const_cast<char*>(device_id.c_str());
76 c_param.client_ip = const_cast<char*>(client_ip.c_str());
77 c_param.client_port = client_port;
78 c_param.consid_ = const_cast<char*>(consid.c_str());
79 c_param.timestamp = timestamp;
80 c_param.custom_client_type_ = custom_client_type;
81 c_param.custom_tag_ = const_cast<char*>(custom_tag.c_str());
82 c_param.os_name_ = const_cast<char*>(os_name.c_str());
83 return c_param;
84 }
85};
86
90 uint32_t client_type{0};
92 uint32_t kick_reason{0};
94 std::string ext{""};
96 uint32_t custom_client_type{0};
97 QChatKickedResp() = default;
99 client_type = c_resp.client_type;
100 kick_reason = c_resp.kick_reason;
101 ext = c_resp.ext ? c_resp.ext : "";
102 custom_client_type = c_resp.custom_client_type;
103 }
104};
105
111 QChatLoginStatusResp(const NIMQChatLoginStatusResp& c_resp) { login_status = c_resp.login_status; }
112};
113
117 uint32_t res_code{0};
119 uint32_t notify_type{0};
121 QChatLoginClientInfo client_info{};
124 notify_type = c_resp.notify_type;
125 client_info = c_resp.client_info;
126 }
127};
128
132 uint32_t res_code{0};
134 QChatLoginClientInfo client_info{};
136 std::vector<QChatLoginClientInfo> other_clients{};
137 QChatLoginResp() = default;
139 res_code = c_resp.res_code;
140 if (c_resp.res_code != kNIMResSuccess)
141 return;
142 client_info = c_resp.client_info;
143 for (size_t i = 0; i < c_resp.other_clients_count; i++) {
144 other_clients.emplace_back(c_resp.other_clients[i]);
145 }
146 }
148 NIMQChatLoginResp c_resp = {};
149 c_resp.res_code = res_code;
150 c_resp.client_info = client_info.ToCParam();
151 c_resp.other_clients_count = other_clients.size();
153 size_t i = 0;
154 for (auto& it : other_clients) {
155 c_resp.other_clients[i++] = it.ToCParam();
156 }
157 return c_resp;
158 }
159};
160
164 uint32_t res_code{0};
165 QChatLogoutResp() = default;
166 QChatLogoutResp(const NIMQChatLogoutResp& c_resp) { res_code = c_resp.res_code; }
167};
168
172 uint32_t res_code{0};
174 std::vector<std::string> kicked_device_ids{};
175 QChatKickResp() = default;
177 res_code = c_resp.res_code;
178 if (c_resp.res_code != kNIMResSuccess)
179 return;
180 for (size_t i = 0; i < c_resp.kicked_device_ids_count; i++)
181 kicked_device_ids.push_back(c_resp.kicked_device_ids[i]);
182 }
184 NIMQChatKickResp c_param = {};
185 c_param.res_code = res_code;
186 vec_kicked_device_ids.clear();
187 for (auto&& device_id : kicked_device_ids)
188 vec_kicked_device_ids.push_back(const_cast<char*>(device_id.c_str()));
189 c_param.kicked_device_ids_count = vec_kicked_device_ids.size();
190 c_param.kicked_device_ids = vec_kicked_device_ids.data();
191 return c_param;
192 }
193
194protected:
195 // 以下字段为内部使用
196 mutable std::vector<char*> vec_kicked_device_ids;
197};
198
202 std::string log_content{""};
203 QChatSDKLogResp() = default;
204 QChatSDKLogResp(const NIMQChatSDKLogResp& c_resp) { log_content = c_resp.log_content ? c_resp.log_content : ""; }
205};
206
210 uint32_t res_code{0};
212 std::string token;
214 uint32_t ttl{0};
217 res_code = c_resp.res_code;
218 token = c_resp.token ? c_resp.token : "";
219 ttl = c_resp.ttl;
220 }
222 NIMQChatGetRTCTokenResp c_response{};
223 c_response.res_code = res_code;
224 c_response.token = const_cast<char*>(token.c_str());
225 c_response.ttl = ttl;
226 return c_response;
227 }
228};
229
233typedef std::function<void(const QChatKickedResp&)> KickedCallback;
235typedef std::function<void(const QChatLoginStatusResp&)> LoginStatusCallback;
237typedef std::function<void(const QChatMultispotLoginResp&)> MultispotLoginCallback;
239typedef std::function<void(const QChatSDKLogResp&)> SDKLogCallback;
241typedef std::function<void(const QChatLoginResp&)> LoginCallback;
243typedef std::function<void(const QChatLogoutResp&)> LogoutCallback;
245typedef std::function<void(const QChatKickResp&)> KickCallback;
247using GetRTCTokenCallback = std::function<void(const QChatGetRTCTokenResp&)>;
248
254 static CustomTokenCallback cb_holder = nullptr;
255 static QChatCustomTokenResp resp_holder{};
256 cb_holder = cb;
258 param.cb = [](const NIMQChatCustomTokenResp* resp) {
259 if (cb_holder)
260 resp_holder = cb_holder(*resp);
261 return resp_holder.ToCParam();
262 };
263 return param;
264 }
265};
266
282 uint32_t nego_key_neca_key_version{0};
285 nego_key_neca = c_param.nego_key_neca;
286 comm_neca = c_param.comm_neca;
287 hand_shake_type = c_param.hand_shake_type;
288 nego_key_neca_key_parta = c_param.nego_key_neca_key_parta ? c_param.nego_key_neca_key_parta : "";
289 nego_key_neca_key_partb = c_param.nego_key_neca_key_partb ? c_param.nego_key_neca_key_partb : "";
290 nego_key_neca_key_version = c_param.nego_key_neca_key_version;
291 }
294 c_param.nego_key_neca = nego_key_neca;
295 c_param.comm_neca = comm_neca;
296 c_param.hand_shake_type = hand_shake_type;
297 c_param.nego_key_neca_key_parta = const_cast<char*>(nego_key_neca_key_parta.c_str());
298 c_param.nego_key_neca_key_partb = const_cast<char*>(nego_key_neca_key_partb.c_str());
299 c_param.nego_key_neca_key_version = nego_key_neca_key_version;
300 return c_param;
301 }
302};
303
309 uint32_t thumbnail_width = 150;
311 uint32_t thumbnail_height = 100;
313 bool auto_download_history_msg_attach_ = false;
315 bool auto_download_image_thumb = true;
317 bool auto_download_video_thumb = true;
319 bool auto_download_image = false;
321 bool auto_download_audio = false;
323 bool auto_download_video = false;
325 bool auto_download_file = false;
329 std::string mock_ua;
331 std::string mock_refer;
334 thumbnail_width = c_param.thumbnail_width;
335 thumbnail_height = c_param.thumbnail_height;
336 auto_download_history_msg_attach_ = c_param.auto_download_history_msg_attach_;
337 auto_download_image_thumb = c_param.auto_download_image_thumb;
338 auto_download_video_thumb = c_param.auto_download_video_thumb;
339 auto_download_image = c_param.auto_download_image;
340 auto_download_audio = c_param.auto_download_audio;
341 auto_download_video = c_param.auto_download_video;
342 auto_download_file = c_param.auto_download_file;
343 fcs_auth_type = c_param.fcs_auth_type;
344 mock_ua = c_param.mock_ua ? c_param.mock_ua : "";
345 mock_refer = c_param.mock_refer ? c_param.mock_refer : "";
346 }
348 NIMQChatFCSConfiguration c_param{};
349 c_param.thumbnail_width = thumbnail_width;
350 c_param.thumbnail_height = thumbnail_height;
351 c_param.auto_download_history_msg_attach_ = auto_download_history_msg_attach_;
352 c_param.auto_download_image_thumb = auto_download_image_thumb;
353 c_param.auto_download_video_thumb = auto_download_video_thumb;
354 c_param.auto_download_image = auto_download_image;
355 c_param.auto_download_audio = auto_download_audio;
356 c_param.auto_download_video = auto_download_video;
357 c_param.auto_download_file = auto_download_file;
358 c_param.fcs_auth_type = fcs_auth_type;
359 c_param.mock_ua = const_cast<char*>(mock_ua.c_str());
360 c_param.mock_refer = const_cast<char*>(mock_refer.c_str());
361 return c_param;
362 }
363};
364
368 bool enable_message_cache = false;
375 enable_message_cache = c_param.enable_message_cache;
376 max_cache_channel_count = c_param.max_cache_channel_count;
377 max_cache_message_count = c_param.max_cache_message_count;
378 }
381 c_param.enable_message_cache = enable_message_cache;
382 c_param.max_cache_channel_count = max_cache_channel_count;
383 c_param.max_cache_message_count = max_cache_message_count;
384 return c_param;
385 }
386};
387
391 std::string appkey;
393 std::string app_data_path;
395 uint32_t custom_timeout{0};
397 uint32_t auth_timeout{0};
401 bool auto_subscribe{false};
408 QChatInitParam() = default;
410 appkey = param.appkey ? param.appkey : "";
411 app_data_path = param.app_data_path ? param.app_data_path : "";
412 custom_timeout = param.custom_timeout;
413 auth_timeout = param.auth_timeout;
414 database_encrypt_key = param.database_encrypt_key ? param.database_encrypt_key : "";
415 auto_subscribe = param.auto_subscribe;
416 encryption_configuration = param.encryption_configuration;
417 fcs_configuration = param.fcs_configuration;
418 message_cache_configuration = param.message_cache_configuration;
419 }
421 NIMQChatInitParam param = {};
422 param.appkey = const_cast<char*>(appkey.c_str());
423 param.app_data_path = const_cast<char*>(app_data_path.c_str());
424 param.custom_timeout = custom_timeout;
425 param.auth_timeout = auth_timeout;
426 param.database_encrypt_key = const_cast<char*>(database_encrypt_key.c_str());
427 param.auto_subscribe = auto_subscribe;
428 param.encryption_configuration = encryption_configuration.ToCParam();
429 param.fcs_configuration = fcs_configuration.ToCParam();
430 param.message_cache_configuration = message_cache_configuration.ToCParam();
431 return param;
432 }
433};
434
438 KickedCallback cb{nullptr};
440 static KickedCallback cb_holder = nullptr;
441 cb_holder = cb;
442 NIMQChatRegKickedCbParam param = {};
443 param.cb = [](const NIMQChatKickedResp* resp) {
444 if (cb_holder)
445 cb_holder(*resp);
446 };
447 return param;
448 }
449};
450
456 static LoginStatusCallback cb_holder = nullptr;
457 cb_holder = cb;
459 param.cb = [](const NIMQChatLoginStatusResp* resp) {
460 if (cb_holder)
461 cb_holder(*resp);
462 };
463 return param;
464 }
465};
466
472 static MultispotLoginCallback cb_holder = nullptr;
473 cb_holder = cb;
475 param.cb = [](const NIMQChatMultispotLoginResp* resp) {
476 if (cb_holder)
477 cb_holder(*resp);
478 };
479 return param;
480 }
481};
482
485 QChatCleanupParam() = default;
488 NIMQChatCleanupParam param = {};
489 return param;
490 }
491};
492
496 LoginCallback cb{nullptr};
498 std::string appkey;
500 std::string accid;
504 uint32_t custom_client_type{0};
506 std::string login_token;
508 std::string login_ext;
510 std::vector<std::string> link_address{};
511 QChatLoginParam() = default;
513 cb = [c_callback = param.cb, user_data = param.user_data](const QChatLoginResp& response) {
514 auto c_response = response.ToCParam();
515 c_response.user_data = user_data;
516 c_callback(&c_response);
517 };
518 appkey = param.appkey;
519 accid = param.accid;
520 auth_type = param.auth_type;
521 custom_client_type = param.custom_client_type;
522 login_token = param.login_token;
523 login_ext = param.login_ext;
524 nim::JsonArrayStringToList(param.link_address, link_address);
525 }
527 static LoginCallback cb_holder = nullptr;
528 cb_holder = cb;
529 link_address_json_array.clear();
530 nim::StrListToJsonString(link_address, link_address_json_array);
531 NIMQChatLoginParam param = {};
532 param.cb = [](const NIMQChatLoginResp* resp) {
533 if (cb_holder)
534 cb_holder(*resp);
535 };
536 param.appkey = const_cast<char*>(appkey.c_str());
537 param.accid = const_cast<char*>(accid.c_str());
538 param.auth_type = auth_type;
539 param.custom_client_type = custom_client_type;
540 param.login_token = const_cast<char*>(login_token.c_str());
541 param.login_ext = const_cast<char*>(login_ext.c_str());
542 param.link_address = const_cast<char*>(link_address_json_array.c_str());
543 return param;
544 }
545
546protected:
547 // 以下字段为内部使用
548 mutable std::string link_address_json_array;
549};
550
554 LogoutCallback cb{nullptr};
556 static LogoutCallback cb_holder = nullptr;
557 cb_holder = cb;
558 NIMQChatLogoutParam param = {};
559 param.cb = [](const NIMQChatLogoutResp* resp) {
560 if (cb_holder)
561 cb_holder(*resp);
562 };
563 return param;
564 }
565};
566
570 KickCallback cb{nullptr};
572 std::vector<std::string> device_ids{};
573 QChatKickParam() = default;
575 for (size_t i = 0; i < c_param.device_ids_count; i++)
576 device_ids.push_back(c_param.device_ids[i]);
577 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatKickResp& response) {
578 auto c_response = response.ToCParam();
579 c_response.user_data = user_data;
580 c_callback(&c_response);
581 };
582 }
584 auto cb_holder = new KickCallback(cb);
585 NIMQChatKickParam param = {};
586 vec_device_ids.clear();
587 for (auto&& accid : device_ids)
588 vec_device_ids.push_back(const_cast<char*>(accid.c_str()));
589 param.device_ids_count = vec_device_ids.size();
590 param.device_ids = vec_device_ids.data();
591 param.user_data = cb_holder;
592 param.cb = [](const NIMQChatKickResp* resp) {
593 InvokeCallback<KickCallback, NIMQChatKickResp>(resp);
594 };
595 return param;
596 }
597
598protected:
599 // 以下字段为内部使用
600 mutable std::vector<char*> vec_device_ids;
601};
602
608 std::string device_id{""};
611 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetRTCTokenResp& response) {
612 auto c_response = response.ToCParam();
613 c_response.user_data = user_data;
614 c_callback(&c_response);
615 };
616 device_id = c_param.device_id ? c_param.device_id : "";
617 }
619 auto cb_holder = new GetRTCTokenCallback(cb);
620 NIMQChatGetRTCTokenParam param = {};
621 param.user_data = cb_holder;
622 param.cb = [](const NIMQChatGetRTCTokenResp* resp) {
623 InvokeCallback<GetRTCTokenCallback, NIMQChatGetRTCTokenResp>(resp);
624 };
625 param.device_id = const_cast<char*>(device_id.c_str());
626 return param;
627 }
628};
629
630} // namespace nim
631
632#endif // __NIM_QCHAT_CLIENT_CPP_DEF_H__
namespace nim
std::function< QChatCustomTokenResp(const QChatCustomTokenResp &)> CustomTokenCallback
获取自定义token回调
Definition: nim_qchat_client_cpp_def.h:231
bool StrListToJsonString(const std::list< std::string > &list, std::string &out)
将一个string类型的list组装成一个Json Array
Definition: nim_json_util.cpp:12
std::function< void(const QChatGetRTCTokenResp &)> GetRTCTokenCallback
获取RTC频道token回调
Definition: nim_qchat_client_cpp_def.h:247
std::function< void(const QChatMultispotLoginResp &)> MultispotLoginCallback
多点登录回调
Definition: nim_qchat_client_cpp_def.h:237
std::function< void(const QChatLoginResp &)> LoginCallback
登录回调
Definition: nim_qchat_client_cpp_def.h:241
bool JsonArrayStringToList(const std::string &array_str, std::list< std::string > &out)
将一个string类型的Json Array解析成一个string类型的list
Definition: nim_json_util.cpp:54
std::function< void(const QChatLogoutResp &)> LogoutCallback
登出回调
Definition: nim_qchat_client_cpp_def.h:243
std::function< void(const QChatSDKLogResp &)> SDKLogCallback
SDK系统日志回调模板
Definition: nim_qchat_client_cpp_def.h:239
std::function< void(const QChatLoginStatusResp &)> LoginStatusCallback
被踢回调
Definition: nim_qchat_client_cpp_def.h:235
std::function< void(const QChatKickResp &)> KickCallback
踢掉自己其他端回调
Definition: nim_qchat_client_cpp_def.h:245
std::function< void(const QChatKickedResp &)> KickedCallback
被踢回调
Definition: nim_qchat_client_cpp_def.h:233
NIMQChatLoginStatus
Definition: nim_qchat_client_def.h:57
@ kLoginStatusUnlogin
Definition: nim_qchat_client_def.h:58
@ kNIMQChatCommEncryptionAlgorithmRC4
RC4 加密
Definition: nim_qchat_client_def.h:255
NIMQChatFCSAuthenticationType
Definition: nim_qchat_client_def.h:287
@ kNIMQChatFCSAuthenticationTypeToken
Definition: nim_qchat_client_def.h:289
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
@ kQChatClientTypeUnknown
Definition: nim_qchat_client_def.h:32
#define NIM_QCHAT_SDK_CPPWRAPPER_DLL_API
Definition: nim_qchat_sdk_cpp_wrapper.h:38
@ kNIMResSuccess
没有错误,一切正常
Definition: public_defines.h:26
Definition: nim_qchat_client_def.h:360
通信协议加密算法
Definition: nim_qchat_client_def.h:109
char * appkey
appkey
Definition: nim_qchat_client_def.h:113
char * accid
accid
Definition: nim_qchat_client_def.h:115
char * token
将该指针指向零结尾的token字符串的起始地址
Definition: nim_qchat_client_def.h:117
圈组协议加密配置
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:415
void * user_data
自定义用户数据
Definition: nim_qchat_client_def.h:419
nim_qchat_get_rtc_token_cb_func cb
获取RTC token回调
Definition: nim_qchat_client_def.h:417
char * device_id
device_id
Definition: nim_qchat_client_def.h:421
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
bool auto_subscribe
自动订阅
Definition: nim_qchat_client_def.h:350
char * app_data_path
APP 数据存储路径,如果为空,则使用系统默认路径
Definition: nim_qchat_client_def.h:342
char * database_encrypt_key
数据库加密密钥,如果为空,则使用默认值
Definition: nim_qchat_client_def.h:348
uint32_t custom_timeout
自定义通信超时时间,单位秒, 为 0 使用默认值
Definition: nim_qchat_client_def.h:344
NIMQChatEncryptionConfiguration encryption_configuration
圈组协议加密配置
Definition: nim_qchat_client_def.h:352
NIMQChatMessageCacheConfiguration message_cache_configuration
圈组消息缓存配置
Definition: nim_qchat_client_def.h:356
char * appkey
云信appkey
Definition: nim_qchat_client_def.h:340
uint32_t auth_timeout
自定义鉴权超时时间,单位秒, 为 0 使用默认值
Definition: nim_qchat_client_def.h:346
NIMQChatFCSConfiguration fcs_configuration
圈组云端数据存储配置信息
Definition: nim_qchat_client_def.h:354
Definition: nim_qchat_client_def.h:395
nim_qchat_kick_cb_func cb
踢掉自己其他端回调
Definition: nim_qchat_client_def.h:397
char ** device_ids
被踢的设备id
Definition: nim_qchat_client_def.h:401
void * user_data
自定义用户数据
Definition: nim_qchat_client_def.h:399
size_t device_ids_count
被踢的设备数量
Definition: nim_qchat_client_def.h:403
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:87
NIMQChatClientType client_type
客户端类型
Definition: nim_qchat_client_def.h:91
uint32_t custom_client_type
自定义客户端类型
Definition: nim_qchat_client_def.h:97
char * ext
扩展字段
Definition: nim_qchat_client_def.h:95
uint32_t kick_reason
被踢原因
Definition: nim_qchat_client_def.h:93
Definition: nim_qchat_client_def.h:65
char * client_ip
客户端 IP
Definition: nim_qchat_client_def.h:71
char * os_name_
操作系统名称
Definition: nim_qchat_client_def.h:83
uint32_t custom_client_type_
自定义终端类型
Definition: nim_qchat_client_def.h:79
char * custom_tag_
自定义标签
Definition: nim_qchat_client_def.h:81
uint64_t timestamp
时间戳
Definition: nim_qchat_client_def.h:77
char * device_id
设备 ID
Definition: nim_qchat_client_def.h:69
uint16_t client_port
客户端端口
Definition: nim_qchat_client_def.h:75
NIMQChatClientType client_type
终端类型
Definition: nim_qchat_client_def.h:67
char * consid_
会话 ID
Definition: nim_qchat_client_def.h:73
Definition: nim_qchat_client_def.h:365
void * user_data
自定义用户数据
Definition: nim_qchat_client_def.h:369
char * login_token
登陆的token
Definition: nim_qchat_client_def.h:379
uint32_t custom_client_type
自定义终端类型
Definition: nim_qchat_client_def.h:377
char * login_ext
登录自定义字段
Definition: nim_qchat_client_def.h:381
nim_qchat_login_cb_func cb
登录异步回调
Definition: nim_qchat_client_def.h:367
char * accid
用户帐号
Definition: nim_qchat_client_def.h:373
char * appkey
app唯一标识符
Definition: nim_qchat_client_def.h:371
NIMQChatLoginAuthType auth_type
鉴权方式
Definition: nim_qchat_client_def.h:375
char * link_address
链接地址 json array
Definition: nim_qchat_client_def.h:383
Definition: nim_qchat_client_def.h:139
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:141
size_t other_clients_count
其他客户端数量
Definition: nim_qchat_client_def.h:147
Definition: nim_qchat_client_def.h:101
NIMQChatLoginStatus login_status
登录状态
Definition: nim_qchat_client_def.h:105
Definition: nim_qchat_client_def.h:387
nim_qchat_logout_cb_func cb
登出异步回调
Definition: nim_qchat_client_def.h:389
Definition: nim_qchat_client_def.h:153
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_client_def.h:155
Definition: nim_qchat_client_def.h:328
size_t max_cache_message_count
每个频道中最大缓存消息数量,默认缓存 20 条消息
Definition: nim_qchat_client_def.h:334
bool enable_message_cache
是否开启缓存消息,默认开启
Definition: nim_qchat_client_def.h:330
size_t max_cache_channel_count
最大缓存消息得频道数量,默认缓存 100 个频道
Definition: nim_qchat_client_def.h:332
Definition: nim_qchat_client_def.h:121
NIMQChatLoginClientInfo client_info
客户端信息
Definition: nim_qchat_client_def.h:127
uint32_t notify_type
通知类型 1:登录 2:登出
Definition: nim_qchat_client_def.h:125
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:131
char * log_content
日志内容
Definition: nim_qchat_client_def.h:135
Definition: nim_qchat_client_cpp_def.h:484
NIMQChatCleanupParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:487
QChatCleanupParam(const NIMQChatCleanupParam &param)
Definition: nim_qchat_client_cpp_def.h:486
Definition: nim_qchat_client_cpp_def.h:18
QChatCustomTokenResp(const NIMQChatCustomTokenResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:26
NIMQChatCustomTokenResp ToCParam() const
Definition: nim_qchat_client_cpp_def.h:31
std::string token
自定义token
Definition: nim_qchat_client_cpp_def.h:24
std::string appkey
appkey
Definition: nim_qchat_client_cpp_def.h:20
std::string accid
accid
Definition: nim_qchat_client_cpp_def.h:22
Definition: nim_qchat_client_cpp_def.h:270
std::string nego_key_neca_key_parta
"交换密钥"协议加密算法密钥, 为空使用默认值
Definition: nim_qchat_client_cpp_def.h:278
std::string nego_key_neca_key_partb
非对称加密算法 key
Definition: nim_qchat_client_cpp_def.h:280
QChatEncryptionConfiguration(const NIMQChatEncryptionConfiguration &c_param)
Definition: nim_qchat_client_cpp_def.h:284
NIMQChatEncryptionConfiguration ToCParam() const
Definition: nim_qchat_client_cpp_def.h:292
Definition: nim_qchat_client_cpp_def.h:307
NIMQChatFCSConfiguration ToCParam() const
Definition: nim_qchat_client_cpp_def.h:347
std::string mock_ua
mock user-agent
Definition: nim_qchat_client_cpp_def.h:329
QChatFCSConfiguration(const NIMQChatFCSConfiguration &c_param)
Definition: nim_qchat_client_cpp_def.h:333
std::string mock_refer
mock refer
Definition: nim_qchat_client_cpp_def.h:331
Definition: nim_qchat_client_cpp_def.h:604
NIMQChatGetRTCTokenParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:618
QChatGetRTCTokenParam(const NIMQChatGetRTCTokenParam &c_param)
Definition: nim_qchat_client_cpp_def.h:610
Definition: nim_qchat_client_cpp_def.h:208
QChatGetRTCTokenResp(const NIMQChatGetRTCTokenResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:216
std::string token
token
Definition: nim_qchat_client_cpp_def.h:212
NIMQChatGetRTCTokenResp ToCParam() const
Definition: nim_qchat_client_cpp_def.h:221
Definition: nim_qchat_client_cpp_def.h:389
std::string database_encrypt_key
数据库加密密钥,传空则使用默认值
Definition: nim_qchat_client_cpp_def.h:399
QChatEncryptionConfiguration encryption_configuration
加密配置
Definition: nim_qchat_client_cpp_def.h:403
QChatMessageCacheConfiguration message_cache_configuration
消息缓存配置
Definition: nim_qchat_client_cpp_def.h:407
QChatFCSConfiguration fcs_configuration
融合存储相关配置
Definition: nim_qchat_client_cpp_def.h:405
std::string appkey
当前应用的 App Key,一个 App Key 对应一个账号体系
Definition: nim_qchat_client_cpp_def.h:391
std::string app_data_path
App 数据存储的完整路径,传空则使用默认路径
Definition: nim_qchat_client_cpp_def.h:393
NIMQChatInitParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:420
QChatInitParam(const NIMQChatInitParam &param)
Definition: nim_qchat_client_cpp_def.h:409
QChatInitParam()=default
Definition: nim_qchat_client_cpp_def.h:568
QChatKickParam()=default
QChatKickParam(const NIMQChatKickParam &c_param)
Definition: nim_qchat_client_cpp_def.h:574
std::vector< char * > vec_device_ids
Definition: nim_qchat_client_cpp_def.h:600
NIMQChatKickParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:583
Definition: nim_qchat_client_cpp_def.h:170
NIMQChatKickResp ToCParam() const
Definition: nim_qchat_client_cpp_def.h:183
QChatKickResp()=default
QChatKickResp(const NIMQChatKickResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:176
std::vector< char * > vec_kicked_device_ids
Definition: nim_qchat_client_cpp_def.h:196
Definition: nim_qchat_client_cpp_def.h:88
QChatKickedResp(const NIMQChatKickedResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:98
QChatKickedResp()=default
Definition: nim_qchat_client_cpp_def.h:41
QChatLoginClientInfo(const NIMQChatLoginClientInfo &c_param)
Definition: nim_qchat_client_cpp_def.h:61
NIMQChatLoginClientInfo ToCParam() const
Definition: nim_qchat_client_cpp_def.h:72
Definition: nim_qchat_client_cpp_def.h:494
QChatLoginParam(const NIMQChatLoginParam &param)
Definition: nim_qchat_client_cpp_def.h:512
NIMQChatLoginParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:526
std::string appkey
app唯一标识符
Definition: nim_qchat_client_cpp_def.h:498
QChatLoginParam()=default
std::string accid
用户帐号
Definition: nim_qchat_client_cpp_def.h:500
std::string login_token
登陆的token
Definition: nim_qchat_client_cpp_def.h:506
std::string login_ext
登录自定义字段
Definition: nim_qchat_client_cpp_def.h:508
std::string link_address_json_array
Definition: nim_qchat_client_cpp_def.h:548
Definition: nim_qchat_client_cpp_def.h:130
NIMQChatLoginResp ToCParam() const
Definition: nim_qchat_client_cpp_def.h:147
QChatLoginResp()=default
QChatLoginResp(const NIMQChatLoginResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:138
Definition: nim_qchat_client_cpp_def.h:107
QChatLoginStatusResp(const NIMQChatLoginStatusResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:111
Definition: nim_qchat_client_cpp_def.h:552
NIMQChatLogoutParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:555
Definition: nim_qchat_client_cpp_def.h:162
QChatLogoutResp()=default
QChatLogoutResp(const NIMQChatLogoutResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:166
Definition: nim_qchat_client_cpp_def.h:366
size_t max_cache_channel_count
最大缓存消息得频道数量,默认缓存 100 个频道
Definition: nim_qchat_client_cpp_def.h:370
QChatMessageCacheConfiguration(const NIMQChatMessageCacheConfiguration &c_param)
Definition: nim_qchat_client_cpp_def.h:374
NIMQChatMessageCacheConfiguration ToCParam() const
Definition: nim_qchat_client_cpp_def.h:379
size_t max_cache_message_count
每个频道中最大缓存消息数量,默认缓存 20 条消息
Definition: nim_qchat_client_cpp_def.h:372
Definition: nim_qchat_client_cpp_def.h:115
QChatMultispotLoginResp(const NIMQChatMultispotLoginResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:123
Definition: nim_qchat_client_cpp_def.h:250
NIMQChatRegCustomTokenCbParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:253
Definition: nim_qchat_client_cpp_def.h:436
NIMQChatRegKickedCbParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:439
Definition: nim_qchat_client_cpp_def.h:452
NIMQChatRegLoginStatusCbParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:455
Definition: nim_qchat_client_cpp_def.h:468
NIMQChatRegMultispotLoginCbParam ToCParam() const
Definition: nim_qchat_client_cpp_def.h:471
Definition: nim_qchat_client_cpp_def.h:200
QChatSDKLogResp(const NIMQChatSDKLogResp &c_resp)
Definition: nim_qchat_client_cpp_def.h:204
QChatSDKLogResp()=default