# 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("//build/ohos_var.gni") import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni") group("build_module") { deps = [ ":distributeddataservice" ] if (build_public_version) { deps += [ ":distributeddata_profile" ] deps += [ ":distributed_data.cfg" ] } } ohos_prebuilt_etc("distributed_data.cfg") { source = "distributed_data.cfg" relative_install_dir = "init" subsystem_name = "distributeddatamgr" part_name = "datamgr_service" } ohos_sa_profile("distributeddata_profile") { sources = [ "../sa_profile/1301.json" ] part_name = "datamgr_service" } config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "${kv_store_common_path}", "${kv_store_path}/frameworks/innerkitsimpl/distributeddatafwk/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/bootstrap/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/config/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/crypto/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/directory/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/permission/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/matrix/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/session_manager", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/backup/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/kvdb", "${device_manager_path}/interfaces/inner_kits/native_cpp/include", "${distributedfilejs_path}/interfaces/kits/js/src/mod_securitylabel", "../adapter/include/account", "../adapter/include/permission", "../adapter/include/uninstaller", "../adapter/include/broadcaster", "../adapter/include/utils", "../adapter/include/dfx", "../adapter/include", # for ipc_core interfaces. "include", "src", "src/security", "src/backup_rule/include", "//third_party/json/single_include", ] cflags = [ "-Wno-multichar" ] cflags_cc = [ "-fvisibility=hidden" ] } ohos_shared_library("distributeddataservice") { sources = [ "src/dump_helper.cpp", "src/feature_stub_impl.cpp", "src/kvstore_account_observer.cpp", "src/kvstore_data_service.cpp", "src/kvstore_device_listener.cpp", "src/kvstore_meta_manager.cpp", "src/security/security.cpp", "src/security/sensitive.cpp", "src/session_manager/route_head_handler_impl.cpp", "src/session_manager/session_manager.cpp", "src/session_manager/upgrade_manager.cpp", "src/task_manager.cpp", ] if (datamgr_service_power) { variable_sources = [ "src/backup_rule/src/charging.cpp", "src/backup_rule/src/screen_off.cpp", ] sources += variable_sources } configs = [ ":module_private_config" ] deps = [ "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/broadcaster:distributeddata_broadcaster_static", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/utils:distributeddata_utils_static", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/checker:distributeddata_checker_static", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/flowctrl_manager:distributeddata_flowctrl_static", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/uninstaller:distributeddata_uninstaller_static", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework:distributeddatasvcfwk", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service:distributeddatasvc", ] external_deps = [ "ability_base:base", "ability_base:want", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "dataclassification:data_transit_mgr", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "kv_store:distributeddb", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (datamgr_service_power) { external_deps += [ "battery_manager:batterysrv_client", "power_manager:powermgr_client", ] defines = [ "SUPPORT_POWER" ] } subsystem_name = "distributeddatamgr" part_name = "datamgr_service" defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] }