1# Copyright (c) 2024-2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/config/components/idl_tool/idl.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17import("../../../multimodalinput_mini.gni") 18 19idl_gen_interface("anco_channel_interface") { 20 src_idl = rebase_path("IAncoChannel.idl") 21} 22 23config("mmi_anco_channel_config") { 24 include_dirs = [ 25 "include", 26 "${mmi_path}/interfaces/native/innerkits/event/include", 27 "${mmi_path}/interfaces/native/innerkits/proxy/include", 28 "${target_gen_dir}", 29 ] 30 31 if (input_ext_feature_anco) { 32 include_dirs += [ "${mmi_ext_path}/anco_uds_manager/include" ] 33 } 34} 35 36ohos_source_set("mmi_anco_channel_proxy") { 37 branch_protector_ret = "pac_ret" 38 39 defines = input_default_defines 40 41 sources = [ 42 "${mmi_path}/frameworks/proxy/events/src/i_anco_consumer.cpp", 43 "src/anco_channel_death_recipient.cpp", 44 ] 45 46 output_values = get_target_outputs(":anco_channel_interface") 47 sources += filter_include(output_values, [ "*_proxy.cpp" ]) 48 49 branch_protector_ret = "pac_ret" 50 sanitize = { 51 cfi = true 52 cfi_cross_dso = true 53 debug = false 54 } 55 56 configs = [ ":mmi_anco_channel_config" ] 57 58 public_configs = [ ":mmi_anco_channel_config" ] 59 60 deps = [ 61 ":anco_channel_interface", 62 "${mmi_path}/util:libmmi-util", 63 ] 64 65 external_deps = [ 66 "hilog:libhilog", 67 "ipc:ipc_single", 68 "c_utils:utils", 69 ] 70 71 part_name = "${mmi_part_name}" 72 subsystem_name = "${mmi_subsystem_name}" 73} 74 75ohos_source_set("mmi_anco_channel_stub") { 76 branch_protector_ret = "pac_ret" 77 78 defines = input_default_defines 79 80 sources = [ 81 "${mmi_path}/frameworks/proxy/events/src/i_anco_consumer.cpp", 82 "src/anco_channel.cpp", 83 ] 84 85 output_values = get_target_outputs(":anco_channel_interface") 86 sources += filter_include(output_values, [ "*_stub.cpp" ]) 87 88 branch_protector_ret = "pac_ret" 89 sanitize = { 90 cfi = true 91 cfi_cross_dso = true 92 debug = false 93 } 94 95 configs = [ ":mmi_anco_channel_config" ] 96 97 public_configs = [ ":mmi_anco_channel_config" ] 98 99 deps = [ 100 ":anco_channel_interface", 101 "${mmi_path}/util:libmmi-util", 102 ] 103 104 external_deps = [ 105 "hilog:libhilog", 106 "ipc:ipc_single", 107 "c_utils:utils", 108 ] 109 110 part_name = "${mmi_part_name}" 111 subsystem_name = "${mmi_subsystem_name}" 112} 113