7 #ifndef _NIM_SDK_CPP_SESSION_H_
8 #define _NIM_SDK_CPP_SESSION_H_
25 class NIM_SDK_CPPWRAPPER_DLL_API
Session {
33 typedef std::function<void(nim::NIMResCode,
const std::list<SessionData>& session_data_list,
int unread_count)>
37 typedef std::function<void(
const std::string& session_id, nim::NIMSessionType)>
41 typedef std::function<void(nim::NIMResCode,
const std::string& session_id, nim::NIMSessionType)>
46 typedef std::function<void(nim::NIMResCode,
const SessionRoamMsgHasMoreTagInfo& info)>
48 typedef std::function<void(nim::NIMResCode,
const std::list<SessionRoamMsgHasMoreTagInfo>& info_list)>
52 typedef std::function<void(nim::NIMResCode, nim::NIMSessionType,
const std::string& session_id)>
61 static void RegChangeCb(
const ChangeCallback& cb,
const std::string& json_extension =
"");
70 static void RegBadgeCountCb(
const BadgeCountCallback& cb,
const std::string& json_extension =
"");
79 static void QueryLastFewSessionAsync(
int limit,
const QuerySessionListCallabck& cb,
const std::string& json_extension =
"");
98 static void QueryAllRecentSessionAsync(NIMMessageType last_msg_excluded_type,
100 const std::string& json_extension =
"");
111 static void QueryAllRecentSessionAsyncEx(
const std::list<NIMMessageType>& last_msg_excluded_type,
113 const std::string& json_extension =
"");
128 static bool DeleteRecentSession(nim::NIMSessionType to_type,
129 const std::string&
id,
131 const std::string& json_extension =
"");
146 static bool DeleteRecentSessionEx(nim::NIMSessionType to_type,
const std::string&
id,
const DeleteRecentSessionCallabck& cb,
bool delete_roaming);
161 static bool DeleteSessionRoamingMessage(nim::NIMSessionType to_type,
162 const std::string&
id,
164 const std::string& json_extension =
"");
189 static bool SetUnreadCountZeroAsync(nim::NIMSessionType to_type,
190 const std::string&
id,
192 const std::string& json_extension =
"");
205 static bool SetMultiUnreadCountZeroAsync(
bool super_team,
206 const std::list<MultiUnreadCountZeroInfo>& unread_zero_info_list,
224 static bool SetSessionTop(
enum NIMSessionType to_type,
225 const std::string&
id,
228 const std::string& json_extension =
"");
245 static bool SetSessionExtendData(
enum NIMSessionType to_type,
246 const std::string&
id,
247 const std::string& data,
249 const std::string& json_extension =
"");
274 static void QuerySessionDataById(NIMSessionType to_type,
275 const std::string&
id,
277 const std::string& json_extension =
"");
322 static void SetToStickTopSession(
const std::string& session_id,
323 nim::NIMSessionType to_type,
324 const std::string& ext,
340 static void UpdateToStickTopSession(
const std::string& session_id,
341 nim::NIMSessionType to_type,
342 const std::string& ext,
365 static void QueryHasmoreRoammsg(
const std::string& session_id, nim::NIMSessionType to_type,
const QueryHasmoreRoammsgCallback& cb);
395 static void UnregSessionCb();
400 #endif //_NIM_SDK_CPP_SESSION_H_