NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
v2_nim_message_service.hpp
浏览该文件的文档.
1#ifndef V2_NIM_MESSAGE_SERVICE_H
2#define V2_NIM_MESSAGE_SERVICE_H
3#include "v2_nim_internal.hpp"
4namespace v2 {
15public:
43 virtual void sendMessage(V2NIMMessage message,
44 nstd::string conversationId,
48 V2NIMProgressCallback progress) = 0;
49
76 virtual void replyMessage(V2NIMMessage message,
81 V2NIMProgressCallback progress) = 0;
82
102 virtual void modifyMessage(const V2NIMMessage& message,
103 const V2NIMModifyMessageParams& params,
105 const V2NIMFailureCallback& failure) = 0;
106
127 virtual void revokeMessage(V2NIMMessage message,
130 V2NIMFailureCallback failure) = 0;
131
154 V2NIMFailureCallback failure) = 0;
155
176 virtual void getMessageListByIds(nstd::vector<nstd::string> messageClientIds,
178 V2NIMFailureCallback failure) = 0;
179
202 V2NIMFailureCallback failure) = 0;
203
222 virtual void getThreadMessageList(V2NIMThreadMessageListOption threadMessageListOption,
224 V2NIMFailureCallback failure) = 0;
225
246 V2NIMFailureCallback failure) = 0;
247
270 virtual void deleteMessage(V2NIMMessage message,
271 nstd::optional<nstd::string> serverExtension,
272 bool onlyDeleteLocal,
274 V2NIMFailureCallback failure) = 0;
275
299 nstd::optional<nstd::string> serverExtension,
300 bool onlyDeleteLocal,
302 V2NIMFailureCallback failure) = 0;
303
323
345 nstd::string localExtension,
347 V2NIMFailureCallback failure) = 0;
348
373 virtual void insertMessageToLocal(V2NIMMessage message,
374 nstd::string conversationId,
375 nstd::string senderId,
376 uint64_t createTime,
378 V2NIMFailureCallback failure) = 0;
379
400 virtual void pinMessage(V2NIMMessage message,
401 nstd::optional<nstd::string> serverExtension,
403 V2NIMFailureCallback failure) = 0;
404
425 virtual void unpinMessage(V2NIMMessageRefer messageRefer,
426 nstd::optional<nstd::string> serverExtension,
428 V2NIMFailureCallback failure) = 0;
429
450 virtual void updatePinMessage(V2NIMMessage message,
451 nstd::optional<nstd::string> serverExtension,
453 V2NIMFailureCallback failure) = 0;
454
474 virtual void getPinnedMessageList(nstd::string conversationId,
476 V2NIMFailureCallback failure) = 0;
477
503 virtual void addQuickComment(V2NIMMessage message,
504 uint64_t index,
505 nstd::optional<nstd::string> serverExtension,
508 V2NIMFailureCallback failure) = 0;
509
532 virtual void removeQuickComment(V2NIMMessageRefer messageRefer,
533 uint32_t index,
534 nstd::optional<nstd::string> serverExtension,
536 V2NIMFailureCallback failure) = 0;
537
560 V2NIMFailureCallback failure) = 0;
561
584
605 V2NIMFailureCallback failure) = 0;
606
628 nstd::optional<nstd::string> serverExtension,
630 V2NIMFailureCallback failure) = 0;
631
655 V2NIMFailureCallback failure) = 0;
656
676
694 virtual void getP2PMessageReceipt(nstd::string conversationId,
696 V2NIMFailureCallback failure) = 0;
697
709 virtual bool isPeerRead(V2NIMMessage message) = 0;
710
730
753 V2NIMFailureCallback failure) = 0;
754
776 nstd::set<nstd::string> memberAccountIds,
778 V2NIMFailureCallback failure) = 0;
779
799
819
843 V2NIMFailureCallback failure) = 0;
844
859
876
909 virtual void addMessageListener(V2NIMMessageListener listener) = 0;
910
921 virtual void removeMessageListener(V2NIMMessageListener listener) = 0;
922};
923} // namespace v2
924#endif
Definition: ne_stl_continuous_container.h:15
Definition: ne_stl_smart_ptr.h:30
Definition: ne_stl_string.h:19
Definition: ne_stl_map.h:15
Definition: ne_stl_set.h:13
消息服务
Definition: v2_nim_message_service.hpp:14
virtual void unpinMessage(V2NIMMessageRefer messageRefer, nstd::optional< nstd::string > serverExtension, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
取消 pin 消息
virtual void getLocalThreadMessageList(V2NIMMessageRefer messageRefer, V2NIMSuccessCallback< V2NIMThreadMessageListResult > success, V2NIMFailureCallback failure)=0
查询 thread 聊天本地消息列表
virtual void searchCloudMessages(V2NIMMessageSearchParams params, V2NIMSuccessCallback< nstd::vector< V2NIMMessage > > success, V2NIMFailureCallback failure)=0
搜索云端消息
virtual void replyMessage(V2NIMMessage message, V2NIMMessage replyMessage, V2NIMSendMessageParams params, V2NIMSuccessCallback< V2NIMSendMessageResult > success, V2NIMFailureCallback failure, V2NIMProgressCallback progress)=0
回复消息
virtual void revokeMessage(V2NIMMessage message, V2NIMMessageRevokeParams params, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
撤回消息
virtual void addMessageListener(V2NIMMessageListener listener)=0
添加消息监听器
virtual void deleteMessage(V2NIMMessage message, nstd::optional< nstd::string > serverExtension, bool onlyDeleteLocal, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
删除消息
virtual void getThreadMessageList(V2NIMThreadMessageListOption threadMessageListOption, V2NIMSuccessCallback< V2NIMThreadMessageListResult > success, V2NIMFailureCallback failure)=0
查询 thread 聊天云端消息列表
virtual void clearHistoryMessage(V2NIMClearHistoryMessageOption option, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
清空历史消息
virtual void getCollectionListByOption(V2NIMCollectionOption option, V2NIMSuccessCallback< nstd::vector< V2NIMCollection > > success, V2NIMFailureCallback failure)=0
分页获取收藏列表
virtual void removeMessageListener(V2NIMMessageListener listener)=0
移除消息监听器
virtual void removeQuickComment(V2NIMMessageRefer messageRefer, uint32_t index, nstd::optional< nstd::string > serverExtension, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
移除快捷评论
virtual void getMessageListByRefers(nstd::vector< V2NIMMessageRefer > messageRefers, V2NIMSuccessCallback< nstd::vector< V2NIMMessage > > success, V2NIMFailureCallback failure)=0
根据消息引用列表查询消息
virtual void pinMessage(V2NIMMessage message, nstd::optional< nstd::string > serverExtension, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
pin 消息
virtual void modifyMessage(const V2NIMMessage &message, const V2NIMModifyMessageParams &params, const V2NIMSuccessCallback< const V2NIMModifyMessageResult & > &success, const V2NIMFailureCallback &failure)=0
更新消息
virtual void registerCustomAttachmentParser(const nstd::shared_ptr< V2NIMMessageCustomAttachmentParser > &parser)=0
注册自定义消息附件解析器,解析自定义消息类型为 100 的附件
virtual void getPinnedMessageList(nstd::string conversationId, V2NIMSuccessCallback< nstd::vector< V2NIMMessagePin > > success, V2NIMFailureCallback failure)=0
获取 pin 消息列表
virtual void getMessageListByIds(nstd::vector< nstd::string > messageClientIds, V2NIMSuccessCallback< nstd::vector< V2NIMMessage > > success, V2NIMFailureCallback failure)=0
根据 ID 列表查询消息
virtual void sendP2PMessageReceipt(V2NIMMessage message, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
发送 P2P 消息已读回执
virtual void cancelMessageAttachmentUpload(V2NIMMessage message, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
取消文件消息附件上传
virtual void insertMessageToLocal(V2NIMMessage message, nstd::string conversationId, nstd::string senderId, uint64_t createTime, V2NIMSuccessCallback< V2NIMMessage > success, V2NIMFailureCallback failure)=0
插入本地消息
virtual bool isPeerRead(V2NIMMessage message)=0
查询 P2P 消息对方是否已读
virtual void getTeamMessageReceiptDetail(V2NIMMessage message, nstd::set< nstd::string > memberAccountIds, V2NIMSuccessCallback< V2NIMTeamMessageReadReceiptDetail > success, V2NIMFailureCallback failure)=0
获取群消息已读回执详情
virtual void deleteMessages(nstd::vector< V2NIMMessage > messages, nstd::optional< nstd::string > serverExtension, bool onlyDeleteLocal, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
批量删除消息
virtual void getMessageList(V2NIMMessageListOption option, V2NIMSuccessCallback< nstd::vector< V2NIMMessage > > success, V2NIMFailureCallback failure)=0
查询消息
virtual void addQuickComment(V2NIMMessage message, uint64_t index, nstd::optional< nstd::string > serverExtension, V2NIMMessageQuickCommentPushConfig pushConfig, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
添加快捷评论
virtual void sendTeamMessageReceipts(nstd::vector< V2NIMMessage > messages, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
发送群消息已读回执
virtual void getQuickCommentList(nstd::vector< V2NIMMessage > messages, V2NIMSuccessCallback< nstd::map< nstd::string, nstd::vector< V2NIMMessageQuickComment > > > success, V2NIMFailureCallback failure)=0
获取快捷评论列表
virtual void unRegisterCustomAttachmentParser(const nstd::shared_ptr< V2NIMMessageCustomAttachmentParser > &parser)=0
注册自定义消息附件解析器,解析自定义消息类型为 100 的附件
virtual void getP2PMessageReceipt(nstd::string conversationId, V2NIMSuccessCallback< V2NIMP2PMessageReadReceipt > success, V2NIMFailureCallback failure)=0
查询 P2P 消息已读回执状态
virtual void updateMessageLocalExtension(V2NIMMessage message, nstd::string localExtension, V2NIMSuccessCallback< V2NIMMessage > success, V2NIMFailureCallback failure)=0
更新消息本地扩展
virtual void updatePinMessage(V2NIMMessage message, nstd::optional< nstd::string > serverExtension, V2NIMSuccessCallback< void > success, V2NIMFailureCallback failure)=0
更新 pin 消息
virtual void getTeamMessageReceipts(nstd::vector< V2NIMMessage > messages, V2NIMSuccessCallback< nstd::vector< V2NIMTeamMessageReadReceipt > > success, V2NIMFailureCallback failure)=0
获取群消息已读回执状态
virtual void updateCollectionExtension(V2NIMCollection collection, nstd::optional< nstd::string > serverExtension, V2NIMSuccessCallback< V2NIMCollection > success, V2NIMFailureCallback failure)=0
更新收藏扩展字段
virtual void sendMessage(V2NIMMessage message, nstd::string conversationId, V2NIMSendMessageParams params, V2NIMSuccessCallback< V2NIMSendMessageResult > success, V2NIMFailureCallback failure, V2NIMProgressCallback progress)=0
发送消息
virtual void removeCollections(nstd::vector< V2NIMCollection > collections, V2NIMSuccessCallback< uint32_t > success, V2NIMFailureCallback failure)=0
移除收藏
virtual void voiceToText(V2NIMVoiceToTextParams params, V2NIMSuccessCallback< nstd::string > success, V2NIMFailureCallback failure)=0
语音转文字
virtual void addCollection(V2NIMAddCollectionParams params, V2NIMSuccessCallback< V2NIMCollection > success, V2NIMFailureCallback failure)=0
添加收藏
通用成功
Definition: v2_nim_def_callback.hpp:7
Definition: v2_nim_ai_service.hpp:4
Definition: ne_stl_optional.h:16
Definition: ne_stl_bind.h:132
Definition: v2_nim_def_struct.hpp:1084
Definition: v2_nim_def_struct.hpp:1005
Definition: v2_nim_def_struct.hpp:1067
Definition: v2_nim_def_struct.hpp:1095
Definition: v2_nim_def_struct.hpp:643
Definition: v2_nim_def_struct.hpp:984
Definition: v2_nim_def_callback.hpp:110
Definition: v2_nim_def_struct.hpp:1016
Definition: v2_nim_def_struct.hpp:544
Definition: v2_nim_def_struct.hpp:860
Definition: v2_nim_def_struct.hpp:1309
Definition: v2_nim_def_struct.hpp:715
Definition: v2_nim_def_struct.hpp:839
Definition: v2_nim_def_struct.hpp:561
Definition: v2_nim_def_struct.hpp:1334