7#ifndef _NIM_SDK_CPP_NOS_H_
8#define _NIM_SDK_CPP_NOS_H_
29 typedef std::function<void(
NIMResCode res_code,
const std::string& file_path,
const std::string& call_id,
const std::string& res_id)>
35 typedef std::function<void(int64_t completed_size, int64_t file_size)>
ProgressCallback;
115 static bool FetchMediaEx(
const IMMessage& msg,
116 const std::string& json_extension,
128 static bool StopFetchMedia(
const IMMessage& msg);
142 static bool UploadResource(
const std::string& local_file,
160 static bool UploadResource2(
const std::string& local_file,
161 const std::string& tag,
185 static bool UploadResourceEx(
const std::string& local_file,
186 const std::string& json_extension,
214 static bool UploadResourceEx2(
const std::string& local_file,
215 const std::string& tag,
216 const std::string& json_extension,
230 static bool StopUploadResourceEx(
const std::string& task_id,
const std::string& json_extension =
"");
244 static bool DownloadResource(
const std::string& nos_url,
268 static bool DownloadResourceEx(
const std::string& nos_url,
269 const std::string& json_extension,
283 static bool StopDownloadResourceEx(
const std::string& task_id,
const std::string& json_extension =
"");
294 static void SafeURLToOriginURL(
const std::string& safe_url,
const SafeURLToOriginURLCallback& cb,
const std::string& json_extension =
"");
300 static void UnregNosCb();
306 static void SetSupportQuickTrans(
bool bquick);
NIM SDK提供的NOS云存储服务接口
Definition: nim_cpp_nos.h:24
std::function< void(const std::string &url, std::string &token)> CustomTokenCallback
自定义token回调模板
Definition: nim_cpp_nos.h:42
std::function< void(int64_t actual_size, int64_t speed)> TransferInfoCallback
最终传输信息回调模板
Definition: nim_cpp_nos.h:49
std::function< void(const InitNosResult &)> InitNosResultCallback
初始化结果回调模板
Definition: nim_cpp_nos.h:27
std::function< void(NIMResCode res_code, const std::string &url)> UploadMediaCallback
上传回调模板
Definition: nim_cpp_nos.h:33
std::function< void(NIMResCode res_code, const DownloadMediaResult &result)> DownloadMediaExCallback
扩展下载回调模板
Definition: nim_cpp_nos.h:38
std::function< void(NIMResCode res_code, const UploadMediaResult &result)> UploadMediaExCallback
扩展上传回调模板
Definition: nim_cpp_nos.h:40
std::function< void(int64_t speed)> SpeedCallback
速度回调模板
Definition: nim_cpp_nos.h:47
std::function< void(NIMResCode res_code, const std::string &file_path, const std::string &call_id, const std::string &res_id)> DownloadMediaCallback
下载回调模板
Definition: nim_cpp_nos.h:31
std::function< void(NIMResCode res_code, const std::string &origin_url)> SafeURLToOriginURLCallback
根据安全链接(短链)取得源链接
Definition: nim_cpp_nos.h:52
std::function< void(int64_t completed_size, int64_t file_size, const ProgressData &result)> ProgressExCallback
扩展过程回调模板
Definition: nim_cpp_nos.h:44
std::function< void(int64_t completed_size, int64_t file_size)> ProgressCallback
过程回调模板
Definition: nim_cpp_nos.h:35
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
NIMResCode
Definition: public_defines.h:21
Definition: nim_talk_helper.h:339
初始化nos参数
Definition: nim_nos_helper.h:23
初始化结果
Definition: nim_nos_helper.h:62
传输过程中的数据
Definition: nim_nos_helper.h:101