blob: c06fc05b8f3974708c1bcf40efd47f8cf862a1b0 [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;
Andreas Huber847b1452016-10-19 14:10:55 -070021import ISimple;
Yifan Hong799ebcb2016-10-05 12:15:51 -070022import ITheirTypes.FloatArray;
Steven Moreland61651882016-08-11 12:52:43 -070023
24interface IFoo {
25
26 enum SomeBaseEnum : uint8_t {
27 bar = 66
28 };
29
30 enum SomeEnum : SomeBaseEnum {
31 quux = 33,
32 goober = 192,
33 blah = goober
34 };
35
36 struct Fumble {
Yifan Hong61db8542016-10-03 10:30:55 -070037 Outer.Inner data;
Steven Moreland61651882016-08-11 12:52:43 -070038 };
39
40 typedef Fumble Gumble;
41
42 struct Goober {
43 int32_t q;
44 string name;
45 string address;
46 double[10] numbers;
47 Fumble fumble;
48 Gumble gumble;
49 // vec<double> lotsOfFumbles;
50 // handle loveHandle;
51 };
52
Andreas Hubercf8560c2016-09-12 15:01:02 -070053 typedef float[3] ThreeFloats;
54 typedef float[5] FiveFloats;
55
56 struct Quux {
57 string first;
58 string last;
59 };
60
61 typedef Quux[3] ThreeQuuxes;
62
63 struct MultiDimensional {
64 ThreeQuuxes[5] quuxMatrix;
65 };
66
Andreas Huber8e237942016-09-19 13:59:52 -070067 typedef string[3] ThreeStrings;
68 typedef string[5] FiveStrings;
69
70 struct StringMatrix3x5 {
71 FiveStrings[3] s;
72 };
73
74 struct StringMatrix5x3 {
75 ThreeStrings[5] s;
76 };
77
Yifan Hong799ebcb2016-10-05 12:15:51 -070078 struct MyStruct {
79 SomeStruct innerStruct;
80 FloatArray myFloatArray;
81 };
82
Yifan Hongebfa6332016-10-14 10:41:41 -070083 struct MyHandle {
84 handle h;
85 int32_t guard;
86 };
87
Steven Moreland61651882016-08-11 12:52:43 -070088 doThis(float param);
89 doThatAndReturnSomething(int64_t param) generates (int32_t result);
90 doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something);
91 doSomethingElse(int32_t[15] param) generates (int32_t[32] something);
92 doStuffAndReturnAString() generates (string something);
93 mapThisVector(vec<int32_t> param) generates (vec<int32_t> something);
Iliyan Malcheve96606a2016-08-13 23:05:56 -070094 oneway callMe(IFooCallback cb);
Steven Moreland61651882016-08-11 12:52:43 -070095 useAnEnum(SomeEnum zzz) generates (SomeEnum sleepy);
96
97 haveAGooberVec(vec<Goober> param);
98 haveAGoober(Goober g);
99 haveAGooberArray(Goober[20] lots);
100
101 haveATypeFromAnotherFile(Abc def);
102
103 haveSomeStrings(string[3] array) generates (string[2] result);
104 haveAStringVec(vec<string> vector) generates (vec<string> result);
Andreas Hubercf8560c2016-09-12 15:01:02 -0700105
106 transposeMe(FiveFloats[3] in) generates (ThreeFloats[5] out);
107 callingDrWho(MultiDimensional in) generates (MultiDimensional out);
Andreas Huber8e237942016-09-19 13:59:52 -0700108
109 transpose(StringMatrix5x3 in) generates (StringMatrix3x5 out);
110 transpose2(ThreeStrings[5] in) generates (FiveStrings[3] out);
Andreas Huber88476c12016-09-27 14:54:20 -0700111
112 sendVec(vec<uint8_t> data) generates (vec<uint8_t> data);
Yifan Hong223b82a2016-10-05 13:43:53 -0700113
114 sendVecVec() generates (vec<vec<uint8_t>> vecvec);
Andreas Huber847b1452016-10-19 14:10:55 -0700115
116 haveAVectorOfInterfaces(vec<ISimple> in) generates (vec<ISimple> out);
117
118 haveAVectorOfGenericInterfaces(vec<interface> in)
119 generates (vec<interface> out);
Yifan Hongebfa6332016-10-14 10:41:41 -0700120 createMyHandle() generates (MyHandle h);
121 createHandles(uint32_t size) generates (vec<handle> handles);
122 closeHandles();
Steven Moreland61651882016-08-11 12:52:43 -0700123};