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