blob: 8118d8bf5912ce554df28c8a47b7d7376f201183 [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
39 enum SomeEnum : SomeOtherEnum {
40 quux = 33,
41 goober = 192,
42 blah = goober
43 };
44
Yifan Hong1d570022016-11-02 13:29:13 -070045 typedef int32_t[3] ThreeInts;
46 struct T {
47 ThreeInts[5] matrix5x3;
48 int32_t[3][5] matrix3x5;
49 };
50
Pavel Maltsevaf9aec42017-01-12 16:48:51 -080051 struct NestedStruct {
52 int32_t a;
53 vec<T> matrices;
54 };
55
Yifan Hong4093a442017-02-22 16:07:33 -080056 struct Quux {
57 string first;
58 string last;
59 };
60 struct Everything {
61 int8_t number;
62 int32_t anotherNumber;
63 string s;
64 vec<string> vs;
65 string[2][2] multidimArray;
66 string[3] sArray;
67 Quux anotherStruct;
68 bitfield<BitField> bf;
69 };
70
Nirav Atre4b348432018-07-26 21:24:32 -070071 struct MyHandle {
72 handle h;
73 int32_t guard;
74 };
75
Howard Chen0cd07d22018-01-03 15:54:55 +080076 struct StructWithInterface {
77 int32_t number;
Nirav Atre6a8d93f2018-07-13 16:03:31 -070078 int8_t[7] array;
79 string oneString;
80 vec<string> vectorOfStrings;
Howard Chen0cd07d22018-01-03 15:54:55 +080081 IBase dummy;
82 };
Andreas Huber669bf7a2016-08-29 10:23:17 -070083 oneway doThis(float param);
84
85 doThatAndReturnSomething(int64_t param) generates (int32_t result);
86 doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something);
87 doSomethingElse(int32_t[15] param) generates (int32_t[32] something);
88 doStuffAndReturnAString() generates (string something);
89 mapThisVector(vec<int32_t> param) generates (vec<int32_t> something);
90 callMe(IBazCallback cb);
Yifan Hongd9389bb2016-12-19 18:02:56 -080091
92 callMeLater(IBazCallback cb);
93 iAmFreeNow();
Martijn Coenen73f99f62016-12-27 16:21:52 +010094 dieNow();
Yifan Hongd9389bb2016-12-19 18:02:56 -080095
Andreas Huber669bf7a2016-08-29 10:23:17 -070096 useAnEnum(SomeEnum zzz) generates (SomeEnum kkk);
97
98 haveSomeStrings(string[3] array) generates (string[2] result);
99 haveAStringVec(vec<string> vector) generates (vec<string> result);
100
101 returnABunchOfStrings() generates (string a, string b, string c);
Yifan Hong8b54c222016-12-12 15:30:49 -0800102
103 returnABitField() generates (bitfield<BitField> good);
Yifan Hong59cd3a42016-12-12 10:34:57 -0800104
105 size(uint32_t size) generates (uint32_t size);
Pavel Maltsevaf9aec42017-01-12 16:48:51 -0800106
107 getNestedStructs() generates(vec<NestedStruct> data);
Howard Chen0cd07d22018-01-03 15:54:55 +0800108
109 haveSomeStructWithInterface(StructWithInterface swi) generates(StructWithInterface swi);
Andreas Huber669bf7a2016-08-29 10:23:17 -0700110};