1# Copyright (c) 2022 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/storage_service/storage_service_aafwk.gni") 16 17ohos_shared_library("storagestatistics") { 18 stack_protector_ret = true 19 sanitize = { 20 integer_overflow = true 21 ubsan = true 22 boundary_sanitize = true 23 cfi = true 24 cfi_cross_dso = true 25 debug = false 26 } 27 28 relative_install_dir = "module/file" 29 subsystem_name = "filemanagement" 30 part_name = "storage_service" 31 32 defines = [ 33 "STORAGE_LOG_TAG = \"StorageManager\"", 34 "LOG_DOMAIN = 0xD004300", 35 ] 36 37 include_dirs = [ 38 "include", 39 "${storage_service_path}/services/storage_manager/include", 40 "${storage_service_path}/interfaces/innerkits/storage_manager/native", 41 "${storage_service_path}/services/common/include", 42 ] 43 44 sources = [ 45 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_manager_connect.cpp", 46 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_statistics_n_exporter.cpp", 47 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_statistics_napi.cpp", 48 ] 49 50 deps = [ "${storage_interface_path}/innerkits/storage_manager/native:storage_manager_sa_proxy" ] 51 52 external_deps = [ 53 "access_token:libtokenid_sdk", 54 "c_utils:utils", 55 "file_api:filemgmt_libhilog", 56 "file_api:filemgmt_libn", 57 "hilog:libhilog", 58 "ipc:ipc_core", 59 "napi:ace_napi", 60 "safwk:system_ability_fwk", 61 "samgr:samgr_proxy", 62 ] 63} 64 65ohos_shared_library("volumemanager") { 66 stack_protector_ret = true 67 sanitize = { 68 integer_overflow = true 69 ubsan = true 70 boundary_sanitize = true 71 cfi = true 72 cfi_cross_dso = true 73 debug = false 74 } 75 76 relative_install_dir = "module/file" 77 subsystem_name = "filemanagement" 78 part_name = "storage_service" 79 80 include_dirs = [ 81 "include", 82 "${storage_service_path}/services/storage_manager/include", 83 "${storage_service_path}/interfaces/innerkits/storage_manager/native", 84 "${storage_service_path}/services/common/include", 85 ] 86 87 sources = [ 88 "${storage_service_path}/services/storage_manager/kits_impl/src/storage_manager_connect.cpp", 89 "${storage_service_path}/services/storage_manager/kits_impl/src/volumemanager_n_exporter.cpp", 90 "${storage_service_path}/services/storage_manager/kits_impl/src/volumemanager_napi.cpp", 91 ] 92 93 defines = [ 94 "STORAGE_LOG_TAG = \"StorageManager\"", 95 "LOG_DOMAIN = 0xD004300", 96 ] 97 98 deps = [ "${storage_interface_path}/innerkits/storage_manager/native:storage_manager_sa_proxy" ] 99 100 external_deps = [ 101 "access_token:libtokenid_sdk", 102 "c_utils:utils", 103 "file_api:filemgmt_libhilog", 104 "file_api:filemgmt_libn", 105 "hilog:libhilog", 106 "ipc:ipc_core", 107 "napi:ace_napi", 108 "safwk:system_ability_fwk", 109 "samgr:samgr_proxy", 110 ] 111} 112 113group("storage_js") { 114 deps = [ 115 ":storagestatistics", 116 ":volumemanager", 117 ] 118} 119