blob: 614f1e45aac8ac90c8f648450ba82c9f157a5f10 [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);
Steven Morelanda3d9fe22016-10-18 18:32:49 +000083 doThis(uint32_t param);
Steven Moreland61651882016-08-11 12:52:43 -070084 doThatAndReturnSomething(int64_t param) generates (int32_t result);
85 doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something);
86 doSomethingElse(int32_t[15] param) generates (int32_t[32] something);
87 doStuffAndReturnAString() generates (string something);
88 mapThisVector(vec<int32_t> param) generates (vec<int32_t> something);
Iliyan Malcheve96606a2016-08-13 23:05:56 -070089 oneway callMe(IFooCallback cb);
Steven Moreland61651882016-08-11 12:52:43 -070090 useAnEnum(SomeEnum zzz) generates (SomeEnum sleepy);
91
92 haveAGooberVec(vec<Goober> param);
93 haveAGoober(Goober g);
94 haveAGooberArray(Goober[20] lots);
95
96 haveATypeFromAnotherFile(Abc def);
97
98 haveSomeStrings(string[3] array) generates (string[2] result);
99 haveAStringVec(vec<string> vector) generates (vec<string> result);
Andreas Hubercf8560c2016-09-12 15:01:02 -0700100
101 transposeMe(FiveFloats[3] in) generates (ThreeFloats[5] out);
102 callingDrWho(MultiDimensional in) generates (MultiDimensional out);
Andreas Huber8e237942016-09-19 13:59:52 -0700103
104 transpose(StringMatrix5x3 in) generates (StringMatrix3x5 out);
105 transpose2(ThreeStrings[5] in) generates (FiveStrings[3] out);
Andreas Huber88476c12016-09-27 14:54:20 -0700106
107 sendVec(vec<uint8_t> data) generates (vec<uint8_t> data);
Yifan Hong223b82a2016-10-05 13:43:53 -0700108
109 sendVecVec() generates (vec<vec<uint8_t>> vecvec);
Steven Moreland61651882016-08-11 12:52:43 -0700110};