# Copyright (C) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/distributeddatamgr/pasteboard/pasteboard.gni") import("//foundation/window/window_manager/windowmanager_aafwk.gni") config("pasteboard_service_config") { visibility = [ ":*" ] visibility += [ "//foundation/distributeddatamgr/pasteboard/test/fuzztest/pasteboardservice_fuzzer/*" ] include_dirs = [ "dfx/src", "dfx/src/behaviour", "dfx/src/statistic", "dfx/src/fault", "zidl/include", "account/include", "core/include", "load/include", "${filemanagement_service_path}/distributedfiledaemon/include/ipc", "${pasteboard_innerkits_path}/include", "${pasteboard_utils_path}/mock/include", "${pasteboard_utils_path}/native/include", "${pasteboard_utils_path}/system/safwk/native/include", "${pasteboard_framework_path}/framework/include", "${pasteboard_framework_path}/framework/include/device", "//commonlibrary/c_utils/base/include", ] ldflags = [ "-Wl,--exclude-libs=ALL" ] cflags = [ "-fdata-sections", "-ffunction-sections", "-fvisibility=hidden", ] } ohos_shared_library("pasteboard_service") { sources = [ "${pasteboard_innerkits_path}/src/paste_data.cpp", "${pasteboard_innerkits_path}/src/paste_data_record.cpp", "account/src/account_manager.cpp", "core/src/pasteboard_dialog.cpp", "core/src/pasteboard_service.cpp", "dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp", "dfx/src/calculate_time_consuming.cpp", "dfx/src/command.cpp", "dfx/src/fault/pasteboard_fault_impl.cpp", "dfx/src/hiview_adapter.cpp", "dfx/src/pasteboard_dump_helper.cpp", "dfx/src/pasteboard_trace.cpp", "dfx/src/reporter.cpp", "dfx/src/statistic/time_consuming_statistic_impl.cpp", "load/src/config.cpp", "load/src/loader.cpp", "zidl/src/pasteboard_observer_proxy.cpp", "zidl/src/pasteboard_service_stub.cpp", ] public_configs = [ "//commonlibrary/c_utils/base:utils_config", ":pasteboard_service_config", ] cflags_cc = [ "-fstack-protector", "-D_FORTIFY_SOURCE=2", "-O2", ] deps = [ "${pasteboard_framework_path}:pasteboard_framework", "//foundation/distributeddatamgr/pasteboard/framework/framework:pasteboard_framework", "//foundation/distributeddatamgr/pasteboard/framework/tlv:pasteboard_tlv", "//foundation/distributeddatamgr/pasteboard/framework/uri:pasteboard_uri", ] defines = [] configs = [ "//third_party/cJSON:cJSON_config" ] deps += [ "//third_party/cJSON:cjson" ] external_deps = [ "ability_base:base", "ability_base:want", "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:uri_permission_mgr", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "app_file_service:remote_file_share_native", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "dfs_service:distributed_file_daemon_kit_inner", "eventhandler:libeventhandler", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "hitrace:libhitracechain", "image_framework:image_native", "imf:inputmethod_client", "init:libbeget_proxy", "init:libbegetutil", "input:libmmi-client", "ipc:ipc_core", "os_account:os_account_innerkits", "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", "window_manager:libwm", ] if (scene_board_enabled) { external_deps += [ "window_manager:libwm_lite" ] defines += [ "SCENE_BOARD_ENABLE" ] } else { external_deps += [ "window_manager:libwm" ] } if (pb_dlp_part_enabled) { external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ] defines += [ "WITH_DLP" ] } if (pb_device_info_manager_part_enabled) { external_deps += [ "device_info_manager:distributed_device_profile_client" ] defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ] } if (pb_device_manager_part_enabled) { external_deps += [ "device_manager:devicemanagersdk" ] defines += [ "PB_DEVICE_MANAGER_ENABLE" ] } subsystem_name = "distributeddatamgr" part_name = "pasteboard" }