• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/data_handler.cpp",
57    "preprocess/preprocess_utils.cpp",
58    "preprocess/udmf_dialog.cpp",
59    "store/runtime_store.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  defines = []
75
76  external_deps = [
77    "ability_base:zuri",
78    "ability_runtime:ability_manager",
79    "ability_runtime:uri_permission_mgr",
80    "ability_runtime:wantagent_innerkits",
81    "access_token:libaccesstoken_sdk",
82    "access_token:libtokenid_sdk",
83    "app_file_service:remote_file_share_native",
84    "bundle_framework:appexecfwk_base",
85    "bundle_framework:appexecfwk_core",
86    "c_utils:utils",
87    "hilog:libhilog",
88    "hisysevent:libhisysevent",
89    "hitrace:hitrace_meter",
90    "hitrace:libhitracechain",
91    "ipc:ipc_core",
92    "kv_store:distributeddb",
93    "safwk:system_ability_fwk",
94    "samgr:samgr_proxy",
95    "udmf:udmf_client",
96    "udmf:utd_client",
97  ]
98  cflags_cc = [ "-fvisibility=hidden" ]
99  subsystem_name = "distributeddatamgr"
100
101  part_name = "datamgr_service"
102
103  if (window_manager_use_sceneboard) {
104    external_deps += [ "window_manager:libwm_lite" ]
105    defines += [ "SCENE_BOARD_ENABLE" ]
106  } else {
107    external_deps += [ "window_manager:libwm" ]
108  }
109}
110