NIM SDK API
9.0.0
|
SDK设置项 More...
#include <nim_client_helper.h>
Public Member Functions | |
SDKConfig () | |
void | SetCustomClientType (int type) |
int | GetCustomClientType () const |
Friends | |
class | Client |
SDK设置项
nim::SDKConfig::SDKConfig | ( | ) |
构造函数
bool nim::SDKConfig::animated_image_thumbnail_enabled_ |
bool 开启对动图缩略图的支持 ,默认为false,开启后获取的缩略图为原格式,关闭后获取的缩略图为第一帧静态图
bool nim::SDKConfig::cache_session_data_when_delete_ |
bool 删除会话时是否在数据库缓存会话原数据,默认为 false
bool nim::SDKConfig::caching_markread_ |
bool 是否开启缓存式“已接收回执”发送,程序可能收到大量消息以至触发频控时可以考虑开启此开关 缺省 false 关闭
uint32_t nim::SDKConfig::caching_markread_count_ |
uint32 caching_markread_ == true 时有效 缓存的最大消息条数 缺省 10
uint32_t nim::SDKConfig::caching_markread_time_ |
uint32 caching_markread_ == true 时有效 缓存时间 单位ms 缺省 1000
bool nim::SDKConfig::client_antispam_ |
bool 客户端反垃圾,默认为false,如需开启请提前咨询技术支持或销售
int nim::SDKConfig::comm_neca_ |
int 通信加密算法 {1(RC4),2(AES128),4(SM4)} def:1(RC4) 对称加密
bool nim::SDKConfig::custom_enable_fcs_ |
是否开启融合云存储
int nim::SDKConfig::custom_timeout_ |
int 自定义通讯超时时间,暂时不开放设置
std::string nim::SDKConfig::database_encrypt_key_ |
string 数据库秘钥,必填,目前只支持最多32个字符的加密密钥!建议使用32个字符
bool nim::SDKConfig::dedicated_cluste_flag_ |
bool 是否为专属集群 {true,false} def:false
std::string nim::SDKConfig::default_link_address_ |
string 默认link服务器地址,如果选择使用私有服务器,ip_protocol_version_ != 1(ipv4 or auto)则必填
std::string nim::SDKConfig::default_link_address_ipv6_ |
string 默认link ipv6服务器地址,如果选择使用私有服务器,ip_protocol_version_ == 1(使用ipv6)则必填
std::string nim::SDKConfig::default_nos_upload_address_ |
string 默认nos 上传服务器地址,如果选择使用私有服务器,则必填
std::string nim::SDKConfig::default_nos_upload_host_ |
string 默认nos 上传服务器主机地址,仅 kNIMUseHttps设置为true 时有效,用作 https 上传时的域名校验及 http header host 字段填充
bool nim::SDKConfig::disable_app_nap_ |
string 是否禁用 macOS 下的 App Nap 功能,默认为 true
bool nim::SDKConfig::enable_user_datafile_backup_ |
bool 是否开启用户数据备份(本地)功能 缺省true
bool nim::SDKConfig::enable_user_datafile_defrestoreproc_ |
bool 是否使用缺省的用户数据恢复(本地)方案 缺省false enable_user_datafile_restore_ == true 生效
bool nim::SDKConfig::enable_user_datafile_restore_ |
bool 是否开启用户数据恢复(本地)功能 缺省false
int nim::SDKConfig::fcs_auth_type_ |
融合云存储认证方式 1=refer鉴权,2=基于时间的token鉴权,3=基于url的token鉴权,4=custom鉴权
int nim::SDKConfig::hand_shake_type_ |
int 登录时使用的握手协议类型 0:支持配置多种对称与非对称加密算法,1:只支持RAS + RC4,缺省 1
std::list<std::string> nim::SDKConfig::http_dns_server_interface_ |
string list httpdns服务请求地址,如果没有特定地址可以不填
int nim::SDKConfig::ip_protocol_version_ |
int IP地址族设置 0:ipv4 1:ipv6 2:auto,经SDK测试后,自行选择,会有少许性能损耗。缺省 0(ipv4)
std::string nim::SDKConfig::lbs_address_ |
string lbs地址,如果选择使用私有服务器,则必填
std::list<std::string> nim::SDKConfig::lbs_backup_address_ |
string list lbs备用地址,没有可不填
int nim::SDKConfig::login_max_retry_times_ |
int 登录重试最大次数,如需设置建议设置大于3次,默认填0,SDK默认设置次数
bool nim::SDKConfig::need_update_lbs_befor_relogin_ |
bool 在进行重新登录前是否先刷新一下lbs,对于切换网络的场景适用
int nim::SDKConfig::nego_key_neca_ |
int "交换密钥"协议加密算法 {1(RSA),2(SM2)}, def:1(RSA) 非对称加密
std::string nim::SDKConfig::nego_key_neca_key_parta_ |
string "交换密钥"协议加密算法密钥 part A 自定义时则必填 BigNumHex string 不含0x RSA:module,SM2:X
std::string nim::SDKConfig::nego_key_neca_key_partb_ |
string 非对称加密算法key2 RSA:EXP,SM2: SM2Y 自定义时则必填
int nim::SDKConfig::nego_key_neca_key_version_ |
int 非对称加密算法的 key version 自定义时则必填
std::string nim::SDKConfig::nos_accelerate_address_ |
string nos 加速地址拼接模板,用于获得加速后的下载地址
std::string nim::SDKConfig::nos_accelerate_host_ |
string 需要被加速主机名【8.1.0版本以及后不建议使用,推荐nos_accelerate_host_list_】
std::vector<std::string> nim::SDKConfig::nos_accelerate_host_list_ |
string array,需要被加速主机名列表
std::string nim::SDKConfig::nos_download_address_ |
string nos 下载地址拼接模板,用于拼接最终得到的下载地址
std::string nim::SDKConfig::nos_lbs_address_ |
string nos lbs地址,如果选择使用私有服务器,则必填
bool nim::SDKConfig::preload_attach_ |
bool 是否需要预下载附件(图片和语音),选填,默认为true,如果有对带宽流量有较高要求的请关闭该选项, 改为上层开发者按需下载附件文件
std::string nim::SDKConfig::preload_image_name_template_ |
string 预下载图片命名规则,以{filename}为token进行替换
int nim::SDKConfig::preload_image_quality_ |
int 预下载图片质量,选填,范围0-100
std::string nim::SDKConfig::preload_image_resize_ |
string 预下载图片基于长宽做内缩略,选填,比如宽100高50,则赋值为100x50,中间为字母小写x
bool nim::SDKConfig::priority_use_cdn_host_ |
bool 是否优先使用cdn域名
std::string nim::SDKConfig::probe_ipv4_url_ |
string 探测ipv4地址类型使用的url,ip_protocol_version_ == 2(auto) 时生效
std::string nim::SDKConfig::probe_ipv6_url_ |
string 探测ipv6地址类型使用的url,ip_protocol_version_ == 2(auto) 时生效
std::string nim::SDKConfig::push_cer_name_ |
string 选填,云信后台配置的推送证书名称 ( iOS/Mac有效)
std::string nim::SDKConfig::push_token_ |
string 选填,推送的设备token (iOS/Mac有效)
bool nim::SDKConfig::reset_unread_count_when_recall_ |
bool 撤回消息是否重新计算未读消息计数,默认为false
std::string nim::SDKConfig::rsa_public_key_module_ |
string RSA public key,如果选择使用私有服务器,则必填 【6.9.0版本后已废弃】
int nim::SDKConfig::rsa_version_ |
int RSA version,如果选择使用私有服务器,则必填 【6.9.0版本后已废弃】
std::string nim::SDKConfig::sdk_human_version |
sdk可读版本号
NIMSDKLogLevel nim::SDKConfig::sdk_log_level_ |
NIMSDKLogLevel 定义见NIMSDKLogLevel,选填,SDK默认的内置级别为kNIMSDKLogLevelPro
NIMSDKType nim::SDKConfig::sdk_type |
客户端sdk类型
std::string nim::SDKConfig::server_conf_file_path_ |
string 私有云服务器相关地址配置文件本地绝对路径,如果不填默认执行文件目录下的server_conf.txt
std::map<int , int > nim::SDKConfig::sync_data_type_list_ |
map 数据同步类型 key(28:置顶会话) value(0:不同步,1:自动同步)
bool nim::SDKConfig::sync_session_ack_ |
bool 设置是否已读未读状态多端同步,默认true
bool nim::SDKConfig::team_msg_ack_ |
bool 群消息已读功能开关, 默认为false,如需开启请提前咨询技术支持或销售
bool nim::SDKConfig::team_notification_unread_count_ |
bool 群通知是否计入未读数,默认为false
bool nim::SDKConfig::upload_sdk_events_after_login_ |
bool,在调用 Login 接口后无论成功是否上报历史错误日志到服务器(目前支持 408、415、500)默认为false
bool nim::SDKConfig::use_https_ |
bool 是否启用HTTPS协议,默认为true
bool nim::SDKConfig::use_private_server_ |
bool 是否使用私有服务器,如果使用私有服务器,则必须设置为true
std::string nim::SDKConfig::user_datafile_localbackup_folder_ |
string 用户数据文件备份(本地)目录,缺省在数据文件所在目录创建一个db_file.back目录
bool nim::SDKConfig::vchat_miss_unread_count_ |
bool 语音消息未接通消息是否计入未读数,默认为false