1# Copyright (c) 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. 13import("//build/ohos.gni") 14import("//foundation/distributeddatamgr/udmf/udmf.gni") 15 16config("udmf_client_config") { 17 include_dirs = [ 18 "${udmf_interfaces_path}/innerkits/client", 19 "${udmf_interfaces_path}/innerkits/common", 20 "${udmf_interfaces_path}/innerkits/data", 21 "${udmf_interfaces_path}/innerkits/dynamic", 22 "${udmf_interfaces_path}/innerkits/convert", 23 "${udmf_interfaces_path}/ndk/data", 24 "${udmf_framework_path}/common", 25 "${udmf_framework_path}/innerkitsimpl/client", 26 "${udmf_framework_path}/innerkitsimpl/data", 27 "${udmf_framework_path}/innerkitsimpl/service", 28 "${udmf_framework_path}/innerkitsimpl/convert", 29 "${udmf_framework_path}/ndkimpl/data", 30 ] 31} 32 33ohos_shared_library("udmf_client") { 34 branch_protector_ret = "pac_ret" 35 sanitize = { 36 ubsan = true 37 boundary_sanitize = true 38 cfi = true 39 cfi_cross_dso = true 40 debug = false 41 } 42 sources = [ 43 "${udmf_framework_path}/common/endian_converter.cpp", 44 "${udmf_framework_path}/common/tlv_object.cpp", 45 "${udmf_framework_path}/common/tlv_util.cpp", 46 "${udmf_framework_path}/common/udmf_copy_file.cpp", 47 "${udmf_framework_path}/common/udmf_executor.cpp", 48 "${udmf_framework_path}/common/udmf_radar_reporter.cpp", 49 "${udmf_framework_path}/common/udmf_types_util.cpp", 50 "${udmf_framework_path}/common/udmf_utils.cpp", 51 "${udmf_framework_path}/innerkitsimpl/client/getter_system.cpp", 52 "${udmf_framework_path}/innerkitsimpl/client/udmf_async_client.cpp", 53 "${udmf_framework_path}/innerkitsimpl/client/udmf_client.cpp", 54 "${udmf_framework_path}/innerkitsimpl/common/progress_queue.cpp", 55 "${udmf_framework_path}/innerkitsimpl/common/unified_key.cpp", 56 "${udmf_framework_path}/innerkitsimpl/common/unified_meta.cpp", 57 "${udmf_framework_path}/innerkitsimpl/convert/udmf_conversion.cpp", 58 "${udmf_framework_path}/innerkitsimpl/data/application_defined_record.cpp", 59 "${udmf_framework_path}/innerkitsimpl/data/audio.cpp", 60 "${udmf_framework_path}/innerkitsimpl/data/file.cpp", 61 "${udmf_framework_path}/innerkitsimpl/data/folder.cpp", 62 "${udmf_framework_path}/innerkitsimpl/data/html.cpp", 63 "${udmf_framework_path}/innerkitsimpl/data/image.cpp", 64 "${udmf_framework_path}/innerkitsimpl/data/link.cpp", 65 "${udmf_framework_path}/innerkitsimpl/data/plain_text.cpp", 66 "${udmf_framework_path}/innerkitsimpl/data/system_defined_appitem.cpp", 67 "${udmf_framework_path}/innerkitsimpl/data/system_defined_form.cpp", 68 "${udmf_framework_path}/innerkitsimpl/data/system_defined_pixelmap.cpp", 69 "${udmf_framework_path}/innerkitsimpl/data/system_defined_record.cpp", 70 "${udmf_framework_path}/innerkitsimpl/data/text.cpp", 71 "${udmf_framework_path}/innerkitsimpl/data/unified_data.cpp", 72 "${udmf_framework_path}/innerkitsimpl/data/unified_data_helper.cpp", 73 "${udmf_framework_path}/innerkitsimpl/data/unified_html_record_process.cpp", 74 "${udmf_framework_path}/innerkitsimpl/data/unified_record.cpp", 75 "${udmf_framework_path}/innerkitsimpl/data/video.cpp", 76 "${udmf_framework_path}/innerkitsimpl/dynamic/pixelmap_loader.cpp", 77 "${udmf_framework_path}/innerkitsimpl/service/progress_callback.cpp", 78 "${udmf_framework_path}/innerkitsimpl/service/udmf_notifier_stub.cpp", 79 "${udmf_framework_path}/innerkitsimpl/service/udmf_service_client.cpp", 80 "${udmf_framework_path}/innerkitsimpl/service/udmf_service_proxy.cpp", 81 ] 82 83 public_configs = [ ":udmf_client_config" ] 84 85 deps = [ "../innerkits:utd_client" ] 86 87 external_deps = [ 88 "ability_base:zuri", 89 "ability_runtime:dataobs_manager", 90 "access_token:libaccesstoken_sdk", 91 "app_file_service:fileuri_native", 92 "bundle_framework:appexecfwk_core", 93 "cJSON:cjson", 94 "c_utils:utils", 95 "dfs_service:distributed_file_daemon_kit_inner", 96 "hilog:libhilog", 97 "hisysevent:libhisysevent", 98 "hitrace:hitrace_meter", 99 "hitrace:libhitracechain", 100 "ipc:ipc_core", 101 "kv_store:distributeddata_inner", 102 "kv_store:distributeddata_mgr", 103 "libuv:uv", 104 "samgr:samgr_proxy", 105 ] 106 107 public_external_deps = [ 108 "ability_base:want", 109 "cJSON:cjson", 110 "image_framework:image", 111 ] 112 113 innerapi_tags = [ "platformsdk" ] 114 subsystem_name = "distributeddatamgr" 115 116 part_name = "udmf" 117 use_exceptions = true 118 cflags_cc = [ 119 "-fvisibility=hidden", 120 "-O2", 121 ] 122} 123 124config("utd_client_config") { 125 include_dirs = [ 126 "${udmf_interfaces_path}/innerkits/client", 127 "${udmf_interfaces_path}/innerkits/common", 128 "${udmf_interfaces_path}/innerkits/data", 129 "${udmf_framework_path}/common", 130 "${udmf_framework_path}/innerkitsimpl/data", 131 "${udmf_framework_path}/innerkitsimpl/service", 132 ] 133} 134 135ohos_shared_library("utd_client") { 136 branch_protector_ret = "pac_ret" 137 sanitize = { 138 cfi = true 139 cfi_cross_dso = true 140 debug = false 141 } 142 143 sources = [ 144 "${udmf_framework_path}/common/base32_utils.cpp", 145 "${udmf_framework_path}/common/custom_utd_json_parser.cpp", 146 "${udmf_framework_path}/common/custom_utd_store.cpp", 147 "${udmf_framework_path}/common/graph.cpp", 148 "${udmf_framework_path}/common/utd_cfgs_checker.cpp", 149 "${udmf_framework_path}/common/utd_graph.cpp", 150 "${udmf_framework_path}/innerkitsimpl/client/utd_client.cpp", 151 "${udmf_framework_path}/innerkitsimpl/data/flexible_type.cpp", 152 "${udmf_framework_path}/innerkitsimpl/data/preset_type_descriptors.cpp", 153 "${udmf_framework_path}/innerkitsimpl/data/type_descriptor.cpp", 154 ] 155 156 public_configs = [ ":utd_client_config" ] 157 158 external_deps = [ 159 "access_token:libaccesstoken_sdk", 160 "cJSON:cjson", 161 "c_utils:utils", 162 "hilog:libhilog", 163 "ipc:ipc_core", 164 "os_account:os_account_innerkits", 165 ] 166 167 public_external_deps = [ "cJSON:cjson" ] 168 use_exceptions = true 169 innerapi_tags = [ "platformsdk" ] 170 subsystem_name = "distributeddatamgr" 171 172 part_name = "udmf" 173 cflags_cc = [ 174 "-fvisibility=hidden", 175 "-O2", 176 ] 177 if (build_selinux) { 178 cflags = [ 179 "-DWITH_SELINUX", 180 "-O2", 181 ] 182 external_deps += [ "selinux_adapter:librestorecon" ] 183 } 184} 185 186ohos_shared_library("pixelmap_wrapper") { 187 branch_protector_ret = "pac_ret" 188 sanitize = { 189 cfi = true 190 cfi_cross_dso = true 191 debug = false 192 } 193 194 include_dirs = [ 195 "${udmf_interfaces_path}/innerkits/dynamic", 196 "${udmf_framework_path}/common", 197 ] 198 sources = [ 199 "${udmf_framework_path}/innerkitsimpl/dynamic/pixelmap_wrapper.cpp", 200 ] 201 202 defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ] 203 204 deps = [] 205 206 external_deps = [ 207 "image_framework:image_native", 208 "ipc:ipc_single", 209 "hilog:libhilog", 210 ] 211 212 relative_install_dir = "platformsdk" 213 innerapi_tags = [ "platformsdk" ] 214 part_name = "udmf" 215 subsystem_name = "distributeddatamgr" 216} 217