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