7#ifndef _NIM_SDK_CPP_NOS_HELPER_H_
8#define _NIM_SDK_CPP_NOS_HELPER_H_
31 void AddTag(
const std::string& tag, int32_t survival_time) {
32 tag_list_[tag] = ((survival_time == 0) ? (0) : (survival_time > kMINSURVIVALTIME ? survival_time : kMINSURVIVALTIME));
38 void RemoveTag(
const std::string& tag) { tag_list_.erase(tag); }
42 std::map<std::string, int32_t>
GetTagList()
const {
return tag_list_; }
47 void SetGetExtension(
const std::string& json_extension) { json_extension_ = json_extension; }
71 void FromJsonString(
const std::string& json_data);
128 const std::string& call_id,
129 const std::string& res_id,
130 DownloadMediaResult& res);
bool ParseDownloadResult(const std::string &file_path, const std::string &call_id, const std::string &res_id, DownloadMediaResult &res)
解析NOS上传过程数据
Definition: nim_nos_helper.cpp:57
bool ParseUploadResult(const std::string &url, const std::string &json, UploadMediaResult &res)
解析NOS上传结果
Definition: nim_nos_helper.cpp:44
bool ParseProgressData(const std::string &json, ProgressData &res)
解析NOS上传过程数据
Definition: nim_nos_helper.cpp:64
NIMNosInitConfigResultType
Definition: nim_nos_def.h:16
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
初始化nos参数
Definition: nim_nos_helper.h:23
std::map< std::string, int32_t > GetTagList() const
Definition: nim_nos_helper.h:42
InitNosConfigParam()
Definition: nim_nos_helper.h:25
void SetGetExtension(const std::string &json_extension)
Definition: nim_nos_helper.h:47
static const int32_t kMINSURVIVALTIME
int32_t 资源生命周期 最小取值
Definition: nim_nos_helper.h:54
std::string json_extension_
Json Value 扩展数据
Definition: nim_nos_helper.h:58
void RemoveTag(const std::string &tag)
Definition: nim_nos_helper.h:38
std::map< std::string, int32_t > tag_list_
std::map<std::string, uint64_t> 场景标签信息列表
Definition: nim_nos_helper.h:56
std::string GetExtension() const
Definition: nim_nos_helper.h:51
void AddTag(const std::string &tag, int32_t survival_time)
Definition: nim_nos_helper.h:31
初始化结果
Definition: nim_nos_helper.h:62
std::map< std::string, int > failure_req_tags_
map 初始化失败的tag列表
Definition: nim_nos_helper.h:68
NIMNosInitConfigResultType result_
enum 初始化结果
Definition: nim_nos_helper.h:64
std::list< std::string > ignore_req_tags_
list 不需要重新初始化tag列表
Definition: nim_nos_helper.h:70
std::list< std::string > success_req_tags_
list 初始化成功的tag列表
Definition: nim_nos_helper.h:66
传输过程中的数据
Definition: nim_nos_helper.h:101
std::string res_id_
资源id
Definition: nim_nos_helper.h:103
ProgressData()
Definition: nim_nos_helper.h:106