1# Copyright (c) 2021-2022 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/ohos.gni") 15import("../../multimodalinput_mini.gni") 16mmi_connect_manager_path = "${mmi_path}/service/connect_manager" 17 18config("mmi_connect_manager_config") { 19 include_dirs = [ 20 "${mmi_path}/common/anco/comm/include", 21 "${mmi_path}/interfaces/native/innerkits/common/include", 22 "${mmi_path}/interfaces/native/innerkits/event/include", 23 "${mmi_path}/interfaces/native/innerkits/proxy/include", 24 "${mmi_path}/util/common/include", 25 "${mmi_path}/util/network/include", 26 "${mmi_path}/util/socket/include", 27 "${mmi_path}/service/delegate_task/include", 28 "${mmi_path}/service/filter/include", 29 "${mmi_path}/service/message_handle/include", 30 "${mmi_path}/service/module_loader/include", 31 "${mmi_path}/service/nap_process/include", 32 "${mmi_path}/service/permission_helper/include", 33 "${mmi_path}/frameworks/proxy/event_handler/include", 34 "${mmi_connect_manager_path}/include", 35 ] 36} 37 38ohos_source_set("mmi_connect_manager_service") { 39 part_name = "input" 40 subsystem_name = "multimodalinput" 41 42 sources = [ 43 "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp", 44 "${mmi_connect_manager_path}/src/multimodal_input_connect_stub.cpp", 45 ] 46 47 sources += [ 48 "${mmi_connect_manager_path}/src/input_binder_client_death_recipient.cpp", 49 ] 50 51 branch_protector_ret = "pac_ret" 52 sanitize = { 53 cfi = true 54 cfi_cross_dso = true 55 debug = false 56 } 57 defines = input_default_defines 58 59 configs = [ ":mmi_connect_manager_config" ] 60 61 external_deps = [ 62 "access_token:libaccesstoken_sdk", 63 "hilog:libhilog", 64 "image_framework:image_native", 65 "ipc:ipc_single", 66 "safwk:system_ability_fwk", 67 "samgr:samgr_proxy", 68 ] 69 70 if (enable_player_framework) { 71 external_deps += [ "player_framework:media_client" ] 72 } 73 74 if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64") && 75 enhanced_opt) { 76 cflags = [] 77 if (input_feature_enable_pgo && input_feature_product != "default") { 78 cflags += [ 79 "-fprofile-use=" + 80 rebase_path("${input_feature_pgo_path}/libmmi-server.profdata", 81 root_build_dir), 82 "-Wno-error=backend-plugin", 83 "-Wno-profile-instr-out-of-date", 84 "-Wno-profile-instr-unprofiled", 85 ] 86 } 87 if (input_feature_product == "pc" && target_cpu == "arm64") { 88 cflags += [ "-moutline-atomics" ] 89 } 90 } 91} 92 93ohos_source_set("mmi_connect_manager_proxy") { 94 part_name = "input" 95 subsystem_name = "multimodalinput" 96 97 branch_protector_ret = "pac_ret" 98 sanitize = { 99 cfi = true 100 cfi_cross_dso = true 101 debug = false 102 } 103 defines = input_default_defines 104 105 sources = [ 106 "${mmi_connect_manager_path}/src/multimodal_input_connect_death_recipient.cpp", 107 "${mmi_connect_manager_path}/src/multimodal_input_connect_def_parcel.cpp", 108 "${mmi_connect_manager_path}/src/multimodal_input_connect_manager.cpp", 109 "${mmi_connect_manager_path}/src/multimodal_input_connect_proxy.cpp", 110 ] 111 112 sources += [ 113 "${mmi_connect_manager_path}/src/input_binder_client_server.cpp", 114 "${mmi_connect_manager_path}/src/input_binder_client_stub.cpp", 115 ] 116 117 configs = [ ":mmi_connect_manager_config" ] 118 119 external_deps = [ 120 "hilog:libhilog", 121 "image_framework:image_native", 122 "ipc:ipc_single", 123 "safwk:system_ability_fwk", 124 "samgr:samgr_proxy", 125 ] 126} 127