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;
60 static void InitConfig(
const InitNosConfigParam& param,
const InitNosResultCallback& cb);
67 static void RegDownloadCb(
const DownloadMediaCallback& cb);
74 static void RegUploadCb(
const UploadMediaExCallback& cb);
81 static void RegCustomCustomTokenCb(
const CustomTokenCallback& cb);
94 static bool FetchMedia(
const IMMessage& msg,
const DownloadMediaCallback& callback_result,
const ProgressCallback& callback_progress);
115 static bool FetchMediaEx(
const IMMessage& msg,
116 const std::string& json_extension,
117 const DownloadMediaCallback& callback_result,
128 static bool StopFetchMedia(
const IMMessage& msg);
142 static bool UploadResource(
const std::string& local_file,
143 const UploadMediaCallback& callback_result,
160 static bool UploadResource2(
const std::string& local_file,
161 const std::string& tag,
162 const UploadMediaCallback& callback_result,
185 static bool UploadResourceEx(
const std::string& local_file,
186 const std::string& json_extension,
187 const UploadMediaExCallback& callback_result,
188 const ProgressExCallback& callback_progress = ProgressExCallback(),
214 static bool UploadResourceEx2(
const std::string& local_file,
215 const std::string& tag,
216 const std::string& json_extension,
217 const UploadMediaExCallback& callback_result,
218 const ProgressExCallback& callback_progress = ProgressExCallback(),
230 static bool StopUploadResourceEx(
const std::string& task_id,
const std::string& json_extension =
"");
244 static bool DownloadResource(
const std::string& nos_url,
245 const DownloadMediaCallback& callback_result,
268 static bool DownloadResourceEx(
const std::string& nos_url,
269 const std::string& json_extension,
270 const DownloadMediaExCallback& callback_result,
271 const ProgressExCallback& callback_progress = ProgressExCallback(),
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);
std::function< void(int64_t completed_size, int64_t file_size, const ProgressData &result) ProgressExCallback)
扩展过程回调模板
Definition nim_cpp_nos.h:44
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