Add a request ID for re-inserting the USB cable

This commit is contained in:
Richard Hughes 2022-12-20 09:30:28 +00:00
parent d09fb40ae2
commit d4bfb0e53c
2 changed files with 15 additions and 0 deletions

View File

@ -71,6 +71,16 @@ typedef enum {
*/ */
#define FWUPD_REQUEST_ID_REMOVE_USB_CABLE "org.freedesktop.fwupd.request.remove-usb-cable" #define FWUPD_REQUEST_ID_REMOVE_USB_CABLE "org.freedesktop.fwupd.request.remove-usb-cable"
/**
* FWUPD_REQUEST_ID_INSERT_USB_CABLE:
*
* The user needs to insert the cable to complete the update, e.g.
* "The update will continue when the device USB cable has been re-inserted."
*
* Since 1.8.9
*/
#define FWUPD_REQUEST_ID_INSERT_USB_CABLE "org.freedesktop.fwupd.request.insert-usb-cable"
/** /**
* FWUPD_REQUEST_ID_DO_NOT_POWER_OFF: * FWUPD_REQUEST_ID_DO_NOT_POWER_OFF:
* *

View File

@ -2258,6 +2258,11 @@ fu_util_request_get_message(FwupdRequest *req)
return _("The update will continue when the device USB cable has been " return _("The update will continue when the device USB cable has been "
"unplugged."); "unplugged.");
} }
if (g_strcmp0(fwupd_request_get_id(req), FWUPD_REQUEST_ID_INSERT_USB_CABLE) == 0) {
/* TRANSLATORS: warning message shown after update has been scheduled */
return _("The update will continue when the device USB cable has been "
"re-inserted.");
}
if (g_strcmp0(fwupd_request_get_id(req), FWUPD_REQUEST_ID_PRESS_UNLOCK) == 0) { if (g_strcmp0(fwupd_request_get_id(req), FWUPD_REQUEST_ID_PRESS_UNLOCK) == 0) {
/* TRANSLATORS: warning message */ /* TRANSLATORS: warning message */
return _("Press unlock on the device to continue the update process."); return _("Press unlock on the device to continue the update process.");