ENH:SD card printing using cloud service

jira:[for sdcard print]

Change-Id: I9b3f3cc5db1b5c1c63d4e9e016cdd81db6893b65
This commit is contained in:
tao wang
2024-05-21 11:52:19 +08:00
committed by SoftFever
parent 0886610160
commit 8e7d1694f9
4 changed files with 36 additions and 13 deletions

View File

@@ -64,6 +64,7 @@ typedef int (*func_start_print)(void *agent, PrintParams params, OnUpdateStatusF
typedef int (*func_start_local_print_with_record)(void *agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
typedef int (*func_start_send_gcode_to_sdcard)(void *agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
typedef int (*func_start_local_print)(void *agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
typedef int (*func_start_sdcard_print)(void *agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
typedef int (*func_get_user_presets)(void *agent, std::map<std::string, std::map<std::string, std::string>>* user_presets);
typedef std::string (*func_request_setting_id)(void *agent, std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
typedef int (*func_put_setting)(void *agent, std::string setting_id, std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
@@ -179,6 +180,7 @@ public:
int start_local_print_with_record(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
int start_send_gcode_to_sdcard(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
int start_local_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
int start_sdcard_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
int get_user_presets(std::map<std::string, std::map<std::string, std::string>>* user_presets);
std::string request_setting_id(std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
int put_setting(std::string setting_id, std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
@@ -284,6 +286,7 @@ private:
static func_start_local_print_with_record start_local_print_with_record_ptr;
static func_start_send_gcode_to_sdcard start_send_gcode_to_sdcard_ptr;
static func_start_local_print start_local_print_ptr;
static func_start_sdcard_print start_sdcard_print_ptr;
static func_get_user_presets get_user_presets_ptr;
static func_request_setting_id request_setting_id_ptr;
static func_put_setting put_setting_ptr;