| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.update |
| |
| <div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div> |
| |
| ## **PROTOCOLS** |
| |
| ## AttemptsMonitor {#AttemptsMonitor} |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=104)* |
| <p>Monitors update attempts as they start.</p> |
| <p>Clients interested in receiving progress information for an update check |
| should implement this protocol and provide the client end to |
| <a class='link' href='#Manager.MonitorAllUpdateChecks'>Manager.MonitorAllUpdateChecks</a>. |
| The Manager will close the client end of the AttemptsMonitor if there are |
| more than 2 outstanding requests.</p> |
| |
| ### OnStart {#AttemptsMonitor.OnStart} |
| |
| <p>Called when a new update attempt has started.</p> |
| <p>Arguments:</p> |
| <ul> |
| <li>|options| Options for how this request should be performed.</li> |
| <li>|monitor| A protocol on which to receive progress updates.</li> |
| </ul> |
| |
| #### Request {#AttemptsMonitor.OnStart_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>options</code></td> |
| <td> |
| <code><a class='link' href='#AttemptOptions'>AttemptOptions</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>monitor</code></td> |
| <td> |
| <code>server_end<<a class='link' href='#Monitor'>Monitor</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#AttemptsMonitor.OnStart_Response} |
| |
| <EMPTY> |
| |
| ## CommitStatusProvider {#CommitStatusProvider} |
| *Defined in [fuchsia.update/commit.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/commit.fidl;l=19)* |
| <p>A reporter for whether the currently booted system is committed. When an |
| update is committed, this means:</p> |
| <ul> |
| <li>The currently booted slot is marked as healthy (e.g. successfully booted).</li> |
| <li>The alternate slot (if present) is marked as unbootable.</li> |
| <li>The system will not roll back to the previous version of the OS on reboot.</li> |
| <li>The previous version of the OS may be garbage collected.</li> |
| </ul> |
| <p>Until the update is committed, the system retains the prior version of the OS. |
| That way, if we discover the newly written version is bad (e.g. it cannot itself |
| update), then the system can fall back to the previous committed version.</p> |
| |
| ### IsCurrentSystemCommitted {#CommitStatusProvider.IsCurrentSystemCommitted} |
| |
| <p>Determines whether the currently booted system is committed, and immediately |
| returns an EventPair.</p> |
| <ul> |
| <li>If the currently booted system is committed, the <code>ZX_USER_SIGNAL_0</code> signal |
| is asserted on the EventPair, e.g. the signal is asserted before the |
| EventPair is returned.</li> |
| <li>If the commit is pending, no signals are asserted on the EventPair. When the |
| system is committed, <code>ZX_USER_SIGNAL_0</code> is asserted on the EventPair.</li> |
| <li>If the system fails to commit the currently booted version, the system |
| will reboot and terminate the component serving <a class='link' href='#CommitStatusProvider'>CommitStatusProvider</a>, |
| which will assert <code>ZX_EVENTPAIR_PEER_CLOSED</code>. At this point, any remaining |
| EventPairs will observe the <code>ZX_EVENTPAIR_PEER_CLOSED</code> signal.</li> |
| </ul> |
| <ul> |
| <li>response <code>event</code> an EventPair with rights <code>ZX_RIGHTS_BASIC</code>.</li> |
| </ul> |
| |
| #### Request {#CommitStatusProvider.IsCurrentSystemCommitted_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#CommitStatusProvider.IsCurrentSystemCommitted_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>event</code></td> |
| <td> |
| <code>handle<eventpair></code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Manager {#Manager} |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=12)* |
| <p>The Manager protocol is used by a client that wishes to either check for an |
| update, or follow the status of ongoing updates.</p> |
| <p>The Manager provides a mechanism for checking for updates via the |
| <a class='link' href='#Manager.CheckNow'>Manager.CheckNow</a> message.</p> |
| |
| ### CheckNow {#Manager.CheckNow} |
| |
| <p>Immediately check for an update, and optionally track the state and |
| progress of that update check.</p> |
| <ul> |
| <li> |
| <p>request <code>options</code> Options for how this request should be performed. |
| E.g. What kind of entity initiated this request? |
| E.g. Is monitoring an existing update check that |
| is already in process an acceptable |
| alternative?</p> |
| </li> |
| <li> |
| <p>request <code>monitor</code> An interface on which to receive the status events |
| for this update check. The monitor is only valid |
| for this single update check, after that it will |
| not receive any more notifications and will be |
| closed.</p> |
| </li> |
| </ul> |
| <ul> |
| <li>error If an update check cannot be started, an error will be returned. |
| The <a class='link' href='#Monitor'>Monitor</a>, if provided, will not receive any notifications.</li> |
| </ul> |
| |
| #### Request {#Manager.CheckNow_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>options</code></td> |
| <td> |
| <code><a class='link' href='#CheckOptions'>CheckOptions</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>monitor</code></td> |
| <td> |
| <code><a class='link' href='#Monitor'>Monitor</a>?</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Manager.CheckNow_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#Manager_CheckNow_Result'>Manager_CheckNow_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### MonitorAllUpdateChecks {#Manager.MonitorAllUpdateChecks} |
| |
| <p>Monitor all update attempts as they start, as well as an in-progress |
| attempt, if there is one.</p> |
| <p>Arguments:</p> |
| <ul> |
| <li>|attempts_monitor| A protocol on which to receive |Monitor| instances |
| as update attempts start.</li> |
| </ul> |
| |
| #### Request {#Manager.MonitorAllUpdateChecks_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>attempts_monitor</code></td> |
| <td> |
| <code><a class='link' href='#AttemptsMonitor'>AttemptsMonitor</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### PerformPendingReboot {#Manager.PerformPendingReboot} |
| |
| <p>Performs any pending reboot of the system into an updated OS, if an |
| update has been staged for the next system startup.</p> |
| <p>Should be used when the platform is configured to let the product drive |
| reboot scheduling. If this method is called when the platform is not |
| configured to let the product drive reboot scheduling, no reboot will |
| occur, and the system will reboot on its own after an update.</p> |
| <p>In product-driven reboot configurations, the platform still contains a |
| backstop for post-update reboots. This means that if an update |
| is installed but the system has not rebooted before the backstop |
| duration occurs, the update system will automatically reboot the |
| system as a security measure. To avoid hitting this backstop, |
| products which desire control over reboot timing should call this |
| method roughly daily.</p> |
| <ul> |
| <li>response <code>rebooting</code> true if the system is rebooting, false if no |
| update was pending reboot.</li> |
| </ul> |
| |
| #### Request {#Manager.PerformPendingReboot_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Manager.PerformPendingReboot_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>rebooting</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Monitor {#Monitor} |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=128)* |
| <p>Monitors a single update check.</p> |
| <p>Clients interested in receiving progress information for an update check |
| should implement this protocol and provide the client end to |
| <a class='link' href='#Manager.CheckNow'>Manager.CheckNow</a>.</p> |
| |
| ### OnState {#Monitor.OnState} |
| |
| <p>Receives a status update for this update check.</p> |
| <p>This request will be called for all state changes, skipping none. |
| However, message delivery is throttled by the rate at which the |
| implementation acknowledges the messages.</p> |
| <p>The throttled delivery doesn't impact the underlying state of the |
| <a class='link' href='#Manager'>Manager</a>. It does not wait for any acknowledgements before it moves |
| on to the next state in its state machine. The <a class='link' href='#Manager'>Manager</a> will simply |
| queue up the states for the <a class='link' href='#Monitor'>Monitor</a> implementation to receive.</p> |
| <p>During the installing_update state, the <a class='link' href='#Manager'>Manager</a> may, at its |
| discretion, collapse redundant information like the fraction completed, |
| in the event that the <a class='link' href='#Monitor'>Monitor</a> implementation is not responding to |
| the <code>OnState()</code> requests in a timely manner.</p> |
| <ul> |
| <li>request <code>state</code> The new state of the update check.</li> |
| </ul> |
| <ul> |
| <li>response The implementation is ready to receive the next |
| <a class='link' href='#State'>State</a> from the <a class='link' href='#Manager'>Manager</a>.</li> |
| </ul> |
| |
| #### Request {#Monitor.OnState_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>state</code></td> |
| <td> |
| <code><a class='link' href='#State'>State</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Monitor.OnState_Response} |
| |
| <EMPTY> |
| |
| |
| ## **STRUCTS** |
| |
| ### Manager_CheckNow_Response {#Manager_CheckNow_Response data-text="Manager_CheckNow_Response"} |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=33)* |
| |
| <EMPTY> |
| |
| |
| ## **ENUMS** |
| |
| ### CheckNotStartedReason [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#CheckNotStartedReason data-text="CheckNotStartedReason"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=297)* |
| <p>This is the set of values that are returned by an request to immediately |
| check for an update.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="CheckNotStartedReason.INTERNAL"> |
| <td><h3 id="CheckNotStartedReason.INTERNAL" class="add-link hide-from-toc">INTERNAL</h3></td> |
| <td><code>1</code></td> |
| <td><p>There was an internal error in starting the update check. The client |
| is not expected to be able to do something meaningful about this error, |
| except to try again later (after an appropriate delay and back-off in |
| the event of multiple errors.</p> |
| </td> |
| </tr> |
| <tr id="CheckNotStartedReason.INVALID_OPTIONS"> |
| <td><h3 id="CheckNotStartedReason.INVALID_OPTIONS" class="add-link hide-from-toc">INVALID_OPTIONS</h3></td> |
| <td><code>2</code></td> |
| <td><p>If there are required arguments or options (or option values in |
| conflict), provided via the CheckOptions table to CheckNow, this error |
| will be returned.</p> |
| </td> |
| </tr> |
| <tr id="CheckNotStartedReason.ALREADY_IN_PROGRESS"> |
| <td><h3 id="CheckNotStartedReason.ALREADY_IN_PROGRESS" class="add-link hide-from-toc">ALREADY_IN_PROGRESS</h3></td> |
| <td><code>3</code></td> |
| <td><p>There was already another update check in progress when this request was |
| made. A new update check will not be started.</p> |
| </td> |
| </tr> |
| <tr id="CheckNotStartedReason.THROTTLED"> |
| <td><h3 id="CheckNotStartedReason.THROTTLED" class="add-link hide-from-toc">THROTTLED</h3></td> |
| <td><code>4</code></td> |
| <td><p>The update check was not started, because too many requests to check for |
| updates have been made by clients in a short period of time.</p> |
| <p><strong>NOTE:</strong> Clients MUST NOT attempt to cause background update checks to |
| happen at a more frequent rate than the fuchsia.update.Manager will do |
| them.</p> |
| <p>If a client attempts to abuse this, it will be throttled.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### Initiator [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Initiator data-text="Initiator"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=85)* |
| <p>Who or what initiated the update check.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="Initiator.USER"> |
| <td><h3 id="Initiator.USER" class="add-link hide-from-toc">USER</h3></td> |
| <td><code>1</code></td> |
| <td><p>The update check was initiated by an interactive user, or the user is |
| otherwise blocked and waiting for the result of this update check. This |
| SHOULD only be used when there is a UI element or flow that a user has |
| interacted with which has initiated this update check.</p> |
| </td> |
| </tr> |
| <tr id="Initiator.SERVICE"> |
| <td><h3 id="Initiator.SERVICE" class="add-link hide-from-toc">SERVICE</h3></td> |
| <td><code>2</code></td> |
| <td><p>The update check was initiated by a service, not a user-facing aspect |
| of the system.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### InstallationDeferralReason [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#InstallationDeferralReason data-text="InstallationDeferralReason"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=327)* |
| <p>This is the set of values that are provided when an update installation |
| is deferred.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="InstallationDeferralReason.CURRENT_SYSTEM_NOT_COMMITTED"> |
| <td><h3 id="InstallationDeferralReason.CURRENT_SYSTEM_NOT_COMMITTED" class="add-link hide-from-toc">CURRENT_SYSTEM_NOT_COMMITTED</h3></td> |
| <td><code>1</code></td> |
| <td><p>The update was not installed because the currently booted system is not |
| committed. Consumers are encouraged to use the <a class='link' href='#CommitStatusProvider'>CommitStatusProvider</a> |
| to determine when to retry the update check such that the update will |
| be installed.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **TABLES** |
| |
| ### AttemptOptions {#AttemptOptions data-text="AttemptOptions"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=117)* |
| <p>Details for an update attempt monitor.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="AttemptOptions.initiator"> |
| <td><h3 id="AttemptOptions.initiator" class="add-link hide-from-toc">1</h3></td> |
| <td><code>initiator</code></td> |
| <td> |
| <code><a class='link' href='#Initiator'>Initiator</a></code> |
| </td> |
| <td><p>Who or what initiated this update attempt. This may influence how the |
| update check is performed.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### CheckOptions {#CheckOptions data-text="CheckOptions"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=69)* |
| <p>Configuration options for an update check.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="CheckOptions.initiator"> |
| <td><h3 id="CheckOptions.initiator" class="add-link hide-from-toc">1</h3></td> |
| <td><code>initiator</code></td> |
| <td> |
| <code><a class='link' href='#Initiator'>Initiator</a></code> |
| </td> |
| <td><p>Who or what initiated this update attempt. This is taken as input to |
| Policy, and may influence how the update check is performed.</p> |
| <p><strong>This is a required field.</strong></p> |
| </td> |
| </tr> |
| <tr id="CheckOptions.allow_attaching_to_existing_update_check"> |
| <td><h3 id="CheckOptions.allow_attaching_to_existing_update_check" class="add-link hide-from-toc">2</h3></td> |
| <td><code>allow_attaching_to_existing_update_check</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>If an update check is already in progress, it's acceptable to instead |
| attach a Monitor to that in-progress update instead of failing this |
| request to check for updates. This may convert situations that would |
| have resulted in the ALREADY_IN_PROGRESS to be treated as non-error |
| cases.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### CheckingForUpdatesData {#CheckingForUpdatesData data-text="CheckingForUpdatesData"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=237)* |
| <p>This is the set of data associated with <code>checking_for_updates</code>. |
| (currently none)</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| </table> |
| |
| ### ErrorCheckingForUpdateData {#ErrorCheckingForUpdateData data-text="ErrorCheckingForUpdateData"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=242)* |
| <p>This is the set of data associated with the <code>error_checking_for_update</code> |
| state. |
| (currently none)</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| </table> |
| |
| ### InstallationDeferredData {#InstallationDeferredData data-text="InstallationDeferredData"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=250)* |
| <p>This is the set of data associated with the |
| <code>installation_deferred_by_policy</code> state.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="InstallationDeferredData.update"> |
| <td><h3 id="InstallationDeferredData.update" class="add-link hide-from-toc">1</h3></td> |
| <td><code>update</code></td> |
| <td> |
| <code><a class='link' href='#UpdateInfo'>UpdateInfo</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="InstallationDeferredData.deferral_reason"> |
| <td><h3 id="InstallationDeferredData.deferral_reason" class="add-link hide-from-toc">2</h3></td> |
| <td><code>deferral_reason</code></td> |
| <td> |
| <code><a class='link' href='#InstallationDeferralReason'>InstallationDeferralReason</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### InstallationErrorData {#InstallationErrorData data-text="InstallationErrorData"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=266)* |
| <p>This is the set of data associated with the <code>installation_error</code> state. |
| (currently none)</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="InstallationErrorData.update"> |
| <td><h3 id="InstallationErrorData.update" class="add-link hide-from-toc">1</h3></td> |
| <td><code>update</code></td> |
| <td> |
| <code><a class='link' href='#UpdateInfo'>UpdateInfo</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="InstallationErrorData.installation_progress"> |
| <td><h3 id="InstallationErrorData.installation_progress" class="add-link hide-from-toc">2</h3></td> |
| <td><code>installation_progress</code></td> |
| <td> |
| <code><a class='link' href='#InstallationProgress'>InstallationProgress</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### InstallationProgress {#InstallationProgress data-text="InstallationProgress"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=290)* |
| <p>This describes the progress installing the update that has been made so far.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="InstallationProgress.fraction_completed"> |
| <td><h3 id="InstallationProgress.fraction_completed" class="add-link hide-from-toc">1</h3></td> |
| <td><code>fraction_completed</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td><p>The fraction [0-1.0f] of the installation that has been completed.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### InstallingData {#InstallingData data-text="InstallingData"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=259)* |
| <p>This is the set of data associated with the states involved with installing |
| an update:</p> |
| <ul> |
| <li><code>installing_update</code></li> |
| <li><code>waiting_for_reboot</code></li> |
| </ul> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="InstallingData.update"> |
| <td><h3 id="InstallingData.update" class="add-link hide-from-toc">1</h3></td> |
| <td><code>update</code></td> |
| <td> |
| <code><a class='link' href='#UpdateInfo'>UpdateInfo</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="InstallingData.installation_progress"> |
| <td><h3 id="InstallingData.installation_progress" class="add-link hide-from-toc">2</h3></td> |
| <td><code>installation_progress</code></td> |
| <td> |
| <code><a class='link' href='#InstallationProgress'>InstallationProgress</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### NoUpdateAvailableData {#NoUpdateAvailableData data-text="NoUpdateAvailableData"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=246)* |
| <p>This is the set of data associated with the <code>no_update_available</code> state. |
| (currently none)</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| </table> |
| |
| ### UpdateInfo {#UpdateInfo data-text="UpdateInfo"} |
| |
| |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=272)* |
| <p>This describes the update that is available to be installed.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="UpdateInfo.version_available"> |
| <td><h3 id="UpdateInfo.version_available" class="add-link hide-from-toc">1</h3></td> |
| <td><code>version_available</code></td> |
| <td> |
| <code>string[128]</code> |
| </td> |
| <td><p>A string that describes the version that is available. This may be |
| either a semantic version (A.B.C.D) or an opaque hash. Clients MUST |
| not attempt to inspect this value, it is for display purposes only.</p> |
| </td> |
| </tr> |
| <tr id="UpdateInfo.download_size"> |
| <td><h3 id="UpdateInfo.download_size" class="add-link hide-from-toc">2</h3></td> |
| <td><code>download_size</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td><p>The total number of bytes that may be downloaded to apply this update.</p> |
| </td> |
| </tr> |
| <tr id="UpdateInfo.urgent"> |
| <td><h3 id="UpdateInfo.urgent" class="add-link hide-from-toc">3</h3></td> |
| <td><code>urgent</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>Whether the update was marked as urgent. Default is false.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **UNIONS** |
| |
| ### Manager_CheckNow_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Manager_CheckNow_Result data-text="Manager_CheckNow_Result"} |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=33)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="Manager_CheckNow_Result.response"> |
| <td><h3 id="Manager_CheckNow_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#Manager_CheckNow_Response'>Manager_CheckNow_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Manager_CheckNow_Result.err"> |
| <td><h3 id="Manager_CheckNow_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#CheckNotStartedReason'>CheckNotStartedReason</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### State [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#State data-text="State"} |
| *Defined in [fuchsia.update/update.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=182)* |
| <p>The set of states that a <a class='link' href='#Monitor'>Monitor</a> can receive during an update check.</p> |
| <p>An update check ends when it enters a terminal state, denoted below as the |
| states on the right-hand side of the diagram with no arrows leading out of |
| them.</p> |
| <h1>State Machine Diagram</h1> |
| <pre><code> +----------------------+ +---------------------------------+ |
| | checking_for_updates |---->| error_checking_for_update | |
| +----------------------+ +---------------------------------+ |
| | |
| | +---------------------------------+ |
| +---------------->| no_update_available | |
| | +---------------------------------+ |
| | |
| | +---------------------------------+ |
| +---------------->| installation_deferred_by_policy | |
| | +---------------------------------+ |
| v |
| +----------------------+ +---------------------------------+ |
| | installing_update |---->| installation_error | |
| +----------------------+ +---------------------------------+ |
| | |
| | +---------------------------------+ |
| +---------------->| waiting_for_reboot | |
| +---------------------------------+ |
| </code></pre> |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="State.checking_for_updates"> |
| <td><h3 id="State.checking_for_updates" class="add-link hide-from-toc">1</h3></td> |
| <td><code>checking_for_updates</code></td> |
| <td> |
| <code><a class='link' href='#CheckingForUpdatesData'>CheckingForUpdatesData</a></code> |
| </td> |
| <td><p>The Manager is currently checking for an update.</p> |
| <p>Next states:</p> |
| <ul> |
| <li><code>installing_update</code> update is available and allowed by policy</li> |
| <li><code>error_checking_for_update</code> on error</li> |
| <li><code>update_deferred_by_policy</code> update is available but deferred by policy</li> |
| </ul> |
| </td> |
| </tr> |
| <tr id="State.error_checking_for_update"> |
| <td><h3 id="State.error_checking_for_update" class="add-link hide-from-toc">2</h3></td> |
| <td><code>error_checking_for_update</code></td> |
| <td> |
| <code><a class='link' href='#ErrorCheckingForUpdateData'>ErrorCheckingForUpdateData</a></code> |
| </td> |
| <td><p>The Manager encountered an error while checking for the existence of a |
| a new update.</p> |
| <p><strong>This is a terminal state</strong></p> |
| </td> |
| </tr> |
| <tr id="State.no_update_available"> |
| <td><h3 id="State.no_update_available" class="add-link hide-from-toc">3</h3></td> |
| <td><code>no_update_available</code></td> |
| <td> |
| <code><a class='link' href='#NoUpdateAvailableData'>NoUpdateAvailableData</a></code> |
| </td> |
| <td><p>There is not update available at this time.</p> |
| <p><strong>This is a terminal state</strong></p> |
| </td> |
| </tr> |
| <tr id="State.installation_deferred_by_policy"> |
| <td><h3 id="State.installation_deferred_by_policy" class="add-link hide-from-toc">4</h3></td> |
| <td><code>installation_deferred_by_policy</code></td> |
| <td> |
| <code><a class='link' href='#InstallationDeferredData'>InstallationDeferredData</a></code> |
| </td> |
| <td><p>The Manager has found an available update but is not acting on it at |
| this time due to policy restrictions.</p> |
| <p><strong>This is a terminal state</strong></p> |
| </td> |
| </tr> |
| <tr id="State.installing_update"> |
| <td><h3 id="State.installing_update" class="add-link hide-from-toc">5</h3></td> |
| <td><code>installing_update</code></td> |
| <td> |
| <code><a class='link' href='#InstallingData'>InstallingData</a></code> |
| </td> |
| <td><p>The Manager is installing the available update.</p> |
| <p>Next states:</p> |
| <ul> |
| <li><code>waiting_for_reboot</code> on success</li> |
| <li><code>installation_error</code> on error</li> |
| </ul> |
| </td> |
| </tr> |
| <tr id="State.waiting_for_reboot"> |
| <td><h3 id="State.waiting_for_reboot" class="add-link hide-from-toc">6</h3></td> |
| <td><code>waiting_for_reboot</code></td> |
| <td> |
| <code><a class='link' href='#InstallingData'>InstallingData</a></code> |
| </td> |
| <td><p>The update has been installed, and the device is waiting to be rebooted.</p> |
| <p>Next states:</p> |
| <ul> |
| <li>(none, the device reboots)</li> |
| </ul> |
| <p><strong>This is a terminal state</strong></p> |
| </td> |
| </tr> |
| <tr id="State.installation_error"> |
| <td><h3 id="State.installation_error" class="add-link hide-from-toc">7</h3></td> |
| <td><code>installation_error</code></td> |
| <td> |
| <code><a class='link' href='#InstallationErrorData'>InstallationErrorData</a></code> |
| </td> |
| <td><p>The Manager encountered an update in the installation of the update.</p> |
| <p><strong>This is a terminal state</strong></p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| ## **CONSTANTS** |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr> |
| <tr id="MAX_VERSION_STRING_SIZE"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.update/update.fidl;l=287">MAX_VERSION_STRING_SIZE</a></td> |
| <td> |
| <code>128</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td><p>This is the maximum length of a version string that will be returned by the |
| protocol</p> |
| </td> |
| </tr> |
| </table> |