# Copyright (c) 2021 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/filemanagement/dfs_service/distributedfile.gni") ohos_shared_library("sendfile") { include_dirs = [ "//third_party/libuv/include", "//third_party/node/src", "//foundation/ace/napi/interfaces/kits", "${distributedfile_path}/interfaces/innerkits/native", "${distributedfile_path}/frameworks/native/include", "${distributedfile_path}/frameworks/js/napi/include", "${distributedfile_path}/utils/log/include", "${services_path}/distributedfileservice/include/ipc", "//foundation/communication/ipc/interfaces/innerkits/libdbinder/include", "//foundation/distributedschedule/samgr/services/samgr/native/include", "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include", "//foundation/distributeddatamgr/distributedfile/utils/filemgmt_libn/include", ] sources = [ "${distributedfile_path}/frameworks/js/napi/src/event_agent.cpp", "${distributedfile_path}/frameworks/js/napi/src/send_file.cpp", "${distributedfile_path}/frameworks/js/napi/src/sendfile_napi.cpp", "${distributedfile_path}/frameworks/js/napi/src/trans_event.cpp", "${distributedfile_path}/frameworks/native/src/dfs_filetransfer_callback.cpp", "${distributedfile_path}/frameworks/native/src/filetransfer_callback_proxy.cpp", "${distributedfile_path}/frameworks/native/src/filetransfer_callback_stub.cpp", ] defines = [ "LOG_TAG=\"distributedfile_napi\"", "LOG_DOMAIN=0xD001600", "LOG_LEVEL=INFO", ] deps = [ "${distributedfile_path}/interfaces/innerkits/native:libdistributedfile_innerkits", "${utils_path}:libdistributedfileutils", "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native", "//foundation/ace/napi:ace_napi", "//foundation/distributeddatamgr/distributedfile/utils/filemgmt_libn:filemgmt_libn", "//utils/native/base:utilsecurec", ] external_deps = [ "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr_standard:samgr_common", "samgr_standard:samgr_proxy", ] cflags_cc = [ "-Wno-unused-function" ] relative_install_dir = "module" subsystem_name = "filemanagement" part_name = "dfs_service" } group("build_kits_js") { deps = [ ":sendfile" ] }