NIM PC Cross Platform SDK
nim_talkex_def_collect.h File Reference

收藏接口相关的常量函数等定义头文件 More...

#include "public_defines.h"

Go to the source code of this file.

Typedefs

typedef void(* nim_talkex_collect_add_collect_cb_func) (int code, const char *collect_info, const void *user_data)
 
typedef void(* nim_talkex_collect_remove_collects_cb_func) (int code, int count, const void *user_data)
 
typedef void(* nim_talkex_collect_update_collect_ext_cb_func) (int code, const char *collect_info, const void *user_data)
 
typedef void(* nim_talkex_collect_query_collects_cb_func) (int code, int total_count, const char *collect_info_list, const void *user_data)
 

Variables

收藏内容Json Keys
static const char * kNIMCollectInfoKeyID = "id"
 uint64_t,ID
 
static const char * kNIMCollectInfoKeyType = "type"
 int,收藏类型,开发者可根据业务自行定义
 
static const char * kNIMCollectInfoKeyData = "data"
 string,数据,最大20480
 
static const char * kNIMCollectInfoKeyExt = "ext"
 string,扩展字段,最大1024
 
static const char * kNIMCollectInfoKeyUniqueID = "unique_id"
 string,去重字段,拥有要同去重字段的收藏将会被覆盖
 
static const char * kNIMCollectInfoKeyCreateTime = "create_time"
 uint64_t,创建时间
 
static const char * kNIMCollectInfoKeyUpdateTime = "update_time"
 uint64_t,更新时间
 
匹配收藏Json Keys
static const char * kNIMMatchCollectInfoKeyID = "id"
 uint64_t,ID
 
static const char * kNIMMatchCollectInfoKeyCreateTime = "create_time"
 uint64_t,创建时间
 
分页查询收藏Json Keys
static const char * kNIMQueryCollectKeyFromTime = "from_time"
 uint64_t,起始时间,默认0
 
static const char * kNIMQueryCollectKeyToTime = "to_time"
 uint64_t,结束时间,推荐当前时间+1小时
 
static const char * kNIMQueryCollectKeyExcludeID = "exclude_id"
 uint64_t,结束查询的最后一条收藏的id(不包含在查询结果中) 缺省 可填0
 
static const char * kNIMQueryCollectKeyLimit = "limit"
 int,本次查询的上限(最多100条)
 
static const char * kNIMQueryCollectKeyReverse = "reverse"
 bool,反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false)
 
static const char * kNIMQueryCollectKeyType = "type"
 int 收藏类型,缺省(0)表示所有类型
 

Detailed Description

收藏接口相关的常量函数等定义头文件

Date
2020/04/19

Typedef Documentation

◆ nim_talkex_collect_add_collect_cb_func

void(* nim_talkex_collect_add_collect_cb_func)(int code, const char *collect_info, const void *user_data)

添加收藏回调函数定义

Parameters
[out]code执行结果
[out]collect_info添加收藏成功后会返回收藏的内容
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_talkex_collect_query_collects_cb_func

void(* nim_talkex_collect_query_collects_cb_func)(int code, int total_count, const char *collect_info_list, const void *user_data)

分页查询收藏列表回调函数定义

Parameters
[out]code执行结果
[out]total_count记录的总条数(非本次查询 到的条数)
[out]collect_info_list查询到的收藏列表
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_talkex_collect_remove_collects_cb_func

void(* nim_talkex_collect_remove_collects_cb_func)(int code, int count, const void *user_data)

添加收藏回调函数定义

Parameters
[out]code执行结果
[out]count删除的记录条数
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

◆ nim_talkex_collect_update_collect_ext_cb_func

void(* nim_talkex_collect_update_collect_ext_cb_func)(int code, const char *collect_info, const void *user_data)

更新收藏ext回调函数定义

Parameters
[out]code执行结果
[out]collect_info更新成功后会返回收藏的内容
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值