NIM PC Cross Platform SDK
nim_msglog_def.h File Reference

消息历史 接口相关的常量函数等定义头文件 More...

#include "nim_session_def.h"
#include "public_defines.h"

Go to the source code of this file.

Classes

struct  NIMDeleteSessionHistoryMessagesNotifyInfo
 删除与某一会话的历史记录推送数据定义 More...
 
struct  NIMLogsBackupExportInfo
 导出消息记录到云端参数定义 More...
 
struct  NIMLogsBackupImportInfo
 从云端导入消息记录参数定义 More...
 
struct  NIMQueryMsgOnlineAsyncParam
 从云端导入消息记录参数定义 More...
 
struct  NIMQueryMsgByKeywordOnlineAsyncParam
 根据关键字村云端查询消息记录的参数定义 More...
 
struct  NIMDeleteMessagesSelfParam
 单向删除某条消息参数 More...
 
struct  NIMQueryMsgAsyncParam
 云端查询某条消息参数一般用在thread聊天场景中 More...
 
struct  NIMQueryThreadHistoryMsgAsyncParam
 云端查询thread聊天历史参数 More...
 

Typedefs

typedef void(* nim_msglog_delete_history_online_res_cb_func) (int res_code, const char *accid, const void *user_data)
 
typedef 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)
 
typedef void(* nim_msglog_delete_history_online_notify_cb_func) (NIMDeleteSessionHistoryMessagesNotifyInfo *info_list_head_node, int node_count, const void *user_data)
 
typedef void(* nim_msglog_delete_message_self_res_cb_func) (int res_code, const void *user_data)
 
typedef void(* nim_msglog_delete_message_self_notify_cb_func) (const char *infos, const void *user_data)
 
typedef 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)
 
typedef 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)
 
typedef 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)
 
typedef void(* nim_msglog_res_cb_func) (int res_code, const char *msg_id, const char *json_extension, const void *user_data)
 
typedef void(* nim_msglog_res_ex_cb_func) (int res_code, const char *uid, enum NIMSessionType type, const char *json_extension, const void *user_data)
 
typedef void(* nim_msglog_modify_res_cb_func) (int res_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_msglog_import_prg_cb_func) (int64_t imported_count, int64_t total_count, const char *json_extension, const void *user_data)
 
typedef void(* nim_msglog_status_changed_cb_func) (int res_code, const char *result, const char *json_extension, const void *user_data)
 
typedef 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)
 
typedef 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)
 

Enumerations

enum  NIMMsglogQuerySource { kNIMMsglogQuerySourceLocal = 0 , kNIMMsglogQuerySourceServer = 1 }
 
enum  NIMMessageType {
  kNIMMessageTypeText = 0 , kNIMMessageTypeImage = 1 , kNIMMessageTypeAudio = 2 , kNIMMessageTypeVideo = 3 ,
  kNIMMessageTypeLocation = 4 , kNIMMessageTypeNotification = 5 , kNIMMessageTypeFile = 6 , kNIMMessageTypeTips = 10 ,
  kNIMMessageTypeRobot = 11 , kNIMMessageTypeG2NetCall = 12 , kNIMMessageTypeCustom = 100 , kNIMMessageTypeUnknown = 1000
}
 
enum  NIMMessageFeature {
  kNIMMessageFeatureDefault = 0 , kNIMMessageFeatureLeaveMsg = 1 , kNIMMessageFeatureRoamMsg = 2 , kNIMMessageFeatureSyncMsg = 3 ,
  kNIMMessageFeatureCustomizedMsg = 4
}
 
enum  NIMMsgLogStatus {
  kNIMMsgLogStatusNone = 0 , kNIMMsgLogStatusUnread = 1 , kNIMMsgLogStatusRead = 2 , kNIMMsgLogStatusDeleted = 3 ,
  kNIMMsgLogStatusSending = 4 , kNIMMsgLogStatusSendFailed = 5 , kNIMMsgLogStatusSent = 6 , kNIMMsgLogStatusReceipt = 7 ,
  kNIMMsgLogStatusDraft = 8 , kNIMMsgLogStatusSendCancel = 9 , kNIMMsgLogStatusRefused = 10
}
 
enum  NIMNotificationId {
  kNIMNotificationIdTeamInvite = 0 , kNIMNotificationIdTeamKick = 1 , kNIMNotificationIdTeamLeave = 2 , kNIMNotificationIdTeamUpdate = 3 ,
  kNIMNotificationIdTeamDismiss = 4 , kNIMNotificationIdTeamApplyPass = 5 , kNIMNotificationIdTeamOwnerTransfer = 6 , kNIMNotificationIdTeamAddManager = 7 ,
  kNIMNotificationIdTeamRemoveManager = 8 , kNIMNotificationIdTeamInviteAccept = 9 , kNIMNotificationIdTeamMuteMember = 10 , kNIMNotificationIdNetcallMiss = 101 ,
  kNIMNotificationIdNetcallBill = 102 , kNIMNotificationIdNetcallReject = 103 , kNIMNotificationIdTeamSyncCreate = 1000 , kNIMNotificationIdTeamMemberChanged = 1001 ,
  kNIMNotificationIdTeamSyncUpdateMemberProperty = 1002 , kNIMNotificationIdLocalCreateTeam = 2000 , kNIMNotificationIdLocalApplyTeam = 2001 , kNIMNotificationIdLocalRejectApply = 2002 ,
  kNIMNotificationIdLocalRejectInvite = 2003 , kNIMNotificationIdLocalUpdateMemberProperty = 2004 , kNIMNotificationIdLocalUpdateOtherNick = 2005 , kNIMNotificationIdLocalGetTeamInfo = 2006 ,
  kNIMNotificationIdLocalGetTeamList = 2007 , kNIMNotificationIdLocalMuteMember = 2008 , kNIMNotificationIdLocalMute = 2009 , kNIMNotificationIdLocalGetTeamMsgUnreadCount = 2010 ,
  kNIMNotificationIdLocalGetTeamMsgUnreadList = 2011 , kNIMNotificationIdLocalNetcallReject = 3103 , kNIMNotificationIdLocalNetcallNoResponse = 3104 , kNIMNotificationIdLocalNetcallCanceled = 3105 ,
  kNIMNotificationIdSuperTeamInvite = 401 , kNIMNotificationIdSuperTeamKick = 402 , kNIMNotificationIdSuperTeamLeave = 403 , kNIMNotificationIdSuperTeamUpdate = 404 ,
  kNIMNotificationIdSuperTeamDismiss = 405 , kNIMNotificationIdSuperTeamOwnerTransfer = 406 , kNIMNotificationIdSuperTeamAddManager = 407 , kNIMNotificationIdSuperTeamRemoveManager = 408 ,
  kNIMNotificationIdSuperTeamMuteMember = 409 , kNIMNotificationIdSuperTeamApplyPass = 410 , kNIMNotificationIdSuperTeamInviteAccept = 411
}
 
enum  NIMMsgLogSubStatus { kNIMMsgLogSubStatusNone = 0 , kNIMMsgLogSubStatusNotPlaying = 20 , kNIMMsgLogSubStatusPlayed = 21 }
 
enum  LogsBackupRemoteOperate { LogsBackupRemoteOperate_Export = 0 , LogsBackupRemoteOperate_Import = 1 }
 
enum  LogsBackupRemoteState {
  LogsBackupRemoteState_Begin = -2 , LogsBackupRemoteState_UnDef , LogsBackupRemoteState_UserCanceled = 5 , LogsBackupRemoteState_SDKError ,
  LogsBackupRemoteState_IMP_NoBackup , LogsBackupRemoteState_IMP_SyncFromSrvError , LogsBackupRemoteState_IMP_DownloadBackupFailed , LogsBackupRemoteState_IMP_RAWError ,
  LogsBackupRemoteState_IMP_ParseRAWError , LogsBackupRemoteState_IMP_LocalDBFailed , LogsBackupRemoteState_EXP_LocalDBFailed , LogsBackupRemoteState_EXP_RAWError ,
  LogsBackupRemoteState_EXP_UploadBackupFailed , LogsBackupRemoteState_EXP_SyncToSrvError , LogsBackupRemoteState_Done , LogsBackupRemoteState_Done_NoLogs ,
  LogsBackupRemoteState_End , LogsBackupRemoteState_FinalState_Begin = LogsBackupRemoteState_UserCanceled
}
 
enum  NIMFullTextSearchRule { kNIMFullTextSearchOrderByAsc = 1 , kNIMFullTextSearchOrderByDesc = 2 , kNIMFullTextSearchNoGroupBySession = 4 }
 全文检索排序规则
 
enum  NIMMsglogSearchDirection { kForward = 0 , kBackward = 1 }
 
enum  NIMMsgLogQueryRange {
  kNIMMsgLogQueryRangeP2P = kNIMSessionTypeP2P , kNIMMsgLogQueryRangeTeam = kNIMSessionTypeTeam , kNIMMsgLogQueryRangeSuperTeam = kNIMSessionTypeSuperTeam , kNIMMsgLogQueryRangeAll = 100 ,
  kNIMMsgLogQueryRangeAllP2P = 101 , kNIMMsgLogQueryRangeAllTeam = 102 , kNIMMsgLogQueryRangeAllSuperTeam = 103 , kNIMMsgLogQueryRangeUnknown = 200
}
 

Variables

消息状态变更通知结果 Json Keys
static const char * kNIMMsglogStatusChangedKeyTalkID = "talk_id"
 会话ID
 
static const char * kNIMMsglogStatusChangedKeyMsgTimetag = "msg_timetag"
 临界的消息的时间戳
 
static const char * kNIMMsglogStatusChangedKeyStatus = "status"
 变更后的状态
 
查询消息历史结果Json Keys

for example: {"count": 20, "source" : 0, "content":[obj, obj, obj, ....] }

static const char * kNIMMsglogQueryKeyCount = "count"
 int, 查询得到的数量
 
static const char * kNIMMsglogQueryKeySource = "source"
 NIMMsglogQuerySource, 查询结果来源
 
static const char * kNIMMsglogQueryKeyContent
 
接口nim_msglog_query_msg_async扩展参数json object key定义
static const char * kNIMMsglogQueryJsonExtensionKeyDirection = "direction"
 NIMMsglogSearchDirection,默认为kForward.
 
static const char * kNIMMsglogQueryJsonExtensionKeyReverse = "reverse"
 bool,返回的消息历史排序正序(false)/逆序(true),默认为false
 
static const char * kNIMMsglogQueryJsonExtensionKeyEndTime = "endtime"
 int64_t,查询消息的截止时间,如果direction为kForward,则截止时间应小于anchor_msg_time,否则大于anchor_msg_time,默认为0代表不限制截止时间
 
接口nim_msglog_query_msg_online_async扩展参数json_extension key定义
static const char * kNIMMsglogJsonExtKeyNeedAutoDownloadAttachment = "need_auto_download_attachment"
 bool 查询结果回来后,是否需要sdk自动下载消息附件。true:需要,false:不需要
 
static const char * kNIMMsglogJsonExtKeyQueryMsgTypeList = "query_msg_type_list"
 array 要查询的消息类型
 
接口 nim_msglog_insert_msglog_async 扩展参数 json_extension key 定义
static const char * kNIMMsglogJsonExtKeyComposeLastMsg = "compose_last_msg"
 bool 插入新消息若需要更新会话数据,指定是否需要绑定历史消息中的最后一条消息。true:需要,false:不需要
 
static const char * kNIMMsglogJsonExtKeyExcludeMsgType = "exclude_msg_type"
 array 绑定的消息要排除的类型,始终排除掉未知类型(1000)消息
 
群组通知 Json Keys

for example: {"id": 1, "data": *** }

static const char * kNIMNotificationKeyId = "id"
 int, 见NIMNotificationId
 
static const char * kNIMNotificationKeyData = "data"
 json object 包含以下5种可能的数据结构
 
static const char * kNIMNotificationKeyDataIds = "ids"
 string array
 
static const char * kNIMNotificationKeyDataInvalidIds = "invalid_ids"
 string array
 
static const char * kNIMNotificationKeyDataId = "id"
 string
 
static const char * kNIMNotificationKeyDataLeave = "leave"
 bool
 
static const char * kNIMNotificationKeyDataMute = "mute"
 int
 
static const char * kNIMNotificationKeyTeamInfo = "team_info"
 string, team_info 群组信息 Json Keys
 
static const char * kNIMNotificationKeyTeamMember = "team_member"
 string, team_member_property 群组成员信息 Json Keys
 
static const char * kNIMNotificationKeyUserNameCards = "name_cards"
 json string array, 操作者和被操作者双方的 用户名片 Json Keys
 
static const char * kNIMNotificationKeyAttach = "attach"
 string array, 应用自定义扩展字段
 

kNIMNotificationIdNetcallBill/kNIMNotificationIdNetcallMiss/kNIMNotificationIdNetcallReject/kNIMNotificationIdLocalNetcallReject/kNIMNotificationIdLocalNetcallNoResponse Data Keys

static const char * kNIMNotificationIdNetCallTypeKey = "calltype"
 int 通话类型对应NIMVideoChatMode
 
static const char * kNIMNotificationIdNetCallTimeKey = "time"
 int64 时间 单位毫秒
 
static const char * kNIMNotificationIdNetCallIdsKey = "ids"
 StrArray 帐号
 
static const char * kNIMNotificationIdNetCallChannelKey = "channel"
 int64 通道id
 
static const char * kNIMNotificationIdNetCallDurationKey = "duration"
 int64 通话时长 单位秒
 
static const char * kNIMNotificationIdNetCallFromKey = "from"
 string 发起者帐号
 
static const char * kNIMNotificationIdNetCallEXTKey = "ext"
 string 会发起时传入的 custominfo参数
 
单向删除某条消息服务端推送 Json Keys
static const char * kNIMDELMSGSelfNotifyKeySessionID = "session_id"
 string, 会话 ID
 
static const char * kNIMDELMSGSelfNotifyKeyMsgClientID = "client_id"
 string 消息ID
 
static const char * kNIMDELMSGSelfNotifyKeyEXT = "ext"
 string 用户自定义数据
 
群组消息标记已读回调 json key
static const char * kNIMTEAMMSGACKREADSUCCESSIDSKEY = "success_ids"
 string json array 群组消息标记已读成功的msg id list key
 
static const char * kNIMTEAMMSGACKREADFAILUREIDSKEY = "failure_ids"
 string json array 群组消息标记已读失败的msg id list key
 
static const char * kNIMTEAMMSGACKREADSIGNOREDIDSKEY = "ignored_ids"
 string json array 群组消息标记已读忽略的msg id list key(消息不需要标记,或者已经标记过)
 

Detailed Description

消息历史 接口相关的常量函数等定义头文件

Author
Oleg
Date
2015/02/12

Typedef Documentation

◆ 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)

删除某一会话的云端的历史记录推送回调函数定义[v8.0.0]

Parameters
[out]info_list_head_node被删除的会话列表的头指针
[out]node_count会话列表的长度
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

删除与某一账号云端的历史记录回调函数定义(p2p类型)

Parameters
[out]res_code操作结果,成功200
[out]accid进行删除操作时传入的对方accid
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

删除某一会话的云端的历史记录回调函数定义[v8.0.0]

Parameters
[out]res_code操作结果,成功200
[out]accid进行删除操作时传入的会话id p2p:accid team:tid
[out]type会话的类型
[out]time删除时间
[out]ext删除某一会话的云端的历史记录操作时传入的ext字段
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_msglog_delete_message_self_notify_cb_func

void(* nim_msglog_delete_message_self_notify_cb_func)(const char *infos, const void *user_data)

单向删除消息记录推送回调函数定义

Parameters
[out]infos被删除的消息摘要 数组包括session_id ,client_id,ext字段
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_msglog_delete_message_self_res_cb_func

void(* nim_msglog_delete_message_self_res_cb_func)(int res_code, const char *result, const void *user_data)

单向删除消息记录回调函数定义

Parameters
[out]res_code操作结果,成功200
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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, constvoid *user_data)
Parameters
[out]res_code操作结果,成功200
[out]count返回的消息总数
[out]result全文检索返回的消息体列表
[out]json_extensionjson 扩展数据(备用)
[out]user_dataAPP 的自定义用户数据,SDK 只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

消息历史数据库导入过程的回调函数定义

Parameters
[out]imported_count已导入的消息历史记录数目
[out]total_count消息历史记录总数目
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_msglog_modify_res_cb_func

void(* nim_msglog_modify_res_cb_func)(int res_code, const char *json_extension, const void *user_data)

消息历史操作结果的回调函数定义(只关心rescode)

Parameters
[out]res_code操作结果,成功200
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

本地或在线查询消息的回调函数定义

Parameters
[out]res_code操作结果,成功200
  1. 在线查询双人会话消息需要处理的错误号: 414:参数错误
  2. 在线查询群组消息需要处理的错误号: 414:参数错误 403:禁止访问(不在该群)
[out]id查询时传入的对方account id或者群组tid
[out]type查询时传入的会话类型
[out]result查询结果json object array string (SEE MORE 『查询消息历史结果Json Keys』 as follows)(查询结果的实际数量需要解析该结果获取)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

查询某条消息是否为thread聊天的根消息结果回调

Parameters
[out]res_code操作结果,成功200
[out]client_id被查询的消息的客户端id
[out]is_root是否为根消息 true/false
[out]reply_count当为根消息时会同时返回被回复数量(回复数量是基于本地缓存数据统计,可以通过查询云端thread talk历史记录拿到精确值)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

查询单条消息历史回调函数定义

Parameters
[out]res_code操作结果,成功200
[out]id查询时传入的客户端消息ID
[out]result查询结果 Json String (Keys SEE MORE in nim_talk_def.h 『消息结构 Json Keys』)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

查询thread 聊天的记录结果回调

Parameters
[out]res_code操作结果,成功200
[out]root_msgthread 聊天根消息的内容
[out]total总的消息数量
[out]timestamp最的一条回复消息的时间戳
[out]msgs回复消息的列表 json object array string (SEE MORE 『查询消息历史结果Json Keys』 as follows)(查询结果的实际数量需要解析该结果获取)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

消息历史操作结果的回调函数定义(按消息历史id操作)

Parameters
[out]res_code操作结果,成功200
[out]msg_id消息历史id
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

消息历史操作结果的回调函数定义(按消息对象id操作)

Parameters
[out]res_code操作结果,成功200
[out]uid对象id(account_id , team_id etc.)
[out]to_type对象类型(好友, 群组 etc.)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ 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)

消息状态变更通知的回调函数定义

Parameters
[out]res_code操作结果,成功200
[out]result结果(key定义见下面的 消息状态变更通知结果 Json Keys)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

Enumeration Type Documentation

◆ LogsBackupRemoteOperate

@导出/导入云端备份操作类型

Enumerator
LogsBackupRemoteOperate_Export 

导出

LogsBackupRemoteOperate_Import 

导入

◆ LogsBackupRemoteState

@导出/导入云端备份操作结果

Enumerator
LogsBackupRemoteState_Begin 

定义开始

LogsBackupRemoteState_UnDef 

未定义

LogsBackupRemoteState_UserCanceled 

已取消

LogsBackupRemoteState_SDKError 

SDK 已出错

LogsBackupRemoteState_IMP_NoBackup 

没有备份文件

LogsBackupRemoteState_IMP_SyncFromSrvError 

查询备份失败一般是网络错误

LogsBackupRemoteState_IMP_DownloadBackupFailed 

下载备份文件出错

LogsBackupRemoteState_IMP_RAWError 

解密/解压出来的源文件格式错误

LogsBackupRemoteState_IMP_ParseRAWError 

解析源文件格式错误

LogsBackupRemoteState_IMP_LocalDBFailed 

导入本地DB出错

LogsBackupRemoteState_EXP_LocalDBFailed 

打开本地DB失败

LogsBackupRemoteState_EXP_RAWError 

导出到源文件失败

LogsBackupRemoteState_EXP_UploadBackupFailed 

上传备份文件出错

LogsBackupRemoteState_EXP_SyncToSrvError 

同步到服务器出错一般是网络错误

LogsBackupRemoteState_Done 

完成

LogsBackupRemoteState_Done_NoLogs 

完成,但未导出任何记录

LogsBackupRemoteState_End 

定义结束

LogsBackupRemoteState_FinalState_Begin 

是否已是最终状态的一个标识,可以判断state是否为终态(state >= LogsBackupRemoteState_FinalState_Begin)

◆ NIMMessageFeature

消息种类

Enumerator
kNIMMessageFeatureDefault 

默认

kNIMMessageFeatureLeaveMsg 

离线消息

kNIMMessageFeatureRoamMsg 

漫游消息

kNIMMessageFeatureSyncMsg 

同步消息

kNIMMessageFeatureCustomizedMsg 

透传消息

◆ NIMMessageType

Message Type

Enumerator
kNIMMessageTypeText 

文本类型消息

kNIMMessageTypeImage 

图片类型消息

kNIMMessageTypeAudio 

声音类型消息

kNIMMessageTypeVideo 

视频类型消息

kNIMMessageTypeLocation 

位置类型消息

kNIMMessageTypeNotification 

系统类型通知(包括入群出群通知等) NIMNotificationId

kNIMMessageTypeFile 

文件类型消息

kNIMMessageTypeTips 

提醒类型消息,Tip内容根据格式要求填入消息结构中的kNIMMsgKeyServerExt字段

kNIMMessageTypeRobot 

波特机器人消息

kNIMMessageTypeG2NetCall 

G2话单消息

kNIMMessageTypeCustom 

自定义消息

kNIMMessageTypeUnknown 

未知类型消息,本地使用,发送时勿使用,作为默认值

◆ NIMMsgLogQueryRange

消息历史的检索范围

Enumerator
kNIMMsgLogQueryRangeP2P 

指定的个人(点对点会话)(注意:暂不支持指定多个人的检索!)

kNIMMsgLogQueryRangeTeam 

指定的群组(注意:暂不支持指定多个群组的检索!)

kNIMMsgLogQueryRangeSuperTeam 

指定的超大群组(注意:暂不支持指定多个群组的检索!)

kNIMMsgLogQueryRangeAll 

全部

kNIMMsgLogQueryRangeAllP2P 

所有个人会话

kNIMMsgLogQueryRangeAllTeam 

所有群组

kNIMMsgLogQueryRangeAllSuperTeam 

所有超大群组

kNIMMsgLogQueryRangeUnknown 

未知(如指定个人和群组的集合)(注意:暂不支持指定个人和群组的混合检索!)

◆ NIMMsglogQuerySource

消息历史查询来源

Enumerator
kNIMMsglogQuerySourceLocal 

本地查询

kNIMMsglogQuerySourceServer 

云端查询

◆ NIMMsglogSearchDirection

消息历史查询方向

Enumerator
kForward 

以时间点为准向前搜索

kBackward 

以时间点为准向后搜索

◆ NIMMsgLogStatus

消息状态

Enumerator
kNIMMsgLogStatusNone 

默认,不能当查询条件,意义太多

kNIMMsgLogStatusUnread 

收到消息,未读

kNIMMsgLogStatusRead 

收到消息,已读

kNIMMsgLogStatusDeleted 

已删

kNIMMsgLogStatusSending 

发送中

kNIMMsgLogStatusSendFailed 

发送失败

kNIMMsgLogStatusSent 

已发送

kNIMMsgLogStatusReceipt 

对方已读发送的内容

kNIMMsgLogStatusDraft 

草稿

kNIMMsgLogStatusSendCancel 

发送取消

kNIMMsgLogStatusRefused 

被对方拒绝,比如被对方加入黑名单等等

◆ NIMMsgLogSubStatus

消息子状态

Enumerator
kNIMMsgLogSubStatusNone 

默认状态

kNIMMsgLogSubStatusNotPlaying 

未播放

kNIMMsgLogSubStatusPlayed 

已播放

◆ NIMNotificationId

通知类型

Enumerator
kNIMNotificationIdTeamInvite 

普通群拉人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""}

kNIMNotificationIdTeamKick 

普通群踢人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""}

kNIMNotificationIdTeamLeave 

退出群,{"id" : "a1","user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamUpdate 

群信息更新,{"team_info":team_info,"user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamDismiss 

群解散,{"user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamApplyPass 

高级群申请加入成功,{"id":"a1","user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamOwnerTransfer 

高级群移交群主,{"id":"a1", "leave" : bool,"user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamAddManager 

增加管理员,{"ids":["a1","a2"],"user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamRemoveManager 

删除管理员,{"ids":["a1","a2"],"user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamInviteAccept 

高级群接受邀请进群,{"id":"a1","user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdTeamMuteMember 

禁言/解禁群成员,{"user_namecards":["namecard1", "namecard2"],"team_info":team_info,"id":"a1","mute":1-禁言,0-解禁}

kNIMNotificationIdNetcallMiss 

未接电话,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}

kNIMNotificationIdNetcallBill 

话单,{"calltype":2,"channel":6146077129466446197,"duration":8,"ids":["id1","id2"],"time":1430995117398}

kNIMNotificationIdNetcallReject 

拒绝电话,{"calltype":1,"channel":6144978055925334000,"from":"id1","ids":["id1"],"time":139323423424}

kNIMNotificationIdTeamSyncCreate 

创建群 {"team_info" : team_info} // 群组信息(Keys SEE MORE nim_team_def.h 『群组信息 Json Keys』)

kNIMNotificationIdTeamMemberChanged 

群成员变更{"team_member" : team_member_info}

kNIMNotificationIdTeamSyncUpdateMemberProperty 

同步通知:修改群成员属性(可能是自己的或别人的)

kNIMNotificationIdLocalCreateTeam 

本地操作创建群 {"ids" : ["a1", "a2"]}

kNIMNotificationIdLocalApplyTeam 

本地操作申请加入群 {}

kNIMNotificationIdLocalRejectApply 

本地操作拒绝申请 {"id":"a1"}

kNIMNotificationIdLocalRejectInvite 

本地操作拒绝邀请 {"id":"a1"}

kNIMNotificationIdLocalUpdateMemberProperty 

本地操作更新群成员属性 {"team_member" : team_member_info}

kNIMNotificationIdLocalUpdateOtherNick 

本地操作更新他人nickname {}

kNIMNotificationIdLocalGetTeamInfo 

本地操作获取群信息 {"team_info":team_info} // 群组信息(Keys SEE MORE nim_team_def.h 『群组信息 Json Keys』)

kNIMNotificationIdLocalGetTeamList 

本地操作获取群成员信息结束

kNIMNotificationIdLocalMuteMember 

本地操作对群成员禁言 {"id":"a1", "mute":1-禁言,0-解禁}

kNIMNotificationIdLocalMute 

本地操作对群禁言 {}

kNIMNotificationIdLocalGetTeamMsgUnreadCount 

获取群消息未读数 {[{"client_msg_id":"", "count":int, "read_accid":"当前已读成员的accid"},...]}

kNIMNotificationIdLocalGetTeamMsgUnreadList 

获取群消息未读列表 {"client_msg_id":"", "read":["id1",...], "unread":["id2",...]}

kNIMNotificationIdLocalNetcallReject 

拒绝电话,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}

kNIMNotificationIdLocalNetcallNoResponse 

无应答,未接通电话,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}

kNIMNotificationIdLocalNetcallCanceled 

未接通前主叫方挂断,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}

kNIMNotificationIdSuperTeamInvite 

超大群拉人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""}

kNIMNotificationIdSuperTeamKick 

超大群踢人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""}

kNIMNotificationIdSuperTeamLeave 

退出超大群,{"id" : "a1","user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdSuperTeamUpdate 

超大群群信息更新,{"team_info":team_info,"user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdSuperTeamDismiss 

超大群解散,{"user_namecards":["namecard1", "namecard2"]}

kNIMNotificationIdSuperTeamOwnerTransfer 

超大群移交群主,{"id":"a1","uinfos":["uinfo1", "uinfo2"]}

kNIMNotificationIdSuperTeamAddManager 

超大群增加管理员,{"ids":["a1","a2"],"uinfos":["uinfo1", "uinfo2"]}

kNIMNotificationIdSuperTeamRemoveManager 

超大群删除管理员,{"ids":["a1","a2"],"uinfos":["uinfo1", "uinfo2"]}

kNIMNotificationIdSuperTeamMuteMember 

超大群禁言/解禁群成员,{"uinfos":["uinfo1", "uinfo2"],“tinfo”:tinfo,"id":"a1","mute":1-禁言,0-解禁}

kNIMNotificationIdSuperTeamApplyPass 

超大群申请加入成功,{"tinfo":tinfo,"id":"a1","uinfos":["uinfo1", "uinfo2"]}

kNIMNotificationIdSuperTeamInviteAccept 

超大群接受邀请进群,{"tinfo":tinfo,"id":"a1"}

Variable Documentation

◆ kNIMMsglogQueryKeyContent

const char* kNIMMsglogQueryKeyContent
static
Initial value:
=
"content"