Jorge E. Moreira | 721db10 | 2018-07-18 11:03:55 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | #pragma once |
| 17 | |
A. Cody Schuffelen | 51c5e5e | 2020-06-22 22:43:37 +0000 | [diff] [blame] | 18 | namespace cuttlefish { |
Jorge E. Moreira | 721db10 | 2018-07-18 11:03:55 -0700 | [diff] [blame] | 19 | |
Cody Schuffelen | a9d9a86 | 2019-09-10 16:16:06 -0700 | [diff] [blame] | 20 | enum RunnerExitCodes : int { |
Jorge E. Moreira | 721db10 | 2018-07-18 11:03:55 -0700 | [diff] [blame] | 21 | kSuccess = 0, |
| 22 | kArgumentParsingError = 1, |
| 23 | kInvalidHostConfiguration = 2, |
| 24 | kCuttlefishConfigurationInitError = 3, |
| 25 | kInstanceDirCreationError = 4, |
| 26 | kPrioFilesCleanupError = 5, |
| 27 | kBootImageUnpackError = 6, |
| 28 | kCuttlefishConfigurationSaveError = 7, |
| 29 | kDaemonizationError = 8, |
| 30 | kVMCreationError = 9, |
| 31 | kPipeIOError = 10, |
| 32 | kVirtualDeviceBootFailed = 11, |
| 33 | kProcessGroupError = 12, |
Jorge E. Moreira | 50a0775 | 2018-07-18 18:49:04 -0700 | [diff] [blame] | 34 | kMonitorCreationFailed = 13, |
| 35 | kServerError = 14, |
Jorge E. Moreira | b5a71d7 | 2018-07-22 23:01:20 -0700 | [diff] [blame] | 36 | kUsbV1SocketError = 15, |
Jorge E. Moreira | 734e1d1 | 2018-11-07 20:30:38 -0800 | [diff] [blame] | 37 | kE2eTestFailed = 16, |
Jorge E. Moreira | 80ddd7f | 2019-02-04 16:30:13 -0800 | [diff] [blame] | 38 | kKernelDecompressError = 17, |
Jorge E. Moreira | fd10cae | 2019-02-19 15:35:42 -0800 | [diff] [blame] | 39 | kLogcatServerError = 18, |
Jorge E. Moreira | f1f7cb3 | 2019-04-15 18:44:41 -0700 | [diff] [blame] | 40 | kConfigServerError = 19, |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 41 | kTombstoneServerError = 20, |
| 42 | kTombstoneDirCreationError = 21, |
Ram Muthiah | aad97c5 | 2019-08-14 17:05:01 -0700 | [diff] [blame] | 43 | kInitRamFsConcatError = 22, |
Cody Schuffelen | 971842d | 2019-12-10 16:33:11 -0800 | [diff] [blame] | 44 | kTapDeviceInUse = 23, |
A. Cody Schuffelen | 3aaef4f | 2020-02-28 15:17:51 -0800 | [diff] [blame] | 45 | kTpmPassthroughError = 24, |
Yan Cao | 9e560e3 | 2020-07-29 16:33:06 -0700 | [diff] [blame] | 46 | kModemSimulatorServerError = 25, |
Jorge E. Moreira | 7dc223a | 2021-04-26 16:42:16 -0700 | [diff] [blame] | 47 | kSocketProxyServerError = 26, |
Jorge E. Moreira | 721db10 | 2018-07-18 11:03:55 -0700 | [diff] [blame] | 48 | }; |
| 49 | |
Jorge E. Moreira | 50a0775 | 2018-07-18 18:49:04 -0700 | [diff] [blame] | 50 | // Actions supported by the launcher server |
| 51 | enum class LauncherAction : char { |
A. Cody Schuffelen | 4c923dc | 2020-07-15 19:29:44 -0700 | [diff] [blame] | 52 | kPowerwash = 'P', |
A. Cody Schuffelen | 55666fb | 2021-01-13 16:31:13 -0800 | [diff] [blame] | 53 | kRestart = 'R', |
Cody Schuffelen | 4f8e330 | 2019-10-23 11:21:10 -0700 | [diff] [blame] | 54 | kStatus = 'I', |
Jorge E. Moreira | 50a0775 | 2018-07-18 18:49:04 -0700 | [diff] [blame] | 55 | kStop = 'X', |
| 56 | }; |
| 57 | |
| 58 | // Responses from the launcher server |
| 59 | enum class LauncherResponse : char { |
| 60 | kSuccess = 'S', |
| 61 | kError = 'E', |
| 62 | kUnknownAction = 'U', |
| 63 | }; |
A. Cody Schuffelen | 51c5e5e | 2020-06-22 22:43:37 +0000 | [diff] [blame] | 64 | } // namespace cuttlefish |