7#ifndef _NIM_SDK_CPP_GLOBAL_H_
8#define _NIM_SDK_CPP_GLOBAL_H_
23class NIM_SDK_CPPWRAPPER_DLL_API
Global {
26 std::string file_type_;
27 std::string file_path_;
29 int64_t file_total_size_;
45 std::string description_;
48 typedef std::function<void(
bool conncet,
NIMProxyDetectStep step,
const std::string& json_extension)> DetectProxyCallback;
49 typedef std::function<void(
NIMSDKException exception,
const std::string& log)> ExceptionCallback;
50 typedef std::function<void(
NIMResCode rescode,
const CachedFileInfo& info)> GetCachedFileInfoCallback;
51 typedef std::function<void(
NIMResCode rescode)> DeleteCachedFileCallback;
52 typedef DeleteCachedFileCallback SDKFeedbackCallback;
53 typedef std::function<void(
const SDKDBErrorInfo& error_info)> SDKDBErrorCallback;
61 static void FreeStrBuf(
char* str);
68 static void FreeBuf(
void* data);
79 static void SetProxy(
NIMProxyType type,
const std::string& host,
int port,
const std::string& user,
const std::string& password);
92 const std::string& host,
94 const std::string& user,
95 const std::string& password,
96 const Global::DetectProxyCallback& callback);
104 static void SetExceptionReportCallback(
const std::string& json_extension,
const ExceptionCallback& cb);
115 static void GetSDKCachedFileInfoAsync(
const std::string& login_id,
116 const std::string& file_type,
117 int64_t end_timestamp,
118 const std::string& json_extension,
119 const GetCachedFileInfoCallback& cb);
131 static void DeleteSDKCachedFileAsync(
const std::string& login_id,
132 const std::string& file_type,
133 int64_t end_timestamp,
134 const std::string& json_extension,
135 const DeleteCachedFileCallback& cb);
144 static void SDKFeedbackAsync(
const std::string& url,
const std::string& json_extension,
const SDKFeedbackCallback& cb);
151 static void RegSDKDBError(
const SDKDBErrorCallback& cb);
159 static void UploadSDKLog(
const std::string& feedback_message,
const SDKFeedbackCallback& cb);
NIM SDK提供的一些全局接口
Definition: nim_cpp_global.h:23
NIMResCode
Definition: nim_chatroom_res_code_def.h:15
NIMProxyType
Definition: nim_global_def.h:186
NIMSDKException
Definition: nim_global_def.h:66
NIMProxyDetectStep
Definition: nim_global_def.h:181
@ kNIMDBOperationInsert
写操作
Definition: nim_global_def.h:141
@ kNIMDBOperationDelete
删除操作
Definition: nim_global_def.h:147
@ kNIMDBOperationUpdate
更新操作
Definition: nim_global_def.h:145
@ kNIMDBOperationRead
读操作
Definition: nim_global_def.h:143
Definition: nim_cpp_global.h:25
Definition: nim_cpp_global.h:31
DBOperation
Definition: nim_cpp_global.h:32