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; |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 25 | // To set the host information (e.g., callback server port). |
| 26 | SET_HOST_INFO = 2; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 27 | |
| 28 | // To check whether fuzzer's binder service is available. |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 29 | CHECK_DRIVER_SERVICE = 101; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 30 | // To start a fuzzer binary service and select a HAL module. |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 31 | LAUNCH_DRIVER_SERVICE = 102; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 32 | |
| 33 | // To get a list of available functions. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 34 | LIST_APIS = 201; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 35 | // To call a function. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 36 | CALL_API = 202; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 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 | |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 55 | // for LIST_HALS |
| 56 | repeated bytes paths = 1001; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 57 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 58 | // for SET_HOST_INFO |
| 59 | optional int32 callback_port = 1101; |
| 60 | |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 61 | // for CHECK_DRIVER_SERVICE |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 62 | // the binder service name |
| 63 | optional bytes service_name = 2001; |
| 64 | |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 65 | // for LAUNCH_DRIVER_SERVICE |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 66 | // The name of a target. |
| 67 | optional bytes file_path = 3001; |
| 68 | |
| 69 | optional int32 bits = 3003; |
| 70 | |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 71 | // target class |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 72 | optional int32 target_class = 3004; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 73 | // target type |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 74 | optional int32 target_type = 3005; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 75 | // target version (should be divided by 100) - float has a compatibility issue |
| 76 | // between C/C++ and python protoc. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 77 | optional int32 target_version = 3006; |
| 78 | |
Keun Soo Yim | 34067de | 2016-05-17 09:46:37 -0700 | [diff] [blame] | 79 | // the name of a HAL module to open. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 80 | optional bytes module_name = 3007; |
| 81 | |
| 82 | // for LIST_APIS |
| 83 | // none |
| 84 | |
| 85 | // for CALL_API |
| 86 | optional bytes arg = 4001; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | |
| 90 | // To specify a response. |
| 91 | message AndroidSystemControlResponseMessage { |
| 92 | // Response type. |
| 93 | optional ResponseCode response_code = 1; |
| 94 | |
| 95 | // The reason. |
| 96 | optional bytes reason = 1001; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 97 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 98 | // for the found component files. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 99 | repeated bytes file_names = 1002; |
| 100 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 101 | // for the found API specification. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 102 | optional bytes spec = 1003; |
| 103 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 104 | // for the API call result including result value, profiling data, and |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 105 | // coverage measurement data. |
| 106 | optional bytes result = 1004; |
Sahil Jain | 41d3be9 | 2016-06-20 18:25:11 -0700 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | |
| 110 | // To specify a callback request message for the TCP server. |
| 111 | message AndroidSystemCallbackRequestMessage { |
| 112 | // callback id for the message sent to the TCP Server. |
| 113 | optional bytes id = 1; |
| 114 | } |
| 115 | |
| 116 | |
| 117 | // To specify a callback response message from the TCP server. |
| 118 | message AndroidSystemCallbackResponseMessage { |
| 119 | // Response code in a Callback response from TCP server. |
| 120 | optional ResponseCode response_code = 1; |
| 121 | } |