NIM SDK API  9.0.0
Public Member Functions | Public Attributes | Friends | List of all members
nim::SDKConfig Struct Reference

SDK设置项 More...

#include <nim_client_helper.h>

Public Member Functions

 SDKConfig ()
 
void SetCustomClientType (int type)
 
int GetCustomClientType () const
 

Public Attributes

std::string push_cer_name_
 
std::string push_token_
 
std::string database_encrypt_key_
 
bool preload_attach_
 
int preload_image_quality_
 
std::string preload_image_resize_
 
std::string preload_image_name_template_
 
NIMSDKLogLevel sdk_log_level_
 
bool sync_session_ack_
 
int login_max_retry_times_
 
int custom_timeout_
 
bool use_https_
 
bool team_notification_unread_count_
 
bool vchat_miss_unread_count_
 
bool reset_unread_count_when_recall_
 
bool upload_sdk_events_after_login_
 
bool animated_image_thumbnail_enabled_
 
bool client_antispam_
 
bool team_msg_ack_
 
bool need_update_lbs_befor_relogin_
 
bool caching_markread_
 
uint32_t caching_markread_time_
 
uint32_t caching_markread_count_
 
bool enable_user_datafile_backup_
 
bool enable_user_datafile_restore_
 
bool enable_user_datafile_defrestoreproc_
 
std::string user_datafile_localbackup_folder_
 
int ip_protocol_version_
 
bool dedicated_cluste_flag_
 
int hand_shake_type_
 
int nego_key_neca_
 
int comm_neca_
 
std::string server_conf_file_path_
 
bool use_private_server_
 
std::string lbs_address_
 
std::list< std::string > lbs_backup_address_
 
std::string nos_lbs_address_
 
std::string default_link_address_
 
std::string default_link_address_ipv6_
 
std::string default_nos_upload_address_
 
std::string default_nos_upload_host_
 
std::string rsa_public_key_module_
 
int rsa_version_
 
std::string nego_key_neca_key_parta_
 
std::string nego_key_neca_key_partb_
 
int nego_key_neca_key_version_
 
std::string nos_download_address_
 
std::string nos_accelerate_host_
 
std::vector< std::string > nos_accelerate_host_list_
 
std::string nos_accelerate_address_
 
std::string probe_ipv4_url_
 
std::string probe_ipv6_url_
 
std::map< int, int > sync_data_type_list_
 
std::list< std::string > http_dns_server_interface_
 
bool priority_use_cdn_host_
 
bool disable_app_nap_
 
bool cache_session_data_when_delete_
 
NIMSDKType sdk_type
 
std::string sdk_human_version
 
std::string mock_refer_
 
std::string mock_ua_
 
int fcs_auth_type_
 
bool custom_enable_fcs_
 

Friends

class Client
 

Detailed Description

SDK设置项

Constructor & Destructor Documentation

◆ SDKConfig()

nim::SDKConfig::SDKConfig ( )

构造函数

Member Data Documentation

◆ animated_image_thumbnail_enabled_

bool nim::SDKConfig::animated_image_thumbnail_enabled_

bool 开启对动图缩略图的支持 ,默认为false,开启后获取的缩略图为原格式,关闭后获取的缩略图为第一帧静态图

◆ cache_session_data_when_delete_

bool nim::SDKConfig::cache_session_data_when_delete_

bool 删除会话时是否在数据库缓存会话原数据,默认为 false

◆ caching_markread_

bool nim::SDKConfig::caching_markread_

bool 是否开启缓存式“已接收回执”发送,程序可能收到大量消息以至触发频控时可以考虑开启此开关 缺省 false 关闭

◆ caching_markread_count_

uint32_t nim::SDKConfig::caching_markread_count_

uint32 caching_markread_ == true 时有效 缓存的最大消息条数 缺省 10

◆ caching_markread_time_

uint32_t nim::SDKConfig::caching_markread_time_

uint32 caching_markread_ == true 时有效 缓存时间 单位ms 缺省 1000

◆ client_antispam_

bool nim::SDKConfig::client_antispam_

bool 客户端反垃圾,默认为false,如需开启请提前咨询技术支持或销售

◆ comm_neca_

int nim::SDKConfig::comm_neca_

int 通信加密算法 {1(RC4),2(AES128),4(SM4)} def:1(RC4) 对称加密

◆ custom_enable_fcs_

bool nim::SDKConfig::custom_enable_fcs_

是否开启融合云存储

◆ custom_timeout_

int nim::SDKConfig::custom_timeout_

int 自定义通讯超时时间,暂时不开放设置

◆ database_encrypt_key_

std::string nim::SDKConfig::database_encrypt_key_

string 数据库秘钥,必填,目前只支持最多32个字符的加密密钥!建议使用32个字符

◆ dedicated_cluste_flag_

bool nim::SDKConfig::dedicated_cluste_flag_

bool 是否为专属集群 {true,false} def:false

◆ default_link_address_

std::string nim::SDKConfig::default_link_address_

string 默认link服务器地址,如果选择使用私有服务器,ip_protocol_version_ != 1(ipv4 or auto)则必填

◆ default_link_address_ipv6_

std::string nim::SDKConfig::default_link_address_ipv6_

string 默认link ipv6服务器地址,如果选择使用私有服务器,ip_protocol_version_ == 1(使用ipv6)则必填

◆ default_nos_upload_address_

std::string nim::SDKConfig::default_nos_upload_address_

string 默认nos 上传服务器地址,如果选择使用私有服务器,则必填

◆ default_nos_upload_host_

std::string nim::SDKConfig::default_nos_upload_host_

string 默认nos 上传服务器主机地址,仅 kNIMUseHttps设置为true 时有效,用作 https 上传时的域名校验及 http header host 字段填充

◆ disable_app_nap_

bool nim::SDKConfig::disable_app_nap_

string 是否禁用 macOS 下的 App Nap 功能,默认为 true

◆ enable_user_datafile_backup_

bool nim::SDKConfig::enable_user_datafile_backup_

bool 是否开启用户数据备份(本地)功能 缺省true

◆ enable_user_datafile_defrestoreproc_

bool nim::SDKConfig::enable_user_datafile_defrestoreproc_

bool 是否使用缺省的用户数据恢复(本地)方案 缺省false enable_user_datafile_restore_ == true 生效

◆ enable_user_datafile_restore_

bool nim::SDKConfig::enable_user_datafile_restore_

bool 是否开启用户数据恢复(本地)功能 缺省false

◆ fcs_auth_type_

int nim::SDKConfig::fcs_auth_type_

融合云存储认证方式 1=refer鉴权,2=基于时间的token鉴权,3=基于url的token鉴权,4=custom鉴权

◆ hand_shake_type_

int nim::SDKConfig::hand_shake_type_

int 登录时使用的握手协议类型 0:支持配置多种对称与非对称加密算法,1:只支持RAS + RC4,缺省 1

◆ http_dns_server_interface_

std::list<std::string> nim::SDKConfig::http_dns_server_interface_

string list httpdns服务请求地址,如果没有特定地址可以不填

◆ ip_protocol_version_

int nim::SDKConfig::ip_protocol_version_

int IP地址族设置 0:ipv4 1:ipv6 2:auto,经SDK测试后,自行选择,会有少许性能损耗。缺省 0(ipv4)

◆ lbs_address_

std::string nim::SDKConfig::lbs_address_

string lbs地址,如果选择使用私有服务器,则必填

◆ lbs_backup_address_

std::list<std::string> nim::SDKConfig::lbs_backup_address_

string list lbs备用地址,没有可不填

◆ login_max_retry_times_

int nim::SDKConfig::login_max_retry_times_

int 登录重试最大次数,如需设置建议设置大于3次,默认填0,SDK默认设置次数

◆ need_update_lbs_befor_relogin_

bool nim::SDKConfig::need_update_lbs_befor_relogin_

bool 在进行重新登录前是否先刷新一下lbs,对于切换网络的场景适用

◆ nego_key_neca_

int nim::SDKConfig::nego_key_neca_

int "交换密钥"协议加密算法 {1(RSA),2(SM2)}, def:1(RSA) 非对称加密

◆ nego_key_neca_key_parta_

std::string nim::SDKConfig::nego_key_neca_key_parta_

string "交换密钥"协议加密算法密钥 part A 自定义时则必填 BigNumHex string 不含0x RSA:module,SM2:X

◆ nego_key_neca_key_partb_

std::string nim::SDKConfig::nego_key_neca_key_partb_

string 非对称加密算法key2 RSA:EXP,SM2: SM2Y 自定义时则必填

◆ nego_key_neca_key_version_

int nim::SDKConfig::nego_key_neca_key_version_

int 非对称加密算法的 key version 自定义时则必填

◆ nos_accelerate_address_

std::string nim::SDKConfig::nos_accelerate_address_

string nos 加速地址拼接模板,用于获得加速后的下载地址

◆ nos_accelerate_host_

std::string nim::SDKConfig::nos_accelerate_host_

string 需要被加速主机名【8.1.0版本以及后不建议使用,推荐nos_accelerate_host_list_】

◆ nos_accelerate_host_list_

std::vector<std::string> nim::SDKConfig::nos_accelerate_host_list_

string array,需要被加速主机名列表

◆ nos_download_address_

std::string nim::SDKConfig::nos_download_address_

string nos 下载地址拼接模板,用于拼接最终得到的下载地址

◆ nos_lbs_address_

std::string nim::SDKConfig::nos_lbs_address_

string nos lbs地址,如果选择使用私有服务器,则必填

◆ preload_attach_

bool nim::SDKConfig::preload_attach_

bool 是否需要预下载附件(图片和语音),选填,默认为true,如果有对带宽流量有较高要求的请关闭该选项, 改为上层开发者按需下载附件文件

◆ preload_image_name_template_

std::string nim::SDKConfig::preload_image_name_template_

string 预下载图片命名规则,以{filename}为token进行替换

◆ preload_image_quality_

int nim::SDKConfig::preload_image_quality_

int 预下载图片质量,选填,范围0-100

◆ preload_image_resize_

std::string nim::SDKConfig::preload_image_resize_

string 预下载图片基于长宽做内缩略,选填,比如宽100高50,则赋值为100x50,中间为字母小写x

◆ priority_use_cdn_host_

bool nim::SDKConfig::priority_use_cdn_host_

bool 是否优先使用cdn域名

◆ probe_ipv4_url_

std::string nim::SDKConfig::probe_ipv4_url_

string 探测ipv4地址类型使用的url,ip_protocol_version_ == 2(auto) 时生效

◆ probe_ipv6_url_

std::string nim::SDKConfig::probe_ipv6_url_

string 探测ipv6地址类型使用的url,ip_protocol_version_ == 2(auto) 时生效

◆ push_cer_name_

std::string nim::SDKConfig::push_cer_name_

string 选填,云信后台配置的推送证书名称 ( iOS/Mac有效)

◆ push_token_

std::string nim::SDKConfig::push_token_

string 选填,推送的设备token (iOS/Mac有效)

◆ reset_unread_count_when_recall_

bool nim::SDKConfig::reset_unread_count_when_recall_

bool 撤回消息是否重新计算未读消息计数,默认为false

◆ rsa_public_key_module_

std::string nim::SDKConfig::rsa_public_key_module_

string RSA public key,如果选择使用私有服务器,则必填 【6.9.0版本后已废弃】

◆ rsa_version_

int nim::SDKConfig::rsa_version_

int RSA version,如果选择使用私有服务器,则必填 【6.9.0版本后已废弃】

◆ sdk_human_version

std::string nim::SDKConfig::sdk_human_version

sdk可读版本号

◆ sdk_log_level_

NIMSDKLogLevel nim::SDKConfig::sdk_log_level_

NIMSDKLogLevel 定义见NIMSDKLogLevel,选填,SDK默认的内置级别为kNIMSDKLogLevelPro

◆ sdk_type

NIMSDKType nim::SDKConfig::sdk_type

客户端sdk类型

◆ server_conf_file_path_

std::string nim::SDKConfig::server_conf_file_path_

string 私有云服务器相关地址配置文件本地绝对路径,如果不填默认执行文件目录下的server_conf.txt

◆ sync_data_type_list_

std::map<int , int > nim::SDKConfig::sync_data_type_list_

map 数据同步类型 key(28:置顶会话) value(0:不同步,1:自动同步)

◆ sync_session_ack_

bool nim::SDKConfig::sync_session_ack_

bool 设置是否已读未读状态多端同步,默认true

◆ team_msg_ack_

bool nim::SDKConfig::team_msg_ack_

bool 群消息已读功能开关, 默认为false,如需开启请提前咨询技术支持或销售

◆ team_notification_unread_count_

bool nim::SDKConfig::team_notification_unread_count_

bool 群通知是否计入未读数,默认为false

◆ upload_sdk_events_after_login_

bool nim::SDKConfig::upload_sdk_events_after_login_

bool,在调用 Login 接口后无论成功是否上报历史错误日志到服务器(目前支持 408、415、500)默认为false

◆ use_https_

bool nim::SDKConfig::use_https_

bool 是否启用HTTPS协议,默认为true

◆ use_private_server_

bool nim::SDKConfig::use_private_server_

bool 是否使用私有服务器,如果使用私有服务器,则必须设置为true

◆ user_datafile_localbackup_folder_

std::string nim::SDKConfig::user_datafile_localbackup_folder_

string 用户数据文件备份(本地)目录,缺省在数据文件所在目录创建一个db_file.back目录

◆ vchat_miss_unread_count_

bool nim::SDKConfig::vchat_miss_unread_count_

bool 语音消息未接通消息是否计入未读数,默认为false


The documentation for this struct was generated from the following file: