1 /* 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 17 package android.hardware.tests.bar@1.0; 18 19 import android.hardware.tests.foo@1.0; 20 21 interface IImportRules { 22 // Note that there is a android.hardware.tests.foo (at) 1.0::Outer in types.hal 23 struct Outer { 24 struct Inner { 25 int32_t data; 26 }; 27 string data; 28 }; 29 30 rule0a(Outer o); // should be resolved to Outer above 31 rule0a1(IImportRules.Outer o); // should be resolved to Outer above 32 rule0b(@1.0::IImportRules.Outer o); 33 rule0c(android.hardware.tests.foo@1.0::Outer o); 34 rule0d(@1.0::Outer o); // android.hardware.tests.foo (at) 1.0::Outer 35 rule0e(Outer.Inner o); // should be resolved to Outer above 36 rule0f(@1.0::IImportRules.Outer.Inner o); 37 rule0g(android.hardware.tests.foo@1.0::Outer.Inner o); 38 rule0h(@1.0::Outer.Inner o); // android.hardware.tests.foo (at) 1.0::Outer.Inner 39 40 rule1a(Def abc); // should be resolved to Def in types.hal in this package 41 rule1b(android.hardware.tests.foo@1.0::Def abc); 42 43 rule2a(Unrelated related); 44 45 // android.hardware.tests.foo (at) 1.0::IFooCallback, since bar (at) 1.0::IFooCallback is not imported. 46 rule2b(IFooCallback fooCallback); 47 }; 48