mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 23:01:22 -06:00
NEW:the model mall is opened using the default browser
Change-Id: I9f855288486196b2a7c72c51bee8cfcf408ceab8
This commit is contained in:
parent
7eb3aa8104
commit
311d9c3481
5 changed files with 128 additions and 63 deletions
|
@ -87,6 +87,7 @@ func_get_user_print_info NetworkAgent::get_user_print_info_ptr = null
|
|||
func_get_printer_firmware NetworkAgent::get_printer_firmware_ptr = nullptr;
|
||||
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_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;
|
||||
|
@ -229,6 +230,7 @@ int NetworkAgent::initialize_network_module(bool using_backup)
|
|||
get_printer_firmware_ptr = reinterpret_cast<func_get_printer_firmware>(get_network_function("bambu_network_get_printer_firmware"));
|
||||
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_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"));
|
||||
|
@ -1019,6 +1021,17 @@ int NetworkAgent::get_user_info(int* identifier)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int NetworkAgent::request_bind_ticket(std::string* ticket)
|
||||
{
|
||||
int ret = 0;
|
||||
if (network_agent && request_bind_ticket_ptr) {
|
||||
ret = request_bind_ticket_ptr(network_agent, ticket);
|
||||
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;
|
||||
|
|
|
@ -67,6 +67,7 @@ typedef int (*func_get_user_print_info)(void *agent, unsigned int* http_code, st
|
|||
typedef int (*func_get_printer_firmware)(void *agent, std::string dev_id, unsigned* http_code, std::string* http_body);
|
||||
typedef int (*func_get_task_plate_index)(void *agent, std::string task_id, int* plate_index);
|
||||
typedef int (*func_get_user_info)(void *agent, int* identifier);
|
||||
typedef int (*func_request_bind_ticket)(void *agent, std::string* ticket);
|
||||
typedef int (*func_get_slice_info)(void *agent, std::string project_id, std::string profile_id, int plate_index, std::string* slice_json);
|
||||
typedef int (*func_query_bind_status)(void *agent, std::vector<std::string> query_list, unsigned int* http_code, std::string* http_body);
|
||||
typedef int (*func_modify_printer_name)(void *agent, std::string dev_id, std::string dev_name);
|
||||
|
@ -151,6 +152,7 @@ public:
|
|||
int get_printer_firmware(std::string dev_id, unsigned* http_code, std::string* http_body);
|
||||
int get_task_plate_index(std::string task_id, int* plate_index);
|
||||
int get_user_info(int* identifier);
|
||||
int request_bind_ticket(std::string* ticket);
|
||||
int get_slice_info(std::string project_id, std::string profile_id, int plate_index, std::string* slice_json);
|
||||
int query_bind_status(std::vector<std::string> query_list, unsigned int* http_code, std::string* http_body);
|
||||
int modify_printer_name(std::string dev_id, std::string dev_name);
|
||||
|
@ -225,6 +227,7 @@ private:
|
|||
static func_get_printer_firmware get_printer_firmware_ptr;
|
||||
static func_get_task_plate_index get_task_plate_index_ptr;
|
||||
static func_get_user_info get_user_info_ptr;
|
||||
static func_request_bind_ticket request_bind_ticket_ptr;
|
||||
static func_get_slice_info get_slice_info_ptr;
|
||||
static func_query_bind_status query_bind_status_ptr;
|
||||
static func_modify_printer_name modify_printer_name_ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue