NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_cpp_global.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_GLOBAL_H_
8#define _NIM_SDK_CPP_GLOBAL_H_
9
10#include <functional>
11#include <string>
13#include "nim_define_include.h"
18namespace nim {
19
24public:
26 std::string file_type_;
27 std::string file_path_;
30 };
41 };
42 std::string db_name_;
45 std::string description_;
46 std::string attach_;
47 };
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;
53 typedef std::function<void(const SDKDBErrorInfo& error_info)> SDKDBErrorCallback;
54 using SDKFeedbackAsyncCallback = std::function<void(NIMResCode rescode, const std::string& download_url)>;
55
56public:
62 static void FreeStrBuf(char* str);
63
69 static void FreeBuf(void* data);
70
80 static void SetProxy(NIMProxyType type, const std::string& host, int port, const std::string& user, const std::string& password);
81
92 static void DetectProxy(NIMProxyType type,
93 const std::string& host,
94 int port,
95 const std::string& user,
96 const std::string& password,
97 const Global::DetectProxyCallback& callback);
98
105 static void SetExceptionReportCallback(const std::string& json_extension, const ExceptionCallback& cb);
106
116 static void GetSDKCachedFileInfoAsync(const std::string& login_id,
117 const std::string& file_type,
118 int64_t end_timestamp,
119 const std::string& json_extension,
120 const GetCachedFileInfoCallback& cb);
121
132 static void DeleteSDKCachedFileAsync(const std::string& login_id,
133 const std::string& file_type,
134 int64_t end_timestamp,
135 const std::string& json_extension,
136 const DeleteCachedFileCallback& cb);
137
145 static void SDKFeedbackAsync(const std::string& url, const std::string& json_extension, const SDKFeedbackCallback& cb);
146
152 static void RegSDKDBError(const SDKDBErrorCallback& cb);
153
160 static void UploadSDKLog(const std::string& feedback_message, const SDKFeedbackCallback& cb);
161
167 static void UploadSDKLogAsync(const std::string& feedback_message, const SDKFeedbackAsyncCallback& cb);
168};
169
170} // namespace nim
171
172#endif //_NIM_SDK_CPP_GLOBAL_H_
NIM SDK提供的一些全局接口
Definition: nim_cpp_global.h:23
std::function< void(NIMSDKException exception, const std::string &log)> ExceptionCallback
Definition: nim_cpp_global.h:49
std::function< void(const SDKDBErrorInfo &error_info)> SDKDBErrorCallback
Definition: nim_cpp_global.h:53
std::function< void(bool conncet, NIMProxyDetectStep step, const std::string &json_extension)> DetectProxyCallback
Definition: nim_cpp_global.h:48
DeleteCachedFileCallback SDKFeedbackCallback
Definition: nim_cpp_global.h:52
std::function< void(NIMResCode rescode, const std::string &download_url)> SDKFeedbackAsyncCallback
Definition: nim_cpp_global.h:54
std::function< void(NIMResCode rescode)> DeleteCachedFileCallback
Definition: nim_cpp_global.h:51
std::function< void(NIMResCode rescode, const CachedFileInfo &info)> GetCachedFileInfoCallback
Definition: nim_cpp_global.h:50
namespace nim
NIM 公共数据类型定义总的包含文件
NIMProxyType
Definition: nim_global_def.h:204
NIMSDKException
Definition: nim_global_def.h:75
NIMProxyDetectStep
Definition: nim_global_def.h:199
@ kNIMDBOperationInsert
写操作
Definition: nim_global_def.h:150
@ kNIMDBOperationDelete
删除操作
Definition: nim_global_def.h:156
@ kNIMDBOperationUpdate
更新操作
Definition: nim_global_def.h:154
@ kNIMDBOperationRead
读操作
Definition: nim_global_def.h:152
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
NIMResCode
Definition: public_defines.h:21
Definition: nim_cpp_global.h:25
int64_t file_total_size_
Definition: nim_cpp_global.h:29
std::string file_path_
Definition: nim_cpp_global.h:27
int file_count_
Definition: nim_cpp_global.h:28
std::string file_type_
Definition: nim_cpp_global.h:26
Definition: nim_cpp_global.h:31
DBOperation
Definition: nim_cpp_global.h:32
int error_code_
Definition: nim_cpp_global.h:43
std::string description_
Definition: nim_cpp_global.h:45
std::string db_name_
Definition: nim_cpp_global.h:42
std::string attach_
Definition: nim_cpp_global.h:46
int operation_
Definition: nim_cpp_global.h:44