1# Copyright (c) 2021 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")
15ohos_static_library("distributeddata_communicator_static") {
16  branch_protector_ret = "pac_ret"
17  sanitize = {
18    cfi = true
19    cfi_cross_dso = true
20    debug = false
21    boundary_sanitize = true
22    ubsan = true
23  }
24  sources = [
25    "src/app_pipe_handler.cpp",
26    "src/app_pipe_handler.h",
27    "src/app_pipe_mgr.cpp",
28    "src/app_pipe_mgr.h",
29    "src/ark_communication_provider.cpp",
30    "src/ark_communication_provider.h",
31    "src/communication_provider.cpp",
32    "src/communication_provider_impl.cpp",
33    "src/communication_provider_impl.h",
34    "src/communicator_context.cpp",
35    "src/data_buffer.cpp",
36    "src/device_manager_adapter.cpp",
37    "src/process_communicator_impl.cpp",
38    "src/softbus_adapter.h",
39    "src/softbus_adapter_standard.cpp",
40    "src/softbus_client.cpp",
41    "src/softbus_client.h",
42  ]
43
44  include_dirs = [
45    "../include/communicator",
46    "../include/dfx",
47    "../include/log",
48    "../include/autils",
49    "../include/utils",
50    "${kv_store_common_path}",
51    "${kv_store_distributeddb_path}/interfaces/include",
52    "${kv_store_distributeddb_path}/include",
53    "${kv_store_distributeddb_path}/interfaces/include/relational",
54    "${kv_store_path}/interfaces/innerkits/distributeddata/include",
55    "${data_service_path}/framework/include",
56  ]
57
58  cflags_cc = [ "-fvisibility=hidden" ]
59
60  deps = [
61    "${data_service_path}/framework:distributeddatasvcfwk",
62    "../dfx:distributeddata_dfx_static",
63    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/utils:distributeddata_utils_static",
64  ]
65
66  external_deps = [
67    "c_utils:utils",
68    "device_manager:devicemanagersdk",
69    "dsoftbus:softbus_client",
70    "hilog:libhilog",
71    "ipc:ipc_core",
72    "netmanager_base:net_conn_manager_if",
73  ]
74
75  subsystem_name = "distributeddatamgr"
76  part_name = "datamgr_service"
77  defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
78}
79