mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 07:11:12 -06:00
ENH: get thumbnail from task info
JIRA: STUDIO-3975 Change-Id: Ic9ae120673098a4b62c4a00b515558fbef630890 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
24cb84e78f
commit
f5f650eac4
3 changed files with 48 additions and 3 deletions
|
@ -89,6 +89,7 @@ func_get_printer_firmware NetworkAgent::get_printer_firmware_ptr = nul
|
|||
func_get_task_plate_index NetworkAgent::get_task_plate_index_ptr = nullptr;
|
||||
func_get_user_info NetworkAgent::get_user_info_ptr = nullptr;
|
||||
func_request_bind_ticket NetworkAgent::request_bind_ticket_ptr = nullptr;
|
||||
func_get_subtask_info NetworkAgent::get_subtask_info_ptr = nullptr;
|
||||
func_get_slice_info NetworkAgent::get_slice_info_ptr = nullptr;
|
||||
func_query_bind_status NetworkAgent::query_bind_status_ptr = nullptr;
|
||||
func_modify_printer_name NetworkAgent::modify_printer_name_ptr = nullptr;
|
||||
|
@ -241,6 +242,7 @@ int NetworkAgent::initialize_network_module(bool using_backup)
|
|||
get_task_plate_index_ptr = reinterpret_cast<func_get_task_plate_index>(get_network_function("bambu_network_get_task_plate_index"));
|
||||
get_user_info_ptr = reinterpret_cast<func_get_user_info>(get_network_function("bambu_network_get_user_info"));
|
||||
request_bind_ticket_ptr = reinterpret_cast<func_request_bind_ticket>(get_network_function("bambu_network_request_bind_ticket"));
|
||||
get_subtask_info_ptr = reinterpret_cast<func_get_subtask_info>(get_network_function("bambu_network_get_subtask_info"));
|
||||
get_slice_info_ptr = reinterpret_cast<func_get_slice_info>(get_network_function("bambu_network_get_slice_info"));
|
||||
query_bind_status_ptr = reinterpret_cast<func_query_bind_status>(get_network_function("bambu_network_query_bind_status"));
|
||||
modify_printer_name_ptr = reinterpret_cast<func_modify_printer_name>(get_network_function("bambu_network_modify_printer_name"));
|
||||
|
@ -346,11 +348,12 @@ int NetworkAgent::unload_network_module()
|
|||
get_printer_firmware_ptr = nullptr;
|
||||
get_task_plate_index_ptr = nullptr;
|
||||
get_user_info_ptr = nullptr;
|
||||
get_subtask_info_ptr = nullptr;
|
||||
get_slice_info_ptr = nullptr;
|
||||
query_bind_status_ptr = nullptr;
|
||||
modify_printer_name_ptr = nullptr;
|
||||
get_camera_url_ptr = nullptr;
|
||||
get_design_staffpick_ptr = nullptr;
|
||||
get_design_staffpick_ptr = nullptr;
|
||||
start_publish_ptr = nullptr;
|
||||
get_profile_3mf_ptr = nullptr;
|
||||
get_model_publish_url_ptr = nullptr;
|
||||
|
@ -1070,6 +1073,17 @@ int NetworkAgent::request_bind_ticket(std::string* ticket)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int NetworkAgent::get_subtask_info(std::string subtask_id, std::string* task_json, unsigned int* http_code, std::string* http_body)
|
||||
{
|
||||
int ret = 0;
|
||||
if (network_agent && get_subtask_info_ptr) {
|
||||
ret = get_subtask_info_ptr(network_agent, subtask_id, task_json, http_code, http_body);
|
||||
if (ret)
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format("error: network_agent=%1%, ret=%2%") % network_agent % ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int NetworkAgent::get_slice_info(std::string project_id, std::string profile_id, int plate_index, std::string* slice_json)
|
||||
{
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue