blob: c87738b8f10ef5a66f25463361e7535e188df5cd [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;
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 Yime0c0cdd2016-05-09 19:43:43 -070030
31 // To get a list of available functions.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070032 LIST_APIS = 201;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070033 // To call a function.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070034 CALL_API = 202;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070035}
36
37
38// Type of a response.
39enum ResponseCode {
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070040 UNKNOWN_RESPONSE_CODE = 0;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070041 // successful
42 SUCCESS = 1;
43 // failed
44 FAIL = 2;
45}
46
47
48// To specify a command.
49message AndroidSystemControlCommandMessage {
50 // Command type.
51 optional CommandType command_type = 1;
52
Keun Soo Yim8e07a092016-05-04 16:30:35 -070053 // for LIST_HALS
54 repeated bytes paths = 1001;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070055
Keun Soo Yim8e07a092016-05-04 16:30:35 -070056 // 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 Yimfeceb4d2016-05-11 20:01:00 -070066 // target class
Keun Soo Yim8e07a092016-05-04 16:30:35 -070067 optional int32 target_class = 3004;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070068 // target type
Keun Soo Yim8e07a092016-05-04 16:30:35 -070069 optional int32 target_type = 3005;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070070 // target version (should be divided by 100) - float has a compatibility issue
71 // between C/C++ and python protoc.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070072 optional int32 target_version = 3006;
73
Keun Soo Yim34067de2016-05-17 09:46:37 -070074 // the name of a HAL module to open.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070075 optional bytes module_name = 3007;
76
77 // for LIST_APIS
78 // none
79
80 // for CALL_API
81 optional bytes arg = 4001;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070082}
83
84
85// To specify a response.
86message AndroidSystemControlResponseMessage {
87 // Response type.
88 optional ResponseCode response_code = 1;
89
90 // The reason.
91 optional bytes reason = 1001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070092
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}