NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_qchat_message_cpp_def.h
浏览该文件的文档.
1
11#ifndef __NIM_QCHAT_MESSAGE_CPP_DEF_H__
12#define __NIM_QCHAT_MESSAGE_CPP_DEF_H__
13
15
16namespace nim {
17
22 virtual void SetRawData(const std::string& raw_data){};
23 virtual std::string GetRawData() const { return ""; };
24 virtual bool IsFileBased() const { return false; };
25};
26
28 QChatDefaultAttach() = default;
29 QChatDefaultAttach(const std::string& raw_data) { SetRawData(raw_data); }
30 QChatDefaultAttach(const NIMQChatDefaultAttach& c_param) { msg_attach = c_param.msg_attach ? c_param.msg_attach : ""; }
33 c_param.msg_attach = const_cast<char*>(msg_attach.c_str());
34 return c_param;
35 }
36 void SetRawData(const std::string& raw_data) override { msg_attach = raw_data; };
37 std::string GetRawData() const override { return msg_attach; }
38 std::string msg_attach;
39};
40
43public:
44 QChatFileAttach() = default;
45 QChatFileAttach(const std::string& raw_data) { SetRawData(raw_data); }
47 file_path = c_param.file_path ? c_param.file_path : "";
48 download_url = c_param.url ? c_param.url : "";
49 hash = c_param.md5 ? c_param.md5 : "";
50 extension = c_param.ext ? c_param.ext : "";
51 name = c_param.name ? c_param.name : "";
52 }
55 param.file_path = const_cast<char*>(file_path.c_str());
56 param.url = const_cast<char*>(download_url.c_str());
57 param.md5 = const_cast<char*>(hash.c_str());
58 param.ext = const_cast<char*>(extension.c_str());
59 param.name = const_cast<char*>(name.c_str());
60 return param;
61 }
62 void SetRawData(const std::string& raw_data) override {
64 if (nim::ParseJsonValue(raw_data, values)) {
65 if (values.isMember(kNIMQChatFilePath))
66 file_path = values[kNIMQChatFilePath].asString();
67 if (values.isMember(kNIMQChatMD5))
68 hash = values[kNIMQChatMD5].asString();
69 if (values.isMember(kNIMQChatName))
70 name = values[kNIMQChatName].asString();
71 if (values.isMember(kNIMQChatURL))
72 download_url = values[kNIMQChatURL].asString();
73 if (values.isMember(kNIMQChatExt))
74 extension = values[kNIMQChatExt].asString();
75 }
76 };
77 std::string GetRawData() const override {
79 ProcessFileFields(values);
80 return nim::GetJsonStringWithNoStyled(values);
81 }
83 values[kNIMQChatFilePath] = file_path;
84 values[kNIMQChatURL] = download_url;
85 values[kNIMQChatMD5] = hash;
86 values[kNIMQChatExt] = extension;
87 values[kNIMQChatName] = name;
88 }
89 bool IsFileBased() const override { return true; }
90
91 std::string name;
92 std::string file_path;
93 std::string hash;
94 std::string download_url;
95 std::string extension;
96};
97
100 QChatImageAttach() = default;
101 QChatImageAttach(const std::string& raw_data) { SetRawData(raw_data); }
103 file_path = c_param.file_path ? c_param.file_path : "";
104 width = c_param.width;
105 height = c_param.height;
106 download_url = c_param.url ? c_param.url : "";
107 hash = c_param.md5 ? c_param.md5 : "";
108 extension = c_param.ext ? c_param.ext : "";
109 name = c_param.name ? c_param.name : "";
110 }
113 param.file_path = const_cast<char*>(file_path.c_str());
114 param.width = width;
115 param.height = height;
116 param.url = const_cast<char*>(download_url.c_str());
117 param.md5 = const_cast<char*>(hash.c_str());
118 param.ext = const_cast<char*>(extension.c_str());
119 param.name = const_cast<char*>(name.c_str());
120 return param;
121 }
122 void SetRawData(const std::string& raw_data) override {
123 QChatFileAttach::SetRawData(raw_data);
125 if (nim::ParseJsonValue(raw_data, values)) {
126 if (values.isMember(kNIMQChatWidth))
127 width = values[kNIMQChatWidth].asInt();
128 if (values.isMember(kNIMQChatHeight))
129 height = values[kNIMQChatHeight].asInt();
130 }
131 }
132 std::string GetRawData() const override {
134 ProcessFileFields(values);
135 values[kNIMQChatWidth] = width;
136 values[kNIMQChatHeight] = height;
137 return nim::GetJsonStringWithNoStyled(values);
138 }
139
140 uint32_t width = 0;
141 uint32_t height = 0;
142};
143
146 QChatAudioAttach() = default;
147 QChatAudioAttach(const std::string& raw_data) { SetRawData(raw_data); }
149 file_path = c_param.file_path ? c_param.file_path : "";
150 duration = c_param.duration;
151 download_url = c_param.url ? c_param.url : "";
152 hash = c_param.md5 ? c_param.md5 : "";
153 extension = c_param.ext ? c_param.ext : "";
154 name = c_param.name ? c_param.name : "";
155 }
158 param.file_path = const_cast<char*>(file_path.c_str());
159 param.duration = duration;
160 param.url = const_cast<char*>(download_url.c_str());
161 param.md5 = const_cast<char*>(hash.c_str());
162 param.ext = const_cast<char*>(extension.c_str());
163 param.name = const_cast<char*>(name.c_str());
164 return param;
165 }
166 void SetRawData(const std::string& raw_data) override {
168 if (nim::ParseJsonValue(raw_data, values)) {
169 if (values.isMember(kNIMQChatDuration))
170 duration = values[kNIMQChatDuration].asInt();
171 }
172 }
173 std::string GetRawData() const override {
175 ProcessFileFields(values);
176 values[kNIMQChatDuration] = duration;
177 return nim::GetJsonStringWithNoStyled(values);
178 }
179
180 uint64_t duration = 0;
181};
182
185 QChatVideoAttach() = default;
186 QChatVideoAttach(const std::string& raw_data) { SetRawData(raw_data); }
188 file_path = c_param.file_path ? c_param.file_path : "";
189 duration = c_param.duration;
190 width = c_param.width;
191 height = c_param.height;
192 download_url = c_param.url ? c_param.url : "";
193 hash = c_param.md5 ? c_param.md5 : "";
194 extension = c_param.ext ? c_param.ext : "";
195 name = c_param.name ? c_param.name : "";
196 }
199 param.file_path = const_cast<char*>(file_path.c_str());
200 param.duration = duration;
201 param.width = width;
202 param.height = height;
203 param.url = const_cast<char*>(download_url.c_str());
204 param.md5 = const_cast<char*>(hash.c_str());
205 param.ext = const_cast<char*>(extension.c_str());
206 param.name = const_cast<char*>(name.c_str());
207 return param;
208 }
209 void SetRawData(const std::string& raw_data) override {
211 if (nim::ParseJsonValue(raw_data, values)) {
212 if (values.isMember(kNIMQChatDuration))
213 duration = values[kNIMQChatDuration].asInt();
214 if (values.isMember(kNIMQChatWidth))
215 width = values[kNIMQChatWidth].asInt();
216 if (values.isMember(kNIMQChatHeight))
217 height = values[kNIMQChatHeight].asInt();
218 }
219 }
220 std::string GetRawData() const override {
222 ProcessFileFields(values);
223 values[kNIMQChatDuration] = duration;
224 values[kNIMQChatWidth] = width;
225 values[kNIMQChatHeight] = height;
226 return nim::GetJsonStringWithNoStyled(values);
227 }
228
229 uint64_t duration = 0;
230 uint32_t width = 0;
231 uint32_t height = 0;
232};
233
237 QChatLocationAttach(const std::string& raw_data) { SetRawData(raw_data); }
239 latitude = c_param.latitude;
240 longitude = c_param.longitude;
241 title = c_param.title ? c_param.title : "";
242 }
245 param.latitude = latitude;
246 param.longitude = longitude;
247 param.title = const_cast<char*>(title.c_str());
248 return param;
249 }
250 void SetRawData(const std::string& raw_data) override {
252 if (nim::ParseJsonValue(raw_data, values)) {
253 if (values.isMember(kNIMQChatLatitude))
254 latitude = values[kNIMQChatLatitude].asDouble();
255 if (values.isMember(kNIMQChatLongitude))
256 longitude = values[kNIMQChatLongitude].asDouble();
257 if (values.isMember(kNIMQChatTitle))
258 title = values[kNIMQChatTitle].asString();
259 }
260 }
261 std::string GetRawData() const override {
263 values[kNIMQChatLatitude] = latitude;
264 values[kNIMQChatLongitude] = longitude;
265 values[kNIMQChatTitle] = title;
266 return nim::GetJsonStringWithNoStyled(values);
267 }
268
269 double latitude = 0;
270 double longitude = 0;
271 std::string title;
272};
273
276 QChatNotificationAttach(const std::string& raw_data) { SetRawData(raw_data); }
278 id = c_param.id;
279 data = c_param.data ? c_param.data : "";
280 }
283 param.id = id;
284 param.data = const_cast<char*>(data.c_str());
285 return param;
286 }
287 void SetRawData(const std::string& raw_data) override {
289 if (nim::ParseJsonValue(raw_data, values)) {
290 if (values.isMember(kNIMQChatID))
291 id = values[kNIMQChatID].asInt();
292 if (values.isMember(kNIMQChatData))
293 data = values[kNIMQChatData].asString();
294 }
295 }
296 std::string GetRawData() const override {
298 values[kNIMQChatID] = id;
299 values[kNIMQChatData] = data;
300 return nim::GetJsonStringWithNoStyled(values);
301 }
302
303 uint32_t id = 0;
304 std::string data;
305};
306
308 QChatTipsAttach() = default;
309 QChatTipsAttach(const std::string& raw_data) { SetRawData(raw_data); }
311 type = c_param.type;
312 data = c_param.data ? c_param.data : "";
313 }
315 NIMQChatTipsAttach param;
316 param.type = type;
317 param.data = const_cast<char*>(data.c_str());
318 return param;
319 }
320 void SetRawData(const std::string& raw_data) override {
322 if (nim::ParseJsonValue(raw_data, values)) {
323 if (values.isMember(kNIMQChatType))
324 type = values[kNIMQChatType].asInt();
325 if (values.isMember(kNIMQChatData))
326 data = values[kNIMQChatData].asString();
327 }
328 }
329 std::string GetRawData() const override {
331 values[kNIMQChatType] = type;
332 values[kNIMQChatData] = data;
333 return nim::GetJsonStringWithNoStyled(values);
334 }
335
336 uint32_t type = 0;
337 std::string data;
338};
339
343 std::string postscript;
345 std::string extension;
347 std::string push_content;
349 std::string push_payload;
351 std::string env;
354 // 以下字段仅在收到消息时有效
355 std::string operator_id;
356 uint32_t operator_client_type{0};
359 postscript = c_param.postscript ? c_param.postscript : "";
360 extension = c_param.extension ? c_param.extension : "";
361 push_content = c_param.push_content ? c_param.push_content : "";
362 push_payload = c_param.push_payload ? c_param.push_payload : "";
363 env = c_param.env ? c_param.env : "";
364 route_enable = c_param.route_enable;
365 operator_id = c_param.operator_id ? c_param.operator_id : "";
366 operator_client_type = c_param.operator_client_type;
367 }
369 NIMQChatMessageUpdateInfo c_param = {};
370 c_param.postscript = const_cast<char*>(postscript.c_str());
371 c_param.extension = const_cast<char*>(extension.c_str());
372 c_param.push_content = const_cast<char*>(push_content.c_str());
373 c_param.push_payload = const_cast<char*>(push_payload.c_str());
374 c_param.env = const_cast<char*>(env.c_str());
375 c_param.route_enable = route_enable;
376 c_param.operator_id = const_cast<char*>(operator_id.c_str());
377 c_param.operator_client_type = operator_client_type;
378 return c_param;
379 }
380};
381
385 bool use_custom_content{false};
387 bool anti_spam_using_yidun{true};
389 std::string anti_spam_content;
400 use_custom_content = c_param.use_custom_content;
401 anti_spam_using_yidun = c_param.anti_spam_using_yidun;
402 anti_spam_content = c_param.anti_spam_content ? c_param.anti_spam_content : "";
403 anti_spam_bussiness_id = c_param.anti_spam_bussiness_id ? c_param.anti_spam_bussiness_id : "";
404 yidun_callback_url = c_param.yidun_callback_url ? c_param.yidun_callback_url : "";
405 yidun_anti_cheating = c_param.yidun_anti_cheating ? c_param.yidun_anti_cheating : "";
406 yidun_anti_spam_ext = c_param.yidun_anti_spam_ext ? c_param.yidun_anti_spam_ext : "";
407 }
409 NIMQChatMessageAntiSpamInfo c_param = {};
410 c_param.use_custom_content = use_custom_content;
411 c_param.anti_spam_using_yidun = anti_spam_using_yidun;
412 c_param.anti_spam_content = const_cast<char*>(anti_spam_content.c_str());
413 c_param.anti_spam_bussiness_id = const_cast<char*>(anti_spam_bussiness_id.c_str());
414 c_param.yidun_callback_url = const_cast<char*>(yidun_callback_url.c_str());
415 c_param.yidun_anti_cheating = const_cast<char*>(yidun_anti_cheating.c_str());
416 c_param.yidun_anti_spam_ext = const_cast<char*>(yidun_anti_spam_ext.c_str());
417 return c_param;
418 }
419};
420
424 std::string reply_from_accid;
426 uint64_t reply_msg_timestamp = 0;
428 uint64_t reply_msg_server_id = 0;
432 std::string thread_root_accid;
434 uint64_t thread_root_msg_timestamp = 0;
436 uint64_t thread_root_msg_server_id = 0;
441 reply_from_accid = c_param.reply_from_accid ? c_param.reply_from_accid : "";
442 reply_msg_timestamp = c_param.reply_msg_timestamp;
443 reply_msg_server_id = c_param.reply_msg_server_id;
444 reply_msg_client_id = c_param.reply_msg_client_id ? c_param.reply_msg_client_id : "";
445 thread_root_accid = c_param.thread_root_accid ? c_param.thread_root_accid : "";
446 thread_root_msg_timestamp = c_param.thread_root_msg_timestamp;
447 thread_root_msg_server_id = c_param.thread_root_msg_server_id;
448 thread_root_msg_client_id = c_param.thread_root_msg_client_id ? c_param.thread_root_msg_client_id : "";
449 }
451 NIMQChatMessageThreadInfo c_param = {};
452 c_param.reply_from_accid = const_cast<char*>(reply_from_accid.c_str());
453 c_param.reply_msg_timestamp = reply_msg_timestamp;
454 c_param.reply_msg_server_id = reply_msg_server_id;
455 c_param.reply_msg_client_id = const_cast<char*>(reply_msg_client_id.c_str());
456 c_param.thread_root_accid = const_cast<char*>(thread_root_accid.c_str());
457 c_param.thread_root_msg_timestamp = thread_root_msg_timestamp;
458 c_param.thread_root_msg_server_id = thread_root_msg_server_id;
459 c_param.thread_root_msg_client_id = const_cast<char*>(thread_root_msg_client_id.c_str());
460 return c_param;
461 }
462};
463
467 uint64_t server_id{0};
469 uint64_t channel_id{0};
473 uint32_t msg_sub_type{0};
475 std::string msg_body{""};
477 std::shared_ptr<IQChatAttachInterface> msg_attach{std::make_shared<QChatDefaultAttach>()};
479 std::string msg_ext{""};
481 std::string msg_id{""};
483 bool resend_flag{false};
485 bool mention_all{false};
487 std::vector<std::string> mention_accids{};
489 std::vector<uint64_t> mention_role_ids{};
491 bool history_enable{true};
493 std::string push_payload{""};
495 std::string push_content{""};
497 bool push_enable{false};
499 bool need_badge{true};
501 bool need_push_nick{true};
503 bool route_enable{true};
509 std::string env;
510 QChatMessageSend() = default;
512 server_id = c_param.server_id;
513 channel_id = c_param.channel_id;
514 msg_type = c_param.msg_type;
515 msg_sub_type = c_param.msg_sub_type;
516 msg_body = c_param.msg_body ? c_param.msg_body : "";
517 msg_attach = CreateAttach(c_param);
518 msg_ext = c_param.msg_ext ? c_param.msg_ext : "";
519 msg_id = c_param.msg_id ? c_param.msg_id : "";
520 resend_flag = c_param.resend_flag;
521 mention_all = c_param.mention_all;
522 mention_accids.clear();
523 for (auto index = 0; index < c_param.mention_accids_count; ++index) {
524 mention_accids.emplace_back(c_param.mention_accids[index]);
525 }
526 mention_role_ids.clear();
527 for (auto index = 0; index < c_param.mention_role_ids_count; ++index) {
528 mention_role_ids.emplace_back(c_param.mention_role_ids[index]);
529 }
530 history_enable = c_param.history_enable;
531 push_payload = c_param.push_payload ? c_param.push_payload : "";
532 push_content = c_param.push_content ? c_param.push_content : "";
533 push_enable = c_param.push_enable;
534 need_badge = c_param.need_badge;
535 need_push_nick = c_param.need_push_nick ? c_param.need_push_nick : true;
536 route_enable = c_param.route_enable;
537 thread_info = c_param.thread_info;
538 anti_spam_info = c_param.anti_spam_info;
539 env = c_param.env ? c_param.env : "";
540 }
542 NIMQChatMessage c_param = {};
543 c_param.server_id = server_id;
544 c_param.channel_id = channel_id;
545 c_param.msg_type = msg_type;
546 c_param.msg_sub_type = msg_sub_type;
547 c_param.msg_body = const_cast<char*>(msg_body.c_str());
548 c_param.msg_ext = const_cast<char*>(msg_ext.c_str());
549 c_param.msg_id = const_cast<char*>(msg_id.c_str());
550 c_param.resend_flag = resend_flag;
551 c_param.mention_all = mention_all;
552 c_param.mention_accids_count = mention_accids.size();
553 c_mention_accids.clear();
554 for (auto& accid : mention_accids) {
555 c_mention_accids.emplace_back(const_cast<char*>(accid.c_str()));
556 }
557 c_param.mention_accids_count = c_mention_accids.size();
558 c_param.mention_accids = const_cast<char**>(c_mention_accids.data());
559 c_param.mention_role_ids_count = mention_role_ids.size();
560 c_param.mention_role_ids = const_cast<uint64_t*>(mention_role_ids.data());
561 c_param.history_enable = history_enable;
562 c_param.push_payload = const_cast<char*>(push_payload.c_str());
563 c_param.push_content = const_cast<char*>(push_content.c_str());
564 c_param.push_enable = push_enable;
565 c_param.need_badge = need_badge;
566 c_param.need_push_nick = need_push_nick;
567 c_param.route_enable = route_enable;
568 c_param.from_accid = nullptr;
569 c_param.from_device_id = nullptr;
570 c_param.from_nick = nullptr;
571 ParseAttach(msg_attach, c_param);
572 c_param.thread_info = thread_info.ToCParam();
573 c_param.anti_spam_info = anti_spam_info.ToCParam();
574 c_param.env = const_cast<char*>(env.c_str());
575 return c_param;
576 }
577 using AttachRawCreateFunc = std::function<std::shared_ptr<IQChatAttachInterface>(const std::string&)>;
578 using AttachCreateFunc = std::function<std::shared_ptr<IQChatAttachInterface>(const NIMQChatMessage&)>;
579 using AttachParseFunc = std::function<void(const std::shared_ptr<IQChatAttachInterface>&, NIMQChatMessage&)>;
580 static std::map<NIMQChatMsgType, AttachRawCreateFunc> attach_raw_create_function_;
581 static std::shared_ptr<IQChatAttachInterface> CreateAttachWithRawData(NIMQChatMsgType type, const std::string& raw_data) {
582 auto iter = attach_raw_create_function_.find(type);
583 if (iter != attach_raw_create_function_.end()) {
584 return iter->second(raw_data);
585 }
586 return std::make_shared<QChatDefaultAttach>(raw_data);
587 }
588
589private:
590 std::shared_ptr<IQChatAttachInterface> CreateAttach(const NIMQChatMessage& m) {
591 auto iter = attach_create_functions_.find(m.msg_type);
592 if (iter != attach_create_functions_.end()) {
593 return iter->second(m);
594 }
595 return std::make_shared<QChatDefaultAttach>(m.default_attach.msg_attach == nullptr ? "" : m.default_attach.msg_attach);
596 }
597 void ParseAttach(const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp) const {
598 if (!p) {
599 return;
600 }
601 auto iter = attach_parse_functions_.find(cp.msg_type);
602 if (iter != attach_parse_functions_.end()) {
603 iter->second(p, cp);
604 } else {
605 cp.default_attach = std::dynamic_pointer_cast<QChatDefaultAttach>(p)->ToCParam();
606 }
607 }
608 template <typename ATTACH_TYPE>
609 static std::shared_ptr<ATTACH_TYPE> GetOriginAttach(const std::shared_ptr<IQChatAttachInterface>& p) {
610 auto attach = std::dynamic_pointer_cast<ATTACH_TYPE>(p);
611 if (attach) {
612 return attach;
613 } else {
614 return std::make_shared<ATTACH_TYPE>(p->GetRawData());
615 }
616 }
617 // clang-format off
618 std::map<NIMQChatMsgType, AttachCreateFunc> attach_create_functions_ = {
619 { kNIMQChatMsgTypeText, [](const NIMQChatMessage& m) { return std::make_shared<QChatDefaultAttach>(m.default_attach); } },
620 { kNIMQChatMsgTypeImage, [](const NIMQChatMessage& m) { return std::make_shared<QChatImageAttach>(m.image_attach); } },
621 { kNIMQChatMsgTypeAudio, [](const NIMQChatMessage& m) { return std::make_shared<QChatAudioAttach>(m.audio_attach); } },
622 { kNIMQChatMsgTypeVideo, [](const NIMQChatMessage& m) { return std::make_shared<QChatVideoAttach>(m.video_attach); } },
623 { kNIMQChatMsgTypeFile, [](const NIMQChatMessage& m) { return std::make_shared<QChatFileAttach>(m.file_attach); } },
624 { kNIMQChatMsgTypeLocation, [](const NIMQChatMessage& m) { return std::make_shared<QChatLocationAttach>(m.location_attach); } },
625 { kNIMQChatMsgTypeNotification, [](const NIMQChatMessage& m) { return std::make_shared<QChatNotificationAttach>(m.notification_attach); } },
626 { kNIMQChatMsgTypeTips, [](const NIMQChatMessage& m) { return std::make_shared<QChatTipsAttach>(m.tips_attach); } }
627 };
628
629 std::map<NIMQChatMsgType, AttachParseFunc> attach_parse_functions_ = {
630 {kNIMQChatMsgTypeText, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
631 { cp.default_attach = GetOriginAttach<QChatDefaultAttach>(p)->ToCParam(); } },
632 {kNIMQChatMsgTypeImage, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
633 { cp.image_attach = GetOriginAttach<QChatImageAttach>(p)->ToCParam(); } },
634 {kNIMQChatMsgTypeAudio, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
635 { cp.audio_attach = GetOriginAttach<QChatAudioAttach>(p)->ToCParam(); } },
636 {kNIMQChatMsgTypeVideo, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
637 { cp.video_attach = GetOriginAttach<QChatVideoAttach>(p)->ToCParam(); } },
638 {kNIMQChatMsgTypeFile, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
639 { cp.file_attach = GetOriginAttach<QChatFileAttach>(p)->ToCParam(); } },
640 {kNIMQChatMsgTypeLocation, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
641 { cp.location_attach = GetOriginAttach<QChatLocationAttach>(p)->ToCParam(); } },
642 {kNIMQChatMsgTypeNotification, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
643 { cp.notification_attach = GetOriginAttach<QChatNotificationAttach>(p)->ToCParam(); } },
644 {kNIMQChatMsgTypeTips, [](const std::shared_ptr<IQChatAttachInterface>& p, NIMQChatMessage& cp)
645 { cp.tips_attach = GetOriginAttach<QChatTipsAttach>(p)->ToCParam(); } }
646 };
647 // clang-format on
648
649protected:
650 mutable std::vector<char*> c_mention_accids;
651};
652
658 std::string msg_body;
660 std::string msg_ext;
663 status = c_param.status;
664 msg_body = c_param.msg_body == nullptr ? "" : c_param.msg_body;
665 msg_ext = c_param.msg_ext == nullptr ? "" : c_param.msg_ext;
666 }
669 c_param.status = status;
670 c_param.msg_body = const_cast<char*>(msg_body.c_str());
671 c_param.msg_ext = const_cast<char*>(msg_ext.c_str());
672 return c_param;
673 }
674};
675
679 std::string operator_id;
681 uint32_t operator_client_type{0};
683 std::string postscript;
685 std::string extension;
687 std::string push_content;
689 std::string push_payload;
692 operator_id = c_param.operator_id == nullptr ? "" : c_param.operator_id;
693 operator_client_type = c_param.operator_client_type;
694 postscript = c_param.postscript == nullptr ? "" : c_param.postscript;
695 extension = c_param.extension == nullptr ? "" : c_param.extension;
696 push_content = c_param.push_content == nullptr ? "" : c_param.push_content;
697 push_payload = c_param.push_payload == nullptr ? "" : c_param.push_payload;
698 }
701 c_param.operator_id = const_cast<char*>(operator_id.c_str());
702 c_param.operator_client_type = operator_client_type;
703 c_param.postscript = const_cast<char*>(postscript.c_str());
704 c_param.extension = const_cast<char*>(extension.c_str());
705 c_param.push_content = const_cast<char*>(push_content.c_str());
706 c_param.push_payload = const_cast<char*>(push_payload.c_str());
707 return c_param;
708 }
709};
710
713 // 以下字段仅在收到消息时有效
717 uint64_t msg_server_id{0};
719 std::string from_accid{""};
721 uint32_t from_client_type{0};
723 std::string from_device_id{""};
725 std::string from_nick{""};
727 uint64_t timestamp{0};
729 uint64_t update_timestamp{0};
733 bool is_anti_spamed{false};
735 std::string anti_spam_result;
737 std::string callback_ext;
742 QChatMessage() = default;
744 : QChatMessageSend(parent) {}
746 : QChatMessageSend(c_param) {
747 // fill by server
748 status = c_param.status;
749 msg_server_id = c_param.msg_server_id;
750 from_accid = c_param.from_accid ? c_param.from_accid : "";
751 from_client_type = c_param.from_client_type;
752 from_device_id = c_param.from_device_id ? c_param.from_device_id : "";
753 from_nick = c_param.from_nick ? c_param.from_nick : "";
754 timestamp = c_param.timestamp;
755 update_timestamp = c_param.update_timestamp;
756 notify_reason = c_param.notify_reason;
757 is_anti_spamed = c_param.is_anti_spamed;
758 callback_ext = c_param.callback_ext ? c_param.callback_ext : "";
759 anti_spam_result = c_param.anti_spam_result ? c_param.anti_spam_result : "";
760 update_content = c_param.update_content;
761 update_ope_info = c_param.update_ope_info;
762 accids_of_mentioned_roles_available = c_param.accids_of_mentioned_roles_available;
763 accids_of_mentioned_roles.clear();
764 for (auto index = 0; index < c_param.accids_of_mentioned_roles_count; ++index) {
765 accids_of_mentioned_roles.emplace_back(c_param.accids_of_mentioned_roles[index]);
766 }
767 }
769 auto c_param = QChatMessageSend::ToCParam();
770 c_param.status = status;
771 c_param.msg_server_id = msg_server_id;
772 c_param.from_accid = const_cast<char*>(from_accid.c_str());
773 c_param.from_client_type = from_client_type;
774 c_param.from_device_id = const_cast<char*>(from_device_id.c_str());
775 c_param.from_nick = const_cast<char*>(from_nick.c_str());
776 c_param.timestamp = timestamp;
777 c_param.update_timestamp = update_timestamp;
778 c_param.notify_reason = notify_reason;
779 c_param.is_anti_spamed = is_anti_spamed;
780 c_param.callback_ext = const_cast<char*>(callback_ext.c_str());
781 c_param.anti_spam_result = const_cast<char*>(anti_spam_result.c_str());
782 c_param.update_content = update_content.ToCParam();
783 c_param.update_ope_info = update_ope_info.ToCParam();
784 c_param.accids_of_mentioned_roles_available = accids_of_mentioned_roles_available;
785 c_accids_of_mentioned_roles.clear();
786 for (auto& accid : accids_of_mentioned_roles) {
787 c_accids_of_mentioned_roles.emplace_back(const_cast<char*>(accid.c_str()));
788 }
789 c_param.accids_of_mentioned_roles = const_cast<char**>(c_accids_of_mentioned_roles.data());
790 c_param.accids_of_mentioned_roles_count = c_accids_of_mentioned_roles.size();
791 return c_param;
792 }
793 // 内部字段
795 bool accids_of_mentioned_roles_available{false};
797 std::vector<std::string> accids_of_mentioned_roles;
798
799protected:
800 mutable std::vector<char*> c_accids_of_mentioned_roles;
801};
802
806 QChatMessage message{};
807 QChatRecvMsgResp() = default;
808 QChatRecvMsgResp(const NIMQChatRecvMsgResp& c_resp) { message = c_resp.message; }
809};
810
814 uint32_t res_code{0};
818 QChatMessage message{};
821 update_info = c_resp.update_info;
822 message = c_resp.message;
823 }
824};
825
829 uint32_t res_code{0};
831 QChatMessage message{};
834 res_code = c_resp.res_code;
835 message = c_resp.message;
837 return;
838 }
840 NIMQChatSendMessageResp c_response;
841 c_response.message = message.ToCParam();
842 c_response.res_code = res_code;
843 return c_response;
844 }
845};
846
849
853 uint32_t res_code{0};
855 QChatMessage message{};
858 res_code = c_resp.res_code;
860 return;
861 message = c_resp.message;
862 }
864 NIMQChatUpdateMessageResp c_response;
865 c_response.message = message.ToCParam();
866 c_response.res_code = res_code;
867 return c_response;
868 }
869};
870
874 uint32_t res_code{0};
876 std::vector<QChatMessage> messages{};
879 res_code = c_resp.res_code;
880 if (c_resp.res_code != kNIMResSuccess)
881 return;
882 for (size_t i = 0; i < c_resp.messages_count; i++) {
883 messages.emplace_back(c_resp.messages[i]);
884 }
885 }
887 NIMQChatGetMessagesResp c_response;
888 c_response.res_code = res_code;
889 message_.clear();
890 for (const auto& msg : messages) {
891 message_.push_back(msg.ToCParam());
892 }
893 c_response.messages = const_cast<NIMQChatMessage*>(message_.data());
894 c_response.messages_count = static_cast<uint32_t>(message_.size());
895 return c_response;
896 }
897
898private:
899 mutable std::vector<NIMQChatMessage> message_;
900};
901
905 uint32_t res_code{0};
907 std::map<uint64_t, QChatMessage> messages{};
910 res_code = c_resp.res_code;
911 if (c_resp.res_code != kNIMResSuccess)
912 return;
913 for (size_t i = 0; i < c_resp.messages_count; i++) {
914 messages.emplace(c_resp.messages[i].channel_id, c_resp.messages[i]);
915 }
916 }
919 c_response.res_code = res_code;
920 message_.clear();
921 for (auto&& iter : messages) {
922 message_.push_back(iter.second.ToCParam());
923 }
924 c_response.messages = const_cast<NIMQChatMessage*>(message_.data());
925 c_response.messages_count = static_cast<uint32_t>(message_.size());
926 return c_response;
927 }
928
929private:
930 mutable std::vector<NIMQChatMessage> message_;
931};
932
935
938
941
945 uint32_t res_code{0};
947 std::map<std::string, bool> result{};
950 res_code = c_resp.res_code;
951 if (c_resp.res_code != kNIMResSuccess)
952 return;
953 for (size_t i = 0; i < c_resp.result_count; i++) {
954 result.emplace(c_resp.result[i].msg_id, c_resp.result[i].mentioned_me);
955 }
956 }
959 c_response.res_code = res_code;
960 c_result_.clear();
961 for (auto&& iter : result) {
963 result.msg_id = const_cast<char*>(iter.first.c_str());
964 result.mentioned_me = iter.second;
965 c_result_.push_back(result);
966 }
967 c_response.result_count = static_cast<uint32_t>(c_result_.size());
968 c_response.result = const_cast<NIMQChatMentionedResult*>(c_result_.data());
969 return c_response;
970 }
971
972private:
973 mutable std::vector<NIMQChatMentionedResult> c_result_;
974};
975
979 uint32_t res_code = 0;
981 NIMQChatUnreadInfo unread_info{};
984 res_code = c_resp.res_code;
985 unread_info = c_resp.unread_info;
986 }
988 NIMQChatMarkMessageReadResp c_response{};
989 c_response.res_code = res_code;
990 c_response.unread_info = unread_info;
991 return c_response;
992 }
993};
994
998 uint32_t res_code{0};
1004 std::vector<QChatMessage> messages;
1007 res_code = c_resp.res_code;
1008 if (c_resp.res_code != kNIMResSuccess)
1009 return;
1010 meta_info = c_resp.meta_info;
1011 root_message = c_resp.root_message;
1012 for (size_t i = 0; i < c_resp.messages_count; i++) {
1013 messages.emplace_back(c_resp.messages[i]);
1014 }
1015 }
1018 c_response.meta_info = meta_info;
1019 c_response.meta_info.thread_msg_server_id = root_message.msg_server_id;
1020 c_response.meta_info.thread_msg_timestamp = root_message.timestamp;
1021 c_response.root_message = root_message.ToCParam();
1022 messages_.clear();
1023 for (auto& message : messages)
1024 messages_.push_back(message.ToCParam());
1025 c_response.messages = const_cast<NIMQChatMessage*>(messages_.data());
1026 c_response.messages_count = messages_.size();
1027 c_response.res_code = res_code;
1028 return c_response;
1029 }
1030
1031private:
1032 mutable std::vector<NIMQChatMessage> messages_;
1033};
1034
1038 uint32_t res_code = 0;
1040 std::vector<NIMQChatThreadMessageMetaInfo> meta_infos;
1043 res_code = c_resp.res_code;
1044 if (c_resp.res_code != kNIMResSuccess)
1045 return;
1046 for (size_t i = 0; i < c_resp.meta_info_count; i++) {
1047 meta_infos.emplace_back(c_resp.meta_infos[i]);
1048 }
1049 }
1052 c_response.res_code = res_code;
1053 c_response.meta_infos = const_cast<NIMQChatThreadMessageMetaInfo*>(meta_infos.data());
1054 c_response.meta_info_count = meta_infos.size();
1055 return c_response;
1056 }
1057};
1058
1061
1064
1068 uint64_t type{0};
1070 uint64_t count{0};
1072 uint64_t create_time{0};
1074 bool include_yourself{false};
1076 std::vector<std::string> accids;
1079 type = c_param.type;
1080 count = c_param.count;
1081 create_time = c_param.create_time;
1082 include_yourself = c_param.include_yourself;
1083 for (size_t i = 0; i < c_param.account_count; i++) {
1084 accids.emplace_back(c_param.accids[i]);
1085 }
1086 }
1089 detail.type = type;
1090 detail.count = count;
1091 detail.create_time = create_time;
1092 detail.include_yourself = include_yourself;
1093 accids_.clear();
1094 for (auto& account : accids)
1095 accids_.push_back(const_cast<char*>(account.c_str()));
1096 detail.accids = const_cast<char**>(accids_.data());
1097 detail.account_count = accids_.size();
1098 return detail;
1099 }
1100
1101private:
1102 mutable std::vector<char*> accids_;
1103};
1104
1108 uint64_t server_id{0};
1110 uint64_t channel_id{0};
1112 uint64_t msg_server_id{0};
1114 uint64_t count{0};
1116 uint64_t timestamp{0};
1118 std::vector<QChatQuickCommentDetail> details;
1121 server_id = c_param.server_id;
1122 channel_id = c_param.channel_id;
1123 msg_server_id = c_param.msg_server_id;
1124 count = c_param.count;
1125 timestamp = c_param.timestamp;
1126 for (size_t i = 0; i < c_param.detail_count; i++) {
1127 details.emplace_back(c_param.detail[i]);
1128 }
1129 }
1132 info.server_id = server_id;
1133 info.channel_id = channel_id;
1134 info.msg_server_id = msg_server_id;
1135 info.count = count;
1136 info.timestamp = timestamp;
1137 detail_.clear();
1138 for (auto& d : details)
1139 detail_.push_back(d.ToCParam());
1140 info.detail = const_cast<NIMQChatQuickCommentDetail*>(detail_.data());
1141 info.detail_count = detail_.size();
1142 return info;
1143 }
1144
1145private:
1146 mutable std::vector<NIMQChatQuickCommentDetail> detail_;
1147};
1148
1152 uint32_t res_code{0};
1154 std::vector<QChatQuickCommentInfo> comments{};
1157 res_code = c_response.res_code;
1158 if (c_response.res_code != kNIMResSuccess)
1159 return;
1160 for (size_t i = 0; i < c_response.comments_count; i++) {
1161 comments.emplace_back(c_response.comments[i]);
1162 }
1163 }
1166 c_response.res_code = res_code;
1167 if (res_code != kNIMResSuccess)
1168 return c_response;
1169 comments_.clear();
1170 for (auto& comment : comments)
1171 comments_.push_back(comment.ToCParam());
1172 c_response.comments = const_cast<NIMQChatQuickCommentInfo*>(comments_.data());
1173 c_response.comments_count = comments_.size();
1174 return c_response;
1175 }
1176
1177private:
1178 mutable std::vector<NIMQChatQuickCommentInfo> comments_;
1179};
1180
1184 uint32_t res_code{0};
1188 std::vector<QChatMessage> messages{};
1191 res_code = c_response.res_code;
1192 page_info = c_response.page_info;
1193 for (size_t i = 0; i < c_response.messages_count; i++) {
1194 messages.emplace_back(c_response.messages[i]);
1195 }
1196 }
1199 c_response.res_code = res_code;
1200 c_response.page_info = page_info.ToCParam();
1201 c_messages.clear();
1202 for (auto& message : messages)
1203 c_messages.push_back(message.ToCParam());
1204 c_response.messages = const_cast<NIMQChatMessage*>(c_messages.data());
1205 c_response.messages_count = c_messages.size();
1206 return c_response;
1207 }
1208
1209protected:
1210 mutable std::vector<NIMQChatMessage> c_messages;
1211};
1212
1215
1219 uint32_t res_code;
1221 std::string value;
1224 res_code = c_response.res_code;
1225 value = c_response.value;
1226 }
1228 NIMQChatGetTextCacheResp c_response;
1229 c_response.res_code = res_code;
1230 c_response.value = value.c_str();
1231 return c_response;
1232 }
1233};
1234
1236typedef std::function<void(const QChatRecvMsgResp&)> RecvMsgCallback;
1238typedef std::function<void(const QChatSendMessageResp&)> SendMsgCallback;
1240typedef std::function<void(const QChatUpdateMessageResp&)> UpdateMsgCallback;
1242typedef std::function<void(const QChatMsgUpdatedResp&)> MsgUpdatedCallback;
1244typedef std::function<void(const QChatGetMessagesResp&)> GetMessagesCallback;
1246typedef std::function<void(const QChatGetLastMessagesResp&)> GetLastMessagesCallback;
1250typedef std::function<void(const QChatMarkMessageReadResp&)> MarkMessageReadCallback;
1252using ReplyMessageCallback = std::function<void(const QChatReplyMessageResp&)>;
1260using GetThreadMessagesCallback = std::function<void(const QChatGetThreadMessagesResp&)>;
1266using GetQuickCommentsCallback = std::function<void(const QChatGetQuickCommentsResp&)>;
1268using MessageSearchPageCallback = std::function<void(const QChatMessageSearchPageResp&)>;
1272using GetTextCacheCallback = std::function<void(const QChatGetTextCacheResp&)>;
1273
1277 RecvMsgCallback cb{nullptr};
1279 static RecvMsgCallback cb_holder = nullptr;
1280 cb_holder = cb;
1281 NIMQChatRegRecvMsgCbParam param = {};
1282 param.cb = [](const NIMQChatRecvMsgResp* resp) {
1283 if (cb_holder)
1284 cb_holder(*resp);
1285 };
1286 return param;
1287 }
1288};
1289
1295 static MsgUpdatedCallback cb_holder = nullptr;
1296 cb_holder = cb;
1298 param.cb = [](const NIMQChatMsgUpdatedResp* resp) {
1299 if (cb_holder)
1300 cb_holder(*resp);
1301 };
1302 return param;
1303 }
1304};
1305
1309 SendMsgCallback cb{nullptr};
1314 message = c_param.message;
1315 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatSendMessageResp& response) {
1316 auto c_response = response.ToCParam();
1317 c_response.user_data = user_data;
1318 c_callback(&c_response);
1319 };
1320 }
1322 auto cb_holder = new SendMsgCallback(cb);
1323 NIMQChatSendMessageParam param = {};
1324 param.user_data = cb_holder;
1325 param.cb = [](const NIMQChatSendMessageResp* resp) {
1326 InvokeCallback<SendMsgCallback, NIMQChatSendMessageResp>(resp);
1327 };
1328 param.message = message.ToCParam();
1329 return param;
1330 }
1331};
1332
1340 uint64_t msg_server_id{0};
1342 uint64_t timestamp{0};
1347 // 以下为待更新的消息属性
1351 std::string msg_body{""};
1353 std::string msg_ext{""};
1355 uint32_t msg_sub_type{0};
1358 id_info = c_param.id_info;
1359 msg_server_id = c_param.msg_server_id;
1360 timestamp = c_param.timestamp;
1361 update_info = c_param.update_info;
1362 anti_spam_info = c_param.anti_spam_info;
1363 status = c_param.status;
1364 msg_body = c_param.msg_body;
1365 msg_ext = c_param.msg_ext;
1366 msg_sub_type = c_param.msg_sub_type;
1367 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatUpdateMessageResp& response) {
1368 auto c_response = response.ToCParam();
1369 c_response.user_data = user_data;
1370 c_callback(&c_response);
1371 };
1372 }
1374 id_info = c_param.id_info;
1375 msg_server_id = c_param.msg_server_id;
1376 timestamp = c_param.timestamp;
1377 update_info = c_param.update_info;
1378 status = kMsgStatusRevoke;
1379 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatUpdateMessageResp& response) {
1380 auto c_response = response.ToCParam();
1381 c_response.user_data = user_data;
1382 c_callback(&c_response);
1383 };
1384 }
1386 id_info = c_param.id_info;
1387 msg_server_id = c_param.msg_server_id;
1388 timestamp = c_param.timestamp;
1389 update_info = c_param.update_info;
1390 status = kMsgStatusDelete;
1391 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatUpdateMessageResp& response) {
1392 auto c_response = response.ToCParam();
1393 c_response.user_data = user_data;
1394 c_callback(&c_response);
1395 };
1396 }
1398 auto cb_holder = new UpdateMsgCallback(cb);
1399 NIMQChatUpdateMessageParam param = {};
1400 param.user_data = cb_holder;
1401 param.cb = [](const NIMQChatUpdateMessageResp* resp) {
1402 InvokeCallback<UpdateMsgCallback, NIMQChatUpdateMessageResp>(resp);
1403 };
1404 param.id_info = id_info;
1405 param.msg_server_id = msg_server_id;
1406 param.timestamp = timestamp;
1407 param.update_info = update_info.ToCParam();
1408 param.anti_spam_info = anti_spam_info.ToCParam();
1409 param.status = status;
1410 param.msg_body = const_cast<char*>(msg_body.c_str());
1411 param.msg_ext = const_cast<char*>(msg_ext.c_str());
1412 param.msg_sub_type = msg_sub_type;
1413 return param;
1414 }
1415};
1416
1422 uint64_t msg_server_id{0};
1423 uint64_t timestamp{0};
1426 auto cb_holder = new UpdateMsgCallback(cb);
1427 NIMQChatRevokeMessageParam param = {};
1428 param.user_data = cb_holder;
1429 param.cb = [](const NIMQChatUpdateMessageResp* resp) {
1430 InvokeCallback<UpdateMsgCallback, NIMQChatUpdateMessageResp>(resp);
1431 };
1432 param.id_info = id_info;
1433 param.msg_server_id = msg_server_id;
1434 param.timestamp = timestamp;
1435 param.update_info = update_info.ToCParam();
1436 return param;
1437 }
1438};
1439
1445 uint64_t msg_server_id{0};
1446 uint64_t timestamp{0};
1449 auto cb_holder = new UpdateMsgCallback(cb);
1450 NIMQChatDeleteMessageParam param = {};
1451 param.user_data = cb_holder;
1452 param.cb = [](const NIMQChatUpdateMessageResp* resp) {
1453 InvokeCallback<UpdateMsgCallback, NIMQChatUpdateMessageResp>(resp);
1454 };
1455 param.id_info = id_info;
1456 param.msg_server_id = msg_server_id;
1457 param.timestamp = timestamp;
1458 param.update_info = update_info.ToCParam();
1459 return param;
1460 }
1461};
1462
1468 uint64_t server_id{0};
1470 uint64_t channel_id{0};
1472 uint64_t from_time{0};
1474 uint64_t to_time{0};
1476 uint64_t exclude_msg_server_id{0};
1478 uint32_t limit{100};
1480 bool reverse{false};
1482 bool include_local_messages{false};
1485 server_id = c_param.server_id;
1486 channel_id = c_param.channel_id;
1487 from_time = c_param.from_time;
1488 to_time = c_param.to_time;
1489 exclude_msg_server_id = c_param.exclude_msg_server_id;
1490 limit = c_param.limit;
1491 reverse = c_param.reverse;
1492 include_local_messages = c_param.include_local_messages;
1493 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetMessagesResp& response) {
1494 auto c_response = response.ToCParam();
1495 c_response.user_data = user_data;
1496 c_callback(&c_response);
1497 };
1498 }
1500 auto cb_holder = new GetMessagesCallback(cb);
1501 NIMQChatGetMessagesParam param = {};
1502 param.user_data = cb_holder;
1503 param.cb = [](const NIMQChatGetMessagesResp* resp) {
1504 InvokeCallback<GetMessagesCallback, NIMQChatGetMessagesResp>(resp);
1505 };
1506 param.server_id = server_id;
1507 param.channel_id = channel_id;
1508 param.from_time = from_time;
1509 param.to_time = to_time;
1510 param.exclude_msg_server_id = exclude_msg_server_id;
1511 param.limit = limit;
1512 param.reverse = reverse;
1513 param.include_local_messages = include_local_messages;
1514 return param;
1515 }
1516};
1517
1523 uint64_t server_id{0};
1525 std::vector<uint64_t> channel_ids{};
1528 server_id = c_param.server_id;
1529 for (size_t i = 0; i < c_param.channel_ids_count; i++) {
1530 channel_ids.emplace_back(c_param.channel_ids[i]);
1531 }
1532 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetLastMessagesResp& response) {
1533 auto c_response = response.ToCParam();
1534 c_response.user_data = user_data;
1535 c_callback(&c_response);
1536 };
1537 }
1539 auto cb_holder = new GetLastMessagesCallback(cb);
1541 param.user_data = cb_holder;
1542 param.cb = [](const NIMQChatGetLastMessagesResp* resp) {
1543 InvokeCallback<GetLastMessagesCallback, NIMQChatGetLastMessagesResp>(resp);
1544 };
1545 param.server_id = server_id;
1546 param.channel_ids_count = channel_ids.size();
1547 param.channel_ids = const_cast<uint64_t*>(channel_ids.data());
1548 return param;
1549 }
1550};
1551
1557 uint64_t server_id{0};
1559 uint64_t channel_id{0};
1562 auto cb_holder = new GetMessagesCacheCallback(cb);
1564 param.user_data = cb_holder;
1565 param.cb = [](const NIMQChatGetMessagesCacheResp* resp) {
1566 InvokeCallback<GetMessagesCacheCallback, NIMQChatGetMessagesCacheResp>(resp);
1567 };
1568 param.server_id = server_id;
1569 param.channel_id = channel_id;
1570 return param;
1571 }
1572};
1573
1581 uint64_t timestamp{0};
1584 id_info = param.id_info;
1585 timestamp = param.timestamp;
1586 cb = [c_callback = param.cb, user_data = param.user_data](const QChatMarkMessageReadResp& response) {
1587 auto c_response = response.ToCParam();
1588 c_response.user_data = user_data;
1589 c_callback(&c_response);
1590 };
1591 }
1593 auto cb_holder = new MarkMessageReadCallback(cb);
1595 param.user_data = cb_holder;
1596 param.cb = [](const NIMQChatMarkMessageReadResp* resp) {
1597 InvokeCallback<MarkMessageReadCallback, NIMQChatMarkMessageReadResp>(resp);
1598 };
1599 param.id_info = id_info;
1600 param.timestamp = timestamp;
1601 return param;
1602 }
1603};
1604
1615 quote_message = c_param.quote_message;
1616 message = c_param.message;
1617 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatReplyMessageResp& response) {
1618 auto c_response = response.ToCParam();
1619 c_response.user_data = user_data;
1620 c_callback(&c_response);
1621 };
1622 }
1624 auto cb_holder = new ReplyMessageCallback(cb);
1625 NIMQChatReplyMessageParam param = {};
1626 param.quote_message = quote_message.ToCParam();
1627 param.message = message.ToCParam();
1628 param.user_data = cb_holder;
1629 param.cb = [](const NIMQChatReplyMsgResp* c_response) {
1630 InvokeCallback<ReplyMessageCallback, NIMQChatReplyMsgResp>(c_response);
1631 };
1632 return param;
1633 }
1634};
1635
1639 uint64_t server_id = 0;
1640 uint64_t channel_id = 0;
1641 std::vector<NIMQChatGetMessageColumns> columns;
1644 server_id = c_param.server_id;
1645 channel_id = c_param.channel_id;
1646 for (size_t i = 0; i < c_param.column_count; i++) {
1647 columns.push_back(c_param.columns[i]);
1648 }
1649 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetMessageHistoryByIdsResp& response) {
1650 auto c_response = response.ToCParam();
1651 c_response.user_data = user_data;
1652 c_callback(&c_response);
1653 };
1654 }
1656 auto cb_holder = new GetMessageHistoryByIdsCallback(cb);
1658 param.server_id = server_id;
1659 param.channel_id = channel_id;
1660 param.columns = const_cast<NIMQChatGetMessageColumns*>(columns.data());
1661 param.column_count = columns.size();
1662 param.user_data = cb_holder;
1663 param.cb = [](const NIMQChatGetMessageHistoryByIdsResp* c_response) {
1664 InvokeCallback<GetMessageHistoryByIdsCallback, NIMQChatGetMessageHistoryByIdsResp>(c_response);
1665 };
1666 return param;
1667 }
1668};
1669
1675 uint64_t server_id{0};
1677 uint64_t channel_id{0};
1679 uint64_t timestamp{0};
1681 uint32_t limit{0};
1685 server_id = param.server_id;
1686 channel_id = param.channel_id;
1687 timestamp = param.timestamp;
1688 limit = param.limit;
1689 cb = [c_callback = param.cb, user_data = param.user_data](const QChatGetMentionedMeMessagesResp& response) {
1690 auto c_response = response.ToCParam();
1691 c_response.user_data = user_data;
1692 c_callback(&c_response);
1693 };
1694 }
1696 auto cb_holder = new GetMentionedMeMessagesCallback(cb);
1698 param.server_id = server_id;
1699 param.channel_id = channel_id;
1700 param.timestamp = timestamp;
1701 param.limit = limit;
1702 param.user_data = cb_holder;
1703 param.cb = [](const NIMQChatGetMentionedMeMessagesResp* resp) {
1704 InvokeCallback<GetMentionedMeMessagesCallback, NIMQChatGetMentionedMeMessagesResp>(resp);
1705 };
1706 return param;
1707 }
1708};
1709
1715 std::vector<QChatMessage> messages;
1718 for (size_t i = 0; i < param.message_count; i++) {
1719 messages.push_back(param.messages[i]);
1720 }
1721 cb = [c_callback = param.cb, user_data = param.user_data](const QChatAreMentionedMeMessagesResp& response) {
1722 auto c_response = response.ToCParam();
1723 c_response.user_data = user_data;
1724 c_callback(&c_response);
1725 };
1726 }
1728 auto cb_holder = new AreMentionedMeMessagesCallback(cb);
1729 c_messages.clear();
1730 for (auto& message : messages) {
1731 c_messages.push_back(message.ToCParam());
1732 }
1734 param.messages = const_cast<NIMQChatMessage*>(c_messages.data());
1735 param.message_count = c_messages.size();
1736 param.user_data = cb_holder;
1737 param.cb = [](const NIMQChatAreMentionedMeMessagesResp* resp) {
1738 InvokeCallback<AreMentionedMeMessagesCallback, NIMQChatAreMentionedMeMessagesResp>(resp);
1739 };
1740 return param;
1741 }
1742
1743private:
1744 mutable std::vector<NIMQChatMessage> c_messages;
1745};
1746
1754 type = c_param.type;
1755 message = c_param.message;
1756 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetReferMessagesResp& response) {
1757 auto c_response = response.ToCParam();
1758 c_response.user_data = user_data;
1759 c_callback(&c_response);
1760 };
1761 }
1764 param.type = type;
1765 param.message = message.ToCParam();
1766 param.user_data = new GetReferMessagesCallback(cb);
1767 param.cb = [](const NIMQChatGetReferMessagesResp* c_response) {
1768 InvokeCallback<GetReferMessagesCallback, NIMQChatGetReferMessagesResp>(c_response);
1769 };
1770 return param;
1771 }
1772};
1773
1781 uint64_t from_time = 0;
1783 uint64_t to_time = 0;
1785 uint64_t exclude_msg_server_id = 0;
1787 uint32_t limit = 10;
1789 bool reverse = false;
1792 message = c_param.message;
1793 from_time = c_param.from_time;
1794 to_time = c_param.to_time;
1795 exclude_msg_server_id = c_param.exclude_msg_server_id;
1796 limit = c_param.limit;
1797 reverse = c_param.reverse;
1798 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetThreadMessagesResp& response) {
1799 auto c_response = response.ToCParam();
1800 c_response.user_data = user_data;
1801 c_callback(&c_response);
1802 };
1803 }
1805 auto cb_holder = new GetThreadMessagesCallback(cb);
1807 param.message = message.ToCParam();
1808 param.from_time = from_time;
1809 param.to_time = to_time;
1810 param.exclude_msg_server_id = exclude_msg_server_id;
1811 param.limit = limit;
1812 param.reverse = reverse;
1813 param.user_data = cb_holder;
1814 param.cb = [](const NIMQChatGetThreadMessagesResp* c_response) {
1815 InvokeCallback<GetThreadMessagesCallback, NIMQChatGetThreadMessagesResp>(c_response);
1816 };
1817 return param;
1818 }
1819};
1820
1821template <NIMQChatQuickCommentOperation operation, typename TCParam, typename TCResponse>
1828 uint32_t type{0};
1830 QChatQuickCommentParam(const TCParam& c_param) {
1831 message = c_param.quote_message;
1832 type = c_param.type;
1833 opt = c_param.operation;
1834 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatAddQuickCommentResp& response) {
1835 auto c_response = response.ToCParam();
1836 c_response.user_data = user_data;
1837 c_callback(&c_response);
1838 };
1839 }
1840 TCParam ToCParam() const {
1841 auto cb_holder = new QuickCommentCallback(cb);
1842 TCParam param;
1843 param.quote_message = message.ToCParam();
1844 param.type = type;
1845 param.operation = opt;
1846 param.user_data = cb_holder;
1847 param.cb = [](const TCResponse* c_response) {
1848 InvokeCallback<QuickCommentCallback, TCResponse>(c_response);
1849 };
1850 return param;
1851 }
1853
1854private:
1857};
1858
1863 uint64_t server_id = 0;
1864 uint64_t channel_id = 0;
1865 std::vector<QChatMessage> thread_root_messages;
1868 server_id = c_param.server_id;
1869 channel_id = c_param.channel_id;
1870 for (size_t i = 0; i < c_param.message_count; i++) {
1871 thread_root_messages.push_back(c_param.messages[i]);
1872 }
1873 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetThreadRootMessagesMetaResp& response) {
1874 auto c_response = response.ToCParam();
1875 c_response.user_data = user_data;
1876 c_callback(&c_response);
1877 };
1878 }
1881 param.server_id = server_id;
1882 param.channel_id = channel_id;
1883 messages_.clear();
1884 for (auto& message : thread_root_messages) {
1885 messages_.push_back(message.ToCParam());
1886 }
1887 param.messages = const_cast<NIMQChatMessage*>(messages_.data());
1888 param.message_count = messages_.size();
1890 param.cb = [](const NIMQChatGetThreadRootMessagesMetaResp* c_response) {
1891 InvokeCallback<GetThreadRootMessagesMetaCallback, NIMQChatGetThreadRootMessagesMetaResp>(c_response);
1892 };
1893 return param;
1894 }
1895
1896private:
1897 mutable std::vector<NIMQChatMessage> messages_;
1898};
1899
1900// clang-format off
1903// clang-format on
1904
1910 uint64_t server_id{0};
1912 uint64_t channel_id{0};
1914 std::vector<uint64_t> msg_server_id_list;
1917 server_id = c_param.server_id;
1918 channel_id = c_param.channel_id;
1919 for (size_t i = 0; i < c_param.msg_server_id_count; i++)
1920 msg_server_id_list.push_back(c_param.msg_server_id_list[i]);
1921 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetQuickCommentsResp& response) {
1922 auto c_response = response.ToCParam();
1923 c_response.user_data = user_data;
1924 c_callback(&c_response);
1925 };
1926 }
1928 auto cb_holder = new GetQuickCommentsCallback(cb);
1930 param.server_id = server_id;
1931 param.channel_id = channel_id;
1932 param.msg_server_id_list = const_cast<uint64_t*>(msg_server_id_list.data());
1933 param.msg_server_id_count = msg_server_id_list.size();
1934 param.user_data = cb_holder;
1935 param.cb = [](const NIMQChatGetQuickCommentsResp* resp) {
1936 InvokeCallback<GetQuickCommentsCallback, NIMQChatGetQuickCommentsResp>(resp);
1937 };
1938 param.server_id = server_id;
1939 param.channel_id = channel_id;
1940 return param;
1941 }
1942};
1943
1949 std::string keyword;
1951 uint64_t server_id{0};
1953 uint64_t channel_id{0};
1955 std::string from_accid;
1957 uint64_t from_time{0};
1959 uint64_t to_time{0};
1961 std::vector<NIMQChatMsgType> msg_types;
1963 std::vector<uint32_t> sub_types;
1965 bool include_self{false};
1971 uint32_t limit{100};
1973 std::string cursor;
1976 keyword = c_param.keyword ? c_param.keyword : "";
1977 server_id = c_param.server_id;
1978 channel_id = c_param.channel_id;
1979 from_accid = c_param.from_accid ? c_param.from_accid : "";
1980 from_time = c_param.from_time;
1981 to_time = c_param.to_time;
1982 for (size_t i = 0; i < c_param.msg_types_count; i++)
1983 msg_types.push_back(c_param.msg_types[i]);
1984 for (size_t i = 0; i < c_param.sub_types_count; i++)
1985 sub_types.push_back(c_param.sub_types[i]);
1986 include_self = c_param.include_self;
1987 order = c_param.order;
1988 sort = c_param.sort;
1989 limit = c_param.limit;
1990 cursor = c_param.cursor ? c_param.cursor : "";
1991 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatMessageSearchPageResp& response) {
1992 auto c_response = response.ToCParam();
1993 c_response.user_data = user_data;
1994 c_callback(&c_response);
1995 };
1996 }
1999 param.keyword = const_cast<char*>(keyword.c_str());
2000 param.server_id = server_id;
2001 param.channel_id = channel_id;
2002 param.from_accid = const_cast<char*>(from_accid.c_str());
2003 param.from_time = from_time;
2004 param.to_time = to_time;
2005 param.msg_types = const_cast<NIMQChatMsgType*>(msg_types.data());
2006 param.msg_types_count = msg_types.size();
2007 param.sub_types = const_cast<uint32_t*>(sub_types.data());
2008 param.sub_types_count = sub_types.size();
2009 param.include_self = include_self;
2010 param.order = order;
2011 param.sort = sort;
2012 param.limit = limit;
2013 param.cursor = const_cast<char*>(cursor.c_str());
2014 param.user_data = new MessageSearchPageCallback(cb);
2015 param.cb = [](const NIMQChatMessageSearchPageResp* c_response) {
2016 InvokeCallback<MessageSearchPageCallback, NIMQChatMessageSearchPageResp>(c_response);
2017 };
2018 return param;
2019 }
2020};
2021
2023
2027 QChatBaseCallback cb = nullptr;
2029 uint64_t server_id{0};
2031 uint64_t channel_id{0};
2033 std::string value;
2036 server_id = c_param.server_id;
2037 channel_id = c_param.channel_id;
2038 value = c_param.value ? c_param.value : "";
2039 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatInsertOrReplaceTextCacheResp& response) {
2040 auto c_response = response.ToCParam();
2041 c_response.user_data = user_data;
2042 c_callback(&c_response);
2043 };
2044 }
2045
2047 auto cb_holder = new QChatBaseCallback(cb);
2049 param.server_id = server_id;
2050 param.channel_id = channel_id;
2051 param.value = const_cast<char*>(value.c_str());
2052 param.user_data = cb_holder;
2053 param.cb = [](const NIMQChatInsertOrReplaceTextCacheResp* c_response) {
2054 InvokeCallback<QChatBaseCallback, NIMQChatInsertOrReplaceTextCacheResp>(c_response);
2055 };
2056 return param;
2057 }
2058};
2059
2061
2065 QChatBaseCallback cb = nullptr;
2067 uint64_t server_id{0};
2069 uint64_t channel_id{0};
2072 server_id = c_param.server_id;
2073 channel_id = c_param.channel_id;
2074 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatDeleteTextCacheResp& response) {
2075 auto c_response = response.ToCParam();
2076 c_response.user_data = user_data;
2077 c_callback(&c_response);
2078 };
2079 }
2080
2082 auto cb_holder = new QChatBaseCallback(cb);
2084 param.server_id = server_id;
2085 param.channel_id = channel_id;
2086 param.user_data = cb_holder;
2087 param.cb = [](const NIMQChatDeleteTextCacheResp* c_response) {
2088 InvokeCallback<QChatBaseCallback, NIMQChatDeleteTextCacheResp>(c_response);
2089 };
2090 return param;
2091 }
2092};
2093
2099 uint64_t server_id{0};
2101 uint64_t channel_id{0};
2104 server_id = c_param.server_id;
2105 channel_id = c_param.channel_id;
2106 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatGetTextCacheResp& response) {
2107 auto c_response = response.ToCParam();
2108 c_response.user_data = user_data;
2109 c_callback(&c_response);
2110 };
2111 }
2112
2114 auto cb_holder = new GetTextCacheCallback(cb);
2115 NIMQChatGetTextCacheParam param = {};
2116 param.server_id = server_id;
2117 param.channel_id = channel_id;
2118 param.user_data = cb_holder;
2119 param.cb = [](const NIMQChatGetTextCacheResp* c_response) {
2120 InvokeCallback<GetTextCacheCallback, NIMQChatGetTextCacheResp>(c_response);
2121 };
2122 return param;
2123 }
2124};
2125
2126} // namespace nim
2127
2128#endif // __NIM_QCHAT_MESSAGE_CPP_DEF_H__
Represents a JSON value.
Definition: value.h:196
bool isMember(const char *key) const
Definition: json_value.cpp:1241
double asDouble() const
Definition: json_value.cpp:782
Int asInt() const
Definition: json_value.cpp:657
String asString() const
Embedded zeroes are possible.
Definition: json_value.cpp:632
namespace nim
std::function< void(const QChatAreMentionedMeMessagesResp &)> AreMentionedMeMessagesCallback
查询消息是否 @ 当前用户回调
Definition: nim_qchat_message_cpp_def.h:1256
std::function< void(const QChatGetThreadRootMessagesMetaResp &)> GetThreadRootMessagesMetaCallback
查询Thread消息元信息回调
Definition: nim_qchat_message_cpp_def.h:1262
bool ParseJsonValue(const std::string &content, nim_cpp_wrapper_util::Json::Value &values)
解析JsonString
Definition: nim_json_util.cpp:70
std::function< void(const QChatReplyMessageResp &)> ReplyMessageCallback
回复消息回调
Definition: nim_qchat_message_cpp_def.h:1252
std::function< void(const QChatUpdateMessageResp &)> UpdateMsgCallback
更新消息回调
Definition: nim_qchat_message_cpp_def.h:1240
GetMessagesCallback GetMessagesCacheCallback
本地获取消息回调
Definition: nim_qchat_message_cpp_def.h:1248
GetMessagesCallback GetReferMessagesCallback
获取关联消息回调
Definition: nim_qchat_message_cpp_def.h:1258
std::function< void(const QChatGetMentionedMeMessagesResp &)> GetMentionedMeMessagesCallback
查询未读消息中 @ 当前用户的消息回调
Definition: nim_qchat_message_cpp_def.h:1270
std::function< void(const QChatMessageSearchPageResp &)> MessageSearchPageCallback
消息分页搜索回调
Definition: nim_qchat_message_cpp_def.h:1268
std::function< void(const QChatBaseResp &)> QChatBaseCallback
通用回调模板
Definition: nim_qchat_public_cpp_def.h:104
std::function< void(const QChatGetTextCacheResp &)> GetTextCacheCallback
查询文本缓存回调
Definition: nim_qchat_message_cpp_def.h:1272
std::function< void(const QChatGetLastMessagesResp &)> GetLastMessagesCallback
查询频道最后一条消息回调
Definition: nim_qchat_message_cpp_def.h:1246
std::function< void(const QChatMsgUpdatedResp &)> MsgUpdatedCallback
消息更新回调
Definition: nim_qchat_message_cpp_def.h:1242
std::function< void(const QChatGetMessagesResp &)> GetMessagesCallback
查询历史消息回调
Definition: nim_qchat_message_cpp_def.h:1244
std::function< void(const QChatGetQuickCommentsResp &)> GetQuickCommentsCallback
查询快捷回复回调
Definition: nim_qchat_message_cpp_def.h:1266
QChatBaseCallback QuickCommentCallback
添加快捷回复回调
Definition: nim_qchat_message_cpp_def.h:1264
GetMessagesCallback GetMessageHistoryByIdsCallback
根据消息 ID 查询消息回调
Definition: nim_qchat_message_cpp_def.h:1254
std::function< void(const QChatGetThreadMessagesResp &)> GetThreadMessagesCallback
查询Thread消息回调
Definition: nim_qchat_message_cpp_def.h:1260
std::function< void(const QChatSendMessageResp &)> SendMsgCallback
发送消息回调
Definition: nim_qchat_message_cpp_def.h:1238
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition: nim_json_util.cpp:89
std::function< void(const QChatRecvMsgResp &)> RecvMsgCallback
接收消息回调
Definition: nim_qchat_message_cpp_def.h:1236
std::function< void(const QChatMarkMessageReadResp &)> MarkMessageReadCallback
消息已读标记回调
Definition: nim_qchat_message_cpp_def.h:1250
NIMQChatGetReferMessageType
Definition: nim_qchat_message_def.h:78
NIMQChatQuickCommentOperation
Definition: nim_qchat_message_def.h:70
NIMQChatMsgType
Definition: nim_qchat_message_def.h:46
@ kNIMQChatMsgTypeNotification
通知类型消息
Definition: nim_qchat_message_def.h:58
@ kNIMQChatMsgTypeVideo
视频类型消息
Definition: nim_qchat_message_def.h:54
@ kNIMQChatMsgTypeText
文本类型消息
Definition: nim_qchat_message_def.h:48
@ kNIMQChatMsgTypeTips
提醒类型消息
Definition: nim_qchat_message_def.h:62
@ kNIMQChatMsgTypeAudio
音频类型消息
Definition: nim_qchat_message_def.h:52
@ kNIMQChatMsgTypeLocation
位置类型消息
Definition: nim_qchat_message_def.h:56
@ kNIMQChatMsgTypeFile
文件类型消息
Definition: nim_qchat_message_def.h:60
@ kNIMQChatMsgTypeUnknown
未知类型消息,作为默认值
Definition: nim_qchat_message_def.h:66
@ kNIMQChatMsgTypeImage
图片类型消息
Definition: nim_qchat_message_def.h:50
NIMQChatMessageStatus
Definition: nim_qchat_message_def.h:23
@ kMsgStatusRevoke
被撤回的消息
Definition: nim_qchat_message_def.h:27
@ kMsgStatusNormal
普通消息状态
Definition: nim_qchat_message_def.h:25
@ kMsgStatusDelete
被删除的消息
Definition: nim_qchat_message_def.h:29
NIMQChatMessageNotifyReason
Definition: nim_qchat_message_def.h:36
@ kMessageNotifyReasonUnkonw
未知原因
Definition: nim_qchat_message_def.h:38
NIMQChatMessageSearchSort
消息搜索排序规则
Definition: nim_qchat_public_def.h:135
@ kNIMQChatMessageSearchSortCreateTime
创建时间排序
Definition: nim_qchat_public_def.h:137
NIMQChatSearchOrder
搜索排序顺序
Definition: nim_qchat_public_def.h:109
@ kNIMQChatSearchOrderAsc
按时间正序
Definition: nim_qchat_public_def.h:111
#define NIM_QCHAT_SDK_CPPWRAPPER_DLL_API
Definition: nim_qchat_sdk_cpp_wrapper.h:38
@ kNIMResSuccess
没有错误,一切正常
Definition: public_defines.h:26
@ kNIMLocalResMsgAccessDenied
无访问权限
Definition: public_defines.h:141
Definition: nim_qchat_message_def.h:688
nim_qchat_are_mentioned_me_messages_cb_func cb
查询消息是否 @ 当前用户的异步回调
Definition: nim_qchat_message_def.h:690
size_t message_count
要查询的息数量
Definition: nim_qchat_message_def.h:694
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:692
NIMQChatMessage * messages
要查询的消息列表
Definition: nim_qchat_message_def.h:696
Definition: nim_qchat_message_def.h:494
NIMQChatMentionedResult * result
结果列表
Definition: nim_qchat_message_def.h:502
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:496
size_t result_count
结果数量
Definition: nim_qchat_message_def.h:500
Definition: nim_qchat_message_def.h:105
char * name
Definition: nim_qchat_message_def.h:112
char * file_path
Definition: nim_qchat_message_def.h:106
char * md5
Definition: nim_qchat_message_def.h:110
char * url
Definition: nim_qchat_message_def.h:109
char * ext
Definition: nim_qchat_message_def.h:111
uint64_t duration
Definition: nim_qchat_message_def.h:107
Definition: nim_qchat_public_def.h:141
Definition: nim_qchat_public_def.h:157
Definition: nim_qchat_message_def.h:88
char * msg_attach
Definition: nim_qchat_message_def.h:89
Definition: nim_qchat_message_def.h:632
NIMQChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_message_def.h:644
NIMQChatChannelIDInfo id_info
频道ID信息
Definition: nim_qchat_message_def.h:638
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:642
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:636
nim_qchat_update_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:634
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:640
Definition: nim_qchat_message_def.h:909
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:915
nim_qchat_write_text_cache_cb_func cb
写入文本缓存异步回调
Definition: nim_qchat_message_def.h:911
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:917
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:913
Definition: nim_qchat_message_def.h:142
char * md5
Definition: nim_qchat_message_def.h:146
char * file_path
Definition: nim_qchat_message_def.h:143
char * name
Definition: nim_qchat_message_def.h:148
char * url
Definition: nim_qchat_message_def.h:145
char * ext
Definition: nim_qchat_message_def.h:147
Definition: nim_qchat_message_def.h:700
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:704
uint64_t * channel_ids
频道ID
Definition: nim_qchat_message_def.h:708
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:706
nim_qchat_get_last_messages_cb_func cb
查询历史消息异步回调
Definition: nim_qchat_message_def.h:702
size_t channel_ids_count
频道ID数量
Definition: nim_qchat_message_def.h:710
Definition: nim_qchat_message_def.h:672
uint64_t timestamp
查询的起始时间位置, 0表示当前时间
Definition: nim_qchat_message_def.h:682
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:680
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:676
uint32_t limit
查询条数
Definition: nim_qchat_message_def.h:684
nim_qchat_get_mentioned_me_messages_cb_func cb
查询未读消息中 @ 当前用户的消息异步回调
Definition: nim_qchat_message_def.h:674
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:678
Definition: nim_qchat_message_def.h:750
Definition: nim_qchat_message_def.h:758
size_t column_count
查询的消息数量
Definition: nim_qchat_message_def.h:767
nim_qchat_get_message_history_by_ids_cb_func cb
Definition: nim_qchat_message_def.h:759
uint64_t channel_id
频道 ID
Definition: nim_qchat_message_def.h:763
NIMQChatGetMessageColumns * columns
消息列表
Definition: nim_qchat_message_def.h:765
uint64_t server_id
服务器 ID
Definition: nim_qchat_message_def.h:761
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:769
Definition: nim_qchat_message_def.h:714
nim_qchat_query_history_msg_cache_cb_func cb
查询本地缓存消息历史异步回调
Definition: nim_qchat_message_def.h:716
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:722
uint64_t channel_id
频道 ID
Definition: nim_qchat_message_def.h:720
uint64_t server_id
服务器 ID
Definition: nim_qchat_message_def.h:718
Definition: nim_qchat_message_def.h:648
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:654
bool include_local_messages
是否包含本地消息
Definition: nim_qchat_message_def.h:668
uint32_t limit
查询条数
Definition: nim_qchat_message_def.h:664
bool reverse
是否倒序, false: 否, true: 是
Definition: nim_qchat_message_def.h:666
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:652
nim_qchat_query_history_msg_cb_func cb
查询历史消息异步回调
Definition: nim_qchat_message_def.h:650
uint64_t exclude_msg_server_id
排除某条消息, msg server id
Definition: nim_qchat_message_def.h:662
uint64_t from_time
查询开始时间
Definition: nim_qchat_message_def.h:658
uint64_t to_time
查询结束时间
Definition: nim_qchat_message_def.h:660
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:656
Definition: nim_qchat_message_def.h:359
size_t messages_count
消息数量
Definition: nim_qchat_message_def.h:365
NIMQChatMessage * messages
消息列表
Definition: nim_qchat_message_def.h:367
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:361
Definition: nim_qchat_message_def.h:838
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:850
size_t msg_server_id_count
消息服务器 ID 列表数量
Definition: nim_qchat_message_def.h:848
uint64_t * msg_server_id_list
消息服务器 ID 列表
Definition: nim_qchat_message_def.h:846
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:842
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:844
nim_qchat_get_quick_comments_cb_func cb
获取快捷评论异步回调
Definition: nim_qchat_message_def.h:840
Definition: nim_qchat_message_def.h:423
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:425
NIMQChatQuickCommentInfo * comments
Definition: nim_qchat_message_def.h:428
size_t comments_count
Definition: nim_qchat_message_def.h:429
Definition: nim_qchat_message_def.h:773
nim_qchat_get_refer_messages_cb_func cb
获取引用消息异步回调
Definition: nim_qchat_message_def.h:775
NIMQChatGetReferMessageType type
查询的类型
Definition: nim_qchat_message_def.h:777
NIMQChatMessage message
要查询的消息体
Definition: nim_qchat_message_def.h:779
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:781
Definition: nim_qchat_message_def.h:924
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:932
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:928
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:930
nim_qchat_get_text_cache_cb_func cb
获取文本缓存异步回调
Definition: nim_qchat_message_def.h:926
Definition: nim_qchat_message_def.h:506
const char * value
文本内容
Definition: nim_qchat_message_def.h:512
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:508
Definition: nim_qchat_message_def.h:785
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:789
uint64_t exclude_msg_server_id
排除某条消息, message server id
Definition: nim_qchat_message_def.h:795
nim_qchat_get_thread_messages_cb_func cb
查询 thread 消息异步回调
Definition: nim_qchat_message_def.h:787
uint32_t limit
查询条数
Definition: nim_qchat_message_def.h:797
bool reverse
是否倒序, false: 否, true: 是
Definition: nim_qchat_message_def.h:799
uint64_t from_time
查询开始时间
Definition: nim_qchat_message_def.h:791
uint64_t to_time
查询结束时间
Definition: nim_qchat_message_def.h:793
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:801
Definition: nim_qchat_message_def.h:445
size_t messages_count
Definition: nim_qchat_message_def.h:453
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:447
NIMQChatMessage root_message
Definition: nim_qchat_message_def.h:451
NIMQChatThreadMessageMetaInfo meta_info
Definition: nim_qchat_message_def.h:450
NIMQChatMessage * messages
Definition: nim_qchat_message_def.h:452
Definition: nim_qchat_message_def.h:805
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:811
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:817
nim_qchat_get_thread_messages_meta_cb_func cb
查询 thread 消息元信息异步回调
Definition: nim_qchat_message_def.h:807
size_t message_count
要查询的 thread root 消息数量
Definition: nim_qchat_message_def.h:815
NIMQChatMessage * messages
要查询的 thread root 消息列表
Definition: nim_qchat_message_def.h:813
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:809
Definition: nim_qchat_message_def.h:457
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:459
NIMQChatThreadMessageMetaInfo * meta_infos
消息元信息
Definition: nim_qchat_message_def.h:461
size_t meta_info_count
消息元信息数量
Definition: nim_qchat_message_def.h:463
Definition: nim_qchat_message_def.h:93
char * name
Definition: nim_qchat_message_def.h:101
uint32_t width
Definition: nim_qchat_message_def.h:95
char * file_path
Definition: nim_qchat_message_def.h:94
uint32_t height
Definition: nim_qchat_message_def.h:96
char * ext
Definition: nim_qchat_message_def.h:100
char * url
Definition: nim_qchat_message_def.h:98
char * md5
Definition: nim_qchat_message_def.h:99
Definition: nim_qchat_message_def.h:892
char * value
缓存的内容
Definition: nim_qchat_message_def.h:902
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:896
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:898
nim_qchat_write_text_cache_cb_func cb
写入文本缓存异步回调
Definition: nim_qchat_message_def.h:894
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:900
Definition: nim_qchat_message_def.h:129
char * title
Definition: nim_qchat_message_def.h:132
double latitude
Definition: nim_qchat_message_def.h:130
double longitude
Definition: nim_qchat_message_def.h:131
Definition: nim_qchat_message_def.h:726
NIMQChatChannelIDInfo id_info
标记已读channel ID
Definition: nim_qchat_message_def.h:732
uint64_t timestamp
标记消息已读时间戳
Definition: nim_qchat_message_def.h:734
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:730
nim_qchat_ack_cb_func cb
标记消息已读异步回调
Definition: nim_qchat_message_def.h:728
Definition: nim_qchat_message_def.h:346
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:348
NIMQChatUnreadInfo unread_info
未读数信息
Definition: nim_qchat_message_def.h:352
Definition: nim_qchat_message_def.h:486
char * msg_id
消息 id
Definition: nim_qchat_message_def.h:488
bool mentioned_me
是否被提及
Definition: nim_qchat_message_def.h:490
Definition: nim_qchat_public_def.h:186
bool use_custom_content
是否需要使用自定义反垃圾字段(即antiSpamContent), false:不需要, true:需要, 默认0
Definition: nim_qchat_public_def.h:188
bool anti_spam_using_yidun
单条消息是否使用易盾反垃圾, false:(在开通易盾的情况下)不过易盾反垃圾, 其他都是按照原来的规则
Definition: nim_qchat_public_def.h:190
char * yidun_anti_spam_ext
易盾反垃圾扩展字段, 限制json, 长度限制1024
Definition: nim_qchat_public_def.h:200
char * anti_spam_content
反垃圾内容, 开发者自定义的反垃圾字段, 如果提供了这个字段, 在过反垃圾时不会再使用body或者attach
Definition: nim_qchat_public_def.h:192
char * anti_spam_bussiness_id
反垃圾业务ID, 对某些单条消息另外的反垃圾的业务ID
Definition: nim_qchat_public_def.h:194
char * yidun_callback_url
易盾check的回调URL
Definition: nim_qchat_public_def.h:196
char * yidun_anti_cheating
易盾反垃圾增强反作弊专属字段, 限制json, 长度限制1024
Definition: nim_qchat_public_def.h:198
Definition: nim_qchat_message_def.h:204
uint32_t msg_sub_type
消息子类型
Definition: nim_qchat_message_def.h:212
bool need_push_nick
是否需要推送昵称, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_message_def.h:240
uint32_t from_client_type
消息发送者的客户端类型
Definition: nim_qchat_message_def.h:283
bool route_enable
是否需要抄送, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_message_def.h:242
size_t mention_accids_count
@成员列表长度
Definition: nim_qchat_message_def.h:224
char * env
环境变量,用于指向不同的抄送、第三方回调等配置
Definition: nim_qchat_message_def.h:252
char * push_payload
自定义的推送属性,限制json
Definition: nim_qchat_message_def.h:232
NIMQChatMsgType msg_type
消息类型
Definition: nim_qchat_message_def.h:210
char ** mention_accids
@成员列表
Definition: nim_qchat_message_def.h:222
bool history_enable
该消息是否存储云端历史,0:不支持,1:支持
Definition: nim_qchat_message_def.h:230
uint64_t server_id
消息所属的server id
Definition: nim_qchat_message_def.h:206
bool accids_of_mentioned_roles_available
@身份组所包含的accid列表是否有效
Definition: nim_qchat_message_def.h:300
bool mention_all
是否@所有人,false:否,true:是
Definition: nim_qchat_message_def.h:220
uint64_t channel_id
消息所属的channel id
Definition: nim_qchat_message_def.h:208
char * callback_ext
第三方回调扩展字段
Definition: nim_qchat_message_def.h:254
char * from_accid
消息发送者的accid
Definition: nim_qchat_message_def.h:281
bool push_enable
是否需要推送, false: 不需要, true: 需要, 默认 false
Definition: nim_qchat_message_def.h:236
NIMQChatMessageThreadInfo thread_info
回复消息信息
Definition: nim_qchat_message_def.h:244
char * push_content
自定义的推送内容
Definition: nim_qchat_message_def.h:234
char * from_device_id
消息发送者的设备id
Definition: nim_qchat_message_def.h:285
uint64_t * mention_role_ids
@身份组列表
Definition: nim_qchat_message_def.h:226
char ** accids_of_mentioned_roles
@身份组所包含的accid列表(部分)
Definition: nim_qchat_message_def.h:302
bool need_badge
是否需要消息计数, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_message_def.h:238
uint64_t update_timestamp
消息更新时间戳
Definition: nim_qchat_message_def.h:291
size_t mention_role_ids_count
@身份组列表长度
Definition: nim_qchat_message_def.h:228
char * from_nick
消息发送者的昵称
Definition: nim_qchat_message_def.h:287
char * msg_ext
消息扩展字段
Definition: nim_qchat_message_def.h:216
NIMQChatMessageNotifyReason notify_reason
消息下发原因
Definition: nim_qchat_message_def.h:293
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:289
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:279
NIMQChatMessageAntiSpamInfo anti_spam_info
反垃圾信息
Definition: nim_qchat_message_def.h:246
NIMQChatDefaultAttach default_attach
默认附件
Definition: nim_qchat_message_def.h:257
char * msg_body
消息内容
Definition: nim_qchat_message_def.h:214
NIMQChatMessageStatus status
消息状态
Definition: nim_qchat_message_def.h:275
size_t accids_of_mentioned_roles_count
@身份组所包含的accid列表长度(部分)
Definition: nim_qchat_message_def.h:304
char * anti_spam_result
反垃圾结果
Definition: nim_qchat_message_def.h:250
NIMQChatMessageUpdateOpeInfo update_ope_info
上次消息变更操作信息
Definition: nim_qchat_message_def.h:297
char * msg_id
消息id
Definition: nim_qchat_message_def.h:277
NIMQChatMessageUpdateContent update_content
上次消息变更内容
Definition: nim_qchat_message_def.h:295
bool resend_flag
重发标记,false:不是重发,true:是重发
Definition: nim_qchat_message_def.h:218
bool is_anti_spamed
是否被反垃圾拦截, false: 未被拦截, true: 已被拦截, 默认 false
Definition: nim_qchat_message_def.h:248
Definition: nim_qchat_message_def.h:854
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:858
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:864
char * from_accid
消息发送者ID
Definition: nim_qchat_message_def.h:866
uint64_t from_time
搜索的开始时间
Definition: nim_qchat_message_def.h:868
size_t msg_types_count
搜索的消息类型数量
Definition: nim_qchat_message_def.h:872
char * keyword
搜索的关键字
Definition: nim_qchat_message_def.h:860
NIMQChatSearchOrder order
排序顺序
Definition: nim_qchat_message_def.h:882
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:862
NIMQChatMsgType * msg_types
搜索的消息类型
Definition: nim_qchat_message_def.h:874
uint32_t * sub_types
搜索的消息子类型
Definition: nim_qchat_message_def.h:878
char * cursor
查询游标, 查询的起始位置
Definition: nim_qchat_message_def.h:888
size_t sub_types_count
搜索的消息子类型数量
Definition: nim_qchat_message_def.h:876
NIMQChatMessageSearchSort sort
排序规则
Definition: nim_qchat_message_def.h:884
bool include_self
是否包含自己的消息
Definition: nim_qchat_message_def.h:880
uint64_t to_time
搜索的结束时间
Definition: nim_qchat_message_def.h:870
nim_qchat_message_search_page_cb_func cb
消息搜索异步回调
Definition: nim_qchat_message_def.h:856
uint32_t limit
查询条数
Definition: nim_qchat_message_def.h:886
Definition: nim_qchat_message_def.h:469
size_t messages_count
消息数量
Definition: nim_qchat_message_def.h:477
NIMQChatMessage * messages
消息列表
Definition: nim_qchat_message_def.h:479
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:471
NIMQChatPageInfo page_info
分页信息
Definition: nim_qchat_message_def.h:475
Definition: nim_qchat_message_def.h:158
char * reply_from_accid
被回复的消息所有者 ID
Definition: nim_qchat_message_def.h:160
char * thread_root_accid
thread 根消息的所有者 ID
Definition: nim_qchat_message_def.h:168
char * reply_msg_client_id
被回复消息得客户端消息 ID
Definition: nim_qchat_message_def.h:166
uint64_t reply_msg_timestamp
被回复消息得创建时间
Definition: nim_qchat_message_def.h:162
uint64_t thread_root_msg_timestamp
thread 根消息的创建时间
Definition: nim_qchat_message_def.h:170
uint64_t thread_root_msg_server_id
thread 根消息的服务器消息 ID
Definition: nim_qchat_message_def.h:172
char * thread_root_msg_client_id
thread 根消息的客户端消息 ID
Definition: nim_qchat_message_def.h:174
uint64_t reply_msg_server_id
被回复消息得服务器消息 ID
Definition: nim_qchat_message_def.h:164
Definition: nim_qchat_message_def.h:178
NIMQChatMessageStatus status
消息状态
Definition: nim_qchat_message_def.h:180
char * msg_ext
消息扩展字段
Definition: nim_qchat_message_def.h:184
char * msg_body
消息内容
Definition: nim_qchat_message_def.h:182
Definition: nim_qchat_public_def.h:165
char * push_content
推送文案
Definition: nim_qchat_public_def.h:171
char * push_payload
推送payload
Definition: nim_qchat_public_def.h:173
bool route_enable
是否需要抄送
Definition: nim_qchat_public_def.h:177
char * extension
操作扩展字段
Definition: nim_qchat_public_def.h:169
char * operator_id
操作者账号
Definition: nim_qchat_public_def.h:180
char * env
环境变量,用于指向不同的抄送、第三方回调等配置
Definition: nim_qchat_public_def.h:175
uint32_t operator_client_type
操作者客户端类型
Definition: nim_qchat_public_def.h:182
char * postscript
操作附言
Definition: nim_qchat_public_def.h:167
Definition: nim_qchat_message_def.h:188
uint32_t operator_client_type
操作者客户端类型
Definition: nim_qchat_message_def.h:192
char * push_payload
推送payload
Definition: nim_qchat_message_def.h:200
char * push_content
推送文案
Definition: nim_qchat_message_def.h:198
char * operator_id
操作者账号
Definition: nim_qchat_message_def.h:190
char * postscript
操作附言
Definition: nim_qchat_message_def.h:194
char * extension
操作扩展字段
Definition: nim_qchat_message_def.h:196
Definition: nim_qchat_message_def.h:308
NIMQChatMessageUpdateInfo update_info
消息更新信息
Definition: nim_qchat_message_def.h:312
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:314
Definition: nim_qchat_message_def.h:136
uint32_t id
Definition: nim_qchat_message_def.h:137
char * data
Definition: nim_qchat_message_def.h:138
Definition: nim_qchat_message_def.h:389
size_t account_count
account ID 总数
Definition: nim_qchat_message_def.h:401
uint64_t count
这个评论的数量
Definition: nim_qchat_message_def.h:393
bool include_yourself
是否包含自己
Definition: nim_qchat_message_def.h:397
uint64_t type
评论类型
Definition: nim_qchat_message_def.h:391
char ** accids
若干个添加过评论的 account ID
Definition: nim_qchat_message_def.h:399
uint64_t create_time
创建时间
Definition: nim_qchat_message_def.h:395
Definition: nim_qchat_message_def.h:405
uint64_t server_id
评论所在服务器 ID
Definition: nim_qchat_message_def.h:407
uint64_t count
总的评论数量
Definition: nim_qchat_message_def.h:413
NIMQChatQuickCommentDetail * detail
评论详情
Definition: nim_qchat_message_def.h:417
size_t detail_count
评论详情数量
Definition: nim_qchat_message_def.h:419
uint64_t msg_server_id
评论所属消息服务器 ID
Definition: nim_qchat_message_def.h:411
uint64_t timestamp
最后一次操作的时间
Definition: nim_qchat_message_def.h:415
uint64_t channel_id
评论所在频道 ID
Definition: nim_qchat_message_def.h:409
Definition: nim_qchat_message_def.h:318
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:322
Definition: nim_qchat_message_def.h:571
nim_qchat_msg_updated_cb_func cb
消息更新异步回调
Definition: nim_qchat_message_def.h:573
Definition: nim_qchat_message_def.h:563
nim_qchat_recv_msg_cb_func cb
接收消息异步回调
Definition: nim_qchat_message_def.h:565
Definition: nim_qchat_message_def.h:738
nim_qchat_reply_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:740
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:746
NIMQChatMessage quote_message
被引用的消息体
Definition: nim_qchat_message_def.h:742
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:744
Definition: nim_qchat_message_def.h:616
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:626
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:620
nim_qchat_update_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:618
NIMQChatChannelIDInfo id_info
频道ID信息
Definition: nim_qchat_message_def.h:622
NIMQChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_message_def.h:628
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:624
Definition: nim_qchat_message_def.h:579
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:583
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:585
nim_qchat_send_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:581
Definition: nim_qchat_message_def.h:326
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:332
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:328
Definition: nim_qchat_message_def.h:433
uint64_t thread_msg_timestamp
thread 消息时间戳
Definition: nim_qchat_message_def.h:441
uint64_t thread_msg_server_id
thread 消息服务器 ID
Definition: nim_qchat_message_def.h:439
Definition: nim_qchat_message_def.h:152
char * data
Definition: nim_qchat_message_def.h:154
uint32_t type
Definition: nim_qchat_message_def.h:153
Definition: nim_qchat_public_def.h:214
Definition: nim_qchat_message_def.h:589
uint32_t msg_sub_type
消息子类型
Definition: nim_qchat_message_def.h:612
NIMQChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_message_def.h:601
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:597
NIMQChatChannelIDInfo id_info
频道ID信息
Definition: nim_qchat_message_def.h:595
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:593
NIMQChatMessageStatus status
消息状态, 不允许更新为删除或撤回
Definition: nim_qchat_message_def.h:606
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:599
char * msg_ext
消息扩展字段
Definition: nim_qchat_message_def.h:610
NIMQChatMessageAntiSpamInfo anti_spam_info
反垃圾信息
Definition: nim_qchat_message_def.h:603
char * msg_body
消息体
Definition: nim_qchat_message_def.h:608
nim_qchat_update_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:591
Definition: nim_qchat_message_def.h:336
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:342
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:338
Definition: nim_qchat_message_def.h:116
uint64_t duration
Definition: nim_qchat_message_def.h:118
char * file_path
Definition: nim_qchat_message_def.h:117
char * ext
Definition: nim_qchat_message_def.h:124
char * url
Definition: nim_qchat_message_def.h:122
char * name
Definition: nim_qchat_message_def.h:125
uint32_t height
Definition: nim_qchat_message_def.h:120
uint32_t width
Definition: nim_qchat_message_def.h:119
char * md5
Definition: nim_qchat_message_def.h:123
Definition: nim_qchat_message_cpp_def.h:19
virtual void SetRawData(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:22
virtual ~IQChatAttachInterface()
Definition: nim_qchat_message_cpp_def.h:21
virtual bool IsFileBased() const
Definition: nim_qchat_message_cpp_def.h:24
virtual std::string GetRawData() const
Definition: nim_qchat_message_cpp_def.h:23
Definition: nim_qchat_message_cpp_def.h:1711
std::vector< NIMQChatMessage > c_messages
Definition: nim_qchat_message_cpp_def.h:1744
std::vector< QChatMessage > messages
消息列表
Definition: nim_qchat_message_cpp_def.h:1715
QChatAreMentionedMeMessagesParam(const NIMQChatAreMentionedMeMessagesParam &param)
Definition: nim_qchat_message_cpp_def.h:1717
NIMQChatAreMentionedMeMessagesParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1727
Definition: nim_qchat_message_cpp_def.h:943
QChatAreMentionedMeMessagesResp(const NIMQChatAreMentionedMeMessagesResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:949
std::vector< NIMQChatMentionedResult > c_result_
Definition: nim_qchat_message_cpp_def.h:973
NIMQChatAreMentionedMeMessagesResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:957
Definition: nim_qchat_message_cpp_def.h:145
QChatAudioAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:147
QChatAudioAttach()=default
QChatAudioAttach(const NIMQChatAudioAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:148
NIMQChatAudioAttach ToCParam() const
Definition: nim_qchat_message_cpp_def.h:156
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:173
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:166
Definition: nim_qchat_public_cpp_def.h:49
Definition: nim_qchat_message_cpp_def.h:27
QChatDefaultAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:29
QChatDefaultAttach(const NIMQChatDefaultAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:30
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:37
std::string msg_attach
Definition: nim_qchat_message_cpp_def.h:38
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:36
NIMQChatDefaultAttach ToCParam()
Definition: nim_qchat_message_cpp_def.h:31
Definition: nim_qchat_message_cpp_def.h:1441
NIMQChatDeleteMessageParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1448
Definition: nim_qchat_message_cpp_def.h:2063
NIMQChatDeleteTextCacheParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:2081
QChatDeleteTextCacheParam(const NIMQChatDeleteTextCacheParam &c_param)
Definition: nim_qchat_message_cpp_def.h:2071
Definition: nim_qchat_message_cpp_def.h:42
std::string download_url
Definition: nim_qchat_message_cpp_def.h:94
std::string name
Definition: nim_qchat_message_cpp_def.h:91
QChatFileAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:45
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:77
QChatFileAttach(const NIMQChatFileAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:46
std::string extension
Definition: nim_qchat_message_cpp_def.h:95
NIMQChatFileAttach ToCParam() const
Definition: nim_qchat_message_cpp_def.h:53
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:62
std::string hash
Definition: nim_qchat_message_cpp_def.h:93
std::string file_path
Definition: nim_qchat_message_cpp_def.h:92
QChatFileAttach()=default
bool IsFileBased() const override
Definition: nim_qchat_message_cpp_def.h:89
void ProcessFileFields(nim_cpp_wrapper_util::Json::Value &values) const
Definition: nim_qchat_message_cpp_def.h:82
Definition: nim_qchat_message_cpp_def.h:1519
NIMQChatGetLastMessagesParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1538
QChatGetLastMessagesParam(const NIMQChatGetLastMessagesParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1527
Definition: nim_qchat_message_cpp_def.h:903
std::vector< NIMQChatMessage > message_
Definition: nim_qchat_message_cpp_def.h:930
QChatGetLastMessagesResp(const NIMQChatGetLastMessagesResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:909
NIMQChatGetLastMessagesResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:917
Definition: nim_qchat_message_cpp_def.h:1671
uint64_t timestamp
查询的起始时间位置, 0表示当前时间
Definition: nim_qchat_message_cpp_def.h:1679
QChatGetMentionedMeMessagesParam(const NIMQChatGetMentionedMeMessagesParam &param)
Definition: nim_qchat_message_cpp_def.h:1684
NIMQChatGetMentionedMeMessagesParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1695
uint32_t limit
查询条数, 0为使用默认值
Definition: nim_qchat_message_cpp_def.h:1681
QChatGetMentionedMeMessagesParam()=default
是否倒序, false: 否, true: 是
GetMentionedMeMessagesCallback cb
查询未读消息中 @ 当前用户的消息异步回调
Definition: nim_qchat_message_cpp_def.h:1673
uint64_t channel_id
频道ID
Definition: nim_qchat_message_cpp_def.h:1677
uint64_t server_id
服务器ID
Definition: nim_qchat_message_cpp_def.h:1675
Definition: nim_qchat_message_cpp_def.h:1637
std::vector< NIMQChatGetMessageColumns > columns
Definition: nim_qchat_message_cpp_def.h:1641
NIMQChatGetMessageHistoryByIdsParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1655
QChatGetMessageHistoryByIdsParam(const NIMQChatGetMessageHistoryByIdsParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1643
Definition: nim_qchat_message_cpp_def.h:1553
NIMQChatGetMessagesCacheParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1561
Definition: nim_qchat_message_cpp_def.h:1464
QChatGetMessagesParam(const NIMQChatGetMessagesParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1484
NIMQChatGetMessagesParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1499
Definition: nim_qchat_message_cpp_def.h:872
QChatGetMessagesResp(const NIMQChatGetMessagesResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:878
NIMQChatGetMessagesResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:886
std::vector< NIMQChatMessage > message_
Definition: nim_qchat_message_cpp_def.h:899
Definition: nim_qchat_message_cpp_def.h:1906
std::vector< uint64_t > msg_server_id_list
要查询的服务器消息 ID 列表
Definition: nim_qchat_message_cpp_def.h:1914
QChatGetQuickCommentsParam(const NIMQChatGetQuickCommentsParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1916
NIMQChatGetQuickCommentsParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1927
Definition: nim_qchat_message_cpp_def.h:1150
QChatGetQuickCommentsResp(const NIMQChatGetQuickCommentsResp &c_response)
Definition: nim_qchat_message_cpp_def.h:1156
std::vector< NIMQChatQuickCommentInfo > comments_
Definition: nim_qchat_message_cpp_def.h:1178
NIMQChatGetQuickCommentsResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1164
Definition: nim_qchat_message_cpp_def.h:1748
QChatMessage message
Definition: nim_qchat_message_cpp_def.h:1751
NIMQChatGetReferMessageType type
Definition: nim_qchat_message_cpp_def.h:1750
GetReferMessagesCallback cb
Definition: nim_qchat_message_cpp_def.h:1749
NIMQChatGetReferMessagesParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1762
QChatGetReferMessagesParam(const NIMQChatGetReferMessagesParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1753
Definition: nim_qchat_message_cpp_def.h:2095
QChatGetTextCacheParam(const NIMQChatGetTextCacheParam &c_param)
Definition: nim_qchat_message_cpp_def.h:2103
NIMQChatGetTextCacheParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:2113
Definition: nim_qchat_message_cpp_def.h:1217
QChatGetTextCacheResp(const NIMQChatGetTextCacheResp &c_response)
Definition: nim_qchat_message_cpp_def.h:1223
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_cpp_def.h:1219
std::string value
文本内容
Definition: nim_qchat_message_cpp_def.h:1221
NIMQChatGetTextCacheResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1227
Definition: nim_qchat_message_cpp_def.h:1775
QChatMessage message
要查询的 thread 依据完整消息体
Definition: nim_qchat_message_cpp_def.h:1779
QChatGetThreadMessagesParam(const NIMQChatGetThreadMessagesParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1791
NIMQChatGetThreadMessagesParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1804
Definition: nim_qchat_message_cpp_def.h:996
QChatGetThreadMessagesResp(const NIMQChatGetThreadMessagesResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:1006
NIMQChatGetThreadMessagesResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1016
std::vector< NIMQChatMessage > messages_
Definition: nim_qchat_message_cpp_def.h:1032
NIMQChatThreadMessageMetaInfo meta_info
thread 消息元信息
Definition: nim_qchat_message_cpp_def.h:1000
std::vector< QChatMessage > messages
消息列表
Definition: nim_qchat_message_cpp_def.h:1004
QChatMessage root_message
消息体
Definition: nim_qchat_message_cpp_def.h:1002
Definition: nim_qchat_message_cpp_def.h:1860
GetThreadRootMessagesMetaCallback cb
回调函数
Definition: nim_qchat_message_cpp_def.h:1862
std::vector< QChatMessage > thread_root_messages
Definition: nim_qchat_message_cpp_def.h:1865
QChatGetThreadRootMessagesMetaParam(const NIMQChatGetThreadRootMessagesMetaParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1867
std::vector< NIMQChatMessage > messages_
Definition: nim_qchat_message_cpp_def.h:1897
NIMQChatGetThreadRootMessagesMetaParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1879
Definition: nim_qchat_message_cpp_def.h:1036
NIMQChatGetThreadRootMessagesMetaResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1050
QChatGetThreadRootMessagesMetaResp(const NIMQChatGetThreadRootMessagesMetaResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:1042
std::vector< NIMQChatThreadMessageMetaInfo > meta_infos
thread 消息元信息
Definition: nim_qchat_message_cpp_def.h:1040
Definition: nim_qchat_message_cpp_def.h:99
QChatImageAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:101
QChatImageAttach()=default
NIMQChatImageAttach ToCParam() const
Definition: nim_qchat_message_cpp_def.h:111
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:122
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:132
QChatImageAttach(const NIMQChatImageAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:102
Definition: nim_qchat_message_cpp_def.h:2025
std::string value
缓存的内容
Definition: nim_qchat_message_cpp_def.h:2033
QChatInsertOrReplaceTextCacheParam(const NIMQChatInsertOrReplaceTextCacheParam &c_param)
Definition: nim_qchat_message_cpp_def.h:2035
NIMQChatInsertOrReplaceTextCacheParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:2046
Definition: nim_qchat_message_cpp_def.h:235
QChatLocationAttach(const NIMQChatLocationAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:238
std::string title
Definition: nim_qchat_message_cpp_def.h:271
QChatLocationAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:237
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:250
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:261
NIMQChatLocationAttach ToCParam() const
Definition: nim_qchat_message_cpp_def.h:243
Definition: nim_qchat_message_cpp_def.h:1575
QChatMarkMessageReadParam(const NIMQChatMarkMessageReadParam &param)
Definition: nim_qchat_message_cpp_def.h:1583
NIMQChatMarkMessageReadParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1592
Definition: nim_qchat_message_cpp_def.h:977
QChatMarkMessageReadResp(const NIMQChatMarkMessageReadResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:983
NIMQChatMarkMessageReadResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:987
Definition: nim_qchat_message_cpp_def.h:383
std::string yidun_anti_cheating
易盾反垃圾增强反作弊专属字段, 限制json, 长度限制1024
Definition: nim_qchat_message_cpp_def.h:395
std::string yidun_anti_spam_ext
易盾反垃圾扩展字段, 限制json, 长度限制1024
Definition: nim_qchat_message_cpp_def.h:397
NIMQChatMessageAntiSpamInfo ToCParam() const
Definition: nim_qchat_message_cpp_def.h:408
QChatMessageAntiSpamInfo(const NIMQChatMessageAntiSpamInfo &c_param)
Definition: nim_qchat_message_cpp_def.h:399
std::string anti_spam_bussiness_id
反垃圾业务ID, 对某些单条消息另外的反垃圾的业务ID
Definition: nim_qchat_message_cpp_def.h:391
std::string yidun_callback_url
易盾check的回调URL
Definition: nim_qchat_message_cpp_def.h:393
std::string anti_spam_content
反垃圾内容, 开发者自定义的反垃圾字段, 如果提供了这个字段, 在过反垃圾时不会再使用body或者attach
Definition: nim_qchat_message_cpp_def.h:389
Definition: nim_qchat_message_cpp_def.h:712
NIMQChatMessage ToCParam() const
Definition: nim_qchat_message_cpp_def.h:768
QChatMessageUpdateContent update_content
上次消息变更内容
Definition: nim_qchat_message_cpp_def.h:739
QChatMessageUpdateOpeInfo update_ope_info
上次消息变更操作信息
Definition: nim_qchat_message_cpp_def.h:741
uint64_t timestamp
更新消息时消息创建的时间戳,以服务器返回信息为准
Definition: nim_qchat_message_cpp_def.h:727
QChatMessage(const NIMQChatMessage &c_param)
Definition: nim_qchat_message_cpp_def.h:745
std::string anti_spam_result
反垃圾结果
Definition: nim_qchat_message_cpp_def.h:735
std::vector< char * > c_accids_of_mentioned_roles
Definition: nim_qchat_message_cpp_def.h:800
QChatMessage(const QChatMessageSend &parent)
Definition: nim_qchat_message_cpp_def.h:743
std::vector< std::string > accids_of_mentioned_roles
@身份组所包含的accid列表(部分)
Definition: nim_qchat_message_cpp_def.h:797
uint64_t msg_server_id
更新消息时消息服务器端id
Definition: nim_qchat_message_cpp_def.h:717
std::string callback_ext
第三方回调扩展字段
Definition: nim_qchat_message_cpp_def.h:737
QChatMessage()=default
Definition: nim_qchat_message_cpp_def.h:1945
std::string keyword
搜索关键字
Definition: nim_qchat_message_cpp_def.h:1949
std::string cursor
查询游标, 查询的起始位置
Definition: nim_qchat_message_cpp_def.h:1973
NIMQChatMessageSearchPageParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1997
std::string from_accid
消息发送者ID
Definition: nim_qchat_message_cpp_def.h:1955
std::vector< uint32_t > sub_types
搜索消息类型
Definition: nim_qchat_message_cpp_def.h:1963
QChatMessageSearchPageParam(const NIMQChatMessageSearchPageParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1975
std::vector< NIMQChatMsgType > msg_types
搜索消息类型
Definition: nim_qchat_message_cpp_def.h:1961
Definition: nim_qchat_message_cpp_def.h:1182
std::vector< NIMQChatMessage > c_messages
Definition: nim_qchat_message_cpp_def.h:1210
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_cpp_def.h:1184
QChatMessageSearchPageResp(const NIMQChatMessageSearchPageResp &c_response)
Definition: nim_qchat_message_cpp_def.h:1190
std::vector< QChatMessage > messages
消息列表
Definition: nim_qchat_message_cpp_def.h:1188
NIMQChatMessageSearchPageResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1197
QChatPageInfo page_info
分页信息
Definition: nim_qchat_message_cpp_def.h:1186
Definition: nim_qchat_message_cpp_def.h:465
std::function< std::shared_ptr< IQChatAttachInterface >(const std::string &)> AttachRawCreateFunc
Definition: nim_qchat_message_cpp_def.h:577
std::function< std::shared_ptr< IQChatAttachInterface >(const NIMQChatMessage &)> AttachCreateFunc
Definition: nim_qchat_message_cpp_def.h:578
QChatMessageThreadInfo thread_info
thread 消息相关信息
Definition: nim_qchat_message_cpp_def.h:505
static std::map< NIMQChatMsgType, AttachRawCreateFunc > attach_raw_create_function_
Definition: nim_qchat_message_cpp_def.h:580
QChatMessageAntiSpamInfo anti_spam_info
反垃圾信息
Definition: nim_qchat_message_cpp_def.h:507
static std::shared_ptr< ATTACH_TYPE > GetOriginAttach(const std::shared_ptr< IQChatAttachInterface > &p)
Definition: nim_qchat_message_cpp_def.h:609
static std::shared_ptr< IQChatAttachInterface > CreateAttachWithRawData(NIMQChatMsgType type, const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:581
QChatMessageSend(const NIMQChatMessage &c_param)
Definition: nim_qchat_message_cpp_def.h:511
QChatMessageSend()=default
void ParseAttach(const std::shared_ptr< IQChatAttachInterface > &p, NIMQChatMessage &cp) const
Definition: nim_qchat_message_cpp_def.h:597
std::vector< char * > c_mention_accids
Definition: nim_qchat_message_cpp_def.h:650
std::shared_ptr< IQChatAttachInterface > CreateAttach(const NIMQChatMessage &m)
Definition: nim_qchat_message_cpp_def.h:590
NIMQChatMessage ToCParam() const
Definition: nim_qchat_message_cpp_def.h:541
std::function< void(const std::shared_ptr< IQChatAttachInterface > &, NIMQChatMessage &)> AttachParseFunc
Definition: nim_qchat_message_cpp_def.h:579
std::string env
环境变量
Definition: nim_qchat_message_cpp_def.h:509
Definition: nim_qchat_message_cpp_def.h:422
QChatMessageThreadInfo(const NIMQChatMessageThreadInfo &c_param)
Definition: nim_qchat_message_cpp_def.h:440
std::string thread_root_msg_client_id
thread 根消息的客户端消息 ID
Definition: nim_qchat_message_cpp_def.h:438
NIMQChatMessageThreadInfo ToCParam() const
Definition: nim_qchat_message_cpp_def.h:450
std::string reply_msg_client_id
被回复消息得客户端消息 ID
Definition: nim_qchat_message_cpp_def.h:430
std::string reply_from_accid
被回复的消息所有者 ID
Definition: nim_qchat_message_cpp_def.h:424
std::string thread_root_accid
thread 根消息的所有者 ID
Definition: nim_qchat_message_cpp_def.h:432
Definition: nim_qchat_message_cpp_def.h:654
std::string msg_body
消息内容
Definition: nim_qchat_message_cpp_def.h:658
QChatMessageUpdateContent(const NIMQChatMessageUpdateContent &c_param)
Definition: nim_qchat_message_cpp_def.h:662
NIMQChatMessageUpdateContent ToCParam() const
Definition: nim_qchat_message_cpp_def.h:667
std::string msg_ext
消息扩展字段
Definition: nim_qchat_message_cpp_def.h:660
Definition: nim_qchat_message_cpp_def.h:341
QChatMessageUpdateInfo(const NIMQChatMessageUpdateInfo &c_param)
Definition: nim_qchat_message_cpp_def.h:358
bool route_enable
是否需要抄送
Definition: nim_qchat_message_cpp_def.h:353
std::string extension
操作扩展字段
Definition: nim_qchat_message_cpp_def.h:345
std::string env
环境变量,用于指向不同的抄送、第三方回调等配置
Definition: nim_qchat_message_cpp_def.h:351
std::string push_payload
推送payload
Definition: nim_qchat_message_cpp_def.h:349
std::string postscript
操作附言
Definition: nim_qchat_message_cpp_def.h:343
std::string operator_id
Definition: nim_qchat_message_cpp_def.h:355
NIMQChatMessageUpdateInfo ToCParam() const
Definition: nim_qchat_message_cpp_def.h:368
std::string push_content
推送文案
Definition: nim_qchat_message_cpp_def.h:347
Definition: nim_qchat_message_cpp_def.h:677
QChatMessageUpdateOpeInfo(const NIMQChatMessageUpdateOpeInfo &c_param)
Definition: nim_qchat_message_cpp_def.h:691
std::string push_payload
推送payload
Definition: nim_qchat_message_cpp_def.h:689
std::string extension
操作扩展字段
Definition: nim_qchat_message_cpp_def.h:685
std::string push_content
推送文案
Definition: nim_qchat_message_cpp_def.h:687
NIMQChatMessageUpdateOpeInfo ToCParam() const
Definition: nim_qchat_message_cpp_def.h:699
std::string postscript
操作附言
Definition: nim_qchat_message_cpp_def.h:683
std::string operator_id
操作者账号
Definition: nim_qchat_message_cpp_def.h:679
Definition: nim_qchat_message_cpp_def.h:812
QChatMsgUpdatedResp(const NIMQChatMsgUpdatedResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:820
Definition: nim_qchat_message_cpp_def.h:274
QChatNotificationAttach(const NIMQChatNotificationAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:277
NIMQChatNotificationAttach ToCParam() const
Definition: nim_qchat_message_cpp_def.h:281
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:287
QChatNotificationAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:276
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:296
std::string data
Definition: nim_qchat_message_cpp_def.h:304
Definition: nim_qchat_public_cpp_def.h:81
NIMQChatPageInfo ToCParam() const
Definition: nim_qchat_public_cpp_def.h:94
Definition: nim_qchat_message_cpp_def.h:1066
std::vector< char * > accids_
Definition: nim_qchat_message_cpp_def.h:1102
std::vector< std::string > accids
若干个添加过表情的 account ID
Definition: nim_qchat_message_cpp_def.h:1076
QChatQuickCommentDetail(const NIMQChatQuickCommentDetail &c_param)
Definition: nim_qchat_message_cpp_def.h:1078
NIMQChatQuickCommentDetail ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1087
Definition: nim_qchat_message_cpp_def.h:1106
std::vector< QChatQuickCommentDetail > details
评论详情
Definition: nim_qchat_message_cpp_def.h:1118
NIMQChatQuickCommentInfo ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1130
QChatQuickCommentInfo(const NIMQChatQuickCommentInfo &c_param)
Definition: nim_qchat_message_cpp_def.h:1120
std::vector< NIMQChatQuickCommentDetail > detail_
Definition: nim_qchat_message_cpp_def.h:1146
Definition: nim_qchat_message_cpp_def.h:1822
QChatMessage message
快速评论内容
Definition: nim_qchat_message_cpp_def.h:1826
TCParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1840
QChatQuickCommentParam(const TCParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1830
NIMQChatQuickCommentOperation GetOperation() const
Definition: nim_qchat_message_cpp_def.h:1852
Definition: nim_qchat_message_cpp_def.h:804
QChatRecvMsgResp(const NIMQChatRecvMsgResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:808
QChatRecvMsgResp()=default
Definition: nim_qchat_message_cpp_def.h:1291
NIMQChatRegMsgUpdatedCbParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1294
Definition: nim_qchat_message_cpp_def.h:1275
NIMQChatRegRecvMsgCbParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1278
Definition: nim_qchat_message_cpp_def.h:1606
QChatReplyMessageParam(const NIMQChatReplyMessageParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1614
QChatMessageSend message
回复消息内容
Definition: nim_qchat_message_cpp_def.h:1612
QChatMessage quote_message
被引用的消息体
Definition: nim_qchat_message_cpp_def.h:1610
NIMQChatReplyMessageParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1623
Definition: nim_qchat_message_cpp_def.h:1418
NIMQChatRevokeMessageParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1425
Definition: nim_qchat_message_cpp_def.h:1307
QChatSendMessageParam(const NIMQChatSendMessageParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1313
NIMQChatSendMessageParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1321
Definition: nim_qchat_message_cpp_def.h:827
QChatSendMessageResp(const NIMQChatSendMessageResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:833
NIMQChatSendMessageResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:839
Definition: nim_qchat_message_cpp_def.h:307
std::string data
Definition: nim_qchat_message_cpp_def.h:337
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:329
QChatTipsAttach()=default
QChatTipsAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:309
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:320
NIMQChatTipsAttach ToCParam() const
Definition: nim_qchat_message_cpp_def.h:314
QChatTipsAttach(const NIMQChatTipsAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:310
Definition: nim_qchat_message_cpp_def.h:1334
QChatUpdateMessageParam(const NIMQChatRevokeMessageParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1373
QChatUpdateMessageParam(const NIMQChatUpdateMessageParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1357
NIMQChatUpdateMessageParam ToCParam() const
Definition: nim_qchat_message_cpp_def.h:1397
QChatUpdateMessageParam(const NIMQChatDeleteMessageParam &c_param)
Definition: nim_qchat_message_cpp_def.h:1385
Definition: nim_qchat_message_cpp_def.h:851
NIMQChatUpdateMessageResp ToCParam() const
Definition: nim_qchat_message_cpp_def.h:863
QChatUpdateMessageResp(const NIMQChatUpdateMessageResp &c_resp)
Definition: nim_qchat_message_cpp_def.h:857
Definition: nim_qchat_message_cpp_def.h:184
QChatVideoAttach()=default
NIMQChatVideoAttach ToCParam() const
Definition: nim_qchat_message_cpp_def.h:197
std::string GetRawData() const override
Definition: nim_qchat_message_cpp_def.h:220
QChatVideoAttach(const std::string &raw_data)
Definition: nim_qchat_message_cpp_def.h:186
QChatVideoAttach(const NIMQChatVideoAttach &c_param)
Definition: nim_qchat_message_cpp_def.h:187
void SetRawData(const std::string &raw_data) override
Definition: nim_qchat_message_cpp_def.h:209