# Copyright (C) 2023 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("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") import("//build/ohos.gni") import("//build/ohos/ace/ace.gni") import("//commonlibrary/memory_utils/purgeable_mem_config.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") import("//foundation/arkui/ace_engine/ace_config.gni") import("//foundation/multimedia/media_library/media_library.gni") ohos_shared_library("mediabackup") { include_dirs = [ "./include", "./include/log", "./include/restore", "./include/report", "${MEDIALIB_CLOUD_SYNC_PATH}/include", "${MEDIALIB_INTERFACES_PATH}/inner_api/media_library_helper/include", "${MEDIALIB_INTERFACES_PATH}/kits/js/include", "${MEDIALIB_UTILS_PATH}/include", "${MEDIALIB_INNERKITS_PATH}/media_library_helper/include", "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension/include", "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension/include/config", "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension/include/event_handler", "${MEDIALIB_SERVICES_PATH}/media_scanner/src/scanner/include", ] sources = [ "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension/src/event_handler/album_plugin_table_event_handler.cpp", "./src/backup_database_helper.cpp", "./src/backup_database_utils.cpp", "./src/backup_dfx_utils.cpp", "./src/backup_file_utils.cpp", "./src/backup_restore_service.cpp", "./src/base_restore.cpp", "./src/burst_key_generator.cpp", "./src/clone_restore.cpp", "./src/log/backup_hi_audit.cpp", "./src/log/backup_hi_audit_helper.cpp", "./src/log/backup_log_utils.cpp", "./src/log/backup_zip_util.cpp", "./src/medialibrary_backup_napi.cpp", "./src/native_module_ohos_medialibrary_backup.cpp", "./src/others_clone_restore.cpp", "./src/report/database_report.cpp", "./src/report/external_files_count_statistic.cpp", "./src/report/gallery_media_count_statistic.cpp", "./src/report/photos_count_statistic.cpp", "./src/report/upgrade_restore_gallery_media_task.cpp", "./src/report/upgrade_restore_task_report.cpp", "./src/restore/db_upgrade_utils.cpp", "./src/restore/gallery_db_upgrade.cpp", "./src/restore/gallery_media_dao.cpp", "./src/restore/media_library_db_upgrade.cpp", "./src/restore/photo_album_clone.cpp", "./src/restore/photo_album_dao.cpp", "./src/restore/photo_album_restore.cpp", "./src/restore/photos_clone.cpp", "./src/restore/photos_dao.cpp", "./src/restore/photos_restore.cpp", "./src/restore/tab_old_photos_restore.cpp", "./src/upgrade_restore.cpp", ] ldflags = [ "-Wl" ] deps = [ "${MEDIALIB_INNERKITS_PATH}/media_library_helper:media_library", "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension:medialibrary_data_extension", "${MEDIALIB_INTERFACES_PATH}/kits/js:medialibrary_nutils", ] external_deps = [ "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:app_context", "ability_runtime:napi_base_context", "ability_runtime:runtime", "bundle_framework:appexecfwk_core", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "kv_store:distributeddata_inner", "libxml2:libxml2", "napi:ace_napi", "player_framework:media_client", "relational_store:native_rdb", "relational_store:rdb_data_share_adapter", "zlib:shared_libz", ] public_external_deps = [ "e2fsprogs:libext2_uuid" ] defines = [] if (defined(global_parts_info) && defined(global_parts_info.filemanagement_dfs_service)) { defines += [ "CLOUD_SYNC_MANAGER" ] external_deps += [ "dfs_service:cloudsync_kit_inner" ] } sanitize = { cfi = true cfi_cross_dso = true debug = false } relative_install_dir = "module/multimedia" subsystem_name = "multimedia" part_name = "media_library" }