mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 23:01:22 -06:00
NEW:support the display of profile info in the mall model
Change-Id: Idab6bb5a4ef50df665ab7c8e5891efc5a8253eba
This commit is contained in:
parent
3fb007aedb
commit
a64e0b2f82
10 changed files with 156 additions and 4 deletions
|
@ -98,6 +98,7 @@ func_get_profile_3mf NetworkAgent::get_profile_3mf_ptr = nullptr;
|
|||
func_get_model_publish_url NetworkAgent::get_model_publish_url_ptr = nullptr;
|
||||
func_get_model_mall_home_url NetworkAgent::get_model_mall_home_url_ptr = nullptr;
|
||||
func_get_model_mall_detail_url NetworkAgent::get_model_mall_detail_url_ptr = nullptr;
|
||||
func_get_subtask NetworkAgent::get_subtask_ptr = nullptr;
|
||||
func_get_my_profile NetworkAgent::get_my_profile_ptr = nullptr;
|
||||
func_track_enable NetworkAgent::track_enable_ptr = nullptr;
|
||||
func_track_event NetworkAgent::track_event_ptr = nullptr;
|
||||
|
@ -245,6 +246,7 @@ int NetworkAgent::initialize_network_module(bool using_backup)
|
|||
start_publish_ptr = reinterpret_cast<func_start_pubilsh>(get_network_function("bambu_network_start_publish"));
|
||||
get_profile_3mf_ptr = reinterpret_cast<func_get_profile_3mf>(get_network_function("bambu_network_get_profile_3mf"));
|
||||
get_model_publish_url_ptr = reinterpret_cast<func_get_model_publish_url>(get_network_function("bambu_network_get_model_publish_url"));
|
||||
get_subtask_ptr = reinterpret_cast<func_get_subtask>(get_network_function("bambu_network_get_subtask"));
|
||||
get_model_mall_home_url_ptr = reinterpret_cast<func_get_model_mall_home_url>(get_network_function("bambu_network_get_model_mall_home_url"));
|
||||
get_model_mall_detail_url_ptr = reinterpret_cast<func_get_model_mall_detail_url>(get_network_function("bambu_network_get_model_mall_detail_url"));
|
||||
get_my_profile_ptr = reinterpret_cast<func_get_my_profile>(get_network_function("bambu_network_get_my_profile"));
|
||||
|
@ -347,8 +349,9 @@ int NetworkAgent::unload_network_module()
|
|||
start_publish_ptr = nullptr;
|
||||
get_profile_3mf_ptr = nullptr;
|
||||
get_model_publish_url_ptr = nullptr;
|
||||
get_subtask_ptr = nullptr;
|
||||
get_model_mall_home_url_ptr = nullptr;
|
||||
get_model_mall_detail_url_ptr = nullptr;
|
||||
get_model_mall_detail_url_ptr = nullptr;
|
||||
get_my_profile_ptr = nullptr;
|
||||
track_enable_ptr = nullptr;
|
||||
track_event_ptr = nullptr;
|
||||
|
@ -1137,6 +1140,18 @@ int NetworkAgent::get_model_publish_url(std::string* url)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int NetworkAgent::get_subtask(BBLModelTask* task)
|
||||
{
|
||||
int ret = 0;
|
||||
if (network_agent && get_subtask_ptr) {
|
||||
ret = get_subtask_ptr(network_agent, task);
|
||||
if (ret)
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(" error: network_agent=%1%, ret=%2%") % network_agent % ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int NetworkAgent::get_model_mall_home_url(std::string* url)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
|
@ -76,6 +76,7 @@ typedef int (*func_get_design_staffpick)(void *agent, int offset, int limit, std
|
|||
typedef int (*func_start_pubilsh)(void *agent, PublishParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, std::string* out);
|
||||
typedef int (*func_get_profile_3mf)(void *agent, BBLProfile* profile);
|
||||
typedef int (*func_get_model_publish_url)(void *agent, std::string* url);
|
||||
typedef int (*func_get_subtask)(void *agent, BBLModelTask* task);
|
||||
typedef int (*func_get_model_mall_home_url)(void *agent, std::string* url);
|
||||
typedef int (*func_get_model_mall_detail_url)(void *agent, std::string* url, std::string id);
|
||||
typedef int (*func_get_my_profile)(void *agent, std::string token, unsigned int *http_code, std::string *http_body);
|
||||
|
@ -167,6 +168,7 @@ public:
|
|||
int start_publish(PublishParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, std::string* out);
|
||||
int get_profile_3mf(BBLProfile* profile);
|
||||
int get_model_publish_url(std::string* url);
|
||||
int get_subtask(BBLModelTask* task);
|
||||
int get_model_mall_home_url(std::string* url);
|
||||
int get_model_mall_detail_url(std::string* url, std::string id);
|
||||
int get_my_profile(std::string token, unsigned int* http_code, std::string* http_body);
|
||||
|
@ -247,6 +249,7 @@ private:
|
|||
static func_start_pubilsh start_publish_ptr;
|
||||
static func_get_profile_3mf get_profile_3mf_ptr;
|
||||
static func_get_model_publish_url get_model_publish_url_ptr;
|
||||
static func_get_subtask get_subtask_ptr;
|
||||
static func_get_model_mall_home_url get_model_mall_home_url_ptr;
|
||||
static func_get_model_mall_detail_url get_model_mall_detail_url_ptr;
|
||||
static func_get_my_profile get_my_profile_ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue