Go to the documentation of this file.
7 #ifndef _NIM_SDK_CPP_MESSAGE_HELPER_H_
8 #define _NIM_SDK_CPP_MESSAGE_HELPER_H_
14 #include "nim_define_include.h"
15 #include "nim_wrapper_util/json/json.h"
32 std::string ToJsonString()
const {
33 nim_cpp_wrapper_util::Json::Value values;
34 values[kNIMMsgKeyLocalTalkId] = talk_id_;
35 values[kNIMSendAckKeyMsgId] = msg_id_;
36 values[kNIMSendAckKeyRescode] = rescode_;
37 values[kNIMSendAckKeyTimetag] = msg_timetag_;
38 values[kNIMSendAckKeyCallbackExt] = third_party_callback_ext_;
39 values[kNIMSendAckKeyAntiSpamRes] = anti_spam_res_;
40 return nim_cpp_wrapper_util::Json::FastWriter().write(values);
62 , msglog_timetag_(0) {}
72 NIM_SDK_CPPWRAPPER_DLL_API
bool ParseRecallMsgNotify(
const std::string json_value, RecallMsgNotify& notify);
80 NIM_SDK_CPPWRAPPER_DLL_API
bool ParseRecallMsgNotify(
const std::string& notify_json, std::list<RecallMsgNotify>& notifys);
88 NIM_SDK_CPPWRAPPER_DLL_API
bool ParseSendMessageAck(
const std::string& arc_json, SendMessageArc& arc);
92 #endif //_NIM_SDK_CPP_MESSAGE_HELPER_H_
std::string from_nick_
Definition: nim_msg_helper.h:50
bool msglog_exist_
Definition: nim_msg_helper.h:55
std::string third_party_callback_ext_
Definition: nim_msg_helper.h:29
NIM_SDK_CPPWRAPPER_DLL_API bool ParseSendMessageAck(const std::string &arc_json, SendMessageArc &arc)
解析发送消息回执
NIM_SDK_CPPWRAPPER_DLL_API bool ParseRecallMsgNotify(const std::string json_value, RecallMsgNotify ¬ify)
解析消息撤回通知
std::string anti_spam_res_
Definition: nim_msg_helper.h:30
消息撤回通知
Definition: nim_msg_helper.h:45
std::string msg_id_
Definition: nim_msg_helper.h:26
std::string notify_
Definition: nim_msg_helper.h:49
std::string attach_
Definition: nim_msg_helper.h:57
int64_t msglog_timetag_
Definition: nim_msg_helper.h:56
std::string talk_id_
Definition: nim_msg_helper.h:25
NIMResCode rescode_
Definition: nim_msg_helper.h:27
int64_t msg_timetag_
Definition: nim_msg_helper.h:28
int64_t notify_timetag_
Definition: nim_msg_helper.h:53
std::string callback_ext_
Definition: nim_msg_helper.h:58
std::string to_id_
Definition: nim_msg_helper.h:47
NIMMessageFeature notify_feature_
Definition: nim_msg_helper.h:54
发送消息回执
Definition: nim_msg_helper.h:24
std::string from_id_
Definition: nim_msg_helper.h:46
std::string msg_id_
Definition: nim_msg_helper.h:48
std::string operator_id_
Definition: nim_msg_helper.h:51
NIMSessionType session_type_
Definition: nim_msg_helper.h:52