NIM SDK API  9.0.0
nim_cpp_talkex.h
Go to the documentation of this file.
1 
7 #ifndef _NIM_SDK_CPP_TALKEX_H_
8 #define _NIM_SDK_CPP_TALKEX_H_
9 
10 #include <functional>
11 #include <string>
21 namespace nim {
22 
26 class NIM_SDK_CPPWRAPPER_DLL_API TalkEx {
27 public:
28  class NIM_SDK_CPPWRAPPER_DLL_API Collect {
29  public:
30  using AddCollectCallback = std::function<void(int code, const CollectInfo&)>;
31  using RemoveCollectsCallback = std::function<void(int code, int count)>;
32  using UpdateCollectCallback = std::function<void(int, const CollectInfo&)>;
33  using QueryCollectsCallback = std::function<void(int, int, const CollectInfoList&)>;
40  static void AddCollect(const CollectInfo& collect_info, const AddCollectCallback& cb);
47  static void RemoveCollects(const RemoveCollectsParm& collect_list, const RemoveCollectsCallback& cb);
55  static void UpdateCollectExt(const MatchCollectParm& collect_match_param, const std::string& ext, const UpdateCollectCallback& cb);
62  static void QueryCollectList(const QueryCollectsParm& query_collect_list_param, const QueryCollectsCallback& cb);
63  };
64  class NIM_SDK_CPPWRAPPER_DLL_API QuickComment {
65  public:
66  using AddQuickCommentCallback = std::function<void(int, const QuickCommentInfo&)>;
67  using RemoveQuickCommentCallback = std::function<void(int, const std::string& id)>;
68  using QueryQuickCommentCallback = std::function<void(int, const QueryQuickCommentsResponse&)>;
70  std::function<void(const std::string&, NIMSessionType, const std::string&, const QuickCommentInfo&)>;
71  using RemoveQuickCommentNotifyCallback = std::function<void(const std::string& session,
72  NIMSessionType type,
73  const std::string& msg_client_id,
74  const std::string& quick_comment_id,
75  const std::string& ext)>;
81  static void UnregAllCb();
87  static void RegAddQuickCommentNotify(const AddQuickCommentNotifyCallback& cb);
88 
94  static void RegRemoveQuickCommentNotify(const RemoveQuickCommentNotifyCallback& cb);
95 
103  static void AddQuickComment(const IMMessage& msg, const QuickCommentInfo& info, const AddQuickCommentCallback& cb);
111  static void RemoveQuickComment(const IMMessage& msg, const RemoveQuickCommentParam& param, const RemoveQuickCommentCallback& cb);
112 
119  static void QueryQuickCommentList(const QueryQuickCommentsParam& query_param, const QueryQuickCommentCallback& cb);
120  };
121  class NIM_SDK_CPPWRAPPER_DLL_API PinMsg {
122  public:
123  using PinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const PinMessageInfo&)>;
124  using UnPinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const std::string&)>;
125  using UpdatePinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const PinMessageInfo&)>;
126  using QueryPinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const QueryAllPinMessageResponse&)>;
127  using AddPinMessageNotifyCallback = std::function<void(const std::string& session, int to_type, const PinMessageInfo&)>;
128  using UnPinMessageNotifyCallback = std::function<void(const std::string& session, int to_type, const std::string& id)>;
129  using UpdatePinMessageNotifyCallback = std::function<void(const std::string& session, int to_type, const PinMessageInfo&)>;
137  static void AddPinMessage(const IMMessage& msg, const PinMessageInfo& pin_info, const PinMessageCallback& cb);
138 
145  static void UnPinMessage(const ModifyPinMessageParam& modify_param, const UnPinMessageCallback& cb);
146 
153  static void UpdatePinMessage(const ModifyPinMessageParam& modify_param, const UpdatePinMessageCallback& cb);
154 
162  static void QueryAllPinMessage(const std::string& session, int to_type, const QueryPinMessageCallback& cb);
163 
168  static void UnregAllCb();
169 
175  static void RegAddPinMessage(const AddPinMessageNotifyCallback& cb);
176 
182  static void RegUnPinMessage(const UnPinMessageNotifyCallback& cb);
183 
189  static void RegUpdatePinMessage(const UpdatePinMessageNotifyCallback& cb);
190  };
191 };
192 
193 } // namespace nim
194 #endif //_NIM_SDK_CPP_TALKEX_H_
nim::TalkEx::Collect::AddCollectCallback
std::function< void(int code, const CollectInfo &)> AddCollectCallback
Definition: nim_cpp_talkex.h:30
nim::TalkEx::Collect::UpdateCollectCallback
std::function< void(int, const CollectInfo &)> UpdateCollectCallback
Definition: nim_cpp_talkex.h:32
nim::TalkEx::PinMsg
Definition: nim_cpp_talkex.h:121
nim::TalkEx
聊天功能;主要包括收藏、快捷回复、PinMessage、ThreadMessage、置顶会话
Definition: nim_cpp_talkex.h:26
nim_talkex_helper_pin_message.h
Talkex Pin Message 辅助方法和数据结构定义
nim::TalkEx::Collect::RemoveCollectsCallback
std::function< void(int code, int count)> RemoveCollectsCallback
Definition: nim_cpp_talkex.h:31
nim_talkex_helper_quick_comment.h
Talkex快捷回复辅助方法和数据结构定义
nim::TalkEx::QuickComment
Definition: nim_cpp_talkex.h:64
nim::TalkEx::Collect::QueryCollectsCallback
std::function< void(int, int, const CollectInfoList &)> QueryCollectsCallback
Definition: nim_cpp_talkex.h:33
nim_talk_helper.h
Talk 辅助方法和数据结构定义
nim::CollectInfoList
收藏列表
Definition: nim_talkex_helper_collect.h:37
nim::QueryAllPinMessageResponse
查询Pin Message应答参数定义
Definition: nim_talkex_helper_pin_message.h:55
nim
namespace nim
nim::QueryQuickCommentsParam
查询快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:53
nim::QueryCollectsParm
分页查询收藏列表参数
Definition: nim_talkex_helper_collect.h:64
nim::QuickCommentInfo
快捷回复属性
Definition: nim_talkex_helper_quick_comment.h:25
nim::RemoveQuickCommentParam
删除快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:45
nim::TalkEx::QuickComment::QueryQuickCommentCallback
std::function< void(int, const QueryQuickCommentsResponse &)> QueryQuickCommentCallback
Definition: nim_cpp_talkex.h:68
nim_talkex_helper_collect.h
Talkex 收藏辅助方法和数据结构定义
nim::TalkEx::Collect
Definition: nim_cpp_talkex.h:28
nim::TalkEx::QuickComment::RemoveQuickCommentNotifyCallback
std::function< void(const std::string &session, NIMSessionType type, const std::string &msg_client_id, const std::string &quick_comment_id, const std::string &ext)> RemoveQuickCommentNotifyCallback
Definition: nim_cpp_talkex.h:75
nim::RemoveCollectsParm
收藏内容参数
Definition: nim_talkex_helper_collect.h:53
nim::MatchCollectParm
收藏匹配参数
Definition: nim_talkex_helper_collect.h:43
nim::TalkEx::QuickComment::AddQuickCommentNotifyCallback
std::function< void(const std::string &, NIMSessionType, const std::string &, const QuickCommentInfo &)> AddQuickCommentNotifyCallback
Definition: nim_cpp_talkex.h:70
nim::TalkEx::QuickComment::AddQuickCommentCallback
std::function< void(int, const QuickCommentInfo &)> AddQuickCommentCallback
Definition: nim_cpp_talkex.h:66
nim::TalkEx::QuickComment::RemoveQuickCommentCallback
std::function< void(int, const std::string &id)> RemoveQuickCommentCallback
Definition: nim_cpp_talkex.h:67
nim::QueryQuickCommentsResponse
查询快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:71
nim_sdk_cpp_wrapper.h
定义导出宏
nim::CollectInfo
收藏内容属性
Definition: nim_talkex_helper_collect.h:24
nim::ModifyPinMessageParam
修改、取消Pin Message参数定义
Definition: nim_talkex_helper_pin_message.h:46
nim::PinMessageInfo
Pin消息属性
Definition: nim_talkex_helper_pin_message.h:25
nim::IMMessage
Definition: nim_talk_helper.h:242