1# Copyright (c) 2023 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.
13import("//build/ohos.gni")
14import("//build/ohos_var.gni")
15import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni")
16config("module_public_config") {
17  visibility = [ ":*" ]
18  include_dirs = [
19    ".",
20    "strategies",
21    "common",
22    "data",
23    "dfx",
24    "../../adapter/include",
25    "../../app/src",
26    "../../framework/include",
27    "${datashare_path}/frameworks/native/common/include",
28    "${datashare_path}/interfaces/inner_api/common/include",
29    "${datashare_path}/interfaces/inner_api/consumer/include",
30    "../common",
31    "../crypto/include",
32    "../permission/include",
33  ]
34}
35group("build_module") {
36  deps = [ ":data_share_service" ]
37}
38ohos_shared_library("data_share_service") {
39  branch_protector_ret = "pac_ret"
40  sanitize = {
41    ubsan = true
42    boundary_sanitize = true
43    cfi = true
44    cfi_cross_dso = true
45    debug = false
46  }
47  sources = [
48    "${data_service_path}/service/common/xcollie.cpp",
49    "common/app_connect_manager.cpp",
50    "common/base64_utils.cpp",
51    "common/bundle_mgr_proxy.cpp",
52    "common/db_delegate.cpp",
53    "common/div_strategy.cpp",
54    "common/extension_ability_manager.cpp",
55    "common/extension_connect_adaptor.cpp",
56    "common/extension_mgr_proxy.cpp",
57    "common/kv_delegate.cpp",
58    "common/rdb_delegate.cpp",
59    "common/scheduler_manager.cpp",
60    "common/seq_strategy.cpp",
61    "common/uri_utils.cpp",
62    "data/published_data.cpp",
63    "data/resultset_json_formatter.cpp",
64    "data/template_data.cpp",
65    "data_provider_config.cpp",
66    "data_share_db_config.cpp",
67    "data_share_obs_proxy.cpp",
68    "data_share_profile_config.cpp",
69    "data_share_service_impl.cpp",
70    "data_share_service_stub.cpp",
71    "data_share_silent_config.cpp",
72    "data_share_types_util.cpp",
73    "dfx/hiview_adapter.cpp",
74    "dfx/hiview_fault_adapter.cpp",
75    "strategies/data_proxy/load_config_from_data_proxy_node_strategy.cpp",
76    "strategies/data_share/load_config_from_data_share_bundle_info_strategy.cpp",
77    "strategies/general/check_is_data_proxy_strategy.cpp",
78    "strategies/general/check_is_single_app_strategy.cpp",
79    "strategies/general/cross_permission_strategy.cpp",
80    "strategies/general/load_config_common_strategy.cpp",
81    "strategies/general/load_config_data_info_strategy.cpp",
82    "strategies/general/load_config_from_bundle_info_strategy.cpp",
83    "strategies/general/permission_strategy.cpp",
84    "strategies/get_data_strategy.cpp",
85    "strategies/publish_strategy.cpp",
86    "strategies/rdb_notify_strategy.cpp",
87    "strategies/subscribe_strategy.cpp",
88    "strategies/template_strategy.cpp",
89    "subscriber_managers/published_data_subscriber_manager.cpp",
90    "subscriber_managers/rdb_subscriber_manager.cpp",
91    "sys_event_subscriber.cpp",
92  ]
93  cflags = [
94    "-Wno-multichar",
95    "-D_LIBCPP_HAS_COND_CLOCKWAIT",
96  ]
97
98  cflags_cc = [ "-fvisibility=hidden" ]
99
100  configs = [ ":module_public_config" ]
101
102  deps = [
103    "../../adapter:distributeddata_adapter",
104    "../../adapter/utils:distributeddata_utils_static",
105    "../../framework:distributeddatasvcfwk",
106    "../../service:distributeddatasvc",
107  ]
108
109  external_deps = [
110    "ability_base:base",
111    "ability_base:want",
112    "ability_base:zuri",
113    "ability_runtime:dataobs_manager",
114    "ability_runtime:extension_manager",
115    "ability_runtime:wantagent_innerkits",
116    "access_token:libaccesstoken_sdk",
117    "access_token:libtokenid_sdk",
118    "bundle_framework:appexecfwk_base",
119    "bundle_framework:appexecfwk_core",
120    "c_utils:utils",
121    "common_event_service:cesfwk_innerkits",
122    "data_share:datashare_common",
123    "device_manager:devicemanagersdk",
124    "hicollie:libhicollie",
125    "hilog:libhilog",
126    "hisysevent:libhisysevent",
127    "ipc:ipc_core",
128    "json:nlohmann_json_static",
129    "kv_store:distributeddb",
130    "relational_store:native_rdb",
131    "relational_store:rdb_data_share_adapter",
132    "resource_management:global_resmgr",
133    "samgr:samgr_proxy",
134    "time_service:time_client",
135  ]
136  subsystem_name = "distributeddatamgr"
137
138  part_name = "datamgr_service"
139}
140