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/app_file_service/app_file_service.gni") 16import("//foundation/filemanagement/app_file_service/backup.gni") 17 18ohos_shared_library("remotefileshare") { 19 include_dirs = [ 20 "${path_napi}/interfaces/kits", 21 "//third_party/bounds_checking_function/include", 22 ] 23 24 sources = [ 25 "remote_file_share/remotefileshare_n_exporter.cpp", 26 "remote_file_share/remotefileshare_napi.cpp", 27 ] 28 29 deps = [ "${third_party_path}/bounds_checking_function:libsec_shared" ] 30 31 external_deps = [ 32 "file_api:filemgmt_libhilog", 33 "file_api:filemgmt_libn", 34 "hilog:libhilog", 35 "napi:ace_napi", 36 ] 37 38 relative_install_dir = "module" 39 40 part_name = "app_file_service" 41 subsystem_name = "filemanagement" 42} 43 44ohos_shared_library("fileshare") { 45 include_dirs = [ 46 ".", 47 "../../common/include", 48 ] 49 50 sources = [ 51 "file_share/fileshare_n_exporter.cpp", 52 "file_share/grant_uri_permission.cpp", 53 ] 54 55 external_deps = [ 56 "ability_base:want", 57 "ability_base:zuri", 58 "ability_runtime:abilitykit_native", 59 "ability_runtime:uri_permission_mgr", 60 "access_token:libtokenid_sdk", 61 "c_utils:utils", 62 "common_event_service:cesfwk_innerkits", 63 "data_share:datashare_common", 64 "data_share:datashare_consumer", 65 "file_api:filemgmt_libhilog", 66 "file_api:filemgmt_libn", 67 "file_api:remote_uri_native", 68 "hilog:libhilog", 69 "ipc:ipc_core", 70 "napi:ace_napi", 71 ] 72 73 relative_install_dir = "module" 74 75 part_name = "app_file_service" 76 subsystem_name = "filemanagement" 77} 78 79ohos_shared_library("fileuri") { 80 include_dirs = [ 81 ".", 82 "../../common/include", 83 "${app_file_service_path}/interfaces/innerkits/native/file_uri/include", 84 ] 85 86 sources = [ 87 "../../common/src/common_func.cpp", 88 "../../common/src/sandbox_helper.cpp", 89 "file_uri/file_uri_n_exporter.cpp", 90 "file_uri/get_uri_from_path.cpp", 91 "file_uri/module.cpp", 92 "file_uri/prop_n_exporter.cpp", 93 ] 94 95 deps = 96 [ "${app_file_service_path}/interfaces/innerkits/native:fileuri_native" ] 97 98 external_deps = [ 99 "ability_base:zuri", 100 "ability_runtime:abilitykit_native", 101 "bundle_framework:appexecfwk_base", 102 "bundle_framework:appexecfwk_core", 103 "c_utils:utils", 104 "file_api:filemgmt_libhilog", 105 "file_api:filemgmt_libn", 106 "hilog:libhilog", 107 "ipc:ipc_core", 108 "napi:ace_napi", 109 "samgr:samgr_proxy", 110 ] 111 112 use_exceptions = true 113 114 relative_install_dir = "module/file" 115 116 part_name = "app_file_service" 117 subsystem_name = "filemanagement" 118} 119 120ohos_shared_library("backup") { 121 relative_install_dir = "module/file" 122 subsystem_name = "filemanagement" 123 part_name = "app_file_service" 124 125 include_dirs = [ "${path_napi}/interfaces/kits" ] 126 127 sources = [ 128 "${path_backup_js}/backup/local_capabilities.cpp", 129 "${path_backup_js}/backup/module.cpp", 130 "${path_backup_js}/backup/prop_n_exporter.cpp", 131 "${path_backup_js}/backup/session_backup_n_exporter.cpp", 132 "${path_backup_js}/backup/session_restore_n_exporter.cpp", 133 ] 134 135 deps = [ 136 "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", 137 "${path_backup}/utils:backup_utils", 138 "${path_jsoncpp}:jsoncpp", 139 ] 140 141 external_deps = [ 142 "c_utils:utils", 143 "file_api:filemgmt_libhilog", 144 "file_api:filemgmt_libn", 145 "hilog:libhilog", 146 "ipc:ipc_core", 147 "napi:ace_napi", 148 ] 149} 150