7#ifndef _NIM_SDK_CPP_TALK_H_
8#define _NIM_SDK_CPP_TALK_H_
74 static void RegSendMsgCb(
const SendMsgAckCallback& cb,
const std::string& json_extension =
"");
100 static void SendMsg(
const std::string& json_msg,
const std::string& json_extension =
"",
FileUpPrgCallback* pcb =
nullptr);
140 static bool StopSendMsg(
const std::string& client_msg_id,
const NIMMessageType& type,
const std::string& json_extension =
"");
159 static void RegReceiveCb(
const ReceiveMsgCallback& cb,
const std::string& json_extension =
"");
176 static void RegReceiveMessagesCb(
const ReceiveMsgsCallback& cb,
const std::string& json_extension =
"");
200 static std::string CreateTextMessage(
const std::string& receiver_id,
202 const std::string& client_msg_id,
203 const std::string& content,
206 int32_t sub_type = 0);
236 static std::string CreateImageMessage(
const std::string& receiver_id,
238 const std::string& client_msg_id,
240 const std::string& file_path,
243 int32_t sub_type = 0);
273 static std::string CreateFileMessage(
const std::string& receiver_id,
275 const std::string& client_msg_id,
277 const std::string& file_path,
280 int32_t sub_type = 0);
310 static std::string CreateAudioMessage(
const std::string& receiver_id,
312 const std::string& client_msg_id,
314 const std::string& file_path,
317 int32_t sub_type = 0);
347 static std::string CreateVideoMessage(
const std::string& receiver_id,
349 const std::string& client_msg_id,
351 const std::string& file_path,
354 int32_t sub_type = 0);
382 static std::string CreateLocationMessage(
const std::string& receiver_id,
384 const std::string& client_msg_id,
388 int32_t sub_type = 0);
412 static std::string CreateTipMessage(
const std::string& receiver_id,
414 const std::string& client_msg_id,
415 const std::string& tip,
418 int32_t sub_type = 0);
441 static std::string CreateBotRobotMessage(
const std::string& receiver_id,
443 const std::string& client_msg_id,
444 const std::string& content,
448 int32_t sub_type = 0);
472 static std::string CreateG2NetCallMessage(
const std::string& receiver_id,
474 const std::string& client_msg_id,
475 const std::string& msg_attach,
478 int32_t sub_type = 0);
500 static std::string CreateRetweetMessage(
const std::string& src_msg_json,
501 const std::string& client_msg_id,
503 const std::string& retweet_to_session_id,
505 int64_t timetag = 0);
513 static bool ParseIMMessage(
const std::string& json_msg,
IMMessage& msg);
529 static bool ParseFileMessageAttach(
const IMMessage& msg,
IMFile& file);
569 static void UnregTalkCb();
584 static void RegTeamNotificationFilter(
const TeamNotificationFilter& filter,
const std::string& json_extension =
"");
598 static void RegMessageFilter(
const MessageFilter& filter,
const std::string& json_extension =
"");
613 static void RegRecallMsgsCallback(
const RecallMsgsCallback& cb,
const std::string& json_extension =
"");
654 static void RecallMsg(
const IMMessage& msg,
const std::string& notify,
const RecallMsgsCallback& cb,
const std::string& json_extension =
"");
699 static void RecallMsg2(
const IMMessage& msg,
700 const std::string& notify,
702 const std::string& apnstext =
"",
703 const std::string& pushpayloadconst =
"",
704 const std::string& json_extension =
"");
764 static std::string GetAttachmentPathFromMsg(
const IMMessage& msg);
NIMMessageType
Definition: nim_msglog_def.h:299
NIMSessionType
Definition: nim_session_def.h:16
NIMResCode
Definition: public_defines.h:21
unsigned char bool
Definition: stdbool.h:25
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
Definition: nim_talk_def.h:72
聊天功能,主要包括消息收发、消息撤回、消息回复(Thread 场景)等功能
Definition: nim_cpp_talk.h:25
std::function< void(const std::list< BroadcastMessage > &)> ReceiveBroadcastMsgsCallback
批量接收广播消息通知回调
Definition: nim_cpp_talk.h:42
std::function< void(const IMMessage &)> ReceiveMsgCallback
接收消息通知回调
Definition: nim_cpp_talk.h:30
std::function< bool(const IMMessage &)> MessageFilter
消息过滤器
Definition: nim_cpp_talk.h:44
std::function< void(int64_t, int64_t)> FileUpPrgCallback
发送多媒体消息文件上传过程回调
Definition: nim_cpp_talk.h:34
std::function< void(const SendMessageArc &)> SendMsgAckCallback
发送消息回执通知回调
Definition: nim_cpp_talk.h:28
std::function< void(const std::list< IMMessage > &)> ReceiveMsgsCallback
批量接收消息通知回调
Definition: nim_cpp_talk.h:32
std::function< void(const BroadcastMessage &)> ReceiveBroadcastMsgCallback
接收广播消息通知回调
Definition: nim_cpp_talk.h:40
std::function< void(const NIMResCode, const std::list< RecallMsgNotify > &)> RecallMsgsCallback
消息撤回通知回调
Definition: nim_cpp_talk.h:38
std::function< bool(const IMMessage &)> TeamNotificationFilter
群通知过滤器
Definition: nim_cpp_talk.h:36
发送消息回执
Definition: nim_msg_helper.h:24
消息属性设置
Definition: nim_talk_helper.h:24
Definition: nim_talk_helper.h:305
文件消息附件
Definition: nim_talk_helper.h:494
图片消息附件
Definition: nim_talk_helper.h:551
位置消息附件
Definition: nim_talk_helper.h:578
语音消息附件
Definition: nim_talk_helper.h:610
小视频消息附件
Definition: nim_talk_helper.h:633
波特机器人消息附件
Definition: nim_talk_helper.h:666
Definition: nim_talk_helper.h:708