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 17package android.hardware.tests.bar@1.0; 18 19import android.hardware.tests.foo@1.0; 20 21interface IImportRules { 22 // Note that there is a android.hardware.tests.foo@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 rule0b1(android.hardware.tests.bar@1.0::IImportRules.Outer o); 34 rule0c(android.hardware.tests.foo@1.0::Outer o); 35 rule0d(@1.0::Outer o); // android.hardware.tests.foo@1.0::Outer 36 rule0e(Outer.Inner o); // should be resolved to Outer above 37 rule0f(@1.0::IImportRules.Outer.Inner o); 38 rule0g(android.hardware.tests.foo@1.0::Outer.Inner o); 39 rule0h(@1.0::Outer.Inner o); // android.hardware.tests.foo@1.0::Outer.Inner 40 41 rule1a(Def abc); // should be resolved to Def in types.hal in this package 42 rule1b(android.hardware.tests.foo@1.0::Def abc); 43 44 rule2a(Unrelated related); 45 46 // android.hardware.tests.foo@1.0::IFooCallback, since bar@1.0::IFooCallback is not imported. 47 rule2b(IFooCallback fooCallback); 48}; 49