1# Copyright (c) 2022 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("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni")
15
16config("module_public_config") {
17  visibility = [ ":*" ]
18
19  include_dirs = [
20    "${data_service_path}/framework/include",
21    "${data_service_path}/adapter/include/communicator",
22    "${data_service_path}/adapter/include/dfx",
23    "${data_service_path}/service/udmf/lifecycle",
24    "${data_service_path}/service/udmf/permission",
25    "${data_service_path}/service/udmf/preprocess",
26    "${data_service_path}/service/udmf/store",
27    "${data_service_path}/service/udmf/utd",
28    "${data_service_path}/service/udmf",
29    "${data_service_path}/service/bootstrap/include",
30    "${kv_store_path}/interfaces/innerkits/distributeddata/include",
31    "${kv_store_path}/framework/libs/distributeddb/interfaces/include",
32    "${kv_store_common_path}",
33    "${udmf_path}/framework/common",
34    "${udmf_path}/interfaces/innerkits/common",
35    "${udmf_path}/interfaces/innerkits/data",
36  ]
37}
38
39ohos_shared_library("udmf_server") {
40  branch_protector_ret = "pac_ret"
41  sanitize = {
42    ubsan = true
43    boundary_sanitize = true
44    cfi = true
45    cfi_cross_dso = true
46    debug = false
47  }
48  sources = [
49    "lifecycle/clean_on_startup.cpp",
50    "lifecycle/clean_on_timeout.cpp",
51    "lifecycle/lifecycle_manager.cpp",
52    "lifecycle/lifecycle_policy.cpp",
53    "permission/checker_manager.cpp",
54    "permission/data_checker.cpp",
55    "permission/uri_permission_manager.cpp",
56    "preprocess/preprocess_utils.cpp",
57    "store/runtime_store.cpp",
58    "store/store_cache.cpp",
59    "udmf_service_impl.cpp",
60    "udmf_service_stub.cpp",
61  ]
62
63  configs = [ ":module_public_config" ]
64
65  cflags = [ "-D_LIBCPP_HAS_COND_CLOCKWAIT" ]
66
67  deps = [
68    "${data_service_path}/adapter:distributeddata_adapter",
69    "${data_service_path}/framework:distributeddatasvcfwk",
70    "${data_service_path}/service:distributeddatasvc",
71  ]
72
73  external_deps = [
74    "ability_base:zuri",
75    "ability_runtime:uri_permission_mgr",
76    "access_token:libaccesstoken_sdk",
77    "access_token:libtokenid_sdk",
78    "app_file_service:remote_file_share_native",
79    "bundle_framework:appexecfwk_base",
80    "bundle_framework:appexecfwk_core",
81    "c_utils:utils",
82    "hilog:libhilog",
83    "hisysevent:libhisysevent",
84    "ipc:ipc_core",
85    "kv_store:distributeddb",
86    "safwk:system_ability_fwk",
87    "samgr:samgr_proxy",
88    "udmf:udmf_client",
89    "udmf:utd_client",
90  ]
91  cflags_cc = [ "-fvisibility=hidden" ]
92  subsystem_name = "distributeddatamgr"
93
94  part_name = "datamgr_service"
95}
96