blob: 3d823536e5f8ce8b4205fe7c9750ace03d7bab33 [file] [log] [blame]
Martijn Coenencbe590c2016-08-30 11:27:56 -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
Steven Moreland61651882016-08-11 12:52:43 -070017package android.hardware.tests.foo@1.0;
18
19import IFooCallback;
Yifan Hong799ebcb2016-10-05 12:15:51 -070020import IMyTypes.SomeStruct;
21import ITheirTypes.FloatArray;
Steven Moreland61651882016-08-11 12:52:43 -070022
23interface IFoo {
24
25 enum SomeBaseEnum : uint8_t {
26 bar = 66
27 };
28
29 enum SomeEnum : SomeBaseEnum {
30 quux = 33,
31 goober = 192,
32 blah = goober
33 };
34
35 struct Fumble {
Yifan Hong61db8542016-10-03 10:30:55 -070036 Outer.Inner data;
Steven Moreland61651882016-08-11 12:52:43 -070037 };
38
39 typedef Fumble Gumble;
40
41 struct Goober {
42 int32_t q;
43 string name;
44 string address;
45 double[10] numbers;
46 Fumble fumble;
47 Gumble gumble;
48 // vec<double> lotsOfFumbles;
49 // handle loveHandle;
50 };
51
Andreas Hubercf8560c2016-09-12 15:01:02 -070052 typedef float[3] ThreeFloats;
53 typedef float[5] FiveFloats;
54
55 struct Quux {
56 string first;
57 string last;
58 };
59
60 typedef Quux[3] ThreeQuuxes;
61
62 struct MultiDimensional {
63 ThreeQuuxes[5] quuxMatrix;
64 };
65
Andreas Huber8e237942016-09-19 13:59:52 -070066 typedef string[3] ThreeStrings;
67 typedef string[5] FiveStrings;
68
69 struct StringMatrix3x5 {
70 FiveStrings[3] s;
71 };
72
73 struct StringMatrix5x3 {
74 ThreeStrings[5] s;
75 };
76
Yifan Hong799ebcb2016-10-05 12:15:51 -070077 struct MyStruct {
78 SomeStruct innerStruct;
79 FloatArray myFloatArray;
80 };
81
Steven Moreland61651882016-08-11 12:52:43 -070082 doThis(float param);
83 doThatAndReturnSomething(int64_t param) generates (int32_t result);
84 doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something);
85 doSomethingElse(int32_t[15] param) generates (int32_t[32] something);
86 doStuffAndReturnAString() generates (string something);
87 mapThisVector(vec<int32_t> param) generates (vec<int32_t> something);
Iliyan Malcheve96606a2016-08-13 23:05:56 -070088 oneway callMe(IFooCallback cb);
Steven Moreland61651882016-08-11 12:52:43 -070089 useAnEnum(SomeEnum zzz) generates (SomeEnum sleepy);
90
91 haveAGooberVec(vec<Goober> param);
92 haveAGoober(Goober g);
93 haveAGooberArray(Goober[20] lots);
94
95 haveATypeFromAnotherFile(Abc def);
96
97 haveSomeStrings(string[3] array) generates (string[2] result);
98 haveAStringVec(vec<string> vector) generates (vec<string> result);
Andreas Hubercf8560c2016-09-12 15:01:02 -070099
100 transposeMe(FiveFloats[3] in) generates (ThreeFloats[5] out);
101 callingDrWho(MultiDimensional in) generates (MultiDimensional out);
Andreas Huber8e237942016-09-19 13:59:52 -0700102
103 transpose(StringMatrix5x3 in) generates (StringMatrix3x5 out);
104 transpose2(ThreeStrings[5] in) generates (FiveStrings[3] out);
Andreas Huber88476c12016-09-27 14:54:20 -0700105
106 sendVec(vec<uint8_t> data) generates (vec<uint8_t> data);
Yifan Hong223b82a2016-10-05 13:43:53 -0700107
108 sendVecVec() generates (vec<vec<uint8_t>> vecvec);
Steven Moreland61651882016-08-11 12:52:43 -0700109};