NIM PC Cross Platform SDK
|
消息历史 接口相关的常量函数等定义头文件 More...
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) |
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(消息不需要标记,或者已经标记过) | |
消息历史 接口相关的常量函数等定义头文件
void(* nim_msglog_delete_history_online_notify_cb_func)(NIMDeleteSessionHistoryMessagesNotifyInfo *info_list_head_node, int node_count, const void *user_data) |
删除某一会话的云端的历史记录推送回调函数定义[v8.0.0]
[out] | info_list_head_node | 被删除的会话列表的头指针 |
[out] | node_count | 会话列表的长度 |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
void(* nim_msglog_delete_history_online_res_cb_func)(int res_code, const char *accid, const void *user_data) |
删除与某一账号云端的历史记录回调函数定义(p2p类型)
[out] | res_code | 操作结果,成功200 |
[out] | accid | 进行删除操作时传入的对方accid |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
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]
[out] | res_code | 操作结果,成功200 |
[out] | accid | 进行删除操作时传入的会话id p2p:accid team:tid |
[out] | type | 会话的类型 |
[out] | time | 删除时间 |
[out] | ext | 删除某一会话的云端的历史记录操作时传入的ext字段 |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
void(* nim_msglog_delete_message_self_notify_cb_func)(const char *infos, const void *user_data) |
单向删除消息记录推送回调函数定义
[out] | infos | 被删除的消息摘要 数组包括session_id ,client_id,ext字段 |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
void(* nim_msglog_delete_message_self_res_cb_func)(int res_code, const char *result, const void *user_data) |
单向删除消息记录回调函数定义
[out] | res_code | 操作结果,成功200 |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
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) |
[out] | res_code | 操作结果,成功200 |
[out] | count | 返回的消息总数 |
[out] | result | 全文检索返回的消息体列表 |
[out] | json_extension | json 扩展数据(备用) |
[out] | user_data | APP 的自定义用户数据,SDK 只负责传回给回调函数,不做任何处理! |
void(* nim_msglog_import_prg_cb_func)(int64_t imported_count, int64_t total_count, const char *json_extension, const void *user_data) |
消息历史数据库导入过程的回调函数定义
[out] | imported_count | 已导入的消息历史记录数目 |
[out] | total_count | 消息历史记录总数目 |
[out] | json_extension | json扩展数据(备用) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
void(* nim_msglog_modify_res_cb_func)(int res_code, const char *json_extension, const void *user_data) |
消息历史操作结果的回调函数定义(只关心rescode)
[out] | res_code | 操作结果,成功200 |
[out] | json_extension | json扩展数据(备用) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
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) |
本地或在线查询消息的回调函数定义
[out] | res_code | 操作结果,成功200
|
[out] | id | 查询时传入的对方account id或者群组tid |
[out] | type | 查询时传入的会话类型 |
[out] | result | 查询结果json object array string (SEE MORE 『查询消息历史结果Json Keys』 as follows)(查询结果的实际数量需要解析该结果获取) |
[out] | json_extension | json扩展数据(备用) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
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聊天的根消息结果回调
[out] | res_code | 操作结果,成功200 |
[out] | client_id | 被查询的消息的客户端id |
[out] | is_root | 是否为根消息 true/false |
[out] | reply_count | 当为根消息时会同时返回被回复数量(回复数量是基于本地缓存数据统计,可以通过查询云端thread talk历史记录拿到精确值) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
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) |
查询单条消息历史回调函数定义
[out] | res_code | 操作结果,成功200 |
[out] | id | 查询时传入的客户端消息ID |
[out] | result | 查询结果 Json String (Keys SEE MORE in nim_talk_def.h 『消息结构 Json Keys』) |
[out] | json_extension | json扩展数据(备用) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
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 聊天的记录结果回调
[out] | res_code | 操作结果,成功200 |
[out] | root_msg | thread 聊天根消息的内容 |
[out] | total | 总的消息数量 |
[out] | timestamp | 最的一条回复消息的时间戳 |
[out] | msgs | 回复消息的列表 json object array string (SEE MORE 『查询消息历史结果Json Keys』 as follows)(查询结果的实际数量需要解析该结果获取) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
void(* nim_msglog_res_cb_func)(int res_code, const char *msg_id, const char *json_extension, const void *user_data) |
消息历史操作结果的回调函数定义(按消息历史id操作)
[out] | res_code | 操作结果,成功200 |
[out] | msg_id | 消息历史id |
[out] | json_extension | json扩展数据(备用) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
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操作)
[out] | res_code | 操作结果,成功200 |
[out] | uid | 对象id(account_id , team_id etc.) |
[out] | to_type | 对象类型(好友, 群组 etc.) |
[out] | json_extension | json扩展数据(备用) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
void(* nim_msglog_status_changed_cb_func)(int res_code, const char *result, const char *json_extension, const void *user_data) |
消息状态变更通知的回调函数定义
[out] | res_code | 操作结果,成功200 |
[out] | result | 结果(key定义见下面的 消息状态变更通知结果 Json Keys) |
[out] | json_extension | json扩展数据(备用) |
[out] | user_data | APP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理! |
@导出/导入云端备份操作结果
enum NIMMessageFeature |
enum NIMMessageType |
Message Type
enum NIMMsgLogQueryRange |
消息历史的检索范围
enum NIMMsglogQuerySource |
enum NIMMsgLogStatus |
消息状态
enum NIMMsgLogSubStatus |
enum 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 |
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 |
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"} |
|
static |