mirror of
https://gitee.com/openharmony/communication_ipc
synced 2024-11-23 07:50:24 +00:00
ipc_core和ipc_single解耦(binder驱动部分)
Signed-off-by: luodonghui <luodonghui@huawei.com> Change-Id: I7c4e41544b296c7650244a145df5404a68a53180
This commit is contained in:
parent
03ac4c98b2
commit
8fbad04458
@ -42,7 +42,8 @@
|
||||
"build_framework",
|
||||
"ylong_runtime",
|
||||
"ffrt",
|
||||
"hisysevent"
|
||||
"hisysevent",
|
||||
"json"
|
||||
],
|
||||
"third_party": [
|
||||
"libuv",
|
||||
|
@ -35,9 +35,7 @@ ohos_shared_library("ipc_core") {
|
||||
"$IPC_CORE_ROOT/c/rpc/include",
|
||||
"$SUBSYSTEM_DIR/utils/include",
|
||||
]
|
||||
if (ipc_feature_actv_binder_enabled) {
|
||||
include_dirs += [ "//third_party/json/single_include" ]
|
||||
}
|
||||
|
||||
sources = [
|
||||
"$IPC_CORE_ROOT/c/adapter/access_token/src/access_token_adapter.c",
|
||||
"$IPC_CORE_ROOT/c/rpc/src/rpc_feature_set.c",
|
||||
@ -60,7 +58,6 @@ ohos_shared_library("ipc_core") {
|
||||
"$IPC_CORE_ROOT/src/core/source/message_parcel.cpp",
|
||||
"$IPC_CORE_ROOT/src/core/source/peer_holder.cpp",
|
||||
"$IPC_CORE_ROOT/src/core/source/stub_refcount_object.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/binder_connector.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/binder_debug.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/binder_invoker.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/dbinder_databus_invoker.cpp",
|
||||
|
@ -45,7 +45,6 @@
|
||||
OHOS::IPCProcessSkeleton*;
|
||||
OHOS::DBinderDatabusInvoker*;
|
||||
OHOS::BufferObject*;
|
||||
OHOS::BinderConnector*;
|
||||
OHOS::DatabusSessionCallback*;
|
||||
OHOS::DBinderCallbackStub*;
|
||||
OHOS::StubRefCountObject*;
|
||||
|
@ -32,9 +32,7 @@ ohos_shared_library("ipc_single") {
|
||||
"$IPC_CORE_ROOT/c/adapter/access_token/include",
|
||||
"$SUBSYSTEM_DIR/utils/include",
|
||||
]
|
||||
if (ipc_feature_actv_binder_enabled) {
|
||||
include_dirs += [ "//third_party/json/single_include" ]
|
||||
}
|
||||
|
||||
sources = [
|
||||
"$IPC_CORE_ROOT/c/adapter/access_token/src/access_token_adapter.c",
|
||||
"$IPC_CORE_ROOT/src/core/source/ipc_file_descriptor.cpp",
|
||||
@ -50,7 +48,6 @@ ohos_shared_library("ipc_single") {
|
||||
"$IPC_CORE_ROOT/src/core/source/message_option.cpp",
|
||||
"$IPC_CORE_ROOT/src/core/source/message_parcel.cpp",
|
||||
"$IPC_CORE_ROOT/src/core/source/peer_holder.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/binder_connector.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/binder_debug.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/binder_invoker.cpp",
|
||||
"$IPC_CORE_ROOT/src/mock/source/hitrace_invoker.cpp",
|
||||
|
@ -14,6 +14,7 @@
|
||||
import("//build/ohos.gni")
|
||||
|
||||
SUBSYSTEM_DIR = "//foundation/communication/ipc"
|
||||
IPC_CORE_ROOT = "$SUBSYSTEM_DIR/ipc/native"
|
||||
|
||||
config("libipc_common_private_config") {
|
||||
cflags_cc = [ "-O2" ]
|
||||
@ -27,7 +28,10 @@ ohos_shared_library("ipc_common") {
|
||||
"$SUBSYSTEM_DIR/utils/include",
|
||||
"include",
|
||||
]
|
||||
sources = [ "source/process_skeleton.cpp" ]
|
||||
sources = [
|
||||
"$IPC_CORE_ROOT/src/mock/source/binder_connector.cpp",
|
||||
"source/process_skeleton.cpp",
|
||||
]
|
||||
|
||||
configs = [
|
||||
"$SUBSYSTEM_DIR/config:ipc_util_config",
|
||||
@ -38,6 +42,7 @@ ohos_shared_library("ipc_common") {
|
||||
"c_utils:utils",
|
||||
"hilog:libhilog",
|
||||
"hisysevent:libhisysevent",
|
||||
"json:nlohmann_json_static",
|
||||
]
|
||||
|
||||
innerapi_tags = [
|
||||
|
@ -24,10 +24,6 @@
|
||||
#endif
|
||||
|
||||
namespace OHOS {
|
||||
#ifdef CONFIG_IPC_SINGLE
|
||||
namespace IPC_SINGLE {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACTV_BINDER
|
||||
typedef void (*ActvBinderJoinThreadFunc)(bool initiative);
|
||||
typedef void (*ActvBinderSetHandlerInfoFunc)(uint32_t id);
|
||||
@ -109,8 +105,5 @@ private:
|
||||
ActvBinderConnector actvBinder_;
|
||||
#endif
|
||||
};
|
||||
#ifdef CONFIG_IPC_SINGLE
|
||||
} // namespace IPC_SINGLE
|
||||
#endif
|
||||
} // namespace OHOS
|
||||
#endif // OHOS_IPC_BINDER_CONNECTOR_H
|
||||
|
@ -45,9 +45,6 @@
|
||||
#endif
|
||||
|
||||
namespace OHOS {
|
||||
#ifdef CONFIG_IPC_SINGLE
|
||||
namespace IPC_SINGLE {
|
||||
#endif
|
||||
static constexpr HiviewDFX::HiLogLabel LABEL = { LOG_CORE, LOG_ID_IPC_BINDER_CONNECT, "BinderConnector" };
|
||||
std::mutex BinderConnector::skeletonMutex;
|
||||
constexpr int SZ_1_M = 1048576;
|
||||
@ -565,7 +562,4 @@ BinderConnector *BinderConnector::GetInstance()
|
||||
|
||||
return instance_;
|
||||
}
|
||||
#ifdef CONFIG_IPC_SINGLE
|
||||
} // namespace IPC_SINGLE
|
||||
#endif
|
||||
} // namespace OHOS
|
||||
|
@ -115,6 +115,7 @@ ohos_unittest("BinderConnectorTest") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$IPC_CORE_ROOT/src/core:ipc_common",
|
||||
"$IPC_TEST_ROOT/auxiliary/native:TestAssistance",
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
@ -145,6 +146,7 @@ ohos_unittest("BinderInvokerUnitTest") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$IPC_CORE_ROOT/src/core:ipc_common",
|
||||
"$IPC_TEST_ROOT/auxiliary/native:TestAssistance",
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user