blob: 01d64707e43c2bfcb57e6b2e7d64b9fb6d91cddb [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;
Steven Moreland61651882016-08-11 12:52:43 -070020
21interface IFoo {
22
23 enum SomeBaseEnum : uint8_t {
24 bar = 66
25 };
26
27 enum SomeEnum : SomeBaseEnum {
28 quux = 33,
29 goober = 192,
30 blah = goober
31 };
32
33 struct Fumble {
34 float x;
35 };
36
37 typedef Fumble Gumble;
38
39 struct Goober {
40 int32_t q;
41 string name;
42 string address;
43 double[10] numbers;
44 Fumble fumble;
45 Gumble gumble;
46 // vec<double> lotsOfFumbles;
47 // handle loveHandle;
48 };
49
Andreas Hubercf8560c2016-09-12 15:01:02 -070050 typedef float[3] ThreeFloats;
51 typedef float[5] FiveFloats;
52
53 struct Quux {
54 string first;
55 string last;
56 };
57
58 typedef Quux[3] ThreeQuuxes;
59
60 struct MultiDimensional {
61 ThreeQuuxes[5] quuxMatrix;
62 };
63
Steven Moreland61651882016-08-11 12:52:43 -070064 doThis(float param);
65 doThatAndReturnSomething(int64_t param) generates (int32_t result);
66 doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something);
67 doSomethingElse(int32_t[15] param) generates (int32_t[32] something);
68 doStuffAndReturnAString() generates (string something);
69 mapThisVector(vec<int32_t> param) generates (vec<int32_t> something);
Iliyan Malcheve96606a2016-08-13 23:05:56 -070070 oneway callMe(IFooCallback cb);
Steven Moreland61651882016-08-11 12:52:43 -070071 useAnEnum(SomeEnum zzz) generates (SomeEnum sleepy);
72
73 haveAGooberVec(vec<Goober> param);
74 haveAGoober(Goober g);
75 haveAGooberArray(Goober[20] lots);
76
77 haveATypeFromAnotherFile(Abc def);
78
79 haveSomeStrings(string[3] array) generates (string[2] result);
80 haveAStringVec(vec<string> vector) generates (vec<string> result);
Andreas Hubercf8560c2016-09-12 15:01:02 -070081
82 transposeMe(FiveFloats[3] in) generates (ThreeFloats[5] out);
83 callingDrWho(MultiDimensional in) generates (MultiDimensional out);
Steven Moreland61651882016-08-11 12:52:43 -070084};