# Copyright (c) 2024 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. import("//build/ohos.gni") import("//build/test.gni") import("../../../multimodalinput_mini.gni") module_output_path = "multimodalinput/mmi_unit_out" config("mmi_anco_channel_config") { include_dirs = [ "include", "${mmi_path}/interfaces/native/innerkits/event/include", "${mmi_path}/interfaces/native/innerkits/proxy/include", ] if (input_ext_feature_anco) { include_dirs += [ "${mmi_ext_path}/anco_uds_manager/include" ] } } ohos_source_set("mmi_anco_channel_proxy") { branch_protector_ret = "pac_ret" defines = input_default_defines sources = [ "${mmi_path}/frameworks/proxy/events/src/i_anco_consumer.cpp", "src/anco_channel_death_recipient.cpp", "src/anco_channel_proxy.cpp", ] branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } configs = [ ":mmi_anco_channel_config" ] public_configs = [ ":mmi_anco_channel_config" ] deps = [ "${mmi_path}/util:libmmi-util" ] external_deps = [ "hilog:libhilog", "ipc:ipc_single", ] part_name = "${mmi_part_name}" subsystem_name = "${mmi_subsystem_name}" } ohos_source_set("mmi_anco_channel_stub") { branch_protector_ret = "pac_ret" defines = input_default_defines sources = [ "${mmi_path}/frameworks/proxy/events/src/i_anco_consumer.cpp", "src/anco_channel.cpp", "src/anco_channel_stub.cpp", ] branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } configs = [ ":mmi_anco_channel_config" ] public_configs = [ ":mmi_anco_channel_config" ] deps = [ "${mmi_path}/util:libmmi-util" ] external_deps = [ "hilog:libhilog", "ipc:ipc_single", ] part_name = "${mmi_part_name}" subsystem_name = "${mmi_subsystem_name}" } ohos_unittest("AncoChannelStubTest") { module_out_path = module_output_path include_dirs = [ "${mmi_path}/common/anco/comm/include", "${mmi_path}/interfaces/native/innerkits/proxy/include", ] cflags = [ "-Dprivate=public", "-Dprotected=public", ] deps = [ "${mmi_path}/util:libmmi-util", "//third_party/googletest:gmock_main", ] sources = [ "${mmi_path}/frameworks/proxy/events/src/i_anco_consumer.cpp", "src/anco_channel_stub.cpp", "test/anco_channel_stub_ex_test.cpp", "test/mock.cpp", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", ] }