1# Copyright (c) 2021-2024 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("../../../distributedinput.gni") 16 17ohos_shared_library("libdinput_source") { 18 sanitize = { 19 boundary_sanitize = true 20 integer_overflow = true 21 ubsan = true 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 branch_protector_ret = "pac_ret" 27 include_dirs = [ 28 "include", 29 "${frameworks_path}/include", 30 "${innerkits_path}/include", 31 "${innerkits_path}/include/ipc", 32 "${innerkits_path}/src", 33 "${ipc_path}/include", 34 "${ipc_path}/src", 35 "${common_path}/include", 36 "${service_common}/include", 37 "${services_source_path}/inputinject/include", 38 "${services_source_path}/transport/include", 39 "${dfx_utils_path}/include", 40 "${utils_path}/include", 41 "${distributedinput_path}/inputdevicehandler/include", 42 "${distributedinput_path}/services/transportbase/include", 43 ] 44 45 sources = [ 46 "${common_path}/include/input_check_param.cpp", 47 "${common_path}/include/white_list_util.cpp", 48 "${ipc_path}/src/add_white_list_infos_call_back_proxy.cpp", 49 "${ipc_path}/src/add_white_list_infos_call_back_stub.cpp", 50 "${ipc_path}/src/del_white_list_infos_call_back_proxy.cpp", 51 "${ipc_path}/src/del_white_list_infos_call_back_stub.cpp", 52 "${ipc_path}/src/distributed_input_sink_proxy.cpp", 53 "${ipc_path}/src/distributed_input_sink_stub.cpp", 54 "${ipc_path}/src/distributed_input_source_proxy.cpp", 55 "${ipc_path}/src/distributed_input_source_stub.cpp", 56 "${ipc_path}/src/get_sink_screen_infos_call_back_proxy.cpp", 57 "${ipc_path}/src/get_sink_screen_infos_call_back_stub.cpp", 58 "${ipc_path}/src/input_node_listener_proxy.cpp", 59 "${ipc_path}/src/input_node_listener_stub.cpp", 60 "${ipc_path}/src/prepare_d_input_call_back_proxy.cpp", 61 "${ipc_path}/src/prepare_d_input_call_back_stub.cpp", 62 "${ipc_path}/src/register_d_input_call_back_proxy.cpp", 63 "${ipc_path}/src/register_d_input_call_back_stub.cpp", 64 "${ipc_path}/src/register_session_state_callback_proxy.cpp", 65 "${ipc_path}/src/register_session_state_callback_stub.cpp", 66 "${ipc_path}/src/sharing_dhid_listener_proxy.cpp", 67 "${ipc_path}/src/sharing_dhid_listener_stub.cpp", 68 "${ipc_path}/src/simulation_event_listener_proxy.cpp", 69 "${ipc_path}/src/simulation_event_listener_stub.cpp", 70 "${ipc_path}/src/start_d_input_call_back_proxy.cpp", 71 "${ipc_path}/src/start_d_input_call_back_stub.cpp", 72 "${ipc_path}/src/start_stop_d_inputs_call_back_proxy.cpp", 73 "${ipc_path}/src/start_stop_d_inputs_call_back_stub.cpp", 74 "${ipc_path}/src/start_stop_result_call_back_proxy.cpp", 75 "${ipc_path}/src/start_stop_result_call_back_stub.cpp", 76 "${ipc_path}/src/stop_d_input_call_back_proxy.cpp", 77 "${ipc_path}/src/stop_d_input_call_back_stub.cpp", 78 "${ipc_path}/src/unprepare_d_input_call_back_proxy.cpp", 79 "${ipc_path}/src/unprepare_d_input_call_back_stub.cpp", 80 "${ipc_path}/src/unregister_d_input_call_back_proxy.cpp", 81 "${ipc_path}/src/unregister_d_input_call_back_stub.cpp", 82 "src/dinput_source_listener.cpp", 83 "src/dinput_source_manager_event_handler.cpp", 84 "src/distributed_input_source_event_handler.cpp", 85 "src/distributed_input_source_manager.cpp", 86 "src/distributed_input_source_sa_cli_mgr.cpp", 87 ] 88 89 defines = [ 90 "HI_LOG_ENABLE", 91 "DH_LOG_TAG=\"distributedinputmanagerkit\"", 92 "LOG_DOMAIN=0xD004120", 93 ] 94 95 cflags = [ 96 "-fstack-protector-strong", 97 "-D_FORTIFY_SOURCE=2", 98 "-O2", 99 ] 100 101 deps = [ 102 "${dfx_utils_path}:libdinput_dfx_utils", 103 "${distributedinput_path}/services/transportbase:libdinput_trans_base", 104 "${innerkits_path}:libdinput_sdk", 105 "${services_source_path}/inputinject:libdinput_inject", 106 "${services_source_path}/transport:libdinput_source_trans", 107 "${utils_path}:libdinput_utils", 108 ] 109 110 external_deps = [ 111 "access_token:libaccesstoken_sdk", 112 "access_token:libtokenid_sdk", 113 "c_utils:utils", 114 "config_policy:configpolicy_util", 115 "distributed_hardware_fwk:distributed_av_receiver", 116 "distributed_hardware_fwk:distributed_av_sender", 117 "distributed_hardware_fwk:distributedhardwareutils", 118 "distributed_hardware_fwk:libdhfwk_sdk", 119 "dsoftbus:softbus_client", 120 "eventhandler:libeventhandler", 121 "hicollie:libhicollie", 122 "hilog:libhilog", 123 "hisysevent:libhisysevent", 124 "hitrace:hitrace_meter", 125 "ipc:ipc_core", 126 "json:nlohmann_json_static", 127 "libevdev:libevdev", 128 "safwk:system_ability_fwk", 129 "samgr:samgr_proxy", 130 ] 131 132 cflags_cc = [ 133 "-DHILOG_ENABLE", 134 "-fstack-protector-strong", 135 "-D_FORTIFY_SOURCE=2", 136 "-O2", 137 ] 138 139 subsystem_name = "distributedhardware" 140 141 part_name = "distributed_input" 142} 143