IBase.hal revision 2cd440cf0c589e89d0d4509d273142a35b5ef81c
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.hidl.base@1.0; 18 19/* 20 * The ancestor for all interfaces. 21 * 22 * All HAL files will have this interface implicitly imported. If an interface 23 * does not explicitly extend from another interface, it will implicitly extend 24 * from IBase. (This is like java.lang.Object in Java.) 25 * 26 * Methods defined here are shared by all interfaces (this is like 27 * java.lang.Object.notify(), for example.) However, the behavior of these 28 * functions cannot be overridden. 29 */ 30interface IBase { 31 32 /* 33 * Provides run-time type information for this object. 34 * For example, for the following interface definition: 35 * package android.hardware.foo@1.0; 36 * interface IParent {}; 37 * interface IChild {}; 38 * Calling interfaceChain on an IChild object will yield the following: 39 * ["android.hardware.foo@1.0::IChild", 40 * "android.hardware.foo@1.0::IParent" 41 * "android.hidl.base@1.0::IBase"] 42 * 43 * @return indicator a vector of descriptors of the run-time type of the 44 * object. 45 */ 46 interfaceChain() generates (vec<string> indicator); 47 48 /* 49 * This method notifies the interface that one or more system properties 50 * have changed. The default implementation calls 51 * (C++) report_sysprop_change() in libcutils or 52 * (Java) android.os.SystemProperties.reportSyspropChanged, 53 * which in turn calls a set of registered callbacks (eg to update trace 54 * tags). 55 */ 56 oneway notifySyspropsChanged(); 57}; 58