NIM PC Cross Platform SDK
nim_qchat_system_notification_cpp_def.h
Go to the documentation of this file.
1
11#ifndef __NIM_QCHAT_SYSTEM_NOTIFICATION_CPP_DEF_H__
12#define __NIM_QCHAT_SYSTEM_NOTIFICATION_CPP_DEF_H__
13
19
20namespace nim_qchat {
21
23struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSystemNotificationDataBase {
25};
26
30 uint64_t request_id{0};
33};
34
38 uint64_t request_id{0};
41 request_id = c_param.request_id;
42 }
43};
44
48 uint64_t request_id{0};
51};
52
56 uint64_t request_id{0};
59};
60
67};
68
75};
76
83};
84
91};
92
98 std::list<std::string> invite_accids;
100 uint64_t request_id{0};
103 server_info = c_param.server_info;
104 if (c_param.invite_accids) {
105 nim::JsonArrayStringToList(c_param.invite_accids, invite_accids);
106 }
107 request_id = c_param.request_id;
108 }
109};
110
116 std::string invite_accid;
118 uint64_t request_id{0};
121 server_info = c_param.server_info;
122 invite_accid = c_param.invite_accid ? c_param.invite_accid : "";
123 request_id = c_param.request_id;
124 }
125};
126
132 uint64_t request_id{0};
135 server_info = c_param.server_info;
136 request_id = c_param.request_id;
137 }
138};
139
145 std::string apply_accid;
147 uint64_t request_id{0};
150 server_info = c_param.server_info;
151 apply_accid = c_param.apply_accid ? c_param.apply_accid : "";
152 request_id = c_param.request_id;
153 }
154};
155
161 std::list<std::string> kick_accids;
164 server_info = c_param.server_info;
165 if (c_param.kick_accids)
166 nim::JsonArrayStringToList(c_param.kick_accids, kick_accids);
167 }
168};
169
176};
177
184};
185
189 uint64_t server_id;
191 uint64_t channel_id;
193 uint64_t role_id;
195 NIMQChatChannelWhiteBlackType type;
197 NIMQChatChannelWhiteBlackOpeType ope_type;
200 server_id = c_param.server_id;
201 channel_id = c_param.channel_id;
202 role_id = c_param.role_id;
203 type = c_param.type;
204 ope_type = c_param.ope_type;
205 }
206};
207
211 uint64_t server_id;
213 uint64_t channel_id;
215 std::list<std::string> accids;
217 NIMQChatChannelWhiteBlackType type;
219 NIMQChatChannelWhiteBlackOpeType ope_type;
222 server_id = c_param.server_id;
223 channel_id = c_param.channel_id;
224 for (size_t i = 0; i < c_param.accids_count; i++)
225 accids.push_back(c_param.accids[i]);
226 type = c_param.type;
227 ope_type = c_param.ope_type;
228 }
229};
230
234 uint64_t server_id = 0;
236 uint64_t channel_id = 0;
238 std::string msg_sender_accid;
244 uint64_t type;
248 std::string operator_accid;
251 server_id = c_param.server_id;
252 channel_id = c_param.channel_id;
253 msg_sender_accid = c_param.msg_sender_accid;
254 msg_server_id = c_param.msg_server_id;
255 msg_timestamp = c_param.msg_timestamp;
256 type = c_param.type;
257 operate_type = c_param.operate_type;
258 operator_accid = c_param.operator_accid;
259 }
260};
261
268 category_info = c_param.category_info;
269 }
270};
271
275 uint64_t category_id;
278 category_id = c_param.category_id;
279 }
280};
281
283using QChatSystemNotificationDataChannelCategoryUpdate = QChatSystemNotificationDataChannelCategoryCreate;
284
288 uint64_t server_id;
290 uint64_t category_id;
292 uint64_t role_id;
294 NIMQChatChannelWhiteBlackType type;
296 NIMQChatChannelWhiteBlackOpeType ope_type;
299 server_id = c_param.server_id;
300 category_id = c_param.category_id;
301 role_id = c_param.role_id;
302 type = c_param.type;
303 ope_type = c_param.ope_type;
304 }
305};
306
310 uint64_t server_id;
312 uint64_t category_id;
314 std::list<std::string> accids;
316 NIMQChatChannelWhiteBlackType type;
318 NIMQChatChannelWhiteBlackOpeType ope_type;
322 server_id = c_param.server_id;
323 category_id = c_param.category_id;
324 for (size_t i = 0; i < c_param.accids_count; i++)
325 accids.push_back(c_param.accids[i]);
326 type = c_param.type;
327 ope_type = c_param.ope_type;
328 }
329};
330
334 uint64_t server_id;
336 uint64_t role_id;
338 std::list<std::string> accids;
341 server_id = c_param.server_id;
342 role_id = c_param.role_id;
343 for (size_t i = 0; i < c_param.accids_count; i++)
344 accids.push_back(c_param.accids[i]);
345 }
346};
347
349using QChatSystemNotificationDataServerRoleRemoveMember = QChatSystemNotificationDataServerRoleAddMember;
350
354 uint64_t server_id;
356 uint64_t role_id;
358 QChatPermission permissions{};
361 server_id = c_param.server_id;
362 role_id = c_param.role_id;
363 for (size_t i = 0; i < c_param.permissions_count; i++) {
364 auto permission = c_param.permissions[i].permission;
365 auto option = c_param.permissions[i].option;
366 permissions.emplace(permission, option);
367 }
368 }
369};
370
374 uint64_t server_id;
376 uint64_t channel_id;
380 uint64_t role_id;
382 QChatPermission permissions{};
385 server_id = c_param.server_id;
386 channel_id = c_param.channel_id;
387 parent_role_id = c_param.parent_role_id;
388 role_id = c_param.role_id;
389 for (size_t i = 0; i < c_param.permissions_count; i++) {
390 auto permission = c_param.permissions[i].permission;
391 auto option = c_param.permissions[i].option;
392 permissions.emplace(permission, option);
393 }
394 }
395};
396
400 uint64_t server_id;
402 uint64_t channel_id;
404 std::string accid;
406 QChatPermission permissions{};
409 server_id = c_param.server_id;
410 channel_id = c_param.channel_id;
411 accid = c_param.accid;
412 for (size_t i = 0; i < c_param.permissions_count; i++) {
413 auto permission = c_param.permissions[i].permission;
414 auto option = c_param.permissions[i].option;
415 permissions.emplace(permission, option);
416 }
417 }
418};
419
423 bool visible{true};
426 visible = c_param.visible;
427 }
428};
429
433 bool is_enter{true};
436};
437
441 QChatServerInfo server_info{};
443 uint64_t request_id{0};
445 std::string invite_code;
448 server_info = c_param.server_info;
449 request_id = c_param.request_id;
450 invite_code = c_param.invite_code ? c_param.invite_code : "";
451 }
452};
453
454template <typename CPP_TYPE, typename C_TYPE>
455static std::shared_ptr<QChatSystemNotificationDataBase> MsgDataCPPToC(void* c_msg_data) {
456 return std::make_shared<CPP_TYPE>(*(C_TYPE*)c_msg_data);
457};
458// clang-format off
459static std::map<NIMQChatSystemNotificationType, std::function<std::shared_ptr<QChatSystemNotificationDataBase>(void*)>> msg_data_transform_map_{
460 {kNIMQChatSystemNotificationTypeMemberInvite, MsgDataCPPToC<QChatSystemNotificationDataServerInvite, NIMQChatSystemNotificationDataServerInvite>},
461 {kNIMQChatSystemNotificationTypeMemberInviteReject, MsgDataCPPToC<QChatSystemNotificationDataServerInviteReject, NIMQChatSystemNotificationDataServerInviteReject>},
462 {kNIMQChatSystemNotificationTypeMemberApply, MsgDataCPPToC<QChatSystemNotificationDataServerApply, NIMQChatSystemNotificationDataServerApply>},
463 {kNIMQChatSystemNotificationTypeMemberApplyReject, MsgDataCPPToC<QChatSystemNotificationDataServerApplyReject, NIMQChatSystemNotificationDataServerApplyReject>},
464 {kNIMQChatSystemNotificationTypeServerCreate, MsgDataCPPToC<QChatSystemNotificationDataServerCreate, NIMQChatSystemNotificationDataServerCreate>},
465 {kNIMQChatSystemNotificationTypeServerUpdate, MsgDataCPPToC<QChatSystemNotificationDataServerUpdate, NIMQChatSystemNotificationDataServerUpdate>},
466 {kNIMQChatSystemNotificationTypeChannelCreate, MsgDataCPPToC<QChatSystemNotificationDataChannelCreate, NIMQChatSystemNotificationDataChannelCreate>},
467 {kNIMQChatSystemNotificationTypeChannelUpdate, MsgDataCPPToC<QChatSystemNotificationDataChannelUpdate, NIMQChatSystemNotificationDataChannelUpdate>},
468 {kNIMQChatSystemNotificationTypeMemberInviteDone, MsgDataCPPToC<QChatSystemNotificationDataMemberInviteDone, NIMQChatSystemNotificationDataMemberInviteDone>},
469 {kNIMQChatSystemNotificationTypeMemberInviteAccept, MsgDataCPPToC<QChatSystemNotificationDataMemberInviteAccept, NIMQChatSystemNotificationDataMemberInviteAccept>},
470 {kNIMQChatSystemNotificationTypeMemberApplyDone, MsgDataCPPToC<QChatSystemNotificationDataMemberApplyDone, NIMQChatSystemNotificationDataMemberApplyDone>},
471 {kNIMQChatSystemNotificationTypeMemberApplyAccept, MsgDataCPPToC<QChatSystemNotificationDataMemberApplyAccept, NIMQChatSystemNotificationDataMemberApplyAccept>},
472 {kNIMQChatSystemNotificationTypeMemberKick, MsgDataCPPToC<QChatSystemNotificationDataMemberKick, NIMQChatSystemNotificationDataMemberKick>},
473 {kNIMQChatSystemNotificationTypeMemberLeave, MsgDataCPPToC<QChatSystemNotificationDataMemberLeave, NIMQChatSystemNotificationDataMemberLeave>},
474 {kNIMQChatSystemNotificationTypeMemberUpdate, MsgDataCPPToC<QChatSystemNotificationDataMemberUpdate, NIMQChatSystemNotificationDataMemberUpdate>},
475 {kNIMQChatSystemNotificationTypeWhiteBlackRoleUpdate, MsgDataCPPToC<QChatSystemNotificationDataWhiteBlackRoleUpdate, NIMQChatSystemNotificationDataWhiteBlackRoleUpdate>},
476 {kNIMQChatSystemNotificationTypeWhiteBlackMembersUpdate, MsgDataCPPToC<QChatSystemNotificationDataWhiteBlackMembersUpdate, NIMQChatSystemNotificationDataWhiteBlackMembersUpdate>},
477 {kNIMQChatSystemNotificationTypeQuickCommentChanged, MsgDataCPPToC<QChatSystemNotificationDataQuickCommentChanged, NIMQChatSystemNotificationDataQuickCommentChanged>},
478 {kNIMQChatSystemNotificationTypeChannelCategoryCreate, MsgDataCPPToC<QChatSystemNotificationDataChannelCategoryCreate, NIMQChatSystemNotificationDataChannelCategoryCreate>},
479 {kNIMQChatSystemNotificationTypeChannelCategoryRemove, MsgDataCPPToC<QChatSystemNotificationDataChannelCategoryRemove, NIMQChatSystemNotificationDataChannelCategoryRemove>},
480 {kNIMQChatSystemNotificationTypeChannelCategoryUpdate, MsgDataCPPToC<QChatSystemNotificationDataChannelCategoryUpdate, NIMQChatSystemNotificationDataChannelCategoryUpdate>},
481 {kNIMQChatSystemNotificationTypeChannelCategoryWhiteBlackRoleUpdate, MsgDataCPPToC<QChatSystemNotificationDataChannelCategoryWhiteBlackRoleUpdate, NIMQChatSystemNotificationDataChannelCategoryWhiteBlackRoleUpdate>},
482 {kNIMQChatSystemNotificationTypeChannelCategoryWhiteBlackMembersUpdate, MsgDataCPPToC<QChatSystemNotificationDataChannelCategoryWhiteBlackMembersUpdate, NIMQChatSystemNotificationDataChannelCategoryWhiteBlackMembersUpdate>},
483 {kNIMQChatSystemNotificationTypeServerRoleAddMember, MsgDataCPPToC<QChatSystemNotificationDataServerRoleAddMember, NIMQChatSystemNotificationDataServerRoleAddMember>},
484 {kNIMQChatSystemNotificationTypeServerRoleRemoveMember, MsgDataCPPToC<QChatSystemNotificationDataServerRoleRemoveMember, NIMQChatSystemNotificationDataServerRoleRemoveMember>},
485 {kNIMQChatSystemNotificationTypeServerRolePermissionChange, MsgDataCPPToC<QChatSystemNotificationDataServerRolePermissionChange, NIMQChatSystemNotificationDataServerRolePermissionChange>},
486 {kNIMQChatSystemNotificationTypeChannelRolePermissionChange, MsgDataCPPToC<QChatSystemNotificationDataChannelRolePermissionChange, NIMQChatSystemNotificationDataChannelRolePermissionChange>},
487 {kNIMQChatSystemNotificationTypeMemberRolePermissionChange, MsgDataCPPToC<QChatSystemNotificationDataMemberRolePermissionChange, NIMQChatSystemNotificationDataMemberRolePermissionChange>},
488 {kNIMQChatSystemNotificationTypeChannelVisibilityChange, MsgDataCPPToC<QChatSystemNotificationDataChannelVisibilityChange, NIMQChatSystemNotificationDataChannelVisibilityChange>},
489 {kNIMQChatSystemNotificationTypeServerEnterLeave, MsgDataCPPToC<QChatSystemNotificationDataServerEnterLeave, NIMQChatSystemNotificationDataServerEnterLeave>},
490 {kNIMQChatSystemNotificationTypeServerJoinByInviteCode, MsgDataCPPToC<QChatSystemNotificationDataServerJoinByInviteCode, NIMQChatSystemNotificationDataServerJoinByInviteCode>}
491};
492// clang-format on
493
495struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSystemNotification {
497 uint64_t server_id{0};
499 uint64_t channel_id{0};
501 std::string msg_id{""};
505 std::string msg_body{""};
507 std::string msg_attach{""};
509 std::string msg_ext{""};
511 bool resend_flag{false};
513 std::list<std::string> to_accids{};
515 bool history_enable{false};
517 std::string push_payload{""};
519 std::string push_content{""};
521 bool push_enable{false};
523 bool need_badge{true};
525 bool need_push_nick{true};
527 bool route_enable{true};
529 std::string env{""};
530 // 以下字段仅在收到消息时有效
534 uint64_t msg_server_id{0};
536 std::string from_accid{""};
538 uint32_t from_client_type{0};
540 std::string from_device_id{""};
542 std::string from_nick{""};
544 uint64_t timestamp{0};
546 uint64_t update_timestamp{0};
548 std::shared_ptr<QChatSystemNotificationDataBase> msg_data{nullptr};
550 std::string callback_ext{""};
551 QChatSystemNotification() = default;
553 server_id = c_param.server_id;
554 channel_id = c_param.channel_id;
555 msg_id = c_param.msg_id ? c_param.msg_id : "";
556 msg_type = c_param.msg_type;
557 msg_body = c_param.msg_body ? c_param.msg_body : "";
558 msg_attach = c_param.msg_attach ? c_param.msg_attach : "";
559 msg_ext = c_param.msg_ext ? c_param.msg_ext : "";
560 resend_flag = c_param.resend_flag;
561 if (c_param.to_accids)
562 nim::JsonArrayStringToList(c_param.to_accids, to_accids);
563 route_enable = c_param.route_enable;
564 env = c_param.env ? c_param.env : "";
565 // fill by server
566 status = c_param.status;
567 history_enable = c_param.history_enable;
568 push_payload = c_param.push_payload ? c_param.push_payload : "";
569 push_content = c_param.push_content ? c_param.push_content : "";
570 push_enable = c_param.push_enable;
571 need_badge = c_param.need_badge;
572 need_push_nick = c_param.need_push_nick;
573 msg_server_id = c_param.msg_server_id;
574 from_accid = c_param.from_accid ? c_param.from_accid : "";
575 from_client_type = c_param.from_client_type;
576 from_device_id = c_param.from_device_id ? c_param.from_device_id : "";
577 from_nick = c_param.from_nick ? c_param.from_nick : "";
578 timestamp = c_param.timestamp;
579 update_timestamp = c_param.update_timestamp;
580 if (c_param.msg_data) {
581 auto iter = msg_data_transform_map_.find(msg_type);
582 if (iter != msg_data_transform_map_.end()) {
583 msg_data = iter->second(c_param.msg_data);
584 }
585 }
586 callback_ext = c_param.callback_ext ? c_param.callback_ext : "";
587 }
588 const NIMQChatSystemNotification ToCParam() const {
589 nim::StrListToJsonString(to_accids, to_accids_json_array);
590 NIMQChatSystemNotification c_param = {};
591 c_param.server_id = server_id;
592 c_param.channel_id = channel_id;
593 c_param.msg_id = const_cast<char*>(msg_id.c_str());
594 c_param.msg_type = msg_type;
595 c_param.msg_body = const_cast<char*>(msg_body.c_str());
596 c_param.msg_attach = const_cast<char*>(msg_attach.c_str());
597 c_param.msg_ext = const_cast<char*>(msg_ext.c_str());
598 c_param.resend_flag = resend_flag;
599 c_param.to_accids = const_cast<char*>(to_accids_json_array.c_str());
600 c_param.history_enable = history_enable;
601 c_param.push_payload = const_cast<char*>(push_payload.c_str());
602 c_param.push_content = const_cast<char*>(push_content.c_str());
603 c_param.push_enable = push_enable;
604 c_param.need_badge = need_badge;
605 c_param.need_push_nick = need_push_nick;
606 c_param.route_enable = route_enable;
607 c_param.env = const_cast<char*>(env.c_str());
608 // fill by server
609 c_param.status = status;
610 c_param.msg_server_id = msg_server_id;
611 c_param.from_accid = const_cast<char*>(from_accid.c_str());
612 c_param.from_client_type = from_client_type;
613 c_param.from_device_id = const_cast<char*>(from_device_id.c_str());
614 c_param.from_nick = const_cast<char*>(from_nick.c_str());
615 c_param.timestamp = timestamp;
616 c_param.update_timestamp = update_timestamp;
617 c_param.callback_ext = const_cast<char*>(callback_ext.c_str());
618 return c_param;
619 }
620
621protected:
622 // 以下字段为内部使用
623 mutable std::string to_accids_json_array;
624};
625
627struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatTypingEvent {
629 uint64_t server_id{0};
631 uint64_t channel_id{0};
633 std::string extension{""};
634 // 以下字段仅在收到事件时有效
636 std::string from_accid{""};
638 std::string from_nick{""};
640 uint64_t timestamp{0};
641 QChatTypingEvent() = default;
642 QChatTypingEvent(const NIMQChatTypingEvent& c_param) {
643 server_id = c_param.server_id;
644 channel_id = c_param.channel_id;
645 extension = c_param.extension ? c_param.extension : "";
646 from_accid = c_param.from_accid ? c_param.from_accid : "";
647 from_nick = c_param.from_nick ? c_param.from_nick : "";
648 timestamp = c_param.timestamp;
649 }
650 const NIMQChatTypingEvent ToCParam() const {
651 NIMQChatTypingEvent c_param = {};
652 c_param.server_id = server_id;
653 c_param.channel_id = channel_id;
654 c_param.extension = const_cast<char*>(extension.c_str());
655 c_param.from_accid = const_cast<char*>(from_accid.c_str());
656 c_param.from_nick = const_cast<char*>(from_nick.c_str());
657 c_param.timestamp = timestamp;
658 return c_param;
659 }
660};
661
663struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRecvSystemNotificationResp {
667 bool is_leave{false};
670 notification = c_resp.notification;
671 is_leave = c_resp.is_leave;
672 }
673};
674
676struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSystemNotificationUpdatedResp {
678 uint32_t res_code{0};
685 update_info = c_resp.update_info;
686 notification = c_resp.notification;
687 }
688};
689
691struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSendSystemNotificationResp {
693 uint32_t res_code{0};
698 res_code = c_resp.res_code;
699 if (c_resp.res_code != kNIMResSuccess)
700 return;
701 notification = c_resp.notification;
702 }
703 NIMQChatSendSystemNotificationResp ToCParam() const {
705 c_resp.res_code = res_code;
706 c_resp.notification = notification.ToCParam();
707 return c_resp;
708 }
709};
710
712struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatUpdateSystemNotificationResp {
714 uint32_t res_code{0};
719 res_code = c_resp.res_code;
720 if (c_resp.res_code != kNIMResSuccess)
721 return;
722 notification = c_resp.notification;
723 }
724 NIMQChatUpdateSystemNotificationResp ToCParam() const {
726 c_resp.res_code = res_code;
727 c_resp.notification = notification.ToCParam();
728 return c_resp;
729 }
730};
731
733using QChatMarkReadSystemNotificationResp = QChatBaseResp;
734
736using QChatMarkSystemNotificationsReadResp = QChatBaseResp;
737
739struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRecvTypingEventResp {
741 QChatTypingEvent typing_event{};
742 QChatRecvTypingEventResp() = default;
743 QChatRecvTypingEventResp(const NIMQChatRecvTypingEventResp& c_resp) { typing_event = c_resp.typing_event; }
744};
745
747struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSendTypingEventResp {
749 uint32_t res_code{0};
751 QChatTypingEvent typing_event{};
752 QChatSendTypingEventResp() = default;
754 res_code = c_resp.res_code;
755 if (c_resp.res_code != kNIMResSuccess)
756 return;
757 typing_event = c_resp.typing_event;
758 }
759 const NIMQChatSendTypingEventResp ToCParam() const {
760 NIMQChatSendTypingEventResp c_resp = {};
761 c_resp.res_code = res_code;
762 c_resp.typing_event = typing_event.ToCParam();
763 return c_resp;
764 }
765};
766
778typedef std::function<void(const QChatRecvTypingEventResp&)> RecvTypingEventCallback;
780typedef std::function<void(const QChatSendTypingEventResp&)> SendTypingEventCallback;
781
783struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRegRecvSystemNotificationCbParam {
786 const NIMQChatRegRecvSystemNotificationCbParam ToCParam() const {
787 static RecvSystemNotificationCallback cb_holder = nullptr;
788 cb_holder = cb;
790 param.cb = [](const NIMQChatRecvSystemNotificationResp& resp) {
791 if (cb_holder)
792 cb_holder(resp);
793 };
794 return param;
795 }
796};
797
799struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRegSystemNotificationUpdatedCbParam {
802 const NIMQChatRegSystemNotificationUpdatedCbParam ToCParam() const {
803 static SystemNotificationUpdatedCallback cb_holder = nullptr;
804 cb_holder = cb;
806 param.cb = [](const NIMQChatSystemNotificationUpdatedResp& resp) {
807 if (cb_holder)
808 cb_holder(resp);
809 };
810 return param;
811 }
812};
813
815struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSendSystemNotificationParam {
822 notification = c_param.notification;
823 cb = [c_param](const QChatSendSystemNotificationResp& response) {
824 auto c_response = response.ToCParam();
825 c_response.user_data = c_param.user_data;
826 c_param.cb(c_response);
827 };
828 }
829 const NIMQChatSendSystemNotificationParam ToCParam() const {
830 auto cb_holder = new SendSystemNotificationCallback(cb);
832 param.user_data = cb_holder;
833 param.cb = [](const NIMQChatSendSystemNotificationResp& resp) {
834 InvokeCallback<SendSystemNotificationCallback, NIMQChatSendSystemNotificationResp>(resp);
835 };
836 param.notification = notification.ToCParam();
837 return param;
838 }
839};
840
842struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatUpdateSystemNotificationParam {
846 uint64_t msg_server_id{0};
852 std::string msg_body;
854 std::string msg_ext;
859 msg_server_id = c_param.msg_server_id;
860 msg_type = c_param.msg_type;
861 status = c_param.status;
862 msg_body = c_param.msg_body;
863 msg_ext = c_param.msg_ext;
864 update_info = c_param.update_info;
865 cb = [c_param](const QChatUpdateSystemNotificationResp& response) {
866 auto c_response = response.ToCParam();
867 c_response.user_data = c_param.user_data;
868 c_param.cb(c_response);
869 };
870 }
871 const NIMQChatUpdateSystemNotificationParam ToCParam() const {
872 auto cb_holder = new UpdateSystemNotificationCallback(cb);
874 param.user_data = cb_holder;
875 param.cb = [](const NIMQChatUpdateSystemNotificationResp& resp) {
876 InvokeCallback<UpdateSystemNotificationCallback, NIMQChatUpdateSystemNotificationResp>(resp);
877 };
878 param.msg_server_id = msg_server_id;
879 param.msg_type = msg_type;
880 param.status = status;
881 param.msg_body = const_cast<char*>(msg_body.c_str());
882 param.msg_ext = const_cast<char*>(msg_ext.c_str());
883 param.update_info = update_info.ToCParam();
884 return param;
885 }
886};
887
889struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatMarkSystemNotificationsReadParam {
891 std::vector<NIMQChatSystemNotificationMarkReadInfo> mark_read_infos{};
894 for (size_t i = 0; i < c_param.mark_read_infos_count; i++) {
895 mark_read_infos.push_back(c_param.mark_read_infos[i]);
896 }
897 cb = [c_param](const QChatMarkSystemNotificationsReadResp& response) {
898 auto c_response = response.ToCParam();
899 c_response.user_data = c_param.user_data;
900 c_param.cb(c_response);
901 };
902 }
903 const NIMQChatMarkSystemNotificationsReadParam ToCParam() const {
904 auto cb_holder = new MarkReadSystemNotificationCallback(cb);
906 param.user_data = cb_holder;
907 param.cb = [](const NIMQChatMarkReadSystemNotificationResp& resp) {
908 InvokeCallback<MarkReadSystemNotificationCallback, NIMQChatMarkReadSystemNotificationResp>(resp);
909 };
910 param.mark_read_infos_count = mark_read_infos.size();
911 param.mark_read_infos = const_cast<NIMQChatSystemNotificationMarkReadInfo*>(mark_read_infos.data());
912 return param;
913 }
914};
915
917struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatRegRecvTypingEventCbParam {
920 const NIMQChatRegRecvTypingEventCbParam ToCParam() const {
921 static RecvTypingEventCallback cb_holder = nullptr;
922 cb_holder = cb;
924 param.cb = [](const NIMQChatRecvTypingEventResp& resp) {
925 if (cb_holder)
926 cb_holder(resp);
927 };
928 return param;
929 }
930};
931
933struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatSendTypingEventParam {
937 QChatTypingEvent typing_event{};
938 QChatSendTypingEventParam() = default;
940 typing_event = c_param.typing_event;
941 cb = [c_callback = c_param.cb, user_data = c_param.user_data](const QChatSendTypingEventResp& resp) {
942 NIMQChatSendTypingEventResp c_response = resp.ToCParam();
943 c_response.user_data = user_data;
944 c_callback(c_response);
945 };
946 }
947 const NIMQChatSendTypingEventParam ToCParam() const {
948 auto cb_holder = new SendTypingEventCallback(cb);
950 param.user_data = cb_holder;
951 param.cb = [](const NIMQChatSendTypingEventResp& resp) {
952 InvokeCallback<SendTypingEventCallback, NIMQChatSendTypingEventResp>(resp);
953 };
954 param.typing_event = typing_event.ToCParam();
955 return param;
956 }
957};
958
959} // namespace nim_qchat
960
961#endif // __NIM_QCHAT_SYSTEM_NOTIFICATION_CPP_DEF_H__
namespace nim_qchat
std::function< void(const QChatUpdateSystemNotificationResp &)> UpdateSystemNotificationCallback
更新系统通知回调
Definition: nim_qchat_system_notification_cpp_def.h:774
std::function< void(const QChatRecvSystemNotificationResp &)> RecvSystemNotificationCallback
接收系统消息回调
Definition: nim_qchat_system_notification_cpp_def.h:768
std::function< void(const QChatRecvTypingEventResp &)> RecvTypingEventCallback
接收圈组正在输入事件回调
Definition: nim_qchat_system_notification_cpp_def.h:778
std::function< void(const QChatMarkSystemNotificationsReadResp &)> MarkReadSystemNotificationCallback
标记系统通知消息已读回调函数
Definition: nim_qchat_system_notification_cpp_def.h:776
std::function< void(const QChatSystemNotificationUpdatedResp &)> SystemNotificationUpdatedCallback
消息更新回调
Definition: nim_qchat_system_notification_cpp_def.h:772
std::function< void(const QChatSendTypingEventResp &)> SendTypingEventCallback
发送圈组正在输入事件回调
Definition: nim_qchat_system_notification_cpp_def.h:780
std::function< void(const QChatSendSystemNotificationResp &)> SendSystemNotificationCallback
发送系统消息回调
Definition: nim_qchat_system_notification_cpp_def.h:770
bool StrListToJsonString(const std::list< std::string > &list, std::string &out)
将一个string类型的list组装成一个Json Array
Definition: nim_json_util.cpp:12
bool JsonArrayStringToList(const std::string &array_str, std::list< std::string > &out)
将一个string类型的Json Array解析成一个string类型的list
Definition: nim_json_util.cpp:54
@ kNIMResSuccess
Definition: nim_chatroom_res_code_def.h:18
NIMQChatQuickCommentOperation
Definition: nim_qchat_message_def.h:68
NIMQChatSystemNotificationType
Definition: nim_qchat_system_notification_def.h:24
@ kNIMQChatSystemNotificationTypeMemberInvite
服务器成员邀请 msg_data: NULL
Definition: nim_qchat_system_notification_def.h:28
@ kNIMQChatSystemNotificationTypeChannelCategoryRemove
删除频道分组 msg_data: NIMQChatSystemNotificationDataChannelCategoryRemove
Definition: nim_qchat_system_notification_def.h:70
@ kNIMQChatSystemNotificationTypeChannelCreate
频道创建 msg_data: NIMQChatSystemNotificationDataChannelCreate
Definition: nim_qchat_system_notification_def.h:56
@ kNIMQChatSystemNotificationTypeMemberRolePermissionChange
频道个人定制权限变更 msg_data: NIMQChatSystemNotificationDataMemberRolePermissionChange
Definition: nim_qchat_system_notification_def.h:86
@ kNIMQChatSystemNotificationTypeServerRoleRemoveMember
服务器身份组移出成员 msg_data: NIMQChatSystemNotificationDataServerRoleRemoveMember
Definition: nim_qchat_system_notification_def.h:80
@ kNIMQChatSystemNotificationTypeServerUpdate
服务器更新 msg_data: NIMQChatSystemNotificationDataServerUpdate
Definition: nim_qchat_system_notification_def.h:40
@ kNIMQChatSystemNotificationTypeMemberUpdate
服务器成员更新 msg_data: NIMQChatSystemNotificationDataMemberUpdate
Definition: nim_qchat_system_notification_def.h:54
@ kNIMQChatSystemNotificationTypeMemberApplyReject
服务器成员申请被拒绝 msg_data: NULL
Definition: nim_qchat_system_notification_def.h:34
@ kNIMQChatSystemNotificationTypeMemberApplyDone
服务器成员申请完成 msg_data: NIMQChatSystemNotificationDataMemberApplyDone
Definition: nim_qchat_system_notification_def.h:46
@ kNIMQChatSystemNotificationTypeWhiteBlackRoleUpdate
频道白/黑名单身份组更新 msg_data: NIMQChatSystemNotificationDataWhiteBlackRoleUpdate
Definition: nim_qchat_system_notification_def.h:62
@ kNIMQChatSystemNotificationTypeChannelCategoryUpdate
更新频道分组 msg_data: NIMQChatSystemNotificationDataChannelCategoryUpdate
Definition: nim_qchat_system_notification_def.h:72
@ kNIMQChatSystemNotificationTypeMemberInviteDone
服务器成员邀请完成 msg_data: NIMQChatSystemNotificationDataMemberInviteDone
Definition: nim_qchat_system_notification_def.h:42
@ kNIMQChatSystemNotificationTypeServerRolePermissionChange
服务器身份组权限变更 msg_data: NIMQChatSystemNotificationDataServerRolePermissionChange
Definition: nim_qchat_system_notification_def.h:82
@ kNIMQChatSystemNotificationTypeServerCreate
服务器创建 msg_data: NIMQChatSystemNotificationDataServerCreate
Definition: nim_qchat_system_notification_def.h:36
@ kNIMQChatSystemNotificationTypeChannelUpdate
频道更新 msg_data: NIMQChatSystemNotificationDataChannelUpdate
Definition: nim_qchat_system_notification_def.h:60
@ kNIMQChatSystemNotificationTypeChannelVisibilityChange
频道对当前用户可见性变更 msg_data: NIMQChatSystemNotificationDataChannelVisibilityChange
Definition: nim_qchat_system_notification_def.h:88
@ kNIMQChatSystemNotificationTypeMemberKick
服务器成员被踢出 msg_data: NIMQChatSystemNotificationDataMemberKick
Definition: nim_qchat_system_notification_def.h:50
@ kNIMQChatSystemNotificationTypeServerEnterLeave
当前用户进入/离开服务器 msg_data: NIMQChatSystemNotificationDataServerEnterLeave
Definition: nim_qchat_system_notification_def.h:90
@ kNIMQChatSystemNotificationTypeMemberInviteReject
服务器成员邀请被拒绝 msg_data: NULL
Definition: nim_qchat_system_notification_def.h:30
@ kNIMQChatSystemNotificationTypeWhiteBlackMembersUpdate
频道白/黑名单成员更新 msg_data: NIMQChatSystemNotificationDataWhiteBlackMembersUpdate
Definition: nim_qchat_system_notification_def.h:64
@ kNIMQChatSystemNotificationTypeChannelCategoryWhiteBlackRoleUpdate
频道分组白/黑名单身份组更新 msg_data: NIMQChatSystemNotificationDataChannelCategoryWhiteBlackRoleUpdate
Definition: nim_qchat_system_notification_def.h:74
@ kNIMQChatSystemNotificationTypeMemberInviteAccept
服务器成员邀请被接受 msg_data: NIMQChatSystemNotificationDataMemberInviteAccept
Definition: nim_qchat_system_notification_def.h:44
@ kNIMQChatSystemNotificationTypeChannelCategoryCreate
创建频道分组 msg_data: NIMQChatSystemNotificationDataChannelCategoryCreate
Definition: nim_qchat_system_notification_def.h:68
@ kNIMQChatSystemNotificationTypeChannelRolePermissionChange
频道定制身份组权限变更 msg_data: NIMQChatSystemNotificationDataChannelRolePermissionChange
Definition: nim_qchat_system_notification_def.h:84
@ kNIMQChatSystemNotificationTypeServerRoleAddMember
服务器身份组加入成员 msg_data: NIMQChatSystemNotificationDataServerRoleAddMember
Definition: nim_qchat_system_notification_def.h:78
@ kNIMQChatSystemNotificationTypeMemberLeave
服务器成员离开 msg_data: NIMQChatSystemNotificationDataMemberLeave
Definition: nim_qchat_system_notification_def.h:52
@ kNIMQChatSystemNotificationTypeMemberApply
服务器成员申请 msg_data: NULL
Definition: nim_qchat_system_notification_def.h:32
@ kNIMQChatSystemNotificationTypeChannelCategoryWhiteBlackMembersUpdate
频道分组白/黑名单成员更新 msg_data: NIMQChatSystemNotificationDataChannelCategoryWhiteBlackMembersUpdate
Definition: nim_qchat_system_notification_def.h:76
@ kNIMQChatSystemNotificationTypeUnkonwn
未知类型系统通知
Definition: nim_qchat_system_notification_def.h:26
@ kNIMQChatSystemNotificationTypeServerJoinByInviteCode
用户通过邀请码加入服务器 msg_data: NIMQChatSystemNotificationDataServerJoinByInviteCode
Definition: nim_qchat_system_notification_def.h:92
@ kNIMQChatSystemNotificationTypeMemberApplyAccept
服务器成员申请被接受 msg_data: NIMQChatSystemNotificationDataMemberApplyAccept
Definition: nim_qchat_system_notification_def.h:48
@ kNIMQChatSystemNotificationTypeQuickCommentChanged
添加或删除快捷评论通知 msg_data: NIMQChatSystemNotificationQuickCommentChanged
Definition: nim_qchat_system_notification_def.h:66
NIMQChatSystemNotificationStatus
Definition: nim_qchat_system_notification_def.h:106
@ kNIMQChatSystemNotificationNormal
普通状态
Definition: nim_qchat_system_notification_def.h:108
Definition: nim_qchat_system_notification_def.h:595
size_t mark_read_infos_count
标记已读系统通知消息列表长度
Definition: nim_qchat_system_notification_def.h:601
void * user_data
自定义用户数据
Definition: nim_qchat_system_notification_def.h:599
NIMQChatSystemNotificationMarkReadInfo * mark_read_infos
标记已读系统通知消息列表
Definition: nim_qchat_system_notification_def.h:603
nim_qchat_mark_read_notification_cb_func cb
标记消息系统通知消息已读异步回调
Definition: nim_qchat_system_notification_def.h:597
uint32_t permission
权限, 见 NIMQChatPermissions 以及自定义权限
Definition: nim_qchat_role_def.h:90
NIMQChatPermissionsOption option
开关
Definition: nim_qchat_role_def.h:92
Definition: nim_qchat_system_notification_def.h:469
bool is_leave
是否为离线通知
Definition: nim_qchat_system_notification_def.h:475
NIMQChatSystemNotification notification
系统通知
Definition: nim_qchat_system_notification_def.h:473
Definition: nim_qchat_system_notification_def.h:512
NIMQChatTypingEvent typing_event
正在输入事件
Definition: nim_qchat_system_notification_def.h:516
Definition: nim_qchat_system_notification_def.h:549
nim_qchat_recv_notification_cb_func cb
接收系统通知异步回调
Definition: nim_qchat_system_notification_def.h:551
Definition: nim_qchat_system_notification_def.h:607
nim_qchat_recv_typing_event_cb_func cb
接收正在输入事件异步回调
Definition: nim_qchat_system_notification_def.h:609
Definition: nim_qchat_system_notification_def.h:557
nim_qchat_notification_updated_cb_func cb
系统通知更新异步回调
Definition: nim_qchat_system_notification_def.h:559
Definition: nim_qchat_system_notification_def.h:565
nim_qchat_send_notification_cb_func cb
发送系统通知异步回调
Definition: nim_qchat_system_notification_def.h:567
void * user_data
自定义用户数据
Definition: nim_qchat_system_notification_def.h:569
NIMQChatSystemNotification notification
系统通知体
Definition: nim_qchat_system_notification_def.h:571
Definition: nim_qchat_system_notification_def.h:489
NIMQChatSystemNotification notification
系统通知
Definition: nim_qchat_system_notification_def.h:495
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_system_notification_def.h:491
Definition: nim_qchat_system_notification_def.h:615
void * user_data
自定义用户数据
Definition: nim_qchat_system_notification_def.h:619
nim_qchat_send_typing_event_cb_func cb
发送正在输入事件异步回调
Definition: nim_qchat_system_notification_def.h:617
NIMQChatTypingEvent typing_event
正在输入事件
Definition: nim_qchat_system_notification_def.h:621
Definition: nim_qchat_system_notification_def.h:520
void * user_data
自定义用户数据
Definition: nim_qchat_system_notification_def.h:524
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_system_notification_def.h:522
NIMQChatTypingEvent typing_event
正在输入事件
Definition: nim_qchat_system_notification_def.h:526
Definition: nim_qchat_system_notification_def.h:345
NIMQChatChannelCategoryInfo category_info
频道分组信息
Definition: nim_qchat_system_notification_def.h:347
Definition: nim_qchat_system_notification_def.h:351
uint64_t category_id
频道分组id
Definition: nim_qchat_system_notification_def.h:353
Definition: nim_qchat_system_notification_def.h:374
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_def.h:376
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_def.h:384
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_def.h:386
size_t accids_count
被踢人id列表长度
Definition: nim_qchat_system_notification_def.h:382
uint64_t category_id
频道分组ID
Definition: nim_qchat_system_notification_def.h:378
char ** accids
被踢人id列表
Definition: nim_qchat_system_notification_def.h:380
Definition: nim_qchat_system_notification_def.h:360
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_def.h:362
uint64_t category_id
频道分组ID
Definition: nim_qchat_system_notification_def.h:364
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_def.h:368
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_def.h:366
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_def.h:370
Definition: nim_qchat_system_notification_def.h:225
NIMQChatChannelInfo channel_info
圈组频道信息
Definition: nim_qchat_system_notification_def.h:227
Definition: nim_qchat_system_notification_def.h:417
size_t permissions_count
变更的权限列表长度
Definition: nim_qchat_system_notification_def.h:429
uint64_t channel_id
频道id
Definition: nim_qchat_system_notification_def.h:421
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_def.h:419
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_def.h:425
NIMQChatPermissionGroup * permissions
变更的权限列表
Definition: nim_qchat_system_notification_def.h:427
uint64_t parent_role_id
继承的服务器身份组 ID
Definition: nim_qchat_system_notification_def.h:423
Definition: nim_qchat_system_notification_def.h:231
NIMQChatChannelInfo channel_info
圈组频道信息
Definition: nim_qchat_system_notification_def.h:233
Definition: nim_qchat_system_notification_def.h:447
bool visible
频道可见性
Definition: nim_qchat_system_notification_def.h:449
Definition: nim_qchat_system_notification_def.h:265
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:271
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:267
char * apply_accid
申请的accid
Definition: nim_qchat_system_notification_def.h:269
Definition: nim_qchat_system_notification_def.h:257
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:261
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:259
Definition: nim_qchat_system_notification_def.h:247
char * invite_accid
邀请的accid
Definition: nim_qchat_system_notification_def.h:251
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:253
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:249
Definition: nim_qchat_system_notification_def.h:237
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:243
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:239
char * invite_accids
邀请的accid列表 json array
Definition: nim_qchat_system_notification_def.h:241
Definition: nim_qchat_system_notification_def.h:275
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:277
char * kick_accids
被踢的accid列表 json array
Definition: nim_qchat_system_notification_def.h:279
Definition: nim_qchat_system_notification_def.h:283
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:285
Definition: nim_qchat_system_notification_def.h:433
size_t permissions_count
变更的权限列表长度
Definition: nim_qchat_system_notification_def.h:443
char * accid
accid
Definition: nim_qchat_system_notification_def.h:439
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_def.h:435
NIMQChatPermissionGroup * permissions
变更的权限列表
Definition: nim_qchat_system_notification_def.h:441
uint64_t channel_id
频道id
Definition: nim_qchat_system_notification_def.h:437
Definition: nim_qchat_system_notification_def.h:289
NIMQChatMemberInfo member_info
圈组成员信息
Definition: nim_qchat_system_notification_def.h:291
Definition: nim_qchat_system_notification_def.h:325
NIMQChatQuickCommentOperation operate_type
操作类型
Definition: nim_qchat_system_notification_def.h:339
uint64_t msg_server_id
消息id
Definition: nim_qchat_system_notification_def.h:333
char * msg_sender_accid
发送者accid
Definition: nim_qchat_system_notification_def.h:331
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_def.h:327
uint64_t msg_timestamp
消息时间戳
Definition: nim_qchat_system_notification_def.h:335
uint64_t channel_id
频道ID
Definition: nim_qchat_system_notification_def.h:329
uint64_t type
消息类型
Definition: nim_qchat_system_notification_def.h:337
char * operator_accid
操作者
Definition: nim_qchat_system_notification_def.h:341
Definition: nim_qchat_system_notification_def.h:201
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:203
Definition: nim_qchat_system_notification_def.h:207
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:209
Definition: nim_qchat_system_notification_def.h:213
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:215
Definition: nim_qchat_system_notification_def.h:453
bool is_enter
进入/离开
Definition: nim_qchat_system_notification_def.h:455
Definition: nim_qchat_system_notification_def.h:189
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:191
Definition: nim_qchat_system_notification_def.h:195
uint64_t request_id
请求ID
Definition: nim_qchat_system_notification_def.h:197
Definition: nim_qchat_system_notification_def.h:459
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:461
uint64_t request_id
请求id
Definition: nim_qchat_system_notification_def.h:463
char * invite_code
邀请码
Definition: nim_qchat_system_notification_def.h:465
Definition: nim_qchat_system_notification_def.h:390
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_def.h:392
size_t accids_count
accid列表长度
Definition: nim_qchat_system_notification_def.h:398
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_def.h:394
char ** accids
accid列表
Definition: nim_qchat_system_notification_def.h:396
Definition: nim_qchat_system_notification_def.h:405
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_def.h:409
size_t permissions_count
变更的权限列表长度
Definition: nim_qchat_system_notification_def.h:413
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_def.h:407
NIMQChatPermissionGroup * permissions
变更的权限列表
Definition: nim_qchat_system_notification_def.h:411
Definition: nim_qchat_system_notification_def.h:219
NIMQChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_def.h:221
Definition: nim_qchat_system_notification_def.h:309
uint64_t channel_id
频道ID
Definition: nim_qchat_system_notification_def.h:313
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_def.h:319
char ** accids
被踢人id列表
Definition: nim_qchat_system_notification_def.h:315
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_def.h:321
size_t accids_count
被踢人id列表长度
Definition: nim_qchat_system_notification_def.h:317
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_def.h:311
Definition: nim_qchat_system_notification_def.h:295
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_def.h:297
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_def.h:301
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_def.h:303
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_def.h:305
uint64_t channel_id
频道ID
Definition: nim_qchat_system_notification_def.h:299
Definition: nim_qchat_system_notification_def.h:113
char * msg_attach
消息附件
Definition: nim_qchat_system_notification_def.h:123
bool history_enable
false 或者 true, 是否存离线,只有 to_accids 不为空,才能设置为存离线,默认 false
Definition: nim_qchat_system_notification_def.h:131
NIMQChatSystemNotificationType msg_type
系统通知类型
Definition: nim_qchat_system_notification_def.h:119
char * from_device_id
消息发送者的设备id
Definition: nim_qchat_system_notification_def.h:158
char * to_accids
通知接受者账号列表, json array
Definition: nim_qchat_system_notification_def.h:129
char * from_accid
消息发送者的accid
Definition: nim_qchat_system_notification_def.h:154
bool resend_flag
重发标记,false:不是重发,true:是重发
Definition: nim_qchat_system_notification_def.h:127
char * msg_ext
消息扩展字段
Definition: nim_qchat_system_notification_def.h:125
bool need_push_nick
是否需要推送昵称, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_system_notification_def.h:141
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_system_notification_def.h:162
char * push_payload
自定义的推送属性,限制json
Definition: nim_qchat_system_notification_def.h:133
char * callback_ext
回调扩展字段
Definition: nim_qchat_system_notification_def.h:168
char * msg_id
消息id
Definition: nim_qchat_system_notification_def.h:150
uint64_t channel_id
消息所属的channel id
Definition: nim_qchat_system_notification_def.h:117
NIMQChatSystemNotificationStatus status
消息状态
Definition: nim_qchat_system_notification_def.h:148
uint32_t from_client_type
消息发送者的客户端类型
Definition: nim_qchat_system_notification_def.h:156
bool need_badge
是否需要消息计数, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_system_notification_def.h:139
uint64_t update_timestamp
消息更新时间戳
Definition: nim_qchat_system_notification_def.h:164
char * msg_body
消息内容
Definition: nim_qchat_system_notification_def.h:121
char * from_nick
消息发送者的昵称
Definition: nim_qchat_system_notification_def.h:160
char * env
环境变量,用户可以根据不同的env配置不同的抄送和回调地址
Definition: nim_qchat_system_notification_def.h:145
bool route_enable
是否需要抄送, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_system_notification_def.h:143
bool push_enable
是否需要推送, false: 不需要, true: 需要, 默认 false
Definition: nim_qchat_system_notification_def.h:137
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_system_notification_def.h:152
uint64_t server_id
消息所属的server id
Definition: nim_qchat_system_notification_def.h:115
void * msg_data
系统通知数据, 根据不同的系统通知类型,数据结构不同
Definition: nim_qchat_system_notification_def.h:166
char * push_content
自定义的推送内容
Definition: nim_qchat_system_notification_def.h:135
Definition: nim_qchat_system_notification_def.h:98
Definition: nim_qchat_system_notification_def.h:479
NIMQChatSystemNotification notification
系统通知
Definition: nim_qchat_system_notification_def.h:485
NIMQChatMessageUpdateInfo update_info
消息更新信息
Definition: nim_qchat_system_notification_def.h:483
Definition: nim_qchat_system_notification_def.h:172
char * from_nick
事件发送者的昵称
Definition: nim_qchat_system_notification_def.h:183
char * extension
事件扩展字段
Definition: nim_qchat_system_notification_def.h:178
uint64_t channel_id
事件所属的channel id
Definition: nim_qchat_system_notification_def.h:176
uint64_t timestamp
事件发送时间戳
Definition: nim_qchat_system_notification_def.h:185
uint64_t server_id
事件所属的server id
Definition: nim_qchat_system_notification_def.h:174
char * from_accid
事件发送者的accid
Definition: nim_qchat_system_notification_def.h:181
Definition: nim_qchat_system_notification_def.h:575
NIMQChatSystemNotificationType msg_type
系统通知类型
Definition: nim_qchat_system_notification_def.h:583
void * user_data
自定义用户数据
Definition: nim_qchat_system_notification_def.h:579
NIMQChatSystemNotificationStatus status
消息状态
Definition: nim_qchat_system_notification_def.h:585
nim_qchat_update_notification_cb_func cb
发送系统通知异步回调
Definition: nim_qchat_system_notification_def.h:577
char * msg_body
消息内容
Definition: nim_qchat_system_notification_def.h:587
NIMQChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_system_notification_def.h:591
uint64_t msg_server_id
系统通知服务器ID
Definition: nim_qchat_system_notification_def.h:581
char * msg_ext
消息扩展字段
Definition: nim_qchat_system_notification_def.h:589
Definition: nim_qchat_system_notification_def.h:499
NIMQChatSystemNotification notification
系统通知
Definition: nim_qchat_system_notification_def.h:505
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_system_notification_def.h:501
Definition: nim_qchat_public_cpp_def.h:40
Definition: nim_qchat_channel_cpp_def.h:156
Definition: nim_qchat_channel_cpp_def.h:24
Definition: nim_qchat_system_notification_cpp_def.h:889
Definition: nim_qchat_member_cpp_def.h:20
Definition: nim_qchat_message_cpp_def.h:344
Definition: nim_qchat_system_notification_cpp_def.h:663
Definition: nim_qchat_system_notification_cpp_def.h:739
Definition: nim_qchat_system_notification_cpp_def.h:783
Definition: nim_qchat_system_notification_cpp_def.h:917
Definition: nim_qchat_system_notification_cpp_def.h:799
Definition: nim_qchat_system_notification_cpp_def.h:815
Definition: nim_qchat_system_notification_cpp_def.h:691
Definition: nim_qchat_system_notification_cpp_def.h:933
Definition: nim_qchat_system_notification_cpp_def.h:747
Definition: nim_qchat_server_cpp_def.h:22
Definition: nim_qchat_system_notification_cpp_def.h:23
Definition: nim_qchat_system_notification_cpp_def.h:263
QChatChannelCategoryInfo category_info
圈组频道分组信息
Definition: nim_qchat_system_notification_cpp_def.h:265
Definition: nim_qchat_system_notification_cpp_def.h:273
uint64_t category_id
圈组频道分组ID
Definition: nim_qchat_system_notification_cpp_def.h:275
Definition: nim_qchat_system_notification_cpp_def.h:308
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_cpp_def.h:316
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_cpp_def.h:310
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_cpp_def.h:318
uint64_t category_id
频道分组ID
Definition: nim_qchat_system_notification_cpp_def.h:312
std::list< std::string > accids
成员列表
Definition: nim_qchat_system_notification_cpp_def.h:314
Definition: nim_qchat_system_notification_cpp_def.h:286
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_cpp_def.h:294
uint64_t role_id
身份组ID
Definition: nim_qchat_system_notification_cpp_def.h:292
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_cpp_def.h:288
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_cpp_def.h:296
uint64_t category_id
频道分组ID
Definition: nim_qchat_system_notification_cpp_def.h:290
Definition: nim_qchat_system_notification_cpp_def.h:78
QChatChannelInfo channel_info
圈组频道信息
Definition: nim_qchat_system_notification_cpp_def.h:80
Definition: nim_qchat_system_notification_cpp_def.h:372
uint64_t parent_role_id
继承的服务器身份组 ID
Definition: nim_qchat_system_notification_cpp_def.h:378
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_cpp_def.h:374
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_cpp_def.h:380
uint64_t channel_id
频道id
Definition: nim_qchat_system_notification_cpp_def.h:376
Definition: nim_qchat_system_notification_cpp_def.h:86
QChatChannelInfo channel_info
圈组频道信息
Definition: nim_qchat_system_notification_cpp_def.h:88
Definition: nim_qchat_system_notification_cpp_def.h:421
Definition: nim_qchat_system_notification_cpp_def.h:141
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:143
std::string apply_accid
申请的accid
Definition: nim_qchat_system_notification_cpp_def.h:145
Definition: nim_qchat_system_notification_cpp_def.h:128
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:130
Definition: nim_qchat_system_notification_cpp_def.h:112
std::string invite_accid
邀请的accid
Definition: nim_qchat_system_notification_cpp_def.h:116
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:114
Definition: nim_qchat_system_notification_cpp_def.h:94
std::list< std::string > invite_accids
邀请的accid列表
Definition: nim_qchat_system_notification_cpp_def.h:98
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:96
Definition: nim_qchat_system_notification_cpp_def.h:157
std::list< std::string > kick_accids
被踢的accid列表
Definition: nim_qchat_system_notification_cpp_def.h:161
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:159
Definition: nim_qchat_system_notification_cpp_def.h:171
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:173
Definition: nim_qchat_system_notification_cpp_def.h:398
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_cpp_def.h:400
uint64_t channel_id
频道id
Definition: nim_qchat_system_notification_cpp_def.h:402
std::string accid
accid
Definition: nim_qchat_system_notification_cpp_def.h:404
Definition: nim_qchat_system_notification_cpp_def.h:179
QChatMemberInfo member_info
圈组成员信息
Definition: nim_qchat_system_notification_cpp_def.h:181
Definition: nim_qchat_system_notification_cpp_def.h:232
uint64_t msg_server_id
消息id
Definition: nim_qchat_system_notification_cpp_def.h:240
uint64_t type
消息类型
Definition: nim_qchat_system_notification_cpp_def.h:244
std::string operator_accid
操作者
Definition: nim_qchat_system_notification_cpp_def.h:248
NIMQChatQuickCommentOperation operate_type
操作类型
Definition: nim_qchat_system_notification_cpp_def.h:246
std::string msg_sender_accid
发送者accid
Definition: nim_qchat_system_notification_cpp_def.h:238
uint64_t msg_timestamp
消息时间戳
Definition: nim_qchat_system_notification_cpp_def.h:242
Definition: nim_qchat_system_notification_cpp_def.h:46
Definition: nim_qchat_system_notification_cpp_def.h:54
Definition: nim_qchat_system_notification_cpp_def.h:62
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:64
Definition: nim_qchat_system_notification_cpp_def.h:431
Definition: nim_qchat_system_notification_cpp_def.h:28
Definition: nim_qchat_system_notification_cpp_def.h:36
Definition: nim_qchat_system_notification_cpp_def.h:439
std::string invite_code
邀请码
Definition: nim_qchat_system_notification_cpp_def.h:445
Definition: nim_qchat_system_notification_cpp_def.h:332
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_cpp_def.h:334
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_cpp_def.h:336
std::list< std::string > accids
accid列表
Definition: nim_qchat_system_notification_cpp_def.h:338
Definition: nim_qchat_system_notification_cpp_def.h:352
uint64_t server_id
服务器id
Definition: nim_qchat_system_notification_cpp_def.h:354
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_cpp_def.h:356
Definition: nim_qchat_system_notification_cpp_def.h:70
QChatServerInfo server_info
圈组服务器信息
Definition: nim_qchat_system_notification_cpp_def.h:72
Definition: nim_qchat_system_notification_cpp_def.h:209
std::list< std::string > accids
成员列表
Definition: nim_qchat_system_notification_cpp_def.h:215
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_cpp_def.h:217
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_cpp_def.h:219
uint64_t channel_id
频道ID
Definition: nim_qchat_system_notification_cpp_def.h:213
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_cpp_def.h:211
Definition: nim_qchat_system_notification_cpp_def.h:187
NIMQChatChannelWhiteBlackOpeType ope_type
操作类型
Definition: nim_qchat_system_notification_cpp_def.h:197
uint64_t channel_id
频道ID
Definition: nim_qchat_system_notification_cpp_def.h:191
NIMQChatChannelWhiteBlackType type
白/黑名单类型
Definition: nim_qchat_system_notification_cpp_def.h:195
uint64_t server_id
服务器ID
Definition: nim_qchat_system_notification_cpp_def.h:189
uint64_t role_id
身份组id
Definition: nim_qchat_system_notification_cpp_def.h:193
Definition: nim_qchat_system_notification_cpp_def.h:495
Definition: nim_qchat_system_notification_cpp_def.h:676
Definition: nim_qchat_system_notification_cpp_def.h:627
Definition: nim_qchat_system_notification_cpp_def.h:842
std::string msg_ext
消息扩展字段
Definition: nim_qchat_system_notification_cpp_def.h:854
QChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_system_notification_cpp_def.h:856
std::string msg_body
消息内容
Definition: nim_qchat_system_notification_cpp_def.h:852
Definition: nim_qchat_system_notification_cpp_def.h:712