1cb7eb8c9Sopenharmony_ci# Copyright (C) 2021-2024 Huawei Device Co., Ltd. 2cb7eb8c9Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3cb7eb8c9Sopenharmony_ci# you may not use this file except in compliance with the License. 4cb7eb8c9Sopenharmony_ci# You may obtain a copy of the License at 5cb7eb8c9Sopenharmony_ci# 6cb7eb8c9Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7cb7eb8c9Sopenharmony_ci# 8cb7eb8c9Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9cb7eb8c9Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10cb7eb8c9Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11cb7eb8c9Sopenharmony_ci# See the License for the specific language governing permissions and 12cb7eb8c9Sopenharmony_ci# limitations under the License. 13cb7eb8c9Sopenharmony_ciimport("//build/ohos.gni") 14cb7eb8c9Sopenharmony_ciimport("//foundation/filemanagement/dfs_service/distributedfile.gni") 15cb7eb8c9Sopenharmony_ci 16cb7eb8c9Sopenharmony_ciohos_shared_library("libdistributedfiledaemon") { 17cb7eb8c9Sopenharmony_ci branch_protector_ret = "pac_ret" 18cb7eb8c9Sopenharmony_ci sanitize = { 19cb7eb8c9Sopenharmony_ci integer_overflow = true 20cb7eb8c9Sopenharmony_ci ubsan = true 21cb7eb8c9Sopenharmony_ci boundary_sanitize = true 22cb7eb8c9Sopenharmony_ci cfi = true 23cb7eb8c9Sopenharmony_ci cfi_cross_dso = true 24cb7eb8c9Sopenharmony_ci debug = false 25cb7eb8c9Sopenharmony_ci } 26cb7eb8c9Sopenharmony_ci include_dirs = [ 27cb7eb8c9Sopenharmony_ci "include", 28cb7eb8c9Sopenharmony_ci "include/network/softbus", 29cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 30cb7eb8c9Sopenharmony_ci "${distributedfile_path}/services/distributedfiledaemon/include/ipc", 31cb7eb8c9Sopenharmony_ci ] 32cb7eb8c9Sopenharmony_ci 33cb7eb8c9Sopenharmony_ci cflags = [ 34cb7eb8c9Sopenharmony_ci "-D_FORTIFY_SOURCE=2", 35cb7eb8c9Sopenharmony_ci "-fstack-protector-strong", 36cb7eb8c9Sopenharmony_ci ] 37cb7eb8c9Sopenharmony_ci 38cb7eb8c9Sopenharmony_ci sources = [ 39cb7eb8c9Sopenharmony_ci "src/all_connect/all_connect_manager.cpp", 40cb7eb8c9Sopenharmony_ci "src/device/device_info.cpp", 41cb7eb8c9Sopenharmony_ci "src/device/device_manager_agent.cpp", 42cb7eb8c9Sopenharmony_ci "src/ipc/asset_callback_manager.cpp", 43cb7eb8c9Sopenharmony_ci "src/ipc/asset_recv_callback_proxy.cpp", 44cb7eb8c9Sopenharmony_ci "src/ipc/asset_send_callback_proxy.cpp", 45cb7eb8c9Sopenharmony_ci "src/ipc/connection_detector.cpp", 46cb7eb8c9Sopenharmony_ci "src/ipc/daemon.cpp", 47cb7eb8c9Sopenharmony_ci "src/ipc/daemon_eventhandler.cpp", 48cb7eb8c9Sopenharmony_ci "src/ipc/daemon_execute.cpp", 49cb7eb8c9Sopenharmony_ci "src/ipc/daemon_stub.cpp", 50cb7eb8c9Sopenharmony_ci "src/ipc/file_dfs_listener_proxy.cpp", 51cb7eb8c9Sopenharmony_ci "src/ipc/file_trans_listener_proxy.cpp", 52cb7eb8c9Sopenharmony_ci "src/ipc/trans_mananger.cpp", 53cb7eb8c9Sopenharmony_ci "src/mountpoint/mount_manager.cpp", 54cb7eb8c9Sopenharmony_ci "src/mountpoint/mount_point.cpp", 55cb7eb8c9Sopenharmony_ci "src/multiuser/os_account_observer.cpp", 56cb7eb8c9Sopenharmony_ci "src/network/devsl_dispatcher.cpp", 57cb7eb8c9Sopenharmony_ci "src/network/kernel_talker.cpp", 58cb7eb8c9Sopenharmony_ci "src/network/network_agent_template.cpp", 59cb7eb8c9Sopenharmony_ci "src/network/session_pool.cpp", 60cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_agent.cpp", 61cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_asset_recv_listener.cpp", 62cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_asset_send_listener.cpp", 63cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_file_receive_listener.cpp", 64cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_file_send_listener.cpp", 65cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_handler.cpp", 66cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_handler_asset.cpp", 67cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_session.cpp", 68cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_session_dispatcher.cpp", 69cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_session_listener.cpp", 70cb7eb8c9Sopenharmony_ci "src/network/softbus/softbus_session_pool.cpp", 71cb7eb8c9Sopenharmony_ci ] 72cb7eb8c9Sopenharmony_ci 73cb7eb8c9Sopenharmony_ci deps = [ 74cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner", 75cb7eb8c9Sopenharmony_ci "${utils_path}:libdistributedfileutils", 76cb7eb8c9Sopenharmony_ci ] 77cb7eb8c9Sopenharmony_ci 78cb7eb8c9Sopenharmony_ci external_deps = [ 79cb7eb8c9Sopenharmony_ci "ability_base:want", 80cb7eb8c9Sopenharmony_ci "ability_base:zuri", 81cb7eb8c9Sopenharmony_ci "ability_runtime:uri_permission_mgr", 82cb7eb8c9Sopenharmony_ci "access_token:libaccesstoken_sdk", 83cb7eb8c9Sopenharmony_ci "access_token:libtokenid_sdk", 84cb7eb8c9Sopenharmony_ci "app_file_service:sandbox_helper_native", 85cb7eb8c9Sopenharmony_ci "c_utils:utils", 86cb7eb8c9Sopenharmony_ci "common_event_service:cesfwk_innerkits", 87cb7eb8c9Sopenharmony_ci "dataclassification:data_transit_mgr", 88cb7eb8c9Sopenharmony_ci "device_auth:deviceauth_sdk", 89cb7eb8c9Sopenharmony_ci "device_manager:devicemanagersdk", 90cb7eb8c9Sopenharmony_ci "dsoftbus:softbus_client", 91cb7eb8c9Sopenharmony_ci "eventhandler:libeventhandler", 92cb7eb8c9Sopenharmony_ci "hilog:libhilog", 93cb7eb8c9Sopenharmony_ci "hisysevent:libhisysevent", 94cb7eb8c9Sopenharmony_ci "init:libbegetutil", 95cb7eb8c9Sopenharmony_ci "ipc:ipc_single", 96cb7eb8c9Sopenharmony_ci "json:nlohmann_json_static", 97cb7eb8c9Sopenharmony_ci "os_account:os_account_innerkits", 98cb7eb8c9Sopenharmony_ci "safwk:system_ability_fwk", 99cb7eb8c9Sopenharmony_ci "samgr:samgr_proxy", 100cb7eb8c9Sopenharmony_ci "storage_service:storage_manager_sa_proxy", 101cb7eb8c9Sopenharmony_ci "zlib:shared_libz", 102cb7eb8c9Sopenharmony_ci ] 103cb7eb8c9Sopenharmony_ci configs = [ "${utils_path}:compiler_configs" ] 104cb7eb8c9Sopenharmony_ci 105cb7eb8c9Sopenharmony_ci defines = [ "LOG_TAG=\"distributedfile_daemon\"" ] 106cb7eb8c9Sopenharmony_ci 107cb7eb8c9Sopenharmony_ci part_name = "dfs_service" 108cb7eb8c9Sopenharmony_ci subsystem_name = "filemanagement" 109cb7eb8c9Sopenharmony_ci kernel_permission_path = "./encaps.json" 110cb7eb8c9Sopenharmony_ci} 111cb7eb8c9Sopenharmony_ci 112cb7eb8c9Sopenharmony_ciconfig("public_config") { 113cb7eb8c9Sopenharmony_ci include_dirs = [ 114cb7eb8c9Sopenharmony_ci ".", 115cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 116cb7eb8c9Sopenharmony_ci "${distributedfile_path}/services/distributedfiledaemon/include/ipc", 117cb7eb8c9Sopenharmony_ci ] 118cb7eb8c9Sopenharmony_ci} 119cb7eb8c9Sopenharmony_ci 120cb7eb8c9Sopenharmony_ciconfig("private_config") { 121cb7eb8c9Sopenharmony_ci include_dirs = [ 122cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 123cb7eb8c9Sopenharmony_ci "${distributedfile_path}/utils/log/include", 124cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/include", 125cb7eb8c9Sopenharmony_ci ] 126cb7eb8c9Sopenharmony_ci} 127cb7eb8c9Sopenharmony_ci 128cb7eb8c9Sopenharmony_ciohos_shared_library("distributed_file_daemon_kit_inner") { 129cb7eb8c9Sopenharmony_ci branch_protector_ret = "pac_ret" 130cb7eb8c9Sopenharmony_ci sanitize = { 131cb7eb8c9Sopenharmony_ci integer_overflow = true 132cb7eb8c9Sopenharmony_ci ubsan = true 133cb7eb8c9Sopenharmony_ci boundary_sanitize = true 134cb7eb8c9Sopenharmony_ci cfi = true 135cb7eb8c9Sopenharmony_ci cfi_cross_dso = true 136cb7eb8c9Sopenharmony_ci debug = false 137cb7eb8c9Sopenharmony_ci } 138cb7eb8c9Sopenharmony_ci sources = [ 139cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_adapter_sa_client.cpp", 140cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp", 141cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_recv_callback_stub.cpp", 142cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_send_callback_stub.cpp", 143cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/distributed_file_daemon_manager.cpp", 144cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/distributed_file_daemon_manager_impl.cpp", 145cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/distributed_file_daemon_proxy.cpp", 146cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/file_trans_listener_stub.cpp", 147cb7eb8c9Sopenharmony_ci "${distributedfile_path}/utils/log/src/utils_log.cpp", 148cb7eb8c9Sopenharmony_ci ] 149cb7eb8c9Sopenharmony_ci 150cb7eb8c9Sopenharmony_ci defines = [ "LOG_TAG=\"distributedfile_daemon\"" ] 151cb7eb8c9Sopenharmony_ci 152cb7eb8c9Sopenharmony_ci configs = [ ":private_config" ] 153cb7eb8c9Sopenharmony_ci 154cb7eb8c9Sopenharmony_ci public_configs = [ ":public_config" ] 155cb7eb8c9Sopenharmony_ci 156cb7eb8c9Sopenharmony_ci cflags = [ 157cb7eb8c9Sopenharmony_ci "-D_FORTIFY_SOURCE=2", 158cb7eb8c9Sopenharmony_ci "-fstack-protector-strong", 159cb7eb8c9Sopenharmony_ci ] 160cb7eb8c9Sopenharmony_ci 161cb7eb8c9Sopenharmony_ci external_deps = [ 162cb7eb8c9Sopenharmony_ci "c_utils:utils", 163cb7eb8c9Sopenharmony_ci "hilog:libhilog", 164cb7eb8c9Sopenharmony_ci "ipc:ipc_single", 165cb7eb8c9Sopenharmony_ci "media_library:media_library", 166cb7eb8c9Sopenharmony_ci "media_library:media_library_manager", 167cb7eb8c9Sopenharmony_ci "safwk:system_ability_fwk", 168cb7eb8c9Sopenharmony_ci "samgr:samgr_proxy", 169cb7eb8c9Sopenharmony_ci ] 170cb7eb8c9Sopenharmony_ci public_external_deps = [ "device_manager:devicemanagersdk" ] 171cb7eb8c9Sopenharmony_ci 172cb7eb8c9Sopenharmony_ci use_exceptions = true 173cb7eb8c9Sopenharmony_ci part_name = "dfs_service" 174cb7eb8c9Sopenharmony_ci subsystem_name = "filemanagement" 175cb7eb8c9Sopenharmony_ci} 176