| // Copyright 2021 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // |
| // The messages in this file comprise the DBus/Protobuf interface for |
| // rmad. |
| syntax = "proto3"; |
| |
| package rmad; |
| option optimize_for = LITE_RUNTIME; |
| |
| // Defined error code. |
| enum RmadErrorCode { |
| // 0 is the default value. It should never be used. |
| RMAD_ERROR_NOT_SET = 0; |
| |
| // Not able to read the Rmad as DBus signature indicated. |
| RMAD_ERROR_REQUEST_INVALID = 1; |
| } |
| |
| // Defined Rmad states. |
| enum RmadState { |
| RMAD_STATE_UNKNOWN = 0; |
| RMAD_STATE_RMA_NOT_REQUIRED = 1; |
| RMAD_STATE_WELCOME_SCREEN = 2; |
| RMAD_STATE_COMPONENT_SELECTION = 3; |
| RMAD_STATE_DESTINATION_SELECTION = 4; |
| RMAD_STATE_DISABLE_HWWP_SELECTION = 5; |
| RMAD_STATE_DISABLE_HWWP_RSU = 6; |
| RMAD_STATE_DISABLE_HWWP_PHYSICAL = 7; |
| RMAD_STATE_DISABLE_HWWP_COMPLETE = 8; |
| RMAD_STATE_UPDATE_RO_FIRMWARE = 9; |
| RMAD_STATE_RESET_DEVICE_INFO = 10; |
| RMAD_STATE_RESTOCK = 11; |
| RMAD_STATE_CONFIRM_DEVICE_INFO = 12; |
| RMAD_STATE_ACCELEROMETER_CALIBRATION = 13; |
| RMAD_STATE_PROVISION = 14; |
| RMAD_STATE_POWERWASH = 15; |
| RMAD_STATE_FINALIZE = 16; |
| RMAD_STATE_VIEW_LOGS = 17; |
| RMAD_STATE_REPAIR_COMPLETE = 18; |
| } |
| |
| // Request from client to get current state. |
| message GetCurrentStateRequest {} |
| |
| // Reply from daemon. |
| message GetCurrentStateReply { |
| RmadErrorCode error = 1; |
| RmadState state = 2; |
| } |
| |
| // Request from client to transition to next state. |
| message TransitionStateRequest {} |
| |
| // Reply from daemon. |
| message TransitionStateReply { |
| RmadErrorCode error = 1; |
| RmadState state = 2; |
| } |