From 2ac9838458670ed6b56d8fc1f81a3ee3e6d83652 Mon Sep 17 00:00:00 2001 From: "yuqingsong (A)" Date: Fri, 8 Dec 2023 16:28:34 +0800 Subject: [PATCH] ipc: binder: Add the head files related to the actv binder Signed-off-by: Yu Qingsong --- BUILD.gn | 4 +++ bundle.json | 1 + config.gni | 1 + ipc/native/src/mock/include/actv_binder.h | 31 +++++++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 ipc/native/src/mock/include/actv_binder.h diff --git a/BUILD.gn b/BUILD.gn index 21551703..d1f9a0d1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,6 +13,7 @@ import("//build/ohos.gni") import("//build/ohos_var.gni") +import("./config.gni") SUBSYSTEM_DIR = "//foundation/communication/ipc" IPC_CORE_ROOT = "$SUBSYSTEM_DIR/ipc/native" @@ -36,6 +37,9 @@ config("ipc_util_config") { if (defined(build_public_version) && build_public_version) { cflags += [ "-DBUILD_PUBLIC_VERSION" ] } + if (ipc_feature_actv_binder_enabled) { + cflags += [ "-DCONFIG_ACTV_BINDER" ] + } } group("ipc_components") { diff --git a/bundle.json b/bundle.json index 2fdcf8eb..0b523f71 100644 --- a/bundle.json +++ b/bundle.json @@ -21,6 +21,7 @@ "mini" ], "features": [ + "ipc_feature_actv_binder_enabled", "ipc_feature_rpc_enabled" ], "syscap":[ diff --git a/config.gni b/config.gni index 09778e5a..30972de4 100755 --- a/config.gni +++ b/config.gni @@ -13,4 +13,5 @@ declare_args() { ipc_feature_rpc_enabled = false + ipc_feature_actv_binder_enabled = true } diff --git a/ipc/native/src/mock/include/actv_binder.h b/ipc/native/src/mock/include/actv_binder.h new file mode 100644 index 00000000..a9b2daf2 --- /dev/null +++ b/ipc/native/src/mock/include/actv_binder.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2023 Huawei Device Co., Ltd. + * 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. + */ + +#ifndef OHOS_IPC_ACTV_BINDER_H +#define OHOS_IPC_ACTV_BINDER_H + +#include + +#ifdef CONFIG_ACTV_BINDER + +#define BINDER_SET_ACTVMGR _IOWR('b', 64, uint64_t) + +#define ACTV_BINDER_HANDLE_BIT 1 + +#define ACTV_BINDER_WRITE_READ _IOWR('b', 97, struct binder_write_read) + +#endif // CONFIG_ACTV_BINDER + +#endif // OHOS_IPC_ACTV_BINDER_H