1# Copyright (c) 2023-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("//foundation/distributeddatamgr/pasteboard/pasteboard.gni") 16 17config("pasteboard_client_config") { 18 visibility = [ ":*" ] 19 visibility += [ "//foundation/distributeddatamgr/pasteboard/test/fuzztest/pasteboardclient_fuzzer/*" ] 20 include_dirs = [ 21 "include", 22 "${pasteboard_root_path}/adapter/pasteboard_progress", 23 "${pasteboard_service_path}/core/include", 24 "${pasteboard_service_path}/dfx/src", 25 "${pasteboard_service_path}/zidl/include", 26 "${pasteboard_utils_path}/native/include", 27 "//foundation/distributeddatamgr/pasteboard/framework/framework/include", 28 "//foundation/distributeddatamgr/pasteboard/framework/tlv", 29 ] 30} 31 32ohos_shared_library("pasteboard_client") { 33 branch_protector_ret = "pac_ret" 34 sanitize = { 35 integer_overflow = true 36 ubsan = true 37 boundary_sanitize = true 38 cfi = true 39 cfi_cross_dso = true 40 debug = false 41 } 42 sources = [ 43 "${pasteboard_root_path}/adapter/pasteboard_progress/pasteboard_progress.cpp", 44 "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp", 45 "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp", 46 "${pasteboard_service_path}/zidl/src/entity_recognition_observer_stub.cpp", 47 "${pasteboard_service_path}/zidl/src/ipasteboard_client_death_observer.cpp", 48 "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_client.cpp", 49 "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_stub.cpp", 50 "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_client.cpp", 51 "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_stub.cpp", 52 "${pasteboard_service_path}/zidl/src/pasteboard_observer_stub.cpp", 53 "${pasteboard_service_path}/zidl/src/pasteboard_service_proxy.cpp", 54 "${pasteboard_service_path}/zidl/src/pasteboard_signal_stub.cpp", 55 "${pasteboard_utils_path}/native/src/pasteboard_common.cpp", 56 "${pasteboard_utils_path}/native/src/pasteboard_time.cpp", 57 "src/convert_utils.cpp", 58 "src/entity_recognition_observer.cpp", 59 "src/paste_data.cpp", 60 "src/paste_data_entry.cpp", 61 "src/paste_data_record.cpp", 62 "src/pasteboard_client.cpp", 63 "src/pasteboard_copy.cpp", 64 "src/pasteboard_entry_getter.cpp", 65 "src/pasteboard_load_callback.cpp", 66 "src/pasteboard_observer.cpp", 67 "src/pasteboard_progress_signal.cpp", 68 "src/pasteboard_signal_callback.cpp", 69 "src/pasteboard_utils.cpp", 70 "src/pasteboard_web_controller.cpp", 71 ] 72 73 cflags_cc = [ 74 "-fstack-protector", 75 "-D_FORTIFY_SOURCE=2", 76 "-O2", 77 "-fvisibility=hidden", 78 ] 79 80 public_configs = [ ":pasteboard_client_config" ] 81 deps = [ 82 "${pasteboard_framework_path}:pasteboard_framework", 83 "${pasteboard_root_path}/framework/tlv:pasteboard_tlv", 84 ] 85 86 external_deps = [ 87 "ability_base:zuri", 88 "ability_runtime:ability_manager", 89 "ability_runtime:uri_permission_mgr", 90 "ability_runtime:wantagent_innerkits", 91 "access_token:libtokenid_sdk", 92 "app_file_service:fileuri_native", 93 "bundle_framework:appexecfwk_base", 94 "bundle_framework:appexecfwk_core", 95 "c_utils:utils", 96 "data_share:datashare_common", 97 "data_share:datashare_consumer", 98 "dfs_service:distributed_file_daemon_kit_inner", 99 "ffrt:libffrt", 100 "hilog:libhilog", 101 "hisysevent:libhisysevent", 102 "hitrace:hitrace_meter", 103 "image_framework:image_native", 104 "ipc:ipc_core", 105 "ipc:ipc_single", 106 "libuv:uv", 107 "libxml2:libxml2", 108 "samgr:samgr_proxy", 109 "time_service:time_client", 110 ] 111 public_external_deps = [ "udmf:udmf_client" ] 112 subsystem_name = "distributeddatamgr" 113 use_exceptions = true 114 innerapi_tags = [ "platformsdk" ] 115 part_name = "pasteboard" 116} 117