NIM SDK提供的一些全局接口
More...
#include <nim_cpp_global.h>
|
typedef std::function< void(bool conncet, NIMProxyDetectStep step, const std::string &json_extension)> | DetectProxyCallback |
|
typedef std::function< void(NIMSDKException exception, const std::string &log)> | ExceptionCallback |
|
typedef std::function< void(NIMResCode rescode, const CachedFileInfo &info)> | GetCachedFileInfoCallback |
|
typedef std::function< void(NIMResCode rescode)> | DeleteCachedFileCallback |
|
typedef DeleteCachedFileCallback | SDKFeedbackCallback |
|
typedef std::function< void(const SDKDBErrorInfo &error_info)> | SDKDBErrorCallback |
|
|
static void | FreeStrBuf (char *str) |
|
static void | FreeBuf (void *data) |
|
static void | SetProxy (NIMProxyType type, const std::string &host, int port, const std::string &user, const std::string &password) |
|
static void | DetectProxy (NIMProxyType type, const std::string &host, int port, const std::string &user, const std::string &password, const Global::DetectProxyCallback &callback) |
|
static void | SetExceptionReportCallback (const std::string &json_extension, const ExceptionCallback &cb) |
|
static void | GetSDKCachedFileInfoAsync (const std::string &login_id, const std::string &file_type, int64_t end_timestamp, const std::string &json_extension, const GetCachedFileInfoCallback &cb) |
|
static void | DeleteSDKCachedFileAsync (const std::string &login_id, const std::string &file_type, int64_t end_timestamp, const std::string &json_extension, const DeleteCachedFileCallback &cb) |
|
static void | SDKFeedbackAsync (const std::string &url, const std::string &json_extension, const SDKFeedbackCallback &cb) |
|
static void | RegSDKDBError (const SDKDBErrorCallback &cb) |
|
static void | UploadSDKLog (const std::string &feedback_message, const SDKFeedbackCallback &cb) |
|
◆ DeleteSDKCachedFileAsync()
void nim::Global::DeleteSDKCachedFileAsync |
( |
const std::string & |
login_id, |
|
|
const std::string & |
file_type, |
|
|
int64_t |
end_timestamp, |
|
|
const std::string & |
json_extension, |
|
|
const DeleteCachedFileCallback & |
cb |
|
) |
| |
|
static |
删除sdk缓存文件
- Parameters
-
[in] | login_id | 查询的账号ID |
[in] | file_type | 文件类型,常量定义见nim_global_def.h 查询SDK文件缓存信息文件类型file_type |
[in] | end_timestamp | 删除时间截止点(查询全部填0) |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | |
- Returns
- void 无返回值
◆ DetectProxy()
void nim::Global::DetectProxy |
( |
NIMProxyType |
type, |
|
|
const std::string & |
host, |
|
|
int |
port, |
|
|
const std::string & |
user, |
|
|
const std::string & |
password, |
|
|
const Global::DetectProxyCallback & |
callback |
|
) |
| |
|
static |
- Parameters
-
[in] | type | 代理类型,见NIMProxyType定义 |
[in] | host | 代理地址 |
[in] | port | 代理端口 |
[in] | user | 代理用户名 |
[in] | password | 代理密码 |
[in] | callback | 回调函数 |
- Returns
- void 无返回值
◆ FreeBuf()
void nim::Global::FreeBuf |
( |
void * |
data | ) |
|
|
static |
释放SDK内部分配的内存
- Parameters
-
- Returns
- void 无返回值
◆ FreeStrBuf()
void nim::Global::FreeStrBuf |
( |
char * |
str | ) |
|
|
static |
释放SDK内部分配的内存
- Parameters
-
- Returns
- void 无返回值
◆ GetSDKCachedFileInfoAsync()
void nim::Global::GetSDKCachedFileInfoAsync |
( |
const std::string & |
login_id, |
|
|
const std::string & |
file_type, |
|
|
int64_t |
end_timestamp, |
|
|
const std::string & |
json_extension, |
|
|
const GetCachedFileInfoCallback & |
cb |
|
) |
| |
|
static |
- Parameters
-
[in] | login_id | 查询的账号ID |
[in] | file_type | 文件类型,常量定义见nim_global_def.h 查询SDK文件缓存信息文件类型file_type |
[in] | end_timestamp | 查询时间截止点(查询全部填0) |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | |
- Returns
- void 无返回值
◆ RegSDKDBError()
void nim::Global::RegSDKDBError |
( |
const SDKDBErrorCallback & |
cb | ) |
|
|
static |
注册 SDK DB操作出错时的回调
- Parameters
-
[in] | cb | SDKDBErrorCallback 出错时的回调 |
- Returns
- void 无返回值
◆ SDKFeedbackAsync()
void nim::Global::SDKFeedbackAsync |
( |
const std::string & |
url, |
|
|
const std::string & |
json_extension, |
|
|
const SDKFeedbackCallback & |
cb |
|
) |
| |
|
static |
SDK 反馈
- Parameters
-
[in] | url | 开发者需将所需要反馈的文件(dump,应用日志等)上传至nos。 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | |
- Returns
- void 无返回值
◆ SetExceptionReportCallback()
void nim::Global::SetExceptionReportCallback |
( |
const std::string & |
json_extension, |
|
|
const ExceptionCallback & |
cb |
|
) |
| |
|
static |
注册输出系统环境异常的回调
- Parameters
-
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | |
- Returns
- void 无返回值
◆ SetProxy()
void nim::Global::SetProxy |
( |
NIMProxyType |
type, |
|
|
const std::string & |
host, |
|
|
int |
port, |
|
|
const std::string & |
user, |
|
|
const std::string & |
password |
|
) |
| |
|
static |
设置SDK统一的网络代理。不需要代理时,type设置为kNIMProxyNone,其余参数都传空字符串(端口设为0)。有些代理不需要用户名和密码,相应参数也传空字符串。
- Parameters
-
[in] | type | 代理类型,见NIMProxyType定义 |
[in] | host | 代理地址 |
[in] | port | 代理端口 |
[in] | user | 代理用户名 |
[in] | password | 代理密码 |
- Returns
- void 无返回值
◆ UploadSDKLog()
void nim::Global::UploadSDKLog |
( |
const std::string & |
feedback_message, |
|
|
const SDKFeedbackCallback & |
cb |
|
) |
| |
|
static |
上传SDK日志到服务器
- Parameters
-
[in] | feedback_message | 反馈信息 |
[in] | cb | 操作结果的回调函数 |
- Returns
- void
The documentation for this class was generated from the following files: