/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.tests.pointer@1.0; interface IPointer { struct S { int32_t data; }; struct A { S s; }; // type declarations struct Sam { int32_t data; }; struct Ada { ref s_ptr; }; struct Bob { ref a_ptr; ref s_ptr; }; struct Cin { Ada a; ref b_ptr; }; struct Dom { Cin c; }; typedef ref Int32Ptr; typedef ref SamPtr; struct Ptr { ref[5] ptr_array; ref array_ptr; Int32Ptr int_ptr; ref int_array_ptr; ref[5] int_ptr_array; ref str_ref; vec> a_ptr_vec; ref> a_vec_ptr; }; // test cases foo1(Sam s, SamPtr s_ptr); foo2(Sam s, Ada a); foo3(Sam s, Ada a, Bob b); foo4(ref s_ptr); foo5(Ada a, Bob b); foo6(ref a_ptr); foo7(ref a_ptr, ref b_ptr); foo8(Dom d); foo9(ref str_ref); foo10(vec> s_ptr_vec); foo11(ref> s_vec_ptr); foo12(ref s_array_ref); foo13(ref[5] s_ref_array); foo14(ref>> s_3ptr); foo15(ref>> i_3ptr); foo16(Ptr p); foo17(ref p); foo18(ref str_ref, ref str_ref2, string str); foo19(ref> a_vec_ref, vec a_vec, ref> a_vec_ref2); foo20(vec> s_ptr_vec); foo21(ref a_array_ptr); foo22(ref[1][2][3] a_ptr_array); bar1() generates (Sam s, ref s_ptr); bar2() generates (Sam s, Ada a); bar3() generates (Sam s, Ada a, Bob b); bar4() generates (ref s_ptr); bar5() generates (Ada a, Bob b); bar6() generates (ref a_ptr); bar7() generates (ref a_ptr, ref b_ptr); bar8() generates (Dom d); bar9() generates (ref str_ref); bar10() generates (vec> s_ptr_vec); bar11() generates (ref> s_vec_ptr); bar12() generates (ref s_array_ref); bar13() generates (ref[5] s_ref_array); bar14() generates (ref>> s_3ptr); bar15() generates (ref>> i_3ptr); bar16() generates (Ptr p); bar17() generates (ref p); bar18() generates (ref str_ref, ref str_ref2, string str); bar19() generates (ref> a_vec_ref, vec a_vec, ref> a_vec_ref2); bar20() generates (vec> s_ptr_vec); bar21() generates (ref a_array_ptr); bar22() generates (ref[1][2][3] a_ptr_array); getErrors() generates(int32_t errors); };