# 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("//build/ohos.gni") import("//build/ohos_var.gni") import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni") config("module_public_config") { visibility = [ ":*" ] include_dirs = [ ".", "strategies", "common", "data", "dfx", "../../adapter/include", "../../app/src", "../../framework/include", "${datashare_path}/frameworks/native/common/include", "${datashare_path}/interfaces/inner_api/common/include", "${datashare_path}/interfaces/inner_api/consumer/include", "../common", "../crypto/include", "../permission/include", ] } group("build_module") { deps = [ ":data_share_service" ] } ohos_shared_library("data_share_service") { branch_protector_ret = "pac_ret" sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = [ "${data_service_path}/service/common/xcollie.cpp", "common/app_connect_manager.cpp", "common/base64_utils.cpp", "common/bundle_mgr_proxy.cpp", "common/db_delegate.cpp", "common/div_strategy.cpp", "common/extension_ability_manager.cpp", "common/extension_connect_adaptor.cpp", "common/extension_mgr_proxy.cpp", "common/kv_delegate.cpp", "common/rdb_delegate.cpp", "common/scheduler_manager.cpp", "common/seq_strategy.cpp", "common/uri_utils.cpp", "data/published_data.cpp", "data/resultset_json_formatter.cpp", "data/template_data.cpp", "data_provider_config.cpp", "data_share_db_config.cpp", "data_share_obs_proxy.cpp", "data_share_profile_config.cpp", "data_share_service_impl.cpp", "data_share_service_stub.cpp", "data_share_silent_config.cpp", "data_share_types_util.cpp", "dfx/hiview_adapter.cpp", "dfx/hiview_fault_adapter.cpp", "strategies/data_proxy/load_config_from_data_proxy_node_strategy.cpp", "strategies/data_share/load_config_from_data_share_bundle_info_strategy.cpp", "strategies/general/check_is_data_proxy_strategy.cpp", "strategies/general/check_is_single_app_strategy.cpp", "strategies/general/cross_permission_strategy.cpp", "strategies/general/load_config_common_strategy.cpp", "strategies/general/load_config_data_info_strategy.cpp", "strategies/general/load_config_from_bundle_info_strategy.cpp", "strategies/general/permission_strategy.cpp", "strategies/get_data_strategy.cpp", "strategies/publish_strategy.cpp", "strategies/rdb_notify_strategy.cpp", "strategies/subscribe_strategy.cpp", "strategies/template_strategy.cpp", "subscriber_managers/published_data_subscriber_manager.cpp", "subscriber_managers/rdb_subscriber_manager.cpp", "sys_event_subscriber.cpp", ] cflags = [ "-Wno-multichar", "-D_LIBCPP_HAS_COND_CLOCKWAIT", ] cflags_cc = [ "-fvisibility=hidden" ] configs = [ ":module_public_config" ] deps = [ "../../adapter:distributeddata_adapter", "../../adapter/utils:distributeddata_utils_static", "../../framework:distributeddatasvcfwk", "../../service:distributeddatasvc", ] external_deps = [ "ability_base:base", "ability_base:want", "ability_base:zuri", "ability_runtime:dataobs_manager", "ability_runtime:extension_manager", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_common", "device_manager:devicemanagersdk", "hicollie:libhicollie", "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", "json:nlohmann_json_static", "kv_store:distributeddb", "relational_store:native_rdb", "relational_store:rdb_data_share_adapter", "resource_management:global_resmgr", "samgr:samgr_proxy", "time_service:time_client", ] subsystem_name = "distributeddatamgr" part_name = "datamgr_service" }