summaryrefslogtreecommitdiff
authorBaocheng Sun <baocheng.sun@amlogic.com>2017-10-20 07:40:38 (GMT)
committer Baocheng Sun <baocheng.sun@amlogic.com>2017-10-26 03:02:45 (GMT)
commitf5c27410e907fdc8ca6ee1357bab76d0d30c13e9 (patch)
treef80c439cb49c7e87aa83a1330f9563b03b93724e
parentba07612149570e3134d78bc63e7ead5e6e0c1b53 (diff)
downloadinterfaces-f5c27410e907fdc8ca6ee1357bab76d0d30c13e9.zip
interfaces-f5c27410e907fdc8ca6ee1357bab76d0d30c13e9.tar.gz
interfaces-f5c27410e907fdc8ca6ee1357bab76d0d30c13e9.tar.bz2
hidl: add droidvold hwbinder service [1/4]
PD# 151674 add droidvold hwbinder service Change-Id: I6ef757f3c35576234b7374f5ffd3065245f742f4
Diffstat
-rw-r--r--Android.bp1
-rw-r--r--droidvold/1.0/Android.bp97
-rw-r--r--droidvold/1.0/Android.mk160
-rwxr-xr-xdroidvold/1.0/IDroidVold.hal78
-rwxr-xr-xdroidvold/1.0/IDroidVoldCallback.hal27
-rwxr-xr-xdroidvold/1.0/types.hal22
-rw-r--r--droidvold/Android.bp4
7 files changed, 389 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index caa0ecb..d984933 100644
--- a/Android.bp
+++ b/Android.bp
@@ -3,4 +3,5 @@ subdirs = [
"systemcontrol/1.0",
"systemcontrol/1.0/vts/functional",
"hdmicec/1.0",
+ "droidvold/1.0",
]
diff --git a/droidvold/1.0/Android.bp b/droidvold/1.0/Android.bp
new file mode 100644
index 0000000..2533e09
--- a/dev/null
+++ b/droidvold/1.0/Android.bp
@@ -0,0 +1,97 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "vendor.amlogic.hardware.droidvold@1.0_hal",
+ srcs: [
+ "types.hal",
+ "IDroidVold.hal",
+ "IDroidVoldCallback.hal",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.droidvold@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.droidvold@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.droidvold@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/droidvold/1.0/types.cpp",
+ "vendor/amlogic/hardware/droidvold/1.0/DroidVoldAll.cpp",
+ "vendor/amlogic/hardware/droidvold/1.0/DroidVoldCallbackAll.cpp",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.droidvold@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.droidvold@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.droidvold@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/droidvold/1.0/types.h",
+ "vendor/amlogic/hardware/droidvold/1.0/hwtypes.h",
+ "vendor/amlogic/hardware/droidvold/1.0/IDroidVold.h",
+ "vendor/amlogic/hardware/droidvold/1.0/IHwDroidVold.h",
+ "vendor/amlogic/hardware/droidvold/1.0/BnHwDroidVold.h",
+ "vendor/amlogic/hardware/droidvold/1.0/BpHwDroidVold.h",
+ "vendor/amlogic/hardware/droidvold/1.0/BsDroidVold.h",
+ "vendor/amlogic/hardware/droidvold/1.0/IDroidVoldCallback.h",
+ "vendor/amlogic/hardware/droidvold/1.0/IHwDroidVoldCallback.h",
+ "vendor/amlogic/hardware/droidvold/1.0/BnHwDroidVoldCallback.h",
+ "vendor/amlogic/hardware/droidvold/1.0/BpHwDroidVoldCallback.h",
+ "vendor/amlogic/hardware/droidvold/1.0/BsDroidVoldCallback.h",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.droidvold@1.0",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.droidvold@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.droidvold@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.droidvold@1.0_genc++_headers"],
+ vendor_available: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.droidvold@1.0_vendor",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.droidvold@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.droidvold@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.droidvold@1.0_genc++_headers"],
+ vendor: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/droidvold/1.0/Android.mk b/droidvold/1.0/Android.mk
new file mode 100644
index 0000000..19ffff6
--- a/dev/null
+++ b/droidvold/1.0/Android.mk
@@ -0,0 +1,160 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.droidvold-V1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java \
+
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/droidvold/V1_0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.droidvold@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidVold.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/droidvold/V1_0/IDroidVold.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidVold.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDroidVoldCallback.hal
+$(GEN): $(LOCAL_PATH)/IDroidVoldCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.droidvold@1.0::IDroidVold
+
+$(GEN): $(LOCAL_PATH)/IDroidVold.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidVoldCallback.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/droidvold/V1_0/IDroidVoldCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidVoldCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.droidvold@1.0::IDroidVoldCallback
+
+$(GEN): $(LOCAL_PATH)/IDroidVoldCallback.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.droidvold-V1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java-static \
+
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/droidvold/V1_0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.droidvold@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidVold.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/droidvold/V1_0/IDroidVold.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidVold.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDroidVoldCallback.hal
+$(GEN): $(LOCAL_PATH)/IDroidVoldCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.droidvold@1.0::IDroidVold
+
+$(GEN): $(LOCAL_PATH)/IDroidVold.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidVoldCallback.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/droidvold/V1_0/IDroidVoldCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidVoldCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.droidvold@1.0::IDroidVoldCallback
+
+$(GEN): $(LOCAL_PATH)/IDroidVoldCallback.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/droidvold/1.0/IDroidVold.hal b/droidvold/1.0/IDroidVold.hal
new file mode 100755
index 0000000..a88f26e
--- a/dev/null
+++ b/droidvold/1.0/IDroidVold.hal
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2017 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 vendor.amlogic.hardware.droidvold@1.0;
+
+import IDroidVoldCallback;
+
+interface IDroidVold {
+ /**
+ * Sets a callback that DroidVold HAL use for incoming Uevent messages.
+ * @param callback Callback object to pass events to the system.
+ *
+ */
+ oneway setCallback(IDroidVoldCallback callback);
+
+ /**
+ * reset volumes success or fail
+ * @param none
+ *
+ * @return result OK, reset success
+ * FAIL, reset fail
+ *
+ */
+ reset() generates (Result result);
+
+ /**
+ * shutdown volumes success or fail
+ * @param none
+ *
+ * @return result OK, shutdown success
+ * FAIL, shutdown fail
+ *
+ */
+ shutdown() generates (Result result);
+
+ /**
+ * mount a volume
+ * @param id the volume id
+ * @param flag mount flag
+ * @param uid mount user id
+ *
+ * @return result OK, mount success; FAIL, mount fail
+ *
+ */
+ mount(string id, uint32_t flag, uint32_t uid) generates (Result result);
+
+ /**
+ * unmount a volume
+ * @param id the volume id
+ *
+ * @return result OK, unmount success; FAIL, unmount fail
+ *
+ */
+ unmount(string id) generates (Result result);
+
+ /**
+ * format a volume
+ * @param id the volume id
+ * @param type the format type
+ *
+ * @return result OK, format success; FAIL, format fail
+ *
+ */
+ format(string id, string type) generates (Result result);
+};
diff --git a/droidvold/1.0/IDroidVoldCallback.hal b/droidvold/1.0/IDroidVoldCallback.hal
new file mode 100755
index 0000000..536e23e
--- a/dev/null
+++ b/droidvold/1.0/IDroidVoldCallback.hal
@@ -0,0 +1,27 @@
+/*
+ * 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 vendor.amlogic.hardware.droidvold@1.0;
+
+interface IDroidVoldCallback {
+ /**
+ * The callback function that must be called by HAL implementation to notify
+ * the system of new message arrival.
+ * @param code the event code
+ * @param message the event message
+ */
+ oneway onEvent(uint32_t code, string message);
+};
diff --git a/droidvold/1.0/types.hal b/droidvold/1.0/types.hal
new file mode 100755
index 0000000..eef903d
--- a/dev/null
+++ b/droidvold/1.0/types.hal
@@ -0,0 +1,22 @@
+/*
+ * 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 vendor.amlogic.hardware.droidvold@1.0;
+
+enum Result : uint32_t {
+ OK, // Success
+ FAIL, // Failure, unknown reason
+};
diff --git a/droidvold/Android.bp b/droidvold/Android.bp
new file mode 100644
index 0000000..bbb3e4b
--- a/dev/null
+++ b/droidvold/Android.bp
@@ -0,0 +1,4 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "1.0",
+]