SmartAudio/package/libs/libyunxin/lib/include/api/nim_global.h

69 lines
3.2 KiB
C
Raw Normal View History

2018-07-16 02:33:31 +00:00
/** @file nim_global.h
* @brief
* @copyright (c) 2015-2017, NetEase Inc. All rights reserved
* @author Harrison
* @date 2015/2/1
*/
#ifndef NIM_SDK_DLL_API_NIM_GLOBAL_H_
#define NIM_SDK_DLL_API_NIM_GLOBAL_H_
#include "nim_sdk_dll.h"
#include "../export_headers/nim_global_def.h"
#ifdef __cplusplus
extern"C"
{
#endif
/** @fn void nim_global_free_str_buf(char *str)
* SDK内部分配的内存
* @param[in] str SDK内部分配内存的字符串
* @return void
*/
NIM_SDK_DLL_API void nim_global_free_str_buf(char *str);
/** @fn void nim_global_free_buf(void *data)
* SDK内部分配的内存
* @param[in] data SDK内部分配的内存
* @return void
*/
NIM_SDK_DLL_API void nim_global_free_buf(void *data);
#if NIMAPI_UNDER_WIN_DESKTOP_ONLY
/** @fn void nim_global_set_proxy(enum NIMProxyType type, const char *host, int port, const char *user, const char *password)
* SDK统一的网络代理type设置为kNIMProxyNone0
* @param[in] type NIMProxyType定义,kNIMProxySocks5代理
* @param[in] host
* @param[in] port
* @param[in] user
* @param[in] password
* @return void
*/
NIM_SDK_DLL_API void nim_global_set_proxy(enum NIMProxyType type, const char *host, int port, const char *user, const char *password);
/** @fn void nim_global_detect_proxy(enum NIMProxyType type, const char *host, int port, const char *user, const char *password, nim_global_detect_proxy_cb_func cb, const void *user_data)
*
* @param[in] type NIMProxyType定义,kNIMProxySocks5代理
* @param[in] host
* @param[in] port
* @param[in] user
* @param[in] password
* @param[in] cb ,nim_global_def.h
* @param[in] user_data APP的自定义用户数据SDK只负责传回给回调函数cb
* @return void
*/
NIM_SDK_DLL_API void nim_global_detect_proxy(enum NIMProxyType type, const char *host, int port, const char *user, const char *password, nim_global_detect_proxy_cb_func cb, const void *user_data);
#endif
/** @fn void nim_global_reg_sdk_log_cb(const char *json_extension, nim_sdk_log_cb_func cb, const void *user_data)
* (PC SDK该接口无效)sdk log回调
* @param[in] json_extension json扩展参数
* @param[in] cb sdk log的回调函数 nim_sdk_log_cb_func回调函数定义见nim_global_def.h
* @param[in] user_data APP的自定义用户数据SDK只负责传回给回调函数cb
* @return void
*/
NIM_SDK_DLL_API void nim_global_reg_sdk_log_cb(const char *json_extension, nim_sdk_log_cb_func cb, const void *user_data);
#ifdef __cplusplus
};
#endif //__cplusplus
#endif //NIM_SDK_DLL_API_NIM_GLOBAL_H_