blob: 91ed1f278ef533b78bf37e6e07c0bc1a7a94b9f0 [file] [log] [blame]
Andreas Huberfc0b6c42016-09-22 09:47:48 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Andreas Huber669bf7a2016-08-29 10:23:17 -070017package android.hardware.tests.baz@1.0;
18
19import IBase;
20import IBazCallback;
21
22interface IBaz extends IBase {
23
Yifan Hong4093a442017-02-22 16:07:33 -080024 enum BitField : uint8_t {
25 V0 = 1 << 0,
26 V1 = 1 << 1,
27 V2 = 1 << 2,
28 V3 = 1 << 3,
29 VALL = V0 | V1 | V2 | V3,
30 };
31
Andreas Huber669bf7a2016-08-29 10:23:17 -070032 enum SomeOtherEnum : uint8_t {
33 bar = 66
34 };
35
36 typedef SomeOtherEnum thisIsAnAlias;
37 typedef IBaz anIBazByAnyOtherName;
38
Steven Morelanda20d00b2018-10-09 10:05:47 -070039 struct NastyNester {
40 struct NestersNasty {
41 struct NestersNastyNester {
42 IBaz baz;
43 vec<NestersNasty> nasties;
44 };
45 };
46
47 IBaz baz;
48 };
49
Andreas Huber669bf7a2016-08-29 10:23:17 -070050 enum SomeEnum : SomeOtherEnum {
51 quux = 33,
52 goober = 192,
53 blah = goober
54 };
55
Yifan Hong1d570022016-11-02 13:29:13 -070056 typedef int32_t[3] ThreeInts;
57 struct T {
58 ThreeInts[5] matrix5x3;
59 int32_t[3][5] matrix3x5;
60 };
61
Pavel Maltsevaf9aec42017-01-12 16:48:51 -080062 struct NestedStruct {
63 int32_t a;
64 vec<T> matrices;
65 };
66
Yifan Hong4093a442017-02-22 16:07:33 -080067 struct Quux {
68 string first;
69 string last;
70 };
71 struct Everything {
72 int8_t number;
73 int32_t anotherNumber;
74 string s;
75 vec<string> vs;
76 string[2][2] multidimArray;
77 string[3] sArray;
78 Quux anotherStruct;
79 bitfield<BitField> bf;
80 };
81
Nirav Atre4b348432018-07-26 21:24:32 -070082 struct MyHandle {
83 handle h;
84 int32_t guard;
85 };
86
Howard Chen0cd07d22018-01-03 15:54:55 +080087 struct StructWithInterface {
88 int32_t number;
Nirav Atre6a8d93f2018-07-13 16:03:31 -070089 int8_t[7] array;
90 string oneString;
91 vec<string> vectorOfStrings;
Howard Chen0cd07d22018-01-03 15:54:55 +080092 IBase dummy;
93 };
Andreas Huber669bf7a2016-08-29 10:23:17 -070094 oneway doThis(float param);
95
96 doThatAndReturnSomething(int64_t param) generates (int32_t result);
97 doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something);
98 doSomethingElse(int32_t[15] param) generates (int32_t[32] something);
99 doStuffAndReturnAString() generates (string something);
100 mapThisVector(vec<int32_t> param) generates (vec<int32_t> something);
101 callMe(IBazCallback cb);
Yifan Hongd9389bb2016-12-19 18:02:56 -0800102
103 callMeLater(IBazCallback cb);
104 iAmFreeNow();
Martijn Coenen73f99f62016-12-27 16:21:52 +0100105 dieNow();
Yifan Hongd9389bb2016-12-19 18:02:56 -0800106
Andreas Huber669bf7a2016-08-29 10:23:17 -0700107 useAnEnum(SomeEnum zzz) generates (SomeEnum kkk);
108
109 haveSomeStrings(string[3] array) generates (string[2] result);
110 haveAStringVec(vec<string> vector) generates (vec<string> result);
111
112 returnABunchOfStrings() generates (string a, string b, string c);
Yifan Hong8b54c222016-12-12 15:30:49 -0800113
114 returnABitField() generates (bitfield<BitField> good);
Yifan Hong59cd3a42016-12-12 10:34:57 -0800115
116 size(uint32_t size) generates (uint32_t size);
Pavel Maltsevaf9aec42017-01-12 16:48:51 -0800117
118 getNestedStructs() generates(vec<NestedStruct> data);
Howard Chen0cd07d22018-01-03 15:54:55 +0800119
120 haveSomeStructWithInterface(StructWithInterface swi) generates(StructWithInterface swi);
Andreas Huber669bf7a2016-08-29 10:23:17 -0700121};