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 get a list of available HAL modules. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 24 | LIST_HALS = 1; |
| 25 | |
| 26 | // To check whether fuzzer's binder service is available. |
| 27 | CHECK_STUB_SERVICE = 101; |
| 28 | // To start a fuzzer binary service and select a HAL module. |
| 29 | LAUNCH_STUB_SERVICE = 102; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 30 | |
| 31 | // To get a list of available functions. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 32 | LIST_APIS = 201; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 33 | // To call a function. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 34 | CALL_API = 202; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | |
| 38 | // Type of a response. |
| 39 | enum ResponseCode { |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 40 | UNKNOWN_RESPONSE_CODE = 0; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 41 | // successful |
| 42 | SUCCESS = 1; |
| 43 | // failed |
| 44 | FAIL = 2; |
| 45 | } |
| 46 | |
| 47 | |
| 48 | // To specify a command. |
| 49 | message AndroidSystemControlCommandMessage { |
| 50 | // Command type. |
| 51 | optional CommandType command_type = 1; |
| 52 | |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 53 | // for LIST_HALS |
| 54 | repeated bytes paths = 1001; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 55 | |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 56 | // for CHECK_STUB_SERVICE |
| 57 | // the binder service name |
| 58 | optional bytes service_name = 2001; |
| 59 | |
| 60 | // for LAUNCH_STUB_SERVICE |
| 61 | // The name of a target. |
| 62 | optional bytes file_path = 3001; |
| 63 | |
| 64 | optional int32 bits = 3003; |
| 65 | |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 66 | // target class |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 67 | optional int32 target_class = 3004; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 68 | // target type |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 69 | optional int32 target_type = 3005; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 70 | // target version (should be divided by 100) - float has a compatibility issue |
| 71 | // between C/C++ and python protoc. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 72 | optional int32 target_version = 3006; |
| 73 | |
Keun Soo Yim | 34067de | 2016-05-17 09:46:37 -0700 | [diff] [blame] | 74 | // the name of a HAL module to open. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 75 | optional bytes module_name = 3007; |
| 76 | |
| 77 | // for LIST_APIS |
| 78 | // none |
| 79 | |
| 80 | // for CALL_API |
| 81 | optional bytes arg = 4001; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | |
| 85 | // To specify a response. |
| 86 | message AndroidSystemControlResponseMessage { |
| 87 | // Response type. |
| 88 | optional ResponseCode response_code = 1; |
| 89 | |
| 90 | // The reason. |
| 91 | optional bytes reason = 1001; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 92 | |
| 93 | // for the found componet files. |
| 94 | repeated bytes file_names = 1002; |
| 95 | |
| 96 | // for the found api spec. |
| 97 | optional bytes spec = 1003; |
| 98 | |
| 99 | // for the api call result including result value, profiling data, and |
| 100 | // coverage measurement data. |
| 101 | optional bytes result = 1004; |
| 102 | } |