• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("../../adapter/common/net/bluetooth/net_bluetooth.gni")
14import("../../dsoftbus.gni")
15
16br_adapter_src =
17    [ "$dsoftbus_root_path/core/adapter/br/mock/wrapper_br_interface.c" ]
18
19br_adapter_inc = [ "$dsoftbus_root_path/core/adapter/br/include" ]
20
21bus_center_core_adapter_src = [
22  "$dsoftbus_root_path/core/adapter/bus_center/src/bus_center_adapter.c",
23  "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_deviceinfo_to_profile_virtual.c",
24  "$dsoftbus_root_path/core/adapter/transmission/src/data_bus_native_virtual.c",
25  "$dsoftbus_root_path/core/adapter/authentication/src/lnn_extdata_config_virtual.c",
26]
27bus_center_core_adapter_inc = [ "$dsoftbus_root_path/adapter/common/include" ]
28bus_center_core_adapter_deps = [ "$dsoftbus_dfx_path:softbus_dfx" ]
29bus_center_core_adapter_external_deps = [ "init:libbegetutil" ]
30
31if (dsoftbus_feature_lnn_cloud_sync) {
32  bus_center_core_adapter_external_deps += [ "kv_store:distributeddata_inner" ]
33  bus_center_core_adapter_src += [
34    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_kv_adapter_wrapper.cpp",
35    "$dsoftbus_root_path/core/adapter/kv_store/src/lnn_kv_adapter.cpp",
36    "$dsoftbus_root_path/core/adapter/kv_store/src/lnn_kv_data_change_listener.cpp",
37    "$dsoftbus_root_path/core/adapter/subscribe_kv_store_sa/src/lnn_kv_store_launch_listener.cpp",
38  ]
39  bus_center_core_adapter_inc += [
40    "$dsoftbus_root_path/core/adapter/kv_store/include",
41    "$dsoftbus_root_path/core/adapter/subscribe_kv_store_sa/include",
42  ]
43} else {
44  bus_center_core_adapter_src += [ "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_kv_adapter_wrapper_virtual.cpp" ]
45}
46
47if (defined(ohos_lite)) {
48  bus_center_core_adapter_src += [
49    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp",
50    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_virtual.cpp",
51    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp",
52    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_sa_status_monitor_virtual.cpp",
53  ]
54  bus_center_core_adapter_inc += [
55    "$dsoftbus_root_path/core/adapter/bus_center/include",
56    "$dsoftbus_root_path/interfaces/kits/lnn",
57    "$dsoftbus_root_path/core/bus_center/utils/include",
58    "//base/startup/init/interfaces/innerkits/include/syspara",
59  ]
60
61  bus_center_core_adapter_deps +=
62      [ "//base/startup/init/interfaces/innerkits:libbegetutil" ]
63
64  if (dsoftbus_feature_encrypt == 0) {
65    bus_center_core_adapter_src += [
66      "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt_virtual.c",
67    ]
68    bus_center_core_adapter_inc +=
69        [ "$dsoftbus_root_path/core/adapter/huks/include" ]
70  } else if (dsoftbus_feature_encrypt == 1) {
71    bus_center_core_adapter_src +=
72        [ "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt.c" ]
73    bus_center_core_adapter_inc +=
74        [ "$dsoftbus_root_path/core/adapter/huks/include" ]
75    bus_center_core_adapter_external_deps += [
76      "huks:libhukssdk",
77      "openssl:libcrypto_shared",
78    ]
79  }
80} else {
81  if (!dsoftbus_get_devicename) {
82    bus_center_core_adapter_src += [ "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp" ]
83    bus_center_core_adapter_inc +=
84        [ "$dsoftbus_root_path/core/adapter/bus_center/include" ]
85  } else {
86    bus_center_core_adapter_src += [ "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor.cpp" ]
87
88    bus_center_core_adapter_inc += [
89      "$dsoftbus_root_path/interfaces/kits/lnn",
90      "$dsoftbus_root_path/adapter/common/bus_center/include",
91      "$dsoftbus_root_path/core/adapter/bus_center/include",
92    ]
93
94    bus_center_core_adapter_external_deps += [
95      "ability_base:want",
96      "ability_base:zuri",
97      "ability_runtime:abilitykit_native",
98      "ability_runtime:dataobs_manager",
99      "data_share:datashare_common",
100      "data_share:datashare_consumer",
101      "relational_store:native_dataability",
102      "relational_store:native_rdb",
103    ]
104  }
105  if (softbus_os_account) {
106    bus_center_core_adapter_src += [
107      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account.cpp",
108      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter.cpp",
109    ]
110    bus_center_core_adapter_external_deps += [
111      "os_account:libaccountkits",
112      "os_account:os_account_innerkits",
113    ]
114  } else {
115    bus_center_core_adapter_src += [
116      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_virtual.cpp",
117      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp",
118    ]
119  }
120  if (dsoftbus_feature_encrypt == 0) {
121    bus_center_core_adapter_src += [
122      "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt_virtual.c",
123    ]
124    bus_center_core_adapter_inc +=
125        [ "$dsoftbus_root_path/core/adapter/huks/include" ]
126  } else if (dsoftbus_feature_encrypt == 1) {
127    bus_center_core_adapter_src +=
128        [ "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt.c" ]
129    bus_center_core_adapter_inc +=
130        [ "$dsoftbus_root_path/core/adapter/huks/include" ]
131    bus_center_core_adapter_external_deps += [
132      "huks:libhukssdk",
133      "openssl:libcrypto_shared",
134    ]
135  }
136  if (dsoftbus_feature_lnn_usb_ncm && dsoftbus_feature_deps_usb_manager) {
137    bus_center_core_adapter_src += [
138      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_usb_adapter.cpp",
139    ]
140    bus_center_core_adapter_inc += [ "$dsoftbus_root_path/interfaces/kits/lnn" ]
141    bus_center_core_adapter_external_deps += [ "usb_manager:usbsrv_client" ]
142  } else {
143    bus_center_core_adapter_src += [ "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_usb_adapter_virtual.cpp" ]
144  }
145  bus_center_core_adapter_src += [
146    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_sa_status_monitor.cpp",
147  ]
148}
149