NIM SDK API  8.7.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();
88 
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_
Definition: nim_cpp_talkex.h:28
static void AddCollect(const CollectInfo &collect_info, const AddCollectCallback &cb)
std::function< void(int, int, const CollectInfoList &)> QueryCollectsCallback
Definition: nim_cpp_talkex.h:33
std::function< void(int, const CollectInfo &)> UpdateCollectCallback
Definition: nim_cpp_talkex.h:32
std::function< void(int code, int count)> RemoveCollectsCallback
Definition: nim_cpp_talkex.h:31
static void UpdateCollectExt(const MatchCollectParm &collect_match_param, const std::string &ext, const UpdateCollectCallback &cb)
static void QueryCollectList(const QueryCollectsParm &query_collect_list_param, const QueryCollectsCallback &cb)
std::function< void(int code, const CollectInfo &)> AddCollectCallback
Definition: nim_cpp_talkex.h:30
static void RemoveCollects(const RemoveCollectsParm &collect_list, const RemoveCollectsCallback &cb)
Definition: nim_cpp_talkex.h:121
static void RegAddPinMessage(const AddPinMessageNotifyCallback &cb)
static void QueryAllPinMessage(const std::string &session, int to_type, const QueryPinMessageCallback &cb)
static void UpdatePinMessage(const ModifyPinMessageParam &modify_param, const UpdatePinMessageCallback &cb)
static void RegUpdatePinMessage(const UpdatePinMessageNotifyCallback &cb)
static void UnregAllCb()
static void AddPinMessage(const IMMessage &msg, const PinMessageInfo &pin_info, const PinMessageCallback &cb)
static void UnPinMessage(const ModifyPinMessageParam &modify_param, const UnPinMessageCallback &cb)
static void RegUnPinMessage(const UnPinMessageNotifyCallback &cb)
Definition: nim_cpp_talkex.h:64
std::function< void(int, const QuickCommentInfo &)> AddQuickCommentCallback
Definition: nim_cpp_talkex.h:66
static void RegRemoveQuickCommentNotify(const RemoveQuickCommentNotifyCallback &cb)
static void AddQuickComment(const IMMessage &msg, const QuickCommentInfo &info, const AddQuickCommentCallback &cb)
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
static void RegAddQuickCommentNotify(const AddQuickCommentNotifyCallback &cb)
std::function< void(int, const QueryQuickCommentsResponse &)> QueryQuickCommentCallback
Definition: nim_cpp_talkex.h:68
static void QueryQuickCommentList(const QueryQuickCommentsParam &query_param, const QueryQuickCommentCallback &cb)
std::function< void(const std::string &, NIMSessionType, const std::string &, const QuickCommentInfo &)> AddQuickCommentNotifyCallback
Definition: nim_cpp_talkex.h:70
static void RemoveQuickComment(const IMMessage &msg, const RemoveQuickCommentParam &param, const RemoveQuickCommentCallback &cb)
std::function< void(int, const std::string &id)> RemoveQuickCommentCallback
Definition: nim_cpp_talkex.h:67
聊天功能;主要包括收藏、快捷回复、PinMessage、ThreadMessage、置顶会话
Definition: nim_cpp_talkex.h:26
namespace nim
定义导出宏
Talk 辅助方法和数据结构定义
Talkex 收藏辅助方法和数据结构定义
Talkex Pin Message 辅助方法和数据结构定义
Talkex快捷回复辅助方法和数据结构定义
收藏内容属性
Definition: nim_talkex_helper_collect.h:24
收藏列表
Definition: nim_talkex_helper_collect.h:37
Definition: nim_talk_helper.h:242
收藏匹配参数
Definition: nim_talkex_helper_collect.h:43
修改、取消Pin Message参数定义
Definition: nim_talkex_helper_pin_message.h:46
Pin消息属性
Definition: nim_talkex_helper_pin_message.h:25
查询Pin Message应答参数定义
Definition: nim_talkex_helper_pin_message.h:55
分页查询收藏列表参数
Definition: nim_talkex_helper_collect.h:64
查询快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:53
查询快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:70
快捷回复属性
Definition: nim_talkex_helper_quick_comment.h:25
收藏内容参数
Definition: nim_talkex_helper_collect.h:53
删除快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:45