pub enum InstallerRequest {
GetLastUpdateResult {
responder: InstallerGetLastUpdateResultResponder,
},
GetUpdateResult {
attempt_id: String,
responder: InstallerGetUpdateResultResponder,
},
StartUpdate {
url: PackageUrl,
options: Options,
monitor: ClientEnd<MonitorMarker>,
reboot_controller: Option<ServerEnd<RebootControllerMarker>>,
responder: InstallerStartUpdateResponder,
},
MonitorUpdate {
attempt_id: Option<String>,
monitor: ClientEnd<MonitorMarker>,
responder: InstallerMonitorUpdateResponder,
},
SuspendUpdate {
attempt_id: Option<String>,
responder: InstallerSuspendUpdateResponder,
},
ResumeUpdate {
attempt_id: Option<String>,
responder: InstallerResumeUpdateResponder,
},
CancelUpdate {
attempt_id: Option<String>,
responder: InstallerCancelUpdateResponder,
},
}
Expand description
Updates the system.
This protocol is intended to be consumed by a component capable of discovering when to update and what version of the system to install.
Variants§
GetLastUpdateResult
Get the status of the last update attempt. If this device hasn’t attempted an update since the last factory reset, every field in the result will be absent.
- response
info
the status of the last update attempt, if available.
Fields
responder: InstallerGetLastUpdateResultResponder
GetUpdateResult
Get the status of the given update attempt, if it exists. If this device
hasn’t attempted an update with the given attempt_id
or forgotten about
that attempt, every field in the result will be absent.
- request
attempt_id
UUID identifying the requested update attempt.
- response
info
the status of the last update attempt, if available.
StartUpdate
Start an update if one is not running, or attach to a pending update
attempt if one is running and
[Options.allow_attach_to_existing_attempt
] is true. If an update
attempt is started or attached to, provide status updates through
monitor
.
- request
url
The fuchsia-pkg URL of the update package to update to. - request
options
Configuration options for this update attempt. Ignored or merged with the existingoptions
if an update attempt is already in progress. - request
monitor
A protocol on which to receive progress updates. - request
reboot_controller
An optional protocol to control the timing of the reboot into the update system. If not provided, the update attempt will initiate the reboot as soon as it is ready.
- response
attempt_id
UUID identifying this update attempt. For updates that require a reboot, components may use this identifier to disambiguate the completion of this update attempt from new update attempts that start post-reboot.
Fields
url: PackageUrl
monitor: ClientEnd<MonitorMarker>
reboot_controller: Option<ServerEnd<RebootControllerMarker>>
responder: InstallerStartUpdateResponder
MonitorUpdate
Attempt to monitor a specific update attempt, if it exists. This request will not start an update if one is not already running.
- request
attempt_id
UUID identifying the requested update attempt. If not given, monitor any active update attempt. - request
monitor
A protocol on which to receive progress updates.
- response
attached
Whether or not the provided monitor was attached to an in-progress update attempt. If false, monitor will be closed by the server.
SuspendUpdate
Suspend a specific update attempt, if it exists.
- request
attempt_id
UUID identifying the requested update attempt. If not given, suspend any active update attempt.
ResumeUpdate
Resume a specific update attempt, if it exists.
- request
attempt_id
UUID identifying the requested update attempt. If not given, resume any active update attempt.
CancelUpdate
Cancel a specific update attempt, if it exists.
- request
attempt_id
UUID identifying the requested update attempt. If not given, cancel any active update attempt.
Implementations§
Source§impl InstallerRequest
impl InstallerRequest
pub fn into_get_last_update_result( self, ) -> Option<InstallerGetLastUpdateResultResponder>
pub fn into_get_update_result( self, ) -> Option<(String, InstallerGetUpdateResultResponder)>
pub fn into_start_update( self, ) -> Option<(PackageUrl, Options, ClientEnd<MonitorMarker>, Option<ServerEnd<RebootControllerMarker>>, InstallerStartUpdateResponder)>
pub fn into_monitor_update( self, ) -> Option<(Option<String>, ClientEnd<MonitorMarker>, InstallerMonitorUpdateResponder)>
pub fn into_suspend_update( self, ) -> Option<(Option<String>, InstallerSuspendUpdateResponder)>
pub fn into_resume_update( self, ) -> Option<(Option<String>, InstallerResumeUpdateResponder)>
pub fn into_cancel_update( self, ) -> Option<(Option<String>, InstallerCancelUpdateResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL