1# Copyright (c) 2021-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/ohos.gni") 15import("//build/ohos_var.gni") 16import("//build/config/components/idl_tool/idl.gni") 17import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni") 18 19idl_gen_interface("dp_business_callback_interfaces") { 20 sources = [ 21 "IBusinessCallback.idl", 22 ] 23 log_domainid = "0xD004400" 24 log_tag = "DHDP" 25} 26 27config("business_callback_interfaces_ipc_config"){ 28 include_dirs = [ 29 ".", 30 "${target_gen_dir}/", 31 ] 32} 33 34ohos_source_set("business_callback_interfaces_ipc") { 35 sanitize = { 36 cfi = true 37 cfi_cross_dso = true 38 debug = false 39 } 40 41 output_values = get_target_outputs(":dp_business_callback_interfaces") 42 sources = [] 43 sources += filter_include(output_values, [ "*.cpp" ]) 44 public_configs = [ 45 ":business_callback_interfaces_ipc_config" 46 ] 47 include_dirs = [ 48 "${device_profile_common}/include/constants", 49 "${device_profile_common}/include/interfaces", 50 "${device_profile_common}/include/utils", 51 ] 52 deps = [ ":dp_business_callback_interfaces",] 53 external_deps = [ 54 "cJSON:cjson", 55 "c_utils:utils", 56 "hilog:libhilog", 57 "hitrace:hitrace_meter", 58 "ipc:ipc_core", 59 "safwk:system_ability_fwk", 60 "samgr:samgr_proxy", 61 ] 62 63 part_name = "device_info_manager" 64 subsystem_name = "deviceprofile" 65} 66 67config("distributed_device_profile_common_config") { 68 visibility = [ ":*" ] 69 include_dirs = [ 70 "include/interfaces", 71 "include/constants", 72 "include/utils", 73 ] 74} 75 76ohos_shared_library("distributed_device_profile_common") { 77 branch_protector_ret = "pac_ret" 78 ldflags = [ 79 "-Wl,-z,relro", 80 "-Wl,-z,now", 81 ] 82 83 cflags = [ 84 "-fPIC", 85 "-D_FORTIFY_SOURCE=2", 86 "-O2", 87 ] 88 89 cflags_cc = cflags 90 91 sanitize = { 92 boundary_sanitize = true 93 integer_overflow = true 94 ubsan = true 95 cfi = true 96 cfi_cross_dso = true 97 debug = false 98 } 99 100 install_enable = true 101 102 sources = [ 103 "src/constants/distributed_device_profile_constants.cpp", 104 "src/interfaces/access_control_profile.cpp", 105 "src/interfaces/accessee.cpp", 106 "src/interfaces/accesser.cpp", 107 "src/interfaces/business_event.cpp", 108 "src/interfaces/characteristic_profile.cpp", 109 "src/interfaces/device_icon_info.cpp", 110 "src/interfaces/device_icon_info_filter_options.cpp", 111 "src/interfaces/device_profile.cpp", 112 "src/interfaces/device_profile_filter_options.cpp", 113 "src/interfaces/dp_inited_callback_proxy.cpp", 114 "src/interfaces/dp_inited_callback_stub.cpp", 115 "src/interfaces/dp_subscribe_info.cpp", 116 "src/interfaces/dp_sync_options.cpp", 117 "src/interfaces/i_profile_change_listener.cpp", 118 "src/interfaces/local_service_info.cpp", 119 "src/interfaces/pincode_invalid_callback_proxy.cpp", 120 "src/interfaces/pincode_invalid_callback_stub.cpp", 121 "src/interfaces/product_info.cpp", 122 "src/interfaces/profile_change_listener_proxy.cpp", 123 "src/interfaces/profile_change_listener_stub.cpp", 124 "src/interfaces/query_profile.cpp", 125 "src/interfaces/service_info_profile.cpp", 126 "src/interfaces/service_info_unique_key.cpp", 127 "src/interfaces/service_profile.cpp", 128 "src/interfaces/sync_completed_callback_proxy.cpp", 129 "src/interfaces/sync_completed_callback_stub.cpp", 130 "src/interfaces/trust_device_profile.cpp", 131 "src/interfaces/trusted_device_info.cpp", 132 "src/utils/content_sensor_manager_utils.cpp", 133 "src/utils/ipc_utils.cpp", 134 "src/utils/profile_utils.cpp", 135 ] 136 137 deps = [":business_callback_interfaces_ipc"] 138 139 public_configs = [ 140 ":business_callback_interfaces_ipc_config", 141 ":distributed_device_profile_common_config" 142 ] 143 144 external_deps = [ 145 "access_token:libaccesstoken_sdk", 146 "cJSON:cjson", 147 "c_utils:utils", 148 "device_manager:devicemanagersdk", 149 "dmsfwk:common_sdk", 150 "dsoftbus:softbus_client", 151 "eventhandler:libeventhandler", 152 "hilog:libhilog", 153 "init:libbegetutil", 154 "ipc:ipc_core", 155 "relational_store:native_rdb", 156 "safwk:system_ability_fwk", 157 "samgr:samgr_proxy", 158 ] 159 160 part_name = "device_info_manager" 161 subsystem_name = "deviceprofile" 162} 163