NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_cpp_sysmsg.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_SYSMSG_H_
8#define _NIM_SDK_CPP_SYSMSG_H_
9
10#include <functional>
11#include <list>
12#include <string>
16
21namespace nim {
22
27public:
29 typedef std::function<void(const SysMessage&)> ReceiveSysmsgCallback;
31 typedef std::function<void(const SendMessageArc&)> SendCustomSysmsgCallback;
33 typedef std::function<void(int, int, const std::list<SysMessage>&)> QueryMsgCallback;
35 typedef std::function<void(NIMResCode res_code, int unread_count)> NotifySysmsgResCallback;
45 typedef std::function<void(NIMResCode, int64_t, int)> NotifySingleSysmsgCallback;
50
58 static void RegSysmsgCb(const ReceiveSysmsgCallback& cb, const std::string& json_extension = "");
59
67 static void RegSendCustomSysmsgCb(const SendCustomSysmsgCallback& cb, const std::string& json_extension = "");
68
74 static void SendCustomNotificationMsg(const std::string& json_msg);
75
81 static void SendCustomNotificationMsg(const SysMessage& sys_msg);
82
98 static std::string CreateCustomNotificationMsg(const std::string& receiver_id,
99 const NIMSysMsgType type,
100 const std::string& client_msg_id,
101 const std::string& content,
102 const SysMessageSetting& msg_setting,
103 int64_t timetag = 0);
104
113 static bool QueryMsgAsync(int limit_count, int64_t last_time, const QueryMsgCallback& cb, const std::string& json_extension = "");
114
122 static void QueryUnreadCount(const QuerySysmsgUnreadCallback& cb, const std::string& json_extension = "");
123
137 static bool SetStatusAsync(int64_t msg_id, nim::NIMSysMsgStatus status, const SetStatusCallback& cb, const std::string& json_extension = "");
138
147 static void ReadAllAsync(const ReadAllCallback& cb, const std::string& json_extension = "");
148
158 static bool DeleteAsync(int64_t msg_id, const DeleteCallback& cb, const std::string& json_extension = "");
159
168 static void DeleteAllAsync(const DeleteAllCallback& cb, const std::string& json_extension = "");
169
183 static void SetStatusByTypeAsync(NIMSysMsgType type, NIMSysMsgStatus status, const BatchSetCallback& cb, const std::string& json_extension = "");
184
194 static void DeleteByTypeAsync(NIMSysMsgType type, const BatchSetCallback& cb, const std::string& json_extension = "");
195
200 static void UnregSysmsgCb();
201};
202
203} // namespace nim
204
205#endif //_NIM_SDK_CPP_SYSMSG_H_
系统消息接口;主要包括查询系统消息、删除系统消息等功能
Definition: nim_cpp_sysmsg.h:26
NotifySysmsgResCallback QuerySysmsgUnreadCallback
查询系统消息自定义通知未读数回调模板
Definition: nim_cpp_sysmsg.h:37
NotifySysmsgResCallback BatchSetCallback
批量调整系统消息自定义通知回调模板
Definition: nim_cpp_sysmsg.h:43
std::function< void(NIMResCode res_code, int unread_count)> NotifySysmsgResCallback
修改系统消息自定义通知回调模板
Definition: nim_cpp_sysmsg.h:35
std::function< void(int, int, const std::list< SysMessage > &)> QueryMsgCallback
查询系统消息自定义通知回调模板
Definition: nim_cpp_sysmsg.h:33
std::function< void(NIMResCode, int64_t, int)> NotifySingleSysmsgCallback
修改(单条)系统消息自定义通知回调模板
Definition: nim_cpp_sysmsg.h:45
NotifySysmsgResCallback ReadAllCallback
设置系统消息自定义通知已读状态回调模板
Definition: nim_cpp_sysmsg.h:39
std::function< void(const SysMessage &)> ReceiveSysmsgCallback
收到自定义通知回执回调模板
Definition: nim_cpp_sysmsg.h:29
std::function< void(const SendMessageArc &)> SendCustomSysmsgCallback
发送自定义通知回调模板
Definition: nim_cpp_sysmsg.h:31
NotifySysmsgResCallback DeleteAllCallback
删除全部系统消息自定义通知回调模板
Definition: nim_cpp_sysmsg.h:41
NotifySingleSysmsgCallback SetStatusCallback
设置系统消息自定义通知状态回调模板
Definition: nim_cpp_sysmsg.h:47
NotifySingleSysmsgCallback DeleteCallback
删除系统消息自定义通知回调模板
Definition: nim_cpp_sysmsg.h:49
namespace nim
Message 通用辅助方法和数据结构定义
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
NIMSysMsgStatus
Definition: nim_sysmsg_def.h:161
NIMSysMsgType
Definition: nim_sysmsg_def.h:177
sysmsg 辅助方法和数据结构定义
NIMResCode
Definition: public_defines.h:21
发送消息回执
Definition: nim_msg_helper.h:24
系统消息和自定义通知数据
Definition: nim_sysmsg_helper.h:103
系统消息和自定义通知属性设置
Definition: nim_sysmsg_helper.h:23