NIM SDK API  8.5.0
nim_msg_helper.h
Go to the documentation of this file.
1 
7 #ifndef _NIM_SDK_CPP_MESSAGE_HELPER_H_
8 #define _NIM_SDK_CPP_MESSAGE_HELPER_H_
9 
10 #include <functional>
11 #include <list>
12 #include <string>
13 #include "nim_define_include.h"
14 #include "nim_cpp_wrapper/nim_sdk_cpp_wrapper.h"
19 namespace nim {
20 
22 struct NIM_SDK_CPPWRAPPER_DLL_API SendMessageArc {
23  std::string talk_id_;
24  std::string msg_id_;
25  NIMResCode rescode_;
26  int64_t msg_timetag_;
28 };
29 
31 struct NIM_SDK_CPPWRAPPER_DLL_API RecallMsgNotify {
32  std::string from_id_;
33  std::string to_id_;
34  std::string msg_id_;
35  std::string notify_;
36  std::string from_nick_;
37  std::string operator_id_;
38  NIMSessionType session_type_;
39  int64_t notify_timetag_;
40  NIMMessageFeature notify_feature_;
42  int64_t msglog_timetag_;
43  std::string attach_;
44  std::string callback_ext_;
46  : notify_timetag_(0)
47  , msglog_exist_(true)
48  , msglog_timetag_(0) {}
49 };
50 
58 NIM_SDK_CPPWRAPPER_DLL_API bool ParseRecallMsgNotify(const std::string json_value, RecallMsgNotify& notify);
59 
66 NIM_SDK_CPPWRAPPER_DLL_API bool ParseRecallMsgNotify(const std::string& notify_json, std::list<RecallMsgNotify>& notifys);
67 
74 NIM_SDK_CPPWRAPPER_DLL_API bool ParseSendMessageAck(const std::string& arc_json, SendMessageArc& arc);
75 
76 } // namespace nim
77 
78 #endif //_NIM_SDK_CPP_MESSAGE_HELPER_H_
nim::RecallMsgNotify::from_nick_
std::string from_nick_
Definition: nim_msg_helper.h:36
nim::RecallMsgNotify::msglog_exist_
bool msglog_exist_
Definition: nim_msg_helper.h:41
nim::SendMessageArc::third_party_callback_ext_
std::string third_party_callback_ext_
Definition: nim_msg_helper.h:27
nim::ParseSendMessageAck
NIM_SDK_CPPWRAPPER_DLL_API bool ParseSendMessageAck(const std::string &arc_json, SendMessageArc &arc)
解析发送消息回执
nim::ParseRecallMsgNotify
NIM_SDK_CPPWRAPPER_DLL_API bool ParseRecallMsgNotify(const std::string json_value, RecallMsgNotify &notify)
解析消息撤回通知
nim::RecallMsgNotify
消息撤回通知
Definition: nim_msg_helper.h:31
nim::SendMessageArc::msg_id_
std::string msg_id_
Definition: nim_msg_helper.h:24
nim::RecallMsgNotify::notify_
std::string notify_
Definition: nim_msg_helper.h:35
nim::RecallMsgNotify::attach_
std::string attach_
Definition: nim_msg_helper.h:43
nim::RecallMsgNotify::msglog_timetag_
int64_t msglog_timetag_
Definition: nim_msg_helper.h:42
nim
namespace nim
nim::SendMessageArc::talk_id_
std::string talk_id_
Definition: nim_msg_helper.h:23
nim::SendMessageArc::rescode_
NIMResCode rescode_
Definition: nim_msg_helper.h:25
nim::SendMessageArc::msg_timetag_
int64_t msg_timetag_
Definition: nim_msg_helper.h:26
nim::RecallMsgNotify::notify_timetag_
int64_t notify_timetag_
Definition: nim_msg_helper.h:39
nim::RecallMsgNotify::callback_ext_
std::string callback_ext_
Definition: nim_msg_helper.h:44
nim::RecallMsgNotify::to_id_
std::string to_id_
Definition: nim_msg_helper.h:33
nim::RecallMsgNotify::notify_feature_
NIMMessageFeature notify_feature_
Definition: nim_msg_helper.h:40
nim::SendMessageArc
发送消息回执
Definition: nim_msg_helper.h:22
nim::RecallMsgNotify::from_id_
std::string from_id_
Definition: nim_msg_helper.h:32
nim::RecallMsgNotify::msg_id_
std::string msg_id_
Definition: nim_msg_helper.h:34
nim::RecallMsgNotify::operator_id_
std::string operator_id_
Definition: nim_msg_helper.h:37
nim::RecallMsgNotify::session_type_
NIMSessionType session_type_
Definition: nim_msg_helper.h:38