NIM SDK API  8.5.0
nim_cpp_session_online_service.h
Go to the documentation of this file.
1 
7 #ifndef _NIM_CPP_SESSION_ONLINE_SERVICE_H_
8 #define _NIM_CPP_SESSION_ONLINE_SERVICE_H_
9 
10 #include <functional>
11 #include <string>
13 #include "nim_cpp_wrapper/nim_sdk_cpp_wrapper.h"
18 namespace nim {
19 
20 class NIM_SDK_CPPWRAPPER_DLL_API SessionOnLineService {
21 public:
22  typedef std::function<void(nim::NIMResCode, const SessionOnLineServiceHelper::SessionInfo&)> QuerySessionInfoCallback;
24  typedef std::function<void(nim::NIMResCode)> UpdateSessionInfoCallback;
25  typedef std::function<void(nim::NIMResCode)> DeleteSessionInfoCallback;
37  static void QuerySessionList(uint64_t min_time, uint64_t max_time, bool need_last_msg, int limit, const QuerySessionListCallabck& cb);
38 
46  static void QuerySession(nim::NIMSessionType to_type, const std::string& session_id, const QuerySessionInfoCallback& cb);
47 
59  static void UpdateSession(nim::NIMSessionType to_type,
60  const std::string& session_id,
61  const std::string& ext,
62  const UpdateSessionInfoCallback& cb);
63 
71  static void DeleteSession(const SessionOnLineServiceHelper::DeleteSessionParam& param, const DeleteSessionInfoCallback& cb);
72 
78  static void RegSessionChanged(const SessionChangedCallback& cb);
79 
84  static void UnregSessionOnLineServiceCb();
85 };
86 
87 } // namespace nim
88 
89 #endif //_NIM_CPP_SESSION_ONLINE_SERVICE_H_
nim::SessionOnLineService
Definition: nim_cpp_session_online_service.h:20
nim_session_online_service_helper.h
SessionOnLineService 辅助方法和数据结构定义
nim::SessionOnLineService::UpdateSessionInfoCallback
std::function< void(nim::NIMResCode)> UpdateSessionInfoCallback
Definition: nim_cpp_session_online_service.h:24
nim::SessionOnLineServiceHelper::SessionInfo
会话服务 会话数据定义
Definition: nim_session_online_service_helper.h:26
nim
namespace nim
nim::SessionOnLineServiceHelper::DeleteSessionParam
Definition: nim_session_online_service_helper.h:59
nim::SessionOnLineService::SessionChangedCallback
std::function< void(const SessionOnLineServiceHelper::SessionInfo &)> SessionChangedCallback
Definition: nim_cpp_session_online_service.h:26
nim::SessionOnLineServiceHelper::QuerySessionListResult
会话服务 查询会话列表应答数据定义
Definition: nim_session_online_service_helper.h:54
nim::SessionOnLineService::QuerySessionInfoCallback
std::function< void(nim::NIMResCode, const SessionOnLineServiceHelper::SessionInfo &)> QuerySessionInfoCallback
Definition: nim_cpp_session_online_service.h:22
nim::SessionOnLineService::QuerySessionListCallabck
std::function< void(const SessionOnLineServiceHelper::QuerySessionListResult &)> QuerySessionListCallabck
Definition: nim_cpp_session_online_service.h:23
nim::SessionOnLineService::DeleteSessionInfoCallback
std::function< void(nim::NIMResCode)> DeleteSessionInfoCallback
Definition: nim_cpp_session_online_service.h:25