NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_cpp_talkex.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_TALKEX_H_
8#define _NIM_SDK_CPP_TALKEX_H_
9
10#include <functional>
11#include <string>
21namespace nim {
22
27public:
29 public:
31 using AddCollectCallback = std::function<void(int code, const CollectInfo&)>;
33 using RemoveCollectsCallback = std::function<void(int code, int count)>;
35 using UpdateCollectCallback = std::function<void(int, const CollectInfo&)>;
37 using QueryCollectsCallback = std::function<void(int, int, const CollectInfoList&)>;
44 static void AddCollect(const CollectInfo& collect_info, const AddCollectCallback& cb);
51 static void RemoveCollects(const RemoveCollectsParm& collect_list, const RemoveCollectsCallback& cb);
59 static void UpdateCollectExt(const MatchCollectParm& collect_match_param, const std::string& ext, const UpdateCollectCallback& cb);
66 static void QueryCollectList(const QueryCollectsParm& query_collect_list_param, const QueryCollectsCallback& cb);
67 };
69 public:
71 using AddQuickCommentCallback = std::function<void(int, const QuickCommentInfo&)>;
73 using RemoveQuickCommentCallback = std::function<void(int, const std::string& id)>;
75 using QueryQuickCommentCallback = std::function<void(int, const QueryQuickCommentsResponse&)>;
78 std::function<void(const std::string&, NIMSessionType, const std::string&, const QuickCommentInfo&)>;
79 using RemoveQuickCommentNotifyCallback = std::function<void(const std::string& session,
80 NIMSessionType type,
81 const std::string& msg_client_id,
82 const std::string& quick_comment_id,
84 const std::string& ext)>;
85
90 static void UnregAllCb();
96 static void RegAddQuickCommentNotify(const AddQuickCommentNotifyCallback& cb);
97
103 static void RegRemoveQuickCommentNotify(const RemoveQuickCommentNotifyCallback& cb);
104
112 static void AddQuickComment(const IMMessage& msg, const QuickCommentInfo& info, const AddQuickCommentCallback& cb);
120 static void RemoveQuickComment(const IMMessage& msg, const RemoveQuickCommentParam& param, const RemoveQuickCommentCallback& cb);
121
128 static void QueryQuickCommentList(const QueryQuickCommentsParam& query_param, const QueryQuickCommentCallback& cb);
129 };
131 public:
132 using PinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const PinMessageInfo&)>;
133 using UnPinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const std::string&)>;
134 using UpdatePinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const PinMessageInfo&)>;
135 using QueryPinMessageCallback = std::function<void(int code, const std::string& session, int to_type, const QueryAllPinMessageResponse&)>;
136 using AddPinMessageNotifyCallback = std::function<void(const std::string& session, int to_type, const PinMessageInfo&)>;
137 using UnPinMessageNotifyCallback = std::function<void(const std::string& session, int to_type, const std::string& id)>;
138 using UpdatePinMessageNotifyCallback = std::function<void(const std::string& session, int to_type, const PinMessageInfo&)>;
146 static void AddPinMessage(const IMMessage& msg, const PinMessageInfo& pin_info, const PinMessageCallback& cb);
147
154 static void UnPinMessage(const ModifyPinMessageParam& modify_param, const UnPinMessageCallback& cb);
155
162 static void UpdatePinMessage(const ModifyPinMessageParam& modify_param, const UpdatePinMessageCallback& cb);
163
171 static void QueryAllPinMessage(const std::string& session, int to_type, const QueryPinMessageCallback& cb);
172
177 static void UnregAllCb();
178
184 static void RegAddPinMessage(const AddPinMessageNotifyCallback& cb);
185
191 static void RegUnPinMessage(const UnPinMessageNotifyCallback& cb);
192
198 static void RegUpdatePinMessage(const UpdatePinMessageNotifyCallback& cb);
199 };
200};
201
202} // namespace nim
203#endif //_NIM_SDK_CPP_TALKEX_H_
Definition nim_cpp_talkex.h:28
std::function< void(int, int, const CollectInfoList &)> QueryCollectsCallback
分页查询回调模板
Definition nim_cpp_talkex.h:37
std::function< void(int, const CollectInfo &)> UpdateCollectCallback
更新收藏回调模板
Definition nim_cpp_talkex.h:35
std::function< void(int code, int count)> RemoveCollectsCallback
删除收藏回调模板
Definition nim_cpp_talkex.h:33
std::function< void(int code, const CollectInfo &)> AddCollectCallback
添加收藏回调模板
Definition nim_cpp_talkex.h:31
Definition nim_cpp_talkex.h:130
std::function< void(const std::string &session, int to_type, const PinMessageInfo &)> UpdatePinMessageNotifyCallback
Definition nim_cpp_talkex.h:138
std::function< void(int code, const std::string &session, int to_type, const QueryAllPinMessageResponse &)> QueryPinMessageCallback
Definition nim_cpp_talkex.h:135
std::function< void(const std::string &session, int to_type, const PinMessageInfo &)> AddPinMessageNotifyCallback
Definition nim_cpp_talkex.h:136
std::function< void(int code, const std::string &session, int to_type, const PinMessageInfo &)> UpdatePinMessageCallback
Definition nim_cpp_talkex.h:134
std::function< void(const std::string &session, int to_type, const std::string &id)> UnPinMessageNotifyCallback
Definition nim_cpp_talkex.h:137
std::function< void(int code, const std::string &session, int to_type, const PinMessageInfo &)> PinMessageCallback
Definition nim_cpp_talkex.h:132
std::function< void(int code, const std::string &session, int to_type, const std::string &)> UnPinMessageCallback
Definition nim_cpp_talkex.h:133
Definition nim_cpp_talkex.h:68
std::function< void(int, const QuickCommentInfo &)> AddQuickCommentCallback
添加快捷回复回调模板
Definition nim_cpp_talkex.h:71
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:79
std::function< void(int, const QueryQuickCommentsResponse &)> QueryQuickCommentCallback
查询快捷回复回调模板
Definition nim_cpp_talkex.h:75
std::function< void(const std::string &, NIMSessionType, const std::string &, const QuickCommentInfo &)> AddQuickCommentNotifyCallback
Definition nim_cpp_talkex.h:76
std::function< void(int, const std::string &id)> RemoveQuickCommentCallback
删除快捷回复回调模板
Definition nim_cpp_talkex.h:73
聊天功能;主要包括收藏、快捷回复、PinMessage、ThreadMessage、置顶会话
Definition nim_cpp_talkex.h:26
namespace nim
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition nim_sdk_cpp_wrapper.h:38
NIMSessionType
Definition nim_session_def.h:16
Talk 辅助方法和数据结构定义
Talkex 收藏辅助方法和数据结构定义
Talkex Pin Message 辅助方法和数据结构定义
Talkex快捷回复辅助方法和数据结构定义
收藏内容属性
Definition nim_talkex_helper_collect.h:24
收藏列表
Definition nim_talkex_helper_collect.h:45
Definition nim_talk_helper.h:339
收藏匹配参数
Definition nim_talkex_helper_collect.h:51
修改、取消Pin Message参数定义
Definition nim_talkex_helper_pin_message.h:59
Pin消息属性
Definition nim_talkex_helper_pin_message.h:25
查询Pin Message应答参数定义
Definition nim_talkex_helper_pin_message.h:72
分页查询收藏列表参数
Definition nim_talkex_helper_collect.h:74
查询快捷回复参数定义
Definition nim_talkex_helper_quick_comment.h:68
查询快捷回复参数定义
Definition nim_talkex_helper_quick_comment.h:86
快捷回复属性
Definition nim_talkex_helper_quick_comment.h:25
收藏内容参数
Definition nim_talkex_helper_collect.h:64
删除快捷回复参数定义
Definition nim_talkex_helper_quick_comment.h:57