台湾一级a毛片在线播放,黄色精品偷拍视频大全,精品一区二区在线欧美日韩,日本特黄一级视频播三级片,日韩美女18岁美女视频,偷偷操不一样的99,国产午夜激无码av毛片久

智慧服務(wù),成就美好體驗(yàn) 項(xiàng)目咨詢

主頁 > 服務(wù)與支持 > 開發(fā)平臺(tái) > 客戶端SDK參考 > iOS Native SDK > 接口參考 組件初始化和配置

入門使用

組件初始化和配置

更新時(shí)間:2019-11-20

接口名稱

接口描述

tsdk_set_config_param

設(shè)置業(yè)務(wù)參數(shù)。

tsdk_init

初始化組件。

tsdk_uninit

去初始化。

tsdk_release_sdk_mem

釋放TSDK內(nèi)存。

tsdk_set_config_param

接口描述

設(shè)置業(yè)務(wù)參數(shù)。

注意事項(xiàng)

無。

方法定義

TSDK_API TSDK_RESULT tsdk_set_config_param(IN TSDK_E_CONFIG_ID config_id, IN TSDK_VOID *param);
 

參數(shù)描述

參數(shù)

是否必須

類型

描述

[in] config_id

TSDK_E_CONFIG_ID

參數(shù)配置ID。

[in] param

TSDK_VOID *

參數(shù)值,根據(jù)配置的ID確定數(shù)據(jù)類型。

返回值

類型

描述

TSDK_RESULT

成功返回TSDK_SUCCESS,失敗返回相應(yīng)錯(cuò)誤碼。

代碼示例

//OC
TSDK_S_LOG_PARAM logParam;
memset(&logParam, 0, sizeof(TSDK_S_LOG_PARAM));
NSString *path = [logPath stringByAppendingString:@"/tsdk"];
logParam.level = TSDK_E_LOG_DEBUG;
logParam.file_count = 1;
logParam.max_size_kb = 4*1024;
strcpy(logParam.path, [path UTF8String]);
TSDK_RESULT configResult = tsdk_set_config_param(TSDK_E_CONFIG_LOG_PARAM, &logParam);
DDLogInfo(@"config log param result: %d",configResult);

TSDK_S_APP_FILE_PATH_INFO app_file_path;
memset(&app_file_path, 0, sizeof(TSDK_S_APP_FILE_PATH_INFO));
NSString *iconPath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingString:@"/TUPC60log/tsdk/icon"];
NSString *deptFilePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingString:@"/TUPC60log/tsdk/deptFile"];
strcpy(app_file_path.icon_file_path, [iconPath UTF8String]);
strcpy(app_file_path.dept_file_path, [deptFilePath UTF8String]);
configResult = tsdk_set_config_param(TSDK_E_CONFIG_APP_FILE_PATH_INFO, &app_file_path);
DDLogInfo(@"config app file path info result: %d", configResult);
 

tsdk_init

接口描述

初始化終端SDK組件。

注意事項(xiàng)

無。

方法定義

TSDK_API TSDK_RESULT tsdk_init(IN TSDK_S_APP_INFO_PARAM *app_info, IN TSDK_FN_CALLBACK_PTR notify);
 

參數(shù)描述

參數(shù)

是否必須

類型

描述

[in] app_info

TSDK_S_APP_INFO_PARAM*

應(yīng)用程序信息參數(shù)。

[in] notify

TSDK_FN_CALLBACK_PTR

事件通知回調(diào)函數(shù)地址。

返回值

類型

描述

TSDK_RESULT

成功返回TSDK_SUCCESS,失敗返回相應(yīng)錯(cuò)誤碼。

代碼示例

//OC
TSDK_S_APP_INFO_PARAM app_info;
app_info.client_type = TSDK_E_CLIENT_MOBILE;
strcpy(app_info.product_name, "SoftClient on Mobile");
app_info.support_audio_and_video_call = TSDK_TRUE;
app_info.support_ctd = TSDK_TRUE;
app_info.support_audio_and_video_conf = TSDK_TRUE;
app_info.support_enterprise_address_book = TSDK_TRUE;
//    app_info.support_im = TSDK_TRUE;
//    app_info.support_data_conf = TSDK_TRUE;
//    app_info.support_rich_media_message = TSDK_TRUE;
TSDK_RESULT result = tsdk_init(&app_info ,&onTSDKNotifications);
 

tsdk_uninit

接口描述

去初始化終端SDK組件。

注意事項(xiàng)

程序退出前請調(diào)用,調(diào)用前停止相關(guān)業(yè)務(wù)。

方法定義

TSDK_API TSDK_RESULT tsdk_uninit(TSDK_VOID);
 

參數(shù)描述

無。

返回值

類型

描述

TSDK_RESULT

成功返回TSDK_SUCCESS,失敗返回相應(yīng)錯(cuò)誤碼。

代碼示例

//OC
-(BOOL)unInitLoginServer
{
    TSDK_RESULT result = tsdk_uninit();
    
    DDLogInfo(@"Login_Log: tsdk_uninit result = %#x",result);
    return result == TSDK_SUCCESS ? YES : NO;
}
 

tsdk_release_sdk_mem

接口描述

釋放SDK內(nèi)部分配的內(nèi)存。

注意事項(xiàng)

僅用于釋放TSDK 組件接口或回調(diào)通知中返回的內(nèi)存。

方法定義

TSDK_VOID tsdk_release_sdk_mem(IN TSDK_VOID* memory_ptr);
 

參數(shù)描述

參數(shù)

是否必須

類型

描述

[in] memory_ptr

TSDK_VOID *

待釋放的內(nèi)存資源地址。

返回值

無。

代碼示例

無。