blob: d616338e8e9733628afb4bc09b3c94467ce897ef [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.
29 CHECK_STUB_SERVICE = 101;
30 // To start a fuzzer binary service and select a HAL module.
31 LAUNCH_STUB_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
50// To specify a command.
51message AndroidSystemControlCommandMessage {
52 // Command type.
53 optional CommandType command_type = 1;
54
Keun Soo Yim8e07a092016-05-04 16:30:35 -070055 // for LIST_HALS
56 repeated bytes paths = 1001;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070057
Keun Soo Yim82b2d782016-06-20 11:29:38 -070058 // for SET_HOST_INFO
59 optional int32 callback_port = 1101;
60
Keun Soo Yim8e07a092016-05-04 16:30:35 -070061 // for CHECK_STUB_SERVICE
62 // the binder service name
63 optional bytes service_name = 2001;
64
65 // for LAUNCH_STUB_SERVICE
66 // The name of a target.
67 optional bytes file_path = 3001;
68
69 optional int32 bits = 3003;
70
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070071 // target class
Keun Soo Yim8e07a092016-05-04 16:30:35 -070072 optional int32 target_class = 3004;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070073 // target type
Keun Soo Yim8e07a092016-05-04 16:30:35 -070074 optional int32 target_type = 3005;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070075 // target version (should be divided by 100) - float has a compatibility issue
76 // between C/C++ and python protoc.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070077 optional int32 target_version = 3006;
78
Keun Soo Yim34067de2016-05-17 09:46:37 -070079 // the name of a HAL module to open.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070080 optional bytes module_name = 3007;
81
82 // for LIST_APIS
83 // none
84
85 // for CALL_API
86 optional bytes arg = 4001;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070087}
88
89
90// To specify a response.
91message AndroidSystemControlResponseMessage {
92 // Response type.
93 optional ResponseCode response_code = 1;
94
95 // The reason.
96 optional bytes reason = 1001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070097
Keun Soo Yim82b2d782016-06-20 11:29:38 -070098 // for the found component files.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070099 repeated bytes file_names = 1002;
100
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700101 // for the found API specification.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700102 optional bytes spec = 1003;
103
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700104 // for the API call result including result value, profiling data, and
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700105 // coverage measurement data.
106 optional bytes result = 1004;
Sahil Jain41d3be92016-06-20 18:25:11 -0700107}
108
109
110// To specify a callback request message for the TCP server.
111message 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.
118message AndroidSystemCallbackResponseMessage {
119 // Response code in a Callback response from TCP server.
120 optional ResponseCode response_code = 1;
121}