7#ifndef _NIM_SDK_CPP_SESSION_H_
8#define _NIM_SDK_CPP_SESSION_H_
40 typedef std::function<void(
NIMResCode,
const std::list<SessionData>& session_data_list,
int unread_count)>
47 typedef std::function<void(
const std::string& session_id, nim::NIMSessionType)>
54 typedef std::function<void(
NIMResCode,
const std::string& session_id, nim::NIMSessionType)>
65 typedef std::function<void(
NIMResCode,
const std::list<SessionRoamMsgHasMoreTagInfo>& info_list)>
72 typedef std::function<void(
NIMResCode, nim::NIMSessionType,
const std::string& session_id)>
88 static void RegChangeCb(
const ChangeCallback& cb,
const std::string& json_extension =
"");
99 static void RegBadgeCountCb(
const BadgeCountCallback& cb,
const std::string& json_extension =
"");
108 static void QueryLastFewSessionAsync(
int limit,
const QuerySessionListCallabck& cb,
const std::string& json_extension =
"");
130 static void QueryAllRecentSessionAsnc(
NIMMessageType last_msg_excluded_type,
132 const std::string& json_extension =
"");
144 static void QueryAllRecentSessionAsyncEx(
const std::list<NIMMessageType>& last_msg_excluded_type,
146 const std::string& json_extension =
"");
162 static bool DeleteRecentSession(nim::NIMSessionType to_type,
163 const std::string&
id,
165 const std::string& json_extension =
"");
181 static bool DeleteRecentSessionEx(nim::NIMSessionType to_type,
const std::string&
id,
const DeleteRecentSessionCallabck& cb,
bool delete_roaming);
197 static bool DeleteSessionRoamingMessage(nim::NIMSessionType to_type,
198 const std::string&
id,
200 const std::string& json_extension =
"");
227 static bool SetUnreadCountZeroAsync(nim::NIMSessionType to_type,
228 const std::string&
id,
230 const std::string& json_extension =
"");
247 static bool SetMultiUnreadCountZeroAsync(
bool super_team,
248 const std::list<MultiUnreadCountZeroInfo>& unread_zero_info_list,
268 const std::string&
id,
271 const std::string& json_extension =
"");
290 const std::string&
id,
291 const std::string& data,
293 const std::string& json_extension =
"");
321 const std::string&
id,
323 const std::string& json_extension =
"");
370 static void SetToStickTopSession(
const std::string& session_id,
371 nim::NIMSessionType to_type,
372 const std::string& ext,
389 static void UpdateToStickTopSession(
const std::string& session_id,
390 nim::NIMSessionType to_type,
391 const std::string& ext,
418 static void QueryHasmoreRoammsg(
const std::string& session_id, nim::NIMSessionType to_type,
const QueryHasmoreRoammsgCallback& cb);
448 static void UnregSessionCb();
会话列表管理功能,主要包括查询会话列表、删除会话列表等功能
Definition: nim_cpp_session.h:26
ChangeCallback DeleteAllRecentSessionCallabck
删除全部会话
Definition: nim_cpp_session.h:37
ChangeCallback SetUnreadCountZeroCallback
会话未读消息数清零回调
Definition: nim_cpp_session.h:39
std::function< void(const std::string &session_id, nim::NIMSessionType)> CancelStickTopSessionNotifyCallback
取消置顶会话通知回调
Definition: nim_cpp_session.h:49
ChangeCallback DeleteRecentSessionCallabck
删除会话回调
Definition: nim_cpp_session.h:35
std::function< void(int, const SessionDataList &)> QuerySessionListCallabck
查询会话列表回调
Definition: nim_cpp_session.h:33
std::function< void(const StickTopSession &)> UpdateStickTopSessionNotifyCallback
更新置顶会话通知回调
Definition: nim_cpp_session.h:51
std::function< int32_t(const std::string &)> BadgeCountCallback
app角标未读计数通知回调 (仅iOS有效)
Definition: nim_cpp_session.h:29
std::function< void(NIMResCode, nim::NIMSessionType, const std::string &session_id)> DeleteSessionRoammsgCallback
删除会话是漫游消息未拉取信息回调
Definition: nim_cpp_session.h:74
std::function< void(NIMResCode, const std::string &session_id, nim::NIMSessionType)> CancelStickTopSessionCallback
取消置顶会话回调
Definition: nim_cpp_session.h:56
std::function< void(NIMResCode, const std::list< SessionData > &session_data_list, int unread_count)> SetMultiUnreadCountZeroCallback
多条会话未读消息数清零回调
Definition: nim_cpp_session.h:42
std::function< void(NIMResCode, const StickTopSession &)> UpdateStickTopSessionCallback
更新置顶会话回调
Definition: nim_cpp_session.h:58
std::function< void(NIMResCode)> UpdateHasmoreRoammsgCallback
更新会话是漫游消息未拉取信息回调
Definition: nim_cpp_session.h:69
std::function< void(NIMResCode, const std::list< SessionRoamMsgHasMoreTagInfo > &info_list)> QueryAllHasmoreRoammsgCallback
查询所有“漫游消息未拉取完全”的会话的回调
Definition: nim_cpp_session.h:67
std::function< void(NIMResCode, const SessionData &)> QuerySessionDataCallback
会话信息查询结果回调
Definition: nim_cpp_session.h:44
std::function< void(NIMResCode)> DeleteHasmoreRoammsgCallback
删除会话是漫游消息未拉取信息回调
Definition: nim_cpp_session.h:71
std::function< void(NIMResCode, const SessionRoamMsgHasMoreTagInfo &info)> QueryHasmoreRoammsgCallback
查询会话的漫游消息是否拉取完整的回调
Definition: nim_cpp_session.h:64
std::function< void(NIMResCode, const StickTopSessionList &)> QueryStickTopSessionListCallback
查询置顶会话列表回调
Definition: nim_cpp_session.h:60
std::function< void(NIMResCode, const StickTopSession &)> SetToStickTopSessionCallback
置顶会话回调
Definition: nim_cpp_session.h:53
std::function< void(NIMResCode, const SessionData &, int)> ChangeCallback
会话变更通知回调
Definition: nim_cpp_session.h:31
std::function< void(const StickTopSession &)> SetToStickTopSessionNotifyCallback
置顶会话通知回调
Definition: nim_cpp_session.h:46
NIMMessageType
Definition: nim_msglog_def.h:301
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
NIMSessionType
Definition: nim_session_def.h:16
NIMResCode
Definition: public_defines.h:21
Definition: nim_session_def.h:58
Definition: nim_talk_helper.h:339
会话数据
Definition: nim_session_helper.h:49
会话列表数据
Definition: nim_session_helper.h:102
Definition: nim_session_helper.h:119
Definition: nim_session_helper.h:135