Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 1 | // Copyright 2016 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | syntax = "proto2"; |
| 16 | |
| 17 | package android.vts; |
| 18 | |
| 19 | |
| 20 | // Type of a command. |
| 21 | enum CommandType { |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 22 | UNKNOWN_COMMAND_TYPE = 0; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 23 | // To check whether fuzzer's binder service is available. |
| 24 | CHECK_FUZZER_BINDER_SERVICE = 1; |
| 25 | // To start a fuzzer binary service. |
| 26 | START_FUZZER_BINDER_SERVICE = 2; |
| 27 | |
| 28 | // To get a list of available HAL modules. |
| 29 | GET_HALS = 101; |
| 30 | // To select a HAL module. |
| 31 | SELECT_HAL = 102; |
| 32 | |
| 33 | // To get a list of available functions. |
| 34 | GET_FUNCTIONS = 201; |
| 35 | // To call a function. |
| 36 | CALL_FUNCTION = 202; |
| 37 | } |
| 38 | |
| 39 | |
| 40 | // Type of a response. |
| 41 | enum ResponseCode { |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 42 | UNKNOWN_RESPONSE_CODE = 0; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 43 | // successful |
| 44 | SUCCESS = 1; |
| 45 | // failed |
| 46 | FAIL = 2; |
| 47 | } |
| 48 | |
| 49 | |
| 50 | // To specify a command. |
| 51 | message AndroidSystemControlCommandMessage { |
| 52 | // Command type. |
| 53 | optional CommandType command_type = 1; |
| 54 | |
| 55 | // The name of a target. |
| 56 | optional bytes target_name = 1001; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 57 | |
| 58 | // for when command_type == SELECT_HAL |
| 59 | // target class |
| 60 | optional int32 target_class = 2001; |
| 61 | // target type |
| 62 | optional int32 target_type = 2002; |
| 63 | // target version (should be divided by 100) - float has a compatibility issue |
| 64 | // between C/C++ and python protoc. |
| 65 | optional int32 target_version = 2003; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | |
| 69 | // To specify a response. |
| 70 | message AndroidSystemControlResponseMessage { |
| 71 | // Response type. |
| 72 | optional ResponseCode response_code = 1; |
| 73 | |
| 74 | // The reason. |
| 75 | optional bytes reason = 1001; |
| 76 | } |