Go to the documentation of this file.
7 #ifndef _NIM_SDK_CPP_SESSION_HELPER_H_
8 #define _NIM_SDK_CPP_SESSION_HELPER_H_
13 #include "nim_define_include.h"
15 #include "nim_wrapper_util/nim_json_util.h"
33 , type_(NIMSessionType::kNIMSessionTypeP2P)
39 static void ToJsonObject(
const StickTopSessionInfo& stickTopSessionInfo, nim_cpp_wrapper_util::Json::Value& value);
65 , type_(kNIMSessionTypeP2P)
66 , command_(kNIMSessionCommandAdd)
67 , msg_type_(kNIMMessageTypeUnknown)
68 , msg_status_(kNIMMsgLogStatusNone)
69 , msg_sub_status_(kNIMMsgLogSubStatusNone)
70 , last_updated_msg_(true)
71 , placed_on_top_(false)
72 , is_robot_session_(false) {}
74 static std::string ToJsonString(
const SessionData& sessionData);
75 static void ToJsonObject(
const SessionData& sessionData, nim_cpp_wrapper_util::Json::Value& value);
93 static void ToJsonObject(
const StickTopSession& stick_session, nim_cpp_wrapper_util::Json::Value& value);
118 NIM_SDK_CPPWRAPPER_DLL_API
void ParseSession(
const nim_cpp_wrapper_util::Json::Value& session_json,
SessionData& session);
154 #endif //_NIM_SDK_CPP_SESSION_HELPER_H_
NIMSessionType type_
Definition: nim_session_helper.h:25
std::string msg_content_
Definition: nim_session_helper.h:52
bool placed_on_top_
Definition: nim_session_helper.h:57
std::string id_
Definition: nim_session_helper.h:24
std::string ext_
Definition: nim_session_helper.h:26
NIM_SDK_CPPWRAPPER_DLL_API bool ParseStickTopSessionList(const std::string &sessions_json, StickTopSessionList &stick_top_session_list)
解析置顶会话列表信息
int64_t msg_timetag_
Definition: nim_session_helper.h:50
NIM_SDK_CPPWRAPPER_DLL_API bool ParseStickTopSession(const std::string &session_json, StickTopSession &session)
解析置顶会话信息
NIMSessionType type_
Definition: nim_session_helper.h:98
int count_
Definition: nim_session_helper.h:80
NIMMsgLogSubStatus msg_sub_status_
Definition: nim_session_helper.h:55
Definition: nim_session_helper.h:96
std::string msg_id_
Definition: nim_session_helper.h:48
StickTopSessionInfo()
Definition: nim_session_helper.h:30
NIM_SDK_CPPWRAPPER_DLL_API bool ParseSessionList(const std::string &sessions_json, SessionDataList &session_list)
解析会话列表信息
int unread_count_
Definition: nim_session_helper.h:81
NIMMessageType msg_type_
Definition: nim_session_helper.h:51
StickTopSessionInfo stick_top_info_
Definition: nim_session_helper.h:90
NIMSessionCommand command_
Definition: nim_session_helper.h:47
会话列表数据
Definition: nim_session_helper.h:79
std::string id_
Definition: nim_session_helper.h:97
std::string extend_data_
Definition: nim_session_helper.h:58
bool last_updated_msg_
Definition: nim_session_helper.h:56
std::string msg_sender_accid_
Definition: nim_session_helper.h:49
std::list< SessionData > sessions_
Definition: nim_session_helper.h:82
std::list< StickTopSession > sessions_
Definition: nim_session_helper.h:101
StickTopSessionInfo stick_top_info_
Definition: nim_session_helper.h:60
std::string msg_attach_
Definition: nim_session_helper.h:53
NIM_SDK_CPPWRAPPER_DLL_API bool ParseSession(const std::string &session_json, SessionData &session)
解析会话信息
会话数据
Definition: nim_session_helper.h:22
SessionData()
Definition: nim_session_helper.h:62
int unread_count_
Definition: nim_session_helper.h:46
int64_t update_time_
Definition: nim_session_helper.h:28
NIMMsgLogStatus msg_status_
Definition: nim_session_helper.h:54
int64_t create_time_
Definition: nim_session_helper.h:27
bool top_
Definition: nim_session_helper.h:23
bool is_robot_session_
Definition: nim_session_helper.h:59
std::string id_
Definition: nim_session_helper.h:44
Definition: nim_session_helper.h:89
Definition: nim_session_helper.h:100
NIMSessionType type_
Definition: nim_session_helper.h:45
SessionData session_data_
Definition: nim_session_helper.h:91
会话数据
Definition: nim_session_helper.h:43