1# Copyright (c) 2021 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/filemanagement/dfs_service/distributedfile.gni") 16 17ohos_shared_library("sendfile") { 18 include_dirs = [ 19 "//third_party/libuv/include", 20 "//third_party/node/src", 21 "//foundation/ace/napi/interfaces/kits", 22 "${distributedfile_path}/interfaces/innerkits/native", 23 "${distributedfile_path}/frameworks/native/include", 24 "${distributedfile_path}/frameworks/js/napi/include", 25 "${distributedfile_path}/utils/log/include", 26 "${services_path}/distributedfileservice/include/ipc", 27 "//foundation/communication/ipc/interfaces/innerkits/libdbinder/include", 28 "//foundation/distributedschedule/samgr/services/samgr/native/include", 29 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", 30 "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include", 31 "//foundation/distributeddatamgr/distributedfile/utils/filemgmt_libn/include", 32 ] 33 34 sources = [ 35 "${distributedfile_path}/frameworks/js/napi/src/event_agent.cpp", 36 "${distributedfile_path}/frameworks/js/napi/src/send_file.cpp", 37 "${distributedfile_path}/frameworks/js/napi/src/sendfile_napi.cpp", 38 "${distributedfile_path}/frameworks/js/napi/src/trans_event.cpp", 39 "${distributedfile_path}/frameworks/native/src/dfs_filetransfer_callback.cpp", 40 "${distributedfile_path}/frameworks/native/src/filetransfer_callback_proxy.cpp", 41 "${distributedfile_path}/frameworks/native/src/filetransfer_callback_stub.cpp", 42 ] 43 44 defines = [ 45 "LOG_TAG=\"distributedfile_napi\"", 46 "LOG_DOMAIN=0xD001600", 47 "LOG_LEVEL=INFO", 48 ] 49 50 deps = [ 51 "${distributedfile_path}/interfaces/innerkits/native:libdistributedfile_innerkits", 52 "${utils_path}:libdistributedfileutils", 53 "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native", 54 "//foundation/ace/napi:ace_napi", 55 "//foundation/distributeddatamgr/distributedfile/utils/filemgmt_libn:filemgmt_libn", 56 "//utils/native/base:utilsecurec", 57 ] 58 59 external_deps = [ 60 "hiviewdfx_hilog_native:libhilog", 61 "ipc:ipc_core", 62 "samgr_standard:samgr_common", 63 "samgr_standard:samgr_proxy", 64 ] 65 66 cflags_cc = [ "-Wno-unused-function" ] 67 68 relative_install_dir = "module" 69 subsystem_name = "filemanagement" 70 part_name = "dfs_service" 71} 72 73group("build_kits_js") { 74 deps = [ ":sendfile" ] 75} 76