NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_cpp_msglog.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_MSGLOG_H_
8#define _NIM_SDK_CPP_MSGLOG_H_
9
10#include <functional>
11#include <string>
19namespace nim {
24public:
26 using QueryMsgCallback = std::function<void(NIMResCode, const std::string&, nim::NIMSessionType, const QueryMsglogResult&)>;
28 using GetMessagesDynamicallyCallback = std::function<void(const GetMessagesResult&)>;
30 using QuerySingleMsgCallback = std::function<void(NIMResCode, const std::string&, const IMMessage&)>;
32 using ModifyMultipleMsglogCallback = std::function<void(NIMResCode, const std::string&, nim::NIMSessionType)>;
40 using ModifySingleMsglogCallback = std::function<void(NIMResCode, const std::string&)>;
54 using DBFunctionCallback = std::function<void(NIMResCode)>;
56 using DeleteMsglogSelfCallback = std::function<void(NIMResCode)>;
62 using ImportDbPrgCallback = std::function<void(int64_t, int64_t)>;
64 using MessageStatusChangedCallback = std::function<void(const MessageStatusChangedResult&)>;
66 using DeleteHistoryOnLineAsyncCallback = std::function<void(const NIMResCode, const std::string&)>;
69 std::function<void(const NIMResCode, const std::string&, nim::NIMSessionType, uint64_t, const std::string&)>;
71 using DeleteHistoryOnLineNotifyCallback = std::function<void(const std::list<NIMDeleteSessionHistoryMessagesNotifyInfo>&)>;
73 using QueryMessageIsThreadRootAsyncCallback = std::function<void(const NIMResCode, const std::string&, bool, int)>;
75 using QueryMessageOnlineCallback = std::function<void(const NIMResCode, const std::string&, const IMMessage&)>;
77 using QueryThreadHistoryMsgCallback = std::function<void(const NIMResCode, const IMMessage&, int, uint64_t, const std::list<IMMessage>&)>;
79 using FullTextSearchOnlineAsyncCallback = std::function<void(NIMResCode res_code, const QueryMsglogResult& message_list)>;
81 using HistoryMessageFilter = std::function<bool(const IMMessage&)>;
82
84 public:
86 std::vector<nim::NIMMessageType> ExclusionType(const std::vector<nim::NIMMessageType>& exclusion_type_list) const;
87
88 private: // judge
89 std::vector<nim::NIMMessageType> list_;
90 };
91
96 friend class MsgLog;
97
98 public:
101 std::string id_;
103 nim::NIMSessionType to_type_;
107 int64_t from_time_;
109 int64_t end_time_;
111 int64_t end_msg_id_;
121 std::vector<nim::NIMMessageType> msg_type_list_;
124
125 private:
126 bool FormatParam();
128 std::string json_extension_;
129 };
130
135 friend class MsgLog;
136
137 public:
140 std::string id_;
142 std::string keyword_;
144 nim::NIMSessionType to_type_;
148 int64_t from_time_;
150 int64_t end_time_;
153
154 private:
155 static bool FormatParam() { return true; };
156 std::string json_extension_;
157 };
158
163 public:
166 std::string keyword_;
168 std::string account_id_;
170 nim::NIMSessionType to_type_{kNIMSessionTypeP2P};
172 std::vector<nim::NIMMessageType> type_;
174 uint32_t limit_count_{100};
176 time_t from_time_{0};
178 time_t end_time_{0};
184 bool enable_pinyin_{true};
185 };
186
191 public:
195 std::string from_account;
197 std::string to_account;
199 int64_t server_id;
201 std::string client_id;
203 int64_t time;
204 };
205
210 public:
212 int64_t from_time;
214 int64_t to_time;
218 int32_t limit;
220 int32_t reverse;
221 };
222
227 public:
229 : limit_count_(100)
230 , reverse_(false) {}
231
235 std::list<std::string> ids_;
239 int64_t from_time_;
241 int64_t end_time_;
251 std::string search_content_;
252
253 public:
254 std::string ToJsonString() const;
255 };
256
258 public:
260 std::string keyword_;
262 uint64_t from_time_{0};
264 uint64_t to_time_{0};
266 uint32_t session_limit_{0};
268 uint32_t msglog_limit_{0};
270 uint32_t search_rule_{0};
272 std::list<std::string> p2p_filter_list_;
274 std::list<std::string> team_filter_list_;
276 std::list<std::string> sender_filter_list_;
278 std::list<nim::NIMMessageType> msg_type_filter_list_;
280 std::list<uint32_t> msg_sub_type_filter_list_;
281
283 : from_time_(0)
284 , to_time_(0)
285 , session_limit_(20)
286 , msglog_limit_(20)
287 , search_rule_(0) {}
288 };
289
295 using IsMessageIndexEstablishedCallback = std::function<void(bool is_built)>;
296
302 using BuildMsglogIndexesProgress = std::function<void(uint32_t total, uint32_t built_count)>;
303
309 using BuildMsglogIndexesComplete = std::function<void(NIMBuildingMsglogIndexesCompleteReason reason, const std::string& message)>;
310
315 static void UnregMsglogCb();
321 static void RegDeleteMsglogSelfNotify(const DeleteMsglogSelfNotifyCallback& cb);
322
328 static void RegDeleteHistoryMessagesNotify(const DeleteHistoryOnLineNotifyCallback& cb);
329
339 static bool QueryMsgByIDAysnc(const std::string& client_msg_id, const QuerySingleMsgCallback& cb, const std::string& json_extension = "");
340
358 static bool QueryMsgAsync(const std::string& account_id,
359 nim::NIMSessionType to_type,
360 int limit_count,
361 int64_t anchor_msg_time,
362 const QueryMsgCallback& cb,
363 const std::string& json_extension = "");
364
389 static void GetMessagesDynamically(const std::string& session_id,
390 nim::NIMSessionType to_type,
391 uint64_t from_time,
392 uint64_t to_time,
393 uint32_t limit_count,
394 const std::string& anchor_client_msg_id,
395 uint64_t anchor_server_msg_id,
396 NIMMsglogSearchDirection direction,
398 const std::string& json_extension = "");
399
409 static bool QueryMsgOnlineAsync(const QueryMsgOnlineAsyncParam& param, const QueryMsgCallback& cb);
428 static bool QueryMsgOnlineAsync(const std::string& id,
429 nim::NIMSessionType to_type,
430 int limit_count,
431 int64_t from_time,
432 int64_t end_time,
433 int64_t end_msg_id,
434 bool reverse,
435 bool need_save_to_local,
436 const QueryMsgCallback& cb,
437 const std::string& json_extension = "");
438
449 static void QueryMessagesByKeywordAsync(const QueryMsgByKeywordParam& param, const QueryMsgCallback& cb);
450
456 static void IsMessageIndexEstablished(const IsMessageIndexEstablishedCallback& cb);
457
465 static void BuildMsglogIndexes(uint32_t page_size, const BuildMsglogIndexesProgress& progress, const BuildMsglogIndexesComplete& completion);
466
471 static void CancelMsglogIndexesBuilding();
472
482 static bool QueryMsgByKeywordOnlineAsync(const MsgLog::QueryMsgByKeywordOnlineParam& param, const QueryMsgCallback& cb);
483
510 static bool QueryMsgOfSpecifiedTypeInASessionAsync(nim::NIMSessionType to_type,
511 const std::string& id,
512 int limit_count,
513 int64_t from_time,
514 int64_t end_time,
515 const std::string& end_client_msg_id,
516 bool reverse,
517 std::list<NIMMessageType> msg_type,
518 const QueryMsgCallback& cb,
519 const std::string& json_extension = "");
520
549 static bool QueryMsgByOptionsAsync(NIMMsgLogQueryRange query_range,
550 const std::list<std::string>& ids,
551 int limit_count,
552 int64_t from_time,
553 int64_t end_time,
554 const std::string& end_client_msg_id,
555 bool reverse,
556 NIMMessageType msg_type,
557 const std::string& search_content,
558 const QueryMsgCallback& cb,
559 const std::string& json_extension = "");
560
569 static bool QueryMsgByOptionsAsyncEx(const QueryMsgByOptionsAsyncParam& param, const QueryMsgCallback& cb);
570
584 static bool BatchStatusReadAsync(const std::string& account_id,
585 nim::NIMSessionType to_type,
586 const BatchStatusReadCallback& cb,
587 const std::string& json_extension = "");
588
600 static bool BatchStatusDeleteAsync(const std::string& account_id,
601 nim::NIMSessionType to_type,
603 const std::string& json_extension = "");
604
617 static bool BatchStatusDeleteAsyncEx(const std::string& account_id,
618 nim::NIMSessionType to_type,
619 bool revert_by_query_online,
621 const std::string& json_extension = "");
622
634 static bool SetStatusAsync(const std::string& msg_id,
635 nim::NIMMsgLogStatus msglog_status,
636 const SetStatusCallback& cb,
637 const std::string& json_extension = "");
638
650 static bool SetSubStatusAsync(const std::string& msg_id,
651 nim::NIMMsgLogSubStatus msglog_sub_status,
652 const SetSubStatusCallback& cb,
653 const std::string& json_extension = "");
654
667 static bool WriteMsglogToLocalAsync(const std::string& talk_id,
668 const IMMessage& msg,
669 bool need_update_session,
670 const WriteMsglogCallback& cb,
671 const std::string& json_extension = "");
672
691 static bool WriteMsglogToLocalAsyncEx(const std::string& talk_id,
692 const IMMessage& msg,
693 bool need_update_session,
694 bool compose_last_msg,
695 const std::list<NIMMessageType>& exclude_msg_type,
696 const WriteMsglogCallback& cb);
697
710 static bool DeleteBySessionTypeAsync(bool delete_sessions,
711 NIMSessionType to_type,
713 const std::string& json_extension = "");
714
728 static bool DeleteBySessionTypeAsyncEx(bool delete_sessions,
729 NIMSessionType to_type,
730 bool revert_by_query_online,
732 const std::string& json_extension = "");
733
746 static bool DeleteAsync(const std::string& session_id,
747 NIMSessionType to_type,
748 const std::string& msg_id,
749 const DeleteCallback& cb,
750 const std::string& json_extension = "");
751
763 static bool DeleteAllAsync(bool delete_sessions, const DeleteAllCallback& cb, const std::string& json_extension = "");
764
778 static bool DeleteAllAsyncEx(bool delete_sessions,
779 bool revert_by_query_online,
780 const DeleteAllCallback& cb,
781 const std::string& json_extension = "");
782
796 static bool DeleteMsgByTimeAsync(const std::string& session_id,
797 NIMSessionType to_type,
798 uint64_t timestamp1,
799 uint64_t timestamp2,
800 const DeleteMsgByTimeCallback& cb,
801 const std::string& json_extension = "");
802
817 static bool DeleteMsgByTimeAsyncEx(const std::string& session_id,
818 NIMSessionType to_type,
819 bool revert_by_query_online,
820 uint64_t timestamp1,
821 uint64_t timestamp2,
822 const DeleteMsgByTimeCallback& cb,
823 const std::string& json_extension = "");
824
834 static bool ExportDbAsync(const std::string& dst_path, const DBFunctionCallback& cb, const std::string& json_extension = "");
835
848 static bool ImportDbAsync(const std::string& src_path,
849 const DBFunctionCallback& cb,
850 const ImportDbPrgCallback& prg_cb,
851 const std::string& json_extension = "");
852
863 static void SendReceiptAsync(const std::string& json_msg, const MessageStatusChangedCallback& cb);
864
875 static void SendReceiptAsync(const IMMessage& msg, const MessageStatusChangedCallback& cb);
876
882 static bool QuerySentMessageBeReaded(const IMMessage& msg);
883
889 static bool QueryReceivedMsgReceiptSent(const IMMessage& msg);
890
898 static void RegMessageStatusChangedCb(const MessageStatusChangedCallback& cb, const std::string& json_extension = "");
899
905 static void RegHistoryMessageFilterCb(const HistoryMessageFilter& filter);
906
918 static bool UpdateLocalExtAsync(const std::string& msg_id,
919 const std::string& local_ext,
920 const UpdateLocalExtCallback& cb,
921 const std::string& json_extension = "");
926 static void UnregMsgologCb();
927
936 static bool ReadAllAsync(const DBFunctionCallback& cb, const std::string& json_extension = "");
937
943 static bool ExportBackupToRemote(const LogsBackupExportInfo& export_info);
944
950 static bool ImportBackupFromRemote(const LogsBackupImportInfo& import_info);
951
956 static void CancelImportBackupFromRemote();
957
962 static void CancelExportBackupToRemote();
963
974 static void DeleteHistoryOnlineAsync(const std::string& accid,
975 bool delete_roaming,
976 const std::string& json_extension,
978
993 static void DeleteHistoryOnlineAsync(const std::string& accid,
994 nim::NIMSessionType to_type,
995 bool notify_self,
996 const std::string& ext,
998
1007 static void DeleteMessageSelfAsync(const IMMessage& msg, const std::string ext, const DeleteMsglogSelfCallback& cb);
1008
1016 static void DeleteMessageSelfAsync(const std::list<std::tuple<IMMessage, std::string>>& msgs, const DeleteMsglogSelfCallback& cb);
1017
1025 static void QueryMessageIsThreadRoot(const std::string msg_client_id, const QueryMessageIsThreadRootAsyncCallback& cb);
1026
1034 static void QueryMessageOnline(const QueryMsgAsyncParam& param, const QueryMessageOnlineCallback& cb);
1035
1043 static void QueryThreadHistoryMsg(const IMMessage& msg, const QueryThreadHistoryMsgAsyncParam& param, const QueryThreadHistoryMsgCallback& cb);
1044
1053 static void QueryLocalThreadHistoryMsg(const IMMessage& msg, const QueryMsgCallback& cb);
1054
1062 static void FullTextSearchOnlineAsync(const FullTextSearchOnlineAsyncParam& param, const FullTextSearchOnlineAsyncCallback& cb);
1063
1073 static void QueryUnreadMessages(const std::string& session_id,
1074 NIMSessionType to_type,
1075 const QueryMsgCallback& cb,
1076 const std::string& json_extension = "");
1077};
1078} // namespace nim
1079
1080#endif //_NIM_SDK_CPP_MSGLOG_H_
导出消息记录到云端参数定义
Definition: nim_msglog_helper.h:106
从云端导入消息记录参数定义
Definition: nim_msglog_helper.h:185
Definition: nim_cpp_msglog.h:83
std::vector< nim::NIMMessageType > list_
Definition: nim_cpp_msglog.h:89
Definition: nim_cpp_msglog.h:257
std::list< std::string > sender_filter_list_
发送者过滤列表
Definition: nim_cpp_msglog.h:276
std::list< std::string > team_filter_list_
Team 群租会话过滤列表
Definition: nim_cpp_msglog.h:274
std::string keyword_
要搜索的关键字
Definition: nim_cpp_msglog.h:260
std::list< std::string > p2p_filter_list_
P2P 会话过滤列表
Definition: nim_cpp_msglog.h:272
std::list< uint32_t > msg_sub_type_filter_list_
消息子类型过滤
Definition: nim_cpp_msglog.h:280
FullTextSearchOnlineAsyncParam()
Definition: nim_cpp_msglog.h:282
std::list< nim::NIMMessageType > msg_type_filter_list_
消息类型过滤
Definition: nim_cpp_msglog.h:278
Definition: nim_cpp_msglog.h:190
NIMSessionType to_type_
enum 会话类型,双人0,群组1,超大群5 (nim_msglog_def.h)
Definition: nim_cpp_msglog.h:193
std::string client_id
string 消息的客户端id
Definition: nim_cpp_msglog.h:201
int64_t server_id
int64_t 消息的服务端id
Definition: nim_cpp_msglog.h:199
int64_t time
int64_t 消息时间戳
Definition: nim_cpp_msglog.h:203
std::string to_account
string 消息的接收方
Definition: nim_cpp_msglog.h:197
std::string from_account
string 消息的发送方
Definition: nim_cpp_msglog.h:195
Definition: nim_cpp_msglog.h:134
int64_t end_time_
int64_t 结束时间点,单位:毫秒
Definition: nim_cpp_msglog.h:150
nim::NIMSessionType to_type_
enum 会话类型,双人0,群组1 (nim_msglog_def.h)
Definition: nim_cpp_msglog.h:144
static bool FormatParam()
Definition: nim_cpp_msglog.h:155
std::string id_
查询id,对方的account id或者群组tid
Definition: nim_cpp_msglog.h:140
bool reverse_
bool true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false)
Definition: nim_cpp_msglog.h:152
int limit_count_
int 本次查询的消息条数上限(最多100条)
Definition: nim_cpp_msglog.h:146
int64_t from_time_
int64_t 起始时间点,单位:毫秒
Definition: nim_cpp_msglog.h:148
std::string json_extension_
Definition: nim_cpp_msglog.h:156
std::string keyword_
要查询的关键字
Definition: nim_cpp_msglog.h:142
Definition: nim_cpp_msglog.h:162
std::string keyword_
要查询的关键字
Definition: nim_cpp_msglog.h:166
std::vector< nim::NIMMessageType > type_
std::list 要获取的消息类型,默认只有文本类消息,可自行扩充其他类型消息,除通知类消息不受支持外,其他类型消息(包括自定义消息)均可检索
Definition: nim_cpp_msglog.h:172
std::string account_id_
查询 ID,对方的 account ID 或者群组 team ID,可留空将不作为查询条件
Definition: nim_cpp_msglog.h:168
Definition: nim_cpp_msglog.h:226
std::string search_content_
检索文本(目前只支持kNIMMessageTypeText和kNIMMessageTypeFile这两种类型消息的文本关键字检索,即支持文字消息和文件名的检索
Definition: nim_cpp_msglog.h:251
std::string end_client_msg_id_
结束查询的最后一条消息的end_client_msg_id(不包含在查询结果中)
Definition: nim_cpp_msglog.h:243
std::list< std::string > ids_
会话id(对方的account id或者群组tid)的集合,目前暂不支持多个的组合检索,详见NIMMsgLogQueryRange说明
Definition: nim_cpp_msglog.h:235
NIMMessageType msg_type_
检索的消息类型(目前只支持kNIMMessageTypeText、kNIMMessageTypeImage和kNIMMessageTypeFile这三种类型消息)
Definition: nim_cpp_msglog.h:247
int32_t msg_sub_type_
消息的子类型
Definition: nim_cpp_msglog.h:249
bool reverse_
true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false)
Definition: nim_cpp_msglog.h:245
int limit_count_
本次查询的消息条数上限(最多100条)
Definition: nim_cpp_msglog.h:237
NIMMsgLogQueryRange query_range_
消息历史的检索范围(目前暂不支持某些范围的组合检索,详见NIMMsgLogQueryRange说明)
Definition: nim_cpp_msglog.h:233
QueryMsgByOptionsAsyncParam()
Definition: nim_cpp_msglog.h:228
int64_t end_time_
结束时间点,单位:毫秒
Definition: nim_cpp_msglog.h:241
int64_t from_time_
起始时间点,单位:毫秒
Definition: nim_cpp_msglog.h:239
Definition: nim_cpp_msglog.h:95
bool need_save_to_local_
bool 将在线查询结果保存到本地,false: 不保存
Definition: nim_cpp_msglog.h:115
int64_t end_time_
int64_t 结束时间点,单位:毫秒
Definition: nim_cpp_msglog.h:109
bool reverse_
bool true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false)
Definition: nim_cpp_msglog.h:113
int limit_count_
int 本次查询的消息条数上限(最多100条)
Definition: nim_cpp_msglog.h:105
std::vector< nim::NIMMessageType > msg_type_list_
vector 要获取或排除掉的消息类型 由 is_exclusion_type_ 参数决定
Definition: nim_cpp_msglog.h:121
bool replace_local_message_
bool 查询结果回来后,如果 need_save_to_local_ 为 true 是否要替换本地已经存在的消息
Definition: nim_cpp_msglog.h:117
std::string id_
查询id,对方的account id或者群组tid
Definition: nim_cpp_msglog.h:101
int64_t end_msg_id_
int64_t 结束查询的最后一条消息的server_msg_id(不包含在查询结果中)
Definition: nim_cpp_msglog.h:111
int64_t from_time_
int64_t 起始时间点,单位:毫秒
Definition: nim_cpp_msglog.h:107
static const AllMessageTypeList AllMsgTypeList
Definition: nim_cpp_msglog.h:127
std::string json_extension_
Definition: nim_cpp_msglog.h:128
nim::NIMSessionType to_type_
enum 会话类型,双人0,群组1 (nim_msglog_def.h)
Definition: nim_cpp_msglog.h:103
bool is_exclusion_type_
bool true : 获取除msg_type_list_中指定的所有类型消息 ,false :只获取 msg_type_list_ 中指定的类型的消息
Definition: nim_cpp_msglog.h:123
bool auto_download_attachment_
bool 查询结果回来后,是否需要sdk自动下载消息附件。true:需要,false:不需要
Definition: nim_cpp_msglog.h:119
Definition: nim_cpp_msglog.h:209
int64_t exclude_msg_id
int64_t 截至消息的服务端id,不包含在查询结果中 缺省0
Definition: nim_cpp_msglog.h:216
int64_t from_time
int64_t 起始时间 缺省0
Definition: nim_cpp_msglog.h:212
int32_t limit
int32_t 查询条数限制 缺省100
Definition: nim_cpp_msglog.h:218
int32_t reverse
int64_t 排序 缺省0 false
Definition: nim_cpp_msglog.h:220
int64_t to_time
int64_t 结束时间 缺省0
Definition: nim_cpp_msglog.h:214
NIM SDK提供的消息历史接口
Definition: nim_cpp_msglog.h:23
ModifyMultipleMsglogCallback BatchStatusReadCallback
批量设置消息历史已读状态回调模板
Definition: nim_cpp_msglog.h:34
std::function< void(NIMResCode, const std::string &)> ModifySingleMsglogCallback
修改(单条)消息历史回调模板
Definition: nim_cpp_msglog.h:40
std::function< void(NIMResCode res_code, const QueryMsglogResult &message_list)> FullTextSearchOnlineAsyncCallback
服务器全文检索回调模板
Definition: nim_cpp_msglog.h:79
ModifyMultipleMsglogCallback DeleteBySessionTypeCallback
批量删除消息历史回调模板
Definition: nim_cpp_msglog.h:38
std::function< void(const std::list< NIMDeleteSessionHistoryMessagesNotifyInfo > &)> DeleteHistoryOnLineNotifyCallback
删除会话的云端的历史记录推送的回调模板
Definition: nim_cpp_msglog.h:71
DBFunctionCallback DeleteMsgByTimeCallback
根据时间段删除部分消息历史回调模板
Definition: nim_cpp_msglog.h:60
std::function< void(const DeleteMsglogSelfNotifyParam &)> DeleteMsglogSelfNotifyCallback
单向删除消息记录通知回调
Definition: nim_cpp_msglog.h:52
std::function< void(NIMResCode)> DeleteMsglogSelfCallback
单向删除消息记录回调
Definition: nim_cpp_msglog.h:56
std::function< void(bool is_built)> IsMessageIndexEstablishedCallback
判断消息索引表是否已经构建完成
Definition: nim_cpp_msglog.h:295
std::function< void(const NIMResCode, const std::string &, bool, int)> QueryMessageIsThreadRootAsyncCallback
查询消息是否是thread聊天的根消息回调模板
Definition: nim_cpp_msglog.h:73
std::function< void(const NIMResCode, const std::string &)> DeleteHistoryOnLineAsyncCallback
删除与某账号(p2p)的所有云端历史记录与漫游消息的回调模板
Definition: nim_cpp_msglog.h:66
ModifyMultipleMsglogCallback BatchStatusDeleteCallback
批量删除消息历史回调模板
Definition: nim_cpp_msglog.h:36
ModifySingleMsglogCallback UpdateLocalExtCallback
修改消息历史本地扩展字段内容回调模板
Definition: nim_cpp_msglog.h:46
ModifySingleMsglogCallback SetSubStatusCallback
修改消息历史子状态回调模板
Definition: nim_cpp_msglog.h:44
std::function< void(NIMBuildingMsglogIndexesCompleteReason reason, const std::string &message)> BuildMsglogIndexesComplete
构建消息索引表完成回调
Definition: nim_cpp_msglog.h:309
ModifySingleMsglogCallback WriteMsglogCallback
保存消息历史回调模板
Definition: nim_cpp_msglog.h:48
std::function< void(const NIMResCode, const std::string &, const IMMessage &)> QueryMessageOnlineCallback
查询某条消息的具体内容回调模板
Definition: nim_cpp_msglog.h:75
ModifySingleMsglogCallback SetStatusCallback
修改消息历史状态回调模板
Definition: nim_cpp_msglog.h:42
std::function< void(const GetMessagesResult &)> GetMessagesDynamicallyCallback
获取消息历史回调函数模板
Definition: nim_cpp_msglog.h:28
std::function< void(const MessageStatusChangedResult &)> MessageStatusChangedCallback
发送消息已读回执通知回调模板
Definition: nim_cpp_msglog.h:64
ModifySingleMsglogCallback DeleteCallback
删除消息历史回调模板
Definition: nim_cpp_msglog.h:50
std::function< void(const NIMResCode, const IMMessage &, int, uint64_t, const std::list< IMMessage > &)> QueryThreadHistoryMsgCallback
分页查询thread talk消息历史回调模板
Definition: nim_cpp_msglog.h:77
std::function< void(NIMResCode, const std::string &, const IMMessage &)> QuerySingleMsgCallback
查询单条消息历史回调模板
Definition: nim_cpp_msglog.h:30
DBFunctionCallback DeleteAllCallback
删除全部消息历史回调模板
Definition: nim_cpp_msglog.h:58
std::function< void(uint32_t total, uint32_t built_count)> BuildMsglogIndexesProgress
构建消息索引表进度回调
Definition: nim_cpp_msglog.h:302
std::function< void(NIMResCode, const std::string &, nim::NIMSessionType, const QueryMsglogResult &)> QueryMsgCallback
查询消息历史回调模板
Definition: nim_cpp_msglog.h:26
std::function< void(NIMResCode, const std::string &, nim::NIMSessionType)> ModifyMultipleMsglogCallback
修改(多条)消息历史回调模板
Definition: nim_cpp_msglog.h:32
std::function< void(int64_t, int64_t)> ImportDbPrgCallback
导入消息历史回调模板
Definition: nim_cpp_msglog.h:62
std::function< void(const NIMResCode, const std::string &, nim::NIMSessionType, uint64_t, const std::string &)> DeleteHistoryOnLineAsyncExCallback
删除某一会话的云端的历史记录的回调模板
Definition: nim_cpp_msglog.h:69
std::function< bool(const IMMessage &)> HistoryMessageFilter
云端历史消息过滤器
Definition: nim_cpp_msglog.h:81
std::function< void(NIMResCode)> DBFunctionCallback
消息历史变更回调模板
Definition: nim_cpp_msglog.h:54
namespace nim
NIMMessageType
Definition: nim_msglog_def.h:309
NIMBuildingMsglogIndexesCompleteReason
构建消息索引表完成原因
Definition: nim_msglog_def.h:31
NIMMsglogSearchDirection
Definition: nim_msglog_def.h:659
@ kForward
以结束时间点为准向前搜索
Definition: nim_msglog_def.h:661
NIMMsgLogQueryRange
Definition: nim_msglog_def.h:685
NIMMsglogSearchSegmentEngine
Definition: nim_msglog_def.h:667
@ kSegmentEngineSimple
单字分词逻辑,默认
Definition: nim_msglog_def.h:671
msglog 辅助方法和数据结构定义
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
NIMSessionType
Definition: nim_session_def.h:16
@ kNIMSessionTypeP2P
个人,即点对点
Definition: nim_session_def.h:18
Talk 辅助方法和数据结构定义
NIMResCode
Definition: public_defines.h:21
#define false
Definition: stdbool.h:33
unsigned char bool
Definition: stdbool.h:25
单向删除消息记录回调参数
Definition: nim_msglog_helper.h:65
Definition: nim_msglog_helper.h:44
Definition: nim_talk_helper.h:339
发送消息已读回执
Definition: nim_msglog_helper.h:84
查询到消息历史结果
Definition: nim_msglog_helper.h:22