summaryrefslogtreecommitdiff
path: root/transport/base
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2016-11-23 11:30:36 -0800
committerYifan Hong <elsk@google.com>2016-12-02 16:17:53 -0800
commit2cd440cf0c589e89d0d4509d273142a35b5ef81c (patch)
tree1c3a3eeae3f3b61b4c9eb876ad881ecc1438fe5a /transport/base
parent44ab623ccf386f0e470bdc6aa22f261b7dc047cd (diff)
downloadlibhidl-2cd440cf0c589e89d0d4509d273142a35b5ef81c.tar.gz
Hidlize IBase and use IBase instead of IBinder.
Note: system/libhidl/base is the libhidlbase project. system/libhidl/transport/base is the android.hidl.base@1.0 HAL files. Test: hidl_test Change-Id: Ic3464b5e50c0896de9b26f44a409496f8df37c39
Diffstat (limited to 'transport/base')
-rw-r--r--transport/base/1.0/Android.bp50
-rw-r--r--transport/base/1.0/Android.mk68
-rw-r--r--transport/base/1.0/IBase.hal57
3 files changed, 175 insertions, 0 deletions
diff --git a/transport/base/1.0/Android.bp b/transport/base/1.0/Android.bp
new file mode 100644
index 0000000..0bb6b4a
--- /dev/null
+++ b/transport/base/1.0/Android.bp
@@ -0,0 +1,50 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hidl.base@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hidl:system/libhidl/transport -randroid.hidl:system/libhidl/transport android.hidl.base@1.0",
+ srcs: [
+ "IBase.hal",
+ ],
+ out: [
+ "android/hidl/base/1.0/BaseAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hidl.base@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hidl:system/libhidl/transport -randroid.hidl:system/libhidl/transport android.hidl.base@1.0",
+ srcs: [
+ "IBase.hal",
+ ],
+ out: [
+ "android/hidl/base/1.0/IBase.h",
+ "android/hidl/base/1.0/IHwBase.h",
+ "android/hidl/base/1.0/BnBase.h",
+ "android/hidl/base/1.0/BpBase.h",
+ "android/hidl/base/1.0/BsBase.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hidl.base@1.0",
+ generated_sources: ["android.hidl.base@1.0_genc++"],
+ generated_headers: ["android.hidl.base@1.0_genc++_headers"],
+ export_generated_headers: ["android.hidl.base@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ ],
+}
diff --git a/transport/base/1.0/Android.mk b/transport/base/1.0/Android.mk
new file mode 100644
index 0000000..1e07a22
--- /dev/null
+++ b/transport/base/1.0/Android.mk
@@ -0,0 +1,68 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hidl.base@1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+#
+# Build IBase.hal
+#
+GEN := $(intermediates)/android/hidl/base/1.0/IBase.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBase.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -randroid.hidl:system/libhidl/transport \
+ android.hidl.base@1.0::IBase
+
+$(GEN): $(LOCAL_PATH)/IBase.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hidl.base@1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+#
+# Build IBase.hal
+#
+GEN := $(intermediates)/android/hidl/base/1.0/IBase.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBase.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -randroid.hidl:system/libhidl/transport \
+ android.hidl.base@1.0::IBase
+
+$(GEN): $(LOCAL_PATH)/IBase.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/transport/base/1.0/IBase.hal b/transport/base/1.0/IBase.hal
new file mode 100644
index 0000000..379213a
--- /dev/null
+++ b/transport/base/1.0/IBase.hal
@@ -0,0 +1,57 @@
+/*
+ * 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.hidl.base@1.0;
+
+/*
+ * The ancestor for all interfaces.
+ *
+ * All HAL files will have this interface implicitly imported. If an interface
+ * does not explicitly extend from another interface, it will implicitly extend
+ * from IBase. (This is like java.lang.Object in Java.)
+ *
+ * Methods defined here are shared by all interfaces (this is like
+ * java.lang.Object.notify(), for example.) However, the behavior of these
+ * functions cannot be overridden.
+ */
+interface IBase {
+
+ /*
+ * Provides run-time type information for this object.
+ * For example, for the following interface definition:
+ * package android.hardware.foo@1.0;
+ * interface IParent {};
+ * interface IChild {};
+ * Calling interfaceChain on an IChild object will yield the following:
+ * ["android.hardware.foo@1.0::IChild",
+ * "android.hardware.foo@1.0::IParent"
+ * "android.hidl.base@1.0::IBase"]
+ *
+ * @return indicator a vector of descriptors of the run-time type of the
+ * object.
+ */
+ interfaceChain() generates (vec<string> indicator);
+
+ /*
+ * This method notifies the interface that one or more system properties
+ * have changed. The default implementation calls
+ * (C++) report_sysprop_change() in libcutils or
+ * (Java) android.os.SystemProperties.reportSyspropChanged,
+ * which in turn calls a set of registered callbacks (eg to update trace
+ * tags).
+ */
+ oneway notifySyspropsChanged();
+};