Show the print-failure snapshot in the device error dialog

When a print fails, DeviceErrorDialog now fetches the printer's captured camera
frame of the failure and shows it in place of the generic HMS illustration,
falling back to the local image and a drawn placeholder on older plugins or errors.

- Agent: add get_hms_snapshot through NetworkAgent / IPrinterAgent (BBL calls the
  bound plugin symbol; other agents no-op, so old plugins degrade gracefully).
- DeviceManager: parse and clear m_print_error_img_id from the print-error message.
- Dialog: tiered cloud/local/placeholder image reusing the single image widget,
  with a liveness-guarded async callback decoded on the UI thread.
This commit is contained in:
SoftFever
2026-07-16 01:44:43 +08:00
parent aa44d57eac
commit d591d50ca0
14 changed files with 244 additions and 17 deletions

View File

@@ -139,6 +139,12 @@ public:
*/
virtual int request_bind_ticket(std::string* ticket) = 0;
/**
* Fetch the cloud snapshot image captured at a print failure.
* Returns 0 if the request was dispatched; the image body arrives via callback(body, http_status).
*/
virtual int get_hms_snapshot(std::string dev_id, std::string file_name, std::function<void(std::string, int)> callback) = 0;
/**
* Register callback for fatal HTTP errors.
*/