# 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/app_file_service/app_file_service.gni") import("//foundation/filemanagement/app_file_service/backup.gni") ohos_shared_library("fileshare") { branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true cfi = true cfi_cross_dso = true debug = false } include_dirs = [ ".", "../../common/include", "${app_file_service_path}/interfaces/innerkits/native/file_share/include", ] sources = [ "../../common/src/json_utils.cpp", "../../common/src/sandbox_helper.cpp", "../../innerkits/native/file_share/src/file_permission.cpp", "file_share/fileshare_n_exporter.cpp", "file_share/grant_permissions.cpp", "file_share/grant_uri_permission.cpp", ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:abilitykit_native", "ability_runtime:extensionkit_native", "ability_runtime:uri_permission_mgr", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_common", "data_share:datashare_consumer", "file_api:filemgmt_libhilog", "file_api:filemgmt_libn", "file_api:remote_uri_native", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", ] defines = [] if (sandbox_manarer) { external_deps += [ "sandbox_manager:libsandbox_manager_sdk" ] defines += [ "SANDBOX_MANAGER", "ABILITY_RUNTIME_FEATURE_SANDBOXMANAGER", ] } relative_install_dir = "module" part_name = "app_file_service" subsystem_name = "filemanagement" } ohos_shared_library("fileuri") { branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true cfi = true cfi_cross_dso = true debug = false } include_dirs = [ ".", "../../common/include", "${app_file_service_path}/interfaces/innerkits/native/file_uri/include", ] sources = [ "../../common/src/common_func.cpp", "../../common/src/sandbox_helper.cpp", "file_uri/file_uri_n_exporter.cpp", "file_uri/get_uri_from_path.cpp", "file_uri/module.cpp", "file_uri/prop_n_exporter.cpp", ] deps = [ "${app_file_service_path}/interfaces/innerkits/native:fileuri_native" ] external_deps = [ "ability_base:zuri", "ability_runtime:abilitykit_native", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "file_api:filemgmt_libhilog", "file_api:filemgmt_libn", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "samgr:samgr_proxy", ] use_exceptions = true relative_install_dir = "module/file" part_name = "app_file_service" subsystem_name = "filemanagement" } ohos_shared_library("backup") { branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true cfi = true cfi_cross_dso = true debug = false } relative_install_dir = "module/file" subsystem_name = "filemanagement" part_name = "app_file_service" include_dirs = [ "${path_napi}/interfaces/kits" ] defines = [ "LOG_DOMAIN=0xD004306", "LOG_TAG=\"BackupNAPI\"", ] sources = [ "${path_backup_js}/backup/general_callbacks.cpp", "${path_backup_js}/backup/module.cpp", "${path_backup_js}/backup/prop_n_exporter.cpp", "${path_backup_js}/backup/prop_n_operation.cpp", "${path_backup_js}/backup/session_backup_n_exporter.cpp", "${path_backup_js}/backup/session_incremental_backup_n_exporter.cpp", "${path_backup_js}/backup/session_restore_n_exporter.cpp", ] deps = [ "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", "${path_backup}/utils:backup_utils", "${path_jsoncpp}:jsoncpp", ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", "file_api:filemgmt_libhilog", "file_api:filemgmt_libn", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", ] }