| // Copyright 2022 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Protobuf definitions for Update Status of COS instance. Keep this file |
| // synced with |
| // chromiumos/src/platform2/system_api/dbus/update_engine/update_engine.proto. |
| syntax = "proto2"; |
| |
| package policymanagerproto; |
| |
| // Keep in sync with: |
| // update_engine/client_library/include/update_engine/update_status.h |
| enum Operation { |
| IDLE = 0; |
| CHECKING_FOR_UPDATE = 1; |
| UPDATE_AVAILABLE = 2; |
| DOWNLOADING = 3; |
| VERIFYING = 4; |
| FINALIZING = 5; |
| UPDATED_NEED_REBOOT = 6; |
| REPORTING_ERROR_EVENT = 7; |
| ATTEMPTING_ROLLBACK = 8; |
| DISABLED = 9; |
| NEED_PERMISSION_TO_UPDATE = 10; |
| |
| // ERROR is only used by Chrome and update_engine doesn't really use/set this |
| // value as it is not the proper way to propagate errors. DO NOT use this |
| // anywhere other than Chrome. |
| // TODO(crbug.com/977320): Remove this from Chrome. |
| ERROR = -1; |
| } |
| |
| // Keep in sync with: |
| // update_engine/client_library/include/update_engine/update_status.h |
| enum UpdateUrgency { |
| REGULAR = 0; |
| CRITICAL = 1; |
| } |
| |
| // This is the message transferred between update_engine and other processes |
| // about the current status of the update_engine. It is used either in |
| // |GetUpdateStatusAdvanced| DBus method or |StatusUpdateAdvanced| signal. |
| // |
| // NOTE: Keep this updated with: |
| // update_engine/client_library/include/update_engine/update_status.h |
| message StatusResult { |
| // When the update_engine last checked for updates (time_t: seconds from Unix |
| // epoch). |
| optional int64 last_checked_time = 1; |
| |
| // The current progress (0.0f-1.0f). |
| optional double progress = 2; |
| |
| // The current status/operation of the update_engine. |
| optional Operation update_status = 3; |
| |
| // The new product version. |
| optional string new_version = 4; |
| |
| // The size of the update payload (bytes). |
| optional int64 new_size = 5; |
| |
| // Whether the update is actually an enterprise rollback. The value is valid |
| // only if the current_operation is passed |CHECKING_FOR_UPDATE|. |
| optional bool is_enterprise_rollback = 6; |
| |
| // Indication of install for DLC(s). |
| optional bool is_install = 7; |
| |
| // The end-of-life date of the device in the number of days since Unix Epoch. |
| optional int64 eol_date = 8; |
| |
| // If true, the system will powerwash once the update is applied and the |
| // system is rebooted. This value is reliable on |UPDATE_NEED_REBOOT|. |
| optional bool will_powerwash_after_reboot = 9; |
| |
| // The last update/install attempt error. |
| // Reference update_engine/dbus-constants.h for the errors that update_engine |
| // will propagate into this field. |
| optional int32 last_attempt_error = 10; |
| |
| // If true, the update is critical. DEPRECATED. |
| // bool critical_update = 11; |
| |
| // Indicates how important an update is. |
| optional UpdateUrgency update_urgency = 12; |
| } |