NIM SDK API  8.5.0
nim_msglog.h
Go to the documentation of this file.
1 
7 #ifndef NIM_SDK_DLL_API_NIM_MSGLOG_H_
8 #define NIM_SDK_DLL_API_NIM_MSGLOG_H_
9 
10 #include "nim_msglog_def.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
21 NIM_SDK_DLL_API void nim_msglog_register_delete_msgs_self_callback(const nim_msglog_delete_message_self_notify_cb_func cb, const void* user_data);
22 
30  const void* user_data);
31 
45 NIM_SDK_DLL_API void nim_msglog_query_msg_by_id_async(const char* client_msg_id,
46  const char* json_extension,
48  const void* user_data);
49 
69 NIM_SDK_DLL_API void nim_msglog_query_msg_async(const char* account_id,
70  enum NIMSessionType to_type,
71  int limit_count,
72  int64_t anchor_msg_time,
73  const char* json_extension,
75  const void* user_data);
76 
105 NIM_SDK_DLL_API void nim_msglog_query_msg_online_async(const char* id,
106  enum NIMSessionType to_type,
107  int limit_count,
108  int64_t from_time,
109  int64_t end_time,
110  int64_t end_msg_id,
111  bool reverse,
112  bool need_save_to_local,
113  const char* json_extension,
115  const void* user_data);
116 
131 NIM_SDK_DLL_API void nim_msglog_query_msg_online_async2(const char* id,
132  NIMQueryMsgOnlineAsyncParam query_param,
134  const void* user_data);
135 
152 NIM_SDK_DLL_API void nim_msglog_query_msg_by_keyword_online_async(const char* id,
153  const char* keyword,
156  const void* user_data);
157 
185  const char* id,
186  int limit_count,
187  int64_t from_time,
188  int64_t end_time,
189  const char* end_client_msg_id,
190  bool reverse,
191  const char* msg_types,
192  const char* json_extension,
194  const void* user_data);
195 
227 NIM_SDK_DLL_API void nim_msglog_query_msg_by_options_async(enum NIMMsgLogQueryRange query_range,
228  const char* ids,
229  int limit_count,
230  int64_t from_time,
231  int64_t end_time,
232  const char* end_client_msg_id,
233  bool reverse,
234  enum NIMMessageType msg_type,
235  const char* search_content,
236  const char* json_extension,
238  const void* user_data);
239 
249 NIM_SDK_DLL_API void nim_msglog_query_msg_by_options_async_ex(const char* json_param, nim_msglog_query_cb_func cb, const void* user_data);
250 
277 NIM_SDK_DLL_API void nim_msglog_full_text_search_online_async(const char* keyword,
278  uint64_t from_time,
279  uint64_t to_time,
280  uint32_t session_limit,
281  uint32_t msg_limit,
282  enum NIMFullTextSearchOnlineOrderType order_by,
283  const char* p2p_filter_list,
284  const char* team_filter_list,
285  const char* sender_filter_list,
287  const void* user_data);
288 
304 NIM_SDK_DLL_API void nim_msglog_batch_status_read_async(const char* account_id,
305  enum NIMSessionType to_type,
306  const char* json_extension,
308  const void* user_data);
309 
325 NIM_SDK_DLL_API void nim_msglog_set_status_async(const char* msg_id,
326  enum NIMMsgLogStatus msglog_status,
327  const char* json_extension,
329  const void* user_data);
330 
346 NIM_SDK_DLL_API void nim_msglog_set_sub_status_async(const char* msg_id,
347  enum NIMMsgLogSubStatus msglog_sub_status,
348  const char* json_extension,
350  const void* user_data);
351 
371 NIM_SDK_DLL_API void nim_msglog_insert_msglog_async(const char* talk_id,
372  const char* json_msg,
373  bool need_update_session,
374  const char* json_extension,
376  const void* user_data);
377 
393 NIM_SDK_DLL_API void nim_msglog_batch_status_delete_async(const char* account_id,
394  enum NIMSessionType to_type,
395  const char* json_extension,
397  const void* user_data);
398 
416 NIM_SDK_DLL_API void nim_msglog_batch_status_delete_async_ex(const char* account_id,
417  enum NIMSessionType to_type,
418  bool revert_by_query_online,
419  const char* json_extension,
421  const void* user_data);
422 
440 NIM_SDK_DLL_API void nim_msglog_delete_by_session_type_async(bool delete_sessions,
441  enum NIMSessionType to_type,
442  const char* json_extension,
444  const void* user_data);
445 
465 NIM_SDK_DLL_API void nim_msglog_delete_by_session_type_async_ex(bool delete_sessions,
466  enum NIMSessionType to_type,
467  bool revert_by_query_online,
468  const char* json_extension,
470  const void* user_data);
471 
489 NIM_SDK_DLL_API void nim_msglog_delete_async(const char* account_id,
490  enum NIMSessionType to_type,
491  const char* msg_id,
492  const char* json_extension,
494  const void* user_data);
495 
508 NIM_SDK_DLL_API void nim_msglog_delete_all_async(bool delete_sessions,
509  const char* json_extension,
511  const void* user_data);
512 
530 NIM_SDK_DLL_API void nim_msglog_delete_all_async_ex(bool delete_sessions,
531  bool revert_by_query_online,
532  const char* json_extension,
534  const void* user_data);
535 
555 NIM_SDK_DLL_API void nim_msglog_delete_by_time_async(const char* account_id,
556  enum NIMSessionType to_type,
557  uint64_t timestamp1,
558  uint64_t timestamp2,
559  const char* json_extension,
561  const void* user_data);
562 
584 NIM_SDK_DLL_API void nim_msglog_delete_by_time_async_ex(const char* account_id,
585  enum NIMSessionType to_type,
586  bool revert_by_query_online,
587  uint64_t timestamp1,
588  uint64_t timestamp2,
589  const char* json_extension,
591  const void* user_data);
592 
603 NIM_SDK_DLL_API void nim_msglog_export_db_async(const char* dst_path,
604  const char* json_extension,
606  const void* user_data);
607 
626 NIM_SDK_DLL_API void nim_msglog_import_db_async(const char* src_path,
627  const char* json_extension,
629  const void* res_user_data,
631  const void* prg_user_data);
632 
648 NIM_SDK_DLL_API void nim_msglog_send_receipt_async(const char* json_msg,
649  const char* json_extension,
651  const void* user_data);
652 
659 NIM_SDK_DLL_API bool nim_msglog_query_be_readed(const char* json_msg, const char* json_extension);
660 
667 NIM_SDK_DLL_API bool nim_msglog_query_receipt_sent(const char* json_msg, const char* json_extension);
668 
677 NIM_SDK_DLL_API void nim_msglog_reg_status_changed_cb(const char* json_extension, nim_msglog_status_changed_cb_func cb, const void* user_data);
678 
694 NIM_SDK_DLL_API void nim_msglog_update_localext_async(const char* msg_id,
695  const char* local_ext,
696  const char* json_extension,
698  const void* user_data);
699 
709 NIM_SDK_DLL_API void nim_msglog_read_all_async(const char* json_extension, nim_msglog_modify_res_cb_func cb, const void* user_data);
710 
716 NIM_SDK_DLL_API bool nim_export_backup_to_remote(const NIMLogsBackupExportInfo* export_info);
717 
723 NIM_SDK_DLL_API bool nim_import_backup_from_remote(const NIMLogsBackupImportInfo* import_info);
724 
729 NIM_SDK_DLL_API void nim_cancel_import_backup_from_remote();
730 
735 NIM_SDK_DLL_API void nim_cancel_export_backup_to_remote();
736 
751 NIM_SDK_DLL_API void nim_msglog_delete_history_online_async(const char* account_id,
752  bool delete_roaming,
753  const char* json_extension,
755  const void* user_data);
756 
773 NIM_SDK_DLL_API void nim_msglog_delete_history_online_async_ex(const char* account_id,
774  enum NIMSessionType to_type,
775  bool notify_self,
776  const char* ext,
778  const void* user_data);
779 
794 NIM_SDK_DLL_API void nim_msglog_delete_message_self_async(const char* json_msg,
795  const char* ext,
796  const char* json_extension,
798  const void* user_data);
799 
813  int param_count,
815  const void* user_data);
816 
827 NIM_SDK_DLL_API void nim_msglog_query_message_is_thread_root_async(const char* msg_client_id,
829  const void* user_data);
830 
839 NIM_SDK_DLL_API void nim_msglog_query_message_online(const NIMQueryMsgAsyncParam& param, nim_msglog_query_single_cb_func cb, const void* user_data);
840 
853 NIM_SDK_DLL_API void nim_msglog_query_thread_history_msg(const char* json_msg,
856  const void* user_data);
857 
858 #ifdef __cplusplus
859 };
860 #endif //__cplusplus
861 #endif // NIM_SDK_DLL_API_NIM_MSGLOG_H_
nim_export_backup_to_remote
NIM_SDK_DLL_API bool nim_export_backup_to_remote(const NIMLogsBackupExportInfo *export_info)
nim_msglog_delete_by_time_async
NIM_SDK_DLL_API void nim_msglog_delete_by_time_async(const char *account_id, enum NIMSessionType to_type, uint64_t timestamp1, uint64_t timestamp2, const char *json_extension, nim_msglog_modify_res_cb_func cb, const void *user_data)
nim_msglog_register_delete_msgs_self_callback
NIM_SDK_DLL_API void nim_msglog_register_delete_msgs_self_callback(const nim_msglog_delete_message_self_notify_cb_func cb, const void *user_data)
nim_msglog_delete_history_online_notify_cb_func
void(* nim_msglog_delete_history_online_notify_cb_func)(NIMDeleteSessionHistoryMessagesNotifyInfo *info_list_head_node, int node_count, const void *user_data)
Definition: nim_msglog_def.h:62
NIMMsgLogQueryRange
NIMMsgLogQueryRange
Definition: nim_msglog_def.h:530
nim_msglog_update_localext_async
NIM_SDK_DLL_API void nim_msglog_update_localext_async(const char *msg_id, const char *local_ext, const char *json_extension, nim_msglog_res_cb_func cb, const void *user_data)
nim_import_backup_from_remote
NIM_SDK_DLL_API bool nim_import_backup_from_remote(const NIMLogsBackupImportInfo *import_info)
NIMMessageType
NIMMessageType
Definition: nim_msglog_def.h:257
nim_msglog_query_be_readed
NIM_SDK_DLL_API bool nim_msglog_query_be_readed(const char *json_msg, const char *json_extension)
nim_msglog_delete_all_async
NIM_SDK_DLL_API void nim_msglog_delete_all_async(bool delete_sessions, const char *json_extension, nim_msglog_modify_res_cb_func cb, const void *user_data)
nim_msglog_query_msg_by_options_async
NIM_SDK_DLL_API void nim_msglog_query_msg_by_options_async(enum NIMMsgLogQueryRange query_range, const char *ids, int limit_count, int64_t from_time, int64_t end_time, const char *end_client_msg_id, bool reverse, enum NIMMessageType msg_type, const char *search_content, const char *json_extension, nim_msglog_query_cb_func cb, const void *user_data)
nim_msglog_import_prg_cb_func
void(* nim_msglog_import_prg_cb_func)(int64_t imported_count, int64_t total_count, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:174
NIMDeleteMessagesSelfParam
单向删除某条消息参数
Definition: nim_msglog_def.h:645
nim_msglog_delete_message_self_notify_cb_func
void(* nim_msglog_delete_message_self_notify_cb_func)(const char *infos, const void *user_data)
Definition: nim_msglog_def.h:80
nim_msglog_register_delete_history_messages_callback
NIM_SDK_DLL_API void nim_msglog_register_delete_history_messages_callback(const nim_msglog_delete_history_online_notify_cb_func cb, const void *user_data)
nim_msglog_delete_by_session_type_async
NIM_SDK_DLL_API void nim_msglog_delete_by_session_type_async(bool delete_sessions, enum NIMSessionType to_type, const char *json_extension, nim_msglog_res_ex_cb_func cb, const void *user_data)
nim_msglog_set_sub_status_async
NIM_SDK_DLL_API void nim_msglog_set_sub_status_async(const char *msg_id, enum NIMMsgLogSubStatus msglog_sub_status, const char *json_extension, nim_msglog_res_cb_func cb, const void *user_data)
nim_msglog_delete_history_online_async_ex
NIM_SDK_DLL_API void nim_msglog_delete_history_online_async_ex(const char *account_id, enum NIMSessionType to_type, bool notify_self, const char *ext, nim_msglog_delete_history_online_res_cb_func_ex cb, const void *user_data)
nim_msglog_export_db_async
NIM_SDK_DLL_API void nim_msglog_export_db_async(const char *dst_path, const char *json_extension, nim_msglog_modify_res_cb_func cb, const void *user_data)
nim_msglog_delete_all_async_ex
NIM_SDK_DLL_API void nim_msglog_delete_all_async_ex(bool delete_sessions, bool revert_by_query_online, const char *json_extension, nim_msglog_modify_res_cb_func cb, const void *user_data)
nim_msglog_query_single_cb_func
void(* nim_msglog_query_single_cb_func)(int res_code, const char *msg_id, const char *result, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:93
NIMMsgLogSubStatus
NIMMsgLogSubStatus
Definition: nim_msglog_def.h:373
nim_msglog_status_changed_cb_func
void(* nim_msglog_status_changed_cb_func)(int res_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:184
nim_msglog_read_all_async
NIM_SDK_DLL_API void nim_msglog_read_all_async(const char *json_extension, nim_msglog_modify_res_cb_func cb, const void *user_data)
nim_msglog_delete_message_self_async
NIM_SDK_DLL_API void nim_msglog_delete_message_self_async(const char *json_msg, const char *ext, const char *json_extension, nim_msglog_delete_message_self_res_cb_func cb, const void *user_data)
nim_msglog_delete_by_time_async_ex
NIM_SDK_DLL_API void nim_msglog_delete_by_time_async_ex(const char *account_id, enum NIMSessionType to_type, bool revert_by_query_online, uint64_t timestamp1, uint64_t timestamp2, const char *json_extension, nim_msglog_modify_res_cb_func cb, const void *user_data)
nim_msglog_res_cb_func
void(* nim_msglog_res_cb_func)(int res_code, const char *msg_id, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:143
nim_msglog_res_ex_cb_func
void(* nim_msglog_res_ex_cb_func)(int res_code, const char *uid, enum NIMSessionType type, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:155
nim_msglog_query_msg_by_options_async_ex
NIM_SDK_DLL_API void nim_msglog_query_msg_by_options_async_ex(const char *json_param, nim_msglog_query_cb_func cb, const void *user_data)
nim_msglog_query_thread_history_msg
NIM_SDK_DLL_API void nim_msglog_query_thread_history_msg(const char *json_msg, const NIMQueryThreadHistoryMsgAsyncParam &param, const nim_msglog_query_thread_history_msg_cb_func &cb, const void *user_data)
nim_msglog_full_text_search_online_cb_func
void(* nim_msglog_full_text_search_online_cb_func)(int res_code, uint32_t count, const char *result, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:133
NIMMsgLogStatus
NIMMsgLogStatus
Definition: nim_msglog_def.h:283
NIMQueryMsgAsyncParam
云端查询某条消息参数一般用在thread聊天场景中
Definition: nim_msglog_def.h:656
nim_cancel_export_backup_to_remote
NIM_SDK_DLL_API void nim_cancel_export_backup_to_remote()
nim_msglog_query_msg_async
NIM_SDK_DLL_API void nim_msglog_query_msg_async(const char *account_id, enum NIMSessionType to_type, int limit_count, int64_t anchor_msg_time, const char *json_extension, nim_msglog_query_cb_func cb, const void *user_data)
nim_msglog_delete_history_online_res_cb_func
void(* nim_msglog_delete_history_online_res_cb_func)(int res_code, const char *accid, const void *user_data)
Definition: nim_msglog_def.h:31
nim_msglog_query_the_message_of_the_specified_type_async
NIM_SDK_DLL_API void nim_msglog_query_the_message_of_the_specified_type_async(enum NIMSessionType to_type, const char *id, int limit_count, int64_t from_time, int64_t end_time, const char *end_client_msg_id, bool reverse, const char *msg_types, const char *json_extension, nim_msglog_query_cb_func cb, const void *user_data)
nim_msglog_full_text_search_online_async
NIM_SDK_DLL_API void nim_msglog_full_text_search_online_async(const char *keyword, uint64_t from_time, uint64_t to_time, uint32_t session_limit, uint32_t msg_limit, enum NIMFullTextSearchOnlineOrderType order_by, const char *p2p_filter_list, const char *team_filter_list, const char *sender_filter_list, nim_msglog_full_text_search_online_cb_func cb, const void *user_data)
NIMLogsBackupImportInfo
从云端导入消息记录参数定义
Definition: nim_msglog_def.h:458
nim_msglog_delete_message_self_res_cb_func
void(* nim_msglog_delete_message_self_res_cb_func)(int res_code, const void *user_data)
Definition: nim_msglog_def.h:72
nim_msglog_delete_async
NIM_SDK_DLL_API void nim_msglog_delete_async(const char *account_id, enum NIMSessionType to_type, const char *msg_id, const char *json_extension, nim_msglog_res_cb_func cb, const void *user_data)
nim_msglog_query_message_is_thread_root_async_cb_func
void(* nim_msglog_query_message_is_thread_root_async_cb_func)(int res_code, const char *client_id, bool is_root, int reply_count, const void *user_data)
Definition: nim_msglog_def.h:199
nim_msglog_batch_status_delete_async_ex
NIM_SDK_DLL_API void nim_msglog_batch_status_delete_async_ex(const char *account_id, enum NIMSessionType to_type, bool revert_by_query_online, const char *json_extension, nim_msglog_res_ex_cb_func cb, const void *user_data)
nim_msglog_query_message_is_thread_root_async
NIM_SDK_DLL_API void nim_msglog_query_message_is_thread_root_async(const char *msg_client_id, nim_msglog_query_message_is_thread_root_async_cb_func cb, const void *user_data)
nim_cancel_import_backup_from_remote
NIM_SDK_DLL_API void nim_cancel_import_backup_from_remote()
NIMQueryMsgByKeywordOnlineAsyncParam
根据关键字村云端查询消息记录的参数定义
Definition: nim_msglog_def.h:557
nim_msglog_delete_history_online_res_cb_func_ex
void(* nim_msglog_delete_history_online_res_cb_func_ex)(int res_code, const char *accid, enum NIMSessionType type, uint64_t time, const char *ext, const void *user_data)
Definition: nim_msglog_def.h:47
nim_msglog_query_msg_by_id_async
NIM_SDK_DLL_API void nim_msglog_query_msg_by_id_async(const char *client_msg_id, const char *json_extension, nim_msglog_query_single_cb_func cb, const void *user_data)
nim_msglog_query_message_online
NIM_SDK_DLL_API void nim_msglog_query_message_online(const NIMQueryMsgAsyncParam &param, nim_msglog_query_single_cb_func cb, const void *user_data)
nim_msglog_import_db_async
NIM_SDK_DLL_API void nim_msglog_import_db_async(const char *src_path, const char *json_extension, nim_msglog_modify_res_cb_func res_cb, const void *res_user_data, nim_msglog_import_prg_cb_func prg_cb, const void *prg_user_data)
nim_msglog_query_msg_online_async2
NIM_SDK_DLL_API void nim_msglog_query_msg_online_async2(const char *id, NIMQueryMsgOnlineAsyncParam query_param, nim_msglog_query_cb_func cb, const void *user_data)
NIMQueryThreadHistoryMsgAsyncParam
云端查询thread聊天历史参数
Definition: nim_msglog_def.h:666
nim_msglog_modify_res_cb_func
void(* nim_msglog_modify_res_cb_func)(int res_code, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:164
NIMFullTextSearchOnlineOrderType
NIMFullTextSearchOnlineOrderType
全文检索排序规则
Definition: nim_msglog_def.h:412
nim_msglog_query_cb_func
void(* nim_msglog_query_cb_func)(int res_code, const char *id, enum NIMSessionType type, const char *result, const char *json_extension, const void *user_data)
Definition: nim_msglog_def.h:116
nim_msglog_batch_status_read_async
NIM_SDK_DLL_API void nim_msglog_batch_status_read_async(const char *account_id, enum NIMSessionType to_type, const char *json_extension, nim_msglog_res_ex_cb_func cb, const void *user_data)
NIMSessionType
NIMSessionType
Definition: nim_session_def.h:16
nim_msglog_delete_history_online_async
NIM_SDK_DLL_API void nim_msglog_delete_history_online_async(const char *account_id, bool delete_roaming, const char *json_extension, nim_msglog_delete_history_online_res_cb_func cb, const void *user_data)
nim_msglog_query_msg_online_async
NIM_SDK_DLL_API void nim_msglog_query_msg_online_async(const char *id, enum NIMSessionType to_type, int limit_count, int64_t from_time, int64_t end_time, int64_t end_msg_id, bool reverse, bool need_save_to_local, const char *json_extension, nim_msglog_query_cb_func cb, const void *user_data)
nim_msglog_batch_status_delete_async
NIM_SDK_DLL_API void nim_msglog_batch_status_delete_async(const char *account_id, enum NIMSessionType to_type, const char *json_extension, nim_msglog_res_ex_cb_func cb, const void *user_data)
nim_msglog_reg_status_changed_cb
NIM_SDK_DLL_API void nim_msglog_reg_status_changed_cb(const char *json_extension, nim_msglog_status_changed_cb_func cb, const void *user_data)
nim_msglog_query_msg_by_keyword_online_async
NIM_SDK_DLL_API void nim_msglog_query_msg_by_keyword_online_async(const char *id, const char *keyword, NIMQueryMsgByKeywordOnlineAsyncParam query_param, nim_msglog_query_cb_func cb, const void *user_data)
nim_msglog_query_thread_history_msg_cb_func
void(* nim_msglog_query_thread_history_msg_cb_func)(int res_code, const char *root_msg, int total, uint64_t timestamp, const char *msgs, const void *user_data)
Definition: nim_msglog_def.h:221
nim_msglog_delete_messages_self_async
NIM_SDK_DLL_API void nim_msglog_delete_messages_self_async(NIMDeleteMessagesSelfParam *param, int param_count, nim_msglog_delete_message_self_res_cb_func cb, const void *user_data)
NIMQueryMsgOnlineAsyncParam
从云端导入消息记录参数定义
Definition: nim_msglog_def.h:542
NIMLogsBackupExportInfo
导出消息记录到云端参数定义
Definition: nim_msglog_def.h:415
nim_msglog_set_status_async
NIM_SDK_DLL_API void nim_msglog_set_status_async(const char *msg_id, enum NIMMsgLogStatus msglog_status, const char *json_extension, nim_msglog_res_cb_func cb, const void *user_data)
nim_msglog_insert_msglog_async
NIM_SDK_DLL_API void nim_msglog_insert_msglog_async(const char *talk_id, const char *json_msg, bool need_update_session, const char *json_extension, nim_msglog_res_cb_func cb, const void *user_data)
nim_msglog_def.h
消息历史 接口相关的常量函数等定义头文件
nim_msglog_query_receipt_sent
NIM_SDK_DLL_API bool nim_msglog_query_receipt_sent(const char *json_msg, const char *json_extension)
nim_msglog_delete_by_session_type_async_ex
NIM_SDK_DLL_API void nim_msglog_delete_by_session_type_async_ex(bool delete_sessions, enum NIMSessionType to_type, bool revert_by_query_online, const char *json_extension, nim_msglog_res_ex_cb_func cb, const void *user_data)
nim_msglog_send_receipt_async
NIM_SDK_DLL_API void nim_msglog_send_receipt_async(const char *json_msg, const char *json_extension, nim_msglog_status_changed_cb_func cb, const void *user_data)