blob: b6e2f78ac998ecd93391dfac8df9fb3c7b4e62a0 [file] [log] [blame]
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -07001// 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
15syntax = "proto2";
16
17package android.vts;
18
19
20// Type of a command.
21enum CommandType {
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070022 UNKNOWN_COMMAND_TYPE = 0;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070023 // To get a list of available HAL modules.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070024 LIST_HALS = 1;
Keun Soo Yim82b2d782016-06-20 11:29:38 -070025 // To set the host information (e.g., callback server port).
26 SET_HOST_INFO = 2;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070027
28 // To check whether fuzzer's binder service is available.
Keun Soo Yim14f22722016-06-29 09:49:38 -070029 CHECK_DRIVER_SERVICE = 101;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070030 // To start a fuzzer binary service and select a HAL module.
Keun Soo Yim14f22722016-06-29 09:49:38 -070031 LAUNCH_DRIVER_SERVICE = 102;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070032
33 // To get a list of available functions.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070034 LIST_APIS = 201;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070035 // To call a function.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070036 CALL_API = 202;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070037}
38
39
40// Type of a response.
41enum ResponseCode {
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070042 UNKNOWN_RESPONSE_CODE = 0;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070043 // successful
44 SUCCESS = 1;
45 // failed
46 FAIL = 2;
47}
48
49
Keun Soo Yima066dd52016-07-01 15:18:28 -070050// VTS driver type.
51enum VtsDriverType {
52 UKNOWN_VTS_DRIVER_TYPE = 0;
53 // for various HALs.
54 VTS_DRIVER_TYPE_HAL_CONVENTIONAL = 1;
55 VTS_DRIVER_TYPE_HAL_LEGACY = 2;
56 VTS_DRIVER_TYPE_HAL_HIDL = 3;
57 VTS_DRIVER_TYPE_HAL_HIDL_WRAPPED_CONVENTIONAL = 4;
58
59 // for shared libraries.
60 VTS_DRIVER_TYPE_LIB_SHARED = 11;
61
62 // for shell.
63 VTS_DRIVER_TYPE_SHELL = 21;
64}
65
66
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070067// To specify a command.
68message AndroidSystemControlCommandMessage {
69 // Command type.
70 optional CommandType command_type = 1;
71
Keun Soo Yim8e07a092016-05-04 16:30:35 -070072 // for LIST_HALS
73 repeated bytes paths = 1001;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070074
Keun Soo Yim82b2d782016-06-20 11:29:38 -070075 // for SET_HOST_INFO
76 optional int32 callback_port = 1101;
77
Keun Soo Yim14f22722016-06-29 09:49:38 -070078 // for CHECK_DRIVER_SERVICE
Keun Soo Yim8e07a092016-05-04 16:30:35 -070079 // the binder service name
80 optional bytes service_name = 2001;
81
Keun Soo Yim14f22722016-06-29 09:49:38 -070082 // for LAUNCH_DRIVER_SERVICE
Keun Soo Yima066dd52016-07-01 15:18:28 -070083 optional VtsDriverType driver_type = 3001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070084
Keun Soo Yima066dd52016-07-01 15:18:28 -070085 // The name of a target.
86 optional bytes file_path = 3002;
87
88 // Whether a target driver binary is 64-bits or 32-bits.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070089 optional int32 bits = 3003;
90
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070091 // target class
Keun Soo Yim8e07a092016-05-04 16:30:35 -070092 optional int32 target_class = 3004;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070093 // target type
Keun Soo Yim8e07a092016-05-04 16:30:35 -070094 optional int32 target_type = 3005;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070095 // target version (should be divided by 100) - float has a compatibility issue
96 // between C/C++ and python protoc.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070097 optional int32 target_version = 3006;
98
Keun Soo Yim34067de2016-05-17 09:46:37 -070099 // the name of a HAL module to open.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700100 optional bytes module_name = 3007;
101
102 // for LIST_APIS
103 // none
104
105 // for CALL_API
106 optional bytes arg = 4001;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -0700107}
108
109
110// To specify a response.
111message AndroidSystemControlResponseMessage {
112 // Response type.
113 optional ResponseCode response_code = 1;
114
115 // The reason.
116 optional bytes reason = 1001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700117
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700118 // for the found component files.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700119 repeated bytes file_names = 1002;
120
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700121 // for the found API specification.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700122 optional bytes spec = 1003;
123
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700124 // for the API call result including result value, profiling data, and
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700125 // coverage measurement data.
126 optional bytes result = 1004;
Sahil Jain41d3be92016-06-20 18:25:11 -0700127}
128
129
130// To specify a callback request message for the TCP server.
131message AndroidSystemCallbackRequestMessage {
132 // callback id for the message sent to the TCP Server.
133 optional bytes id = 1;
134}
135
136
137// To specify a callback response message from the TCP server.
138message AndroidSystemCallbackResponseMessage {
139 // Response code in a Callback response from TCP server.
140 optional ResponseCode response_code = 1;
141}