mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2025-02-26 06:18:10 +00:00
compile optimize
Signed-off-by: xiongjun_gitee <xiongjun28@huawei.com>
This commit is contained in:
parent
979b20abb4
commit
d61b1c1064
1
BUILD.gn
1
BUILD.gn
@ -11,7 +11,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
lite_component("dsoftbus") {
|
||||
|
@ -11,34 +11,53 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/adapter/common/net/bluetooth/net_bluetooth.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (enable_connection_ble == true || enable_discovery_ble == true) {
|
||||
net_bluetooth_src = adapter_ble_src
|
||||
net_bluetooth_inc = adapter_ble_inc
|
||||
net_bluetooth_deps = adapter_ble_deps
|
||||
} else {
|
||||
net_bluetooth_src = []
|
||||
net_bluetooth_inc = []
|
||||
net_bluetooth_deps = []
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
hilog_lite_include_path =
|
||||
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite"
|
||||
} else {
|
||||
hilog_lite_include_path =
|
||||
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits"
|
||||
}
|
||||
config("dsoftbus_adapter_common_interface") {
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
}
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
"$libsec_include_path",
|
||||
"//third_party/mbedtls/include",
|
||||
"//utils/native/base/include",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"//third_party/mbedtls/include",
|
||||
"//utils/native/base/include",
|
||||
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_adapter") {
|
||||
include_dirs = common_include
|
||||
include_dirs = common_include + net_bluetooth_inc
|
||||
include_dirs += [ "//kernel/liteos_m/kal/cmsis" ]
|
||||
cflags = [ "-Wall" ]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = [
|
||||
"$softbus_adapter_common/bus_center/platform/bus_center_adapter_weak.c",
|
||||
"$softbus_adapter_common/kernel/liteos_m/softbus_adapter_file.c",
|
||||
@ -48,15 +67,22 @@ if (defined(ohos_lite)) {
|
||||
"$softbus_adapter_common/mbedtls/softbus_adapter_crypto.c",
|
||||
"$softbus_adapter_config/spec_config/softbus_config_adapter.c",
|
||||
]
|
||||
sources += net_bluetooth_src
|
||||
deps = [ "//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite" ]
|
||||
deps += net_bluetooth_deps
|
||||
public_configs = [ ":dsoftbus_adapter_common_interface" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_adapter") {
|
||||
include_dirs = common_include
|
||||
include_dirs = common_include + net_bluetooth_inc
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
cflags_cc = [ "-fPIC" ]
|
||||
sources = [
|
||||
"$softbus_adapter_common/bus_center/platform/bus_center_adapter.c",
|
||||
"$softbus_adapter_common/kernel/liteos_a/softbus_adapter_file.c",
|
||||
@ -66,19 +92,18 @@ if (defined(ohos_lite)) {
|
||||
"$softbus_adapter_common/mbedtls/softbus_adapter_crypto.c",
|
||||
"$softbus_adapter_config/spec_config/softbus_config_adapter.c",
|
||||
]
|
||||
sources += net_bluetooth_src
|
||||
deps = [
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
|
||||
"//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
deps += [ "//third_party/mbedtls:mbedtls_shared" ]
|
||||
deps += net_bluetooth_deps
|
||||
public_configs = [ ":dsoftbus_adapter_common_interface" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("config_adapter_common") {
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
@ -95,6 +120,7 @@ if (defined(ohos_lite)) {
|
||||
"//third_party/mbedtls/include",
|
||||
"//utils/native/base/include",
|
||||
]
|
||||
include_dirs += net_bluetooth_inc
|
||||
sources = [
|
||||
"$softbus_adapter_common/bus_center/platform/bus_center_adapter.c",
|
||||
"$softbus_adapter_common/kernel/liteos_a/softbus_adapter_file.c",
|
||||
@ -104,10 +130,12 @@ if (defined(ohos_lite)) {
|
||||
"$softbus_adapter_common/mbedtls/softbus_adapter_crypto.c",
|
||||
"$softbus_adapter_config/spec_config/softbus_config_adapter.c",
|
||||
]
|
||||
sources += net_bluetooth_src
|
||||
deps = net_bluetooth_deps
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/components/mbedtls:mbedtls_shared",
|
||||
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
"//third_party/mbedtls:mbedtls_shared",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
public_configs = [ ":config_adapter_common" ]
|
||||
|
@ -1,170 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("bus_center_monitor_interface") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_bus_center_monitor") {
|
||||
sources = [
|
||||
"driver/lnn_driver_monitor_virtual.c",
|
||||
"driver/lnn_driver_request_virtual.c",
|
||||
"network/lnn_lwip_monitor.c",
|
||||
"network/lnn_netlink_monitor_virtual.c",
|
||||
"platform/lnn_product_monitor_virtual.c",
|
||||
"wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
]
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/adapter/kernel/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
"$hispark_pegasus_sdk_path/third_party/lwip_sack/include/lwip",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_monitor_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_bus_center_monitor") {
|
||||
sources = [ "network/lnn_lwip_monitor_virtual.c" ]
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
if (ohos_kernel_type == "linux") {
|
||||
sources += [
|
||||
"driver/lnn_driver_monitor_virtual.c",
|
||||
"driver/lnn_driver_request_virtual.c",
|
||||
"network/lnn_netlink_monitor.c",
|
||||
"platform/lnn_product_monitor_virtual.c",
|
||||
"wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
]
|
||||
}
|
||||
if (ohos_kernel_type == "liteos_a") {
|
||||
sources += [
|
||||
"network/lnn_netlink_monitor_virtual.c",
|
||||
"platform/lnn_product_monitor.c",
|
||||
"wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
]
|
||||
include_dirs += [
|
||||
"//drivers/adapter/uhdf/posix/include",
|
||||
"//drivers/framework/include/utils",
|
||||
"//drivers/framework/include/core",
|
||||
"//drivers/framework/ability/sbuf/include",
|
||||
]
|
||||
if (enable_dsoftbus_driver) {
|
||||
sources += [
|
||||
"driver/lnn_hdf_driver_monitor.c",
|
||||
"driver/lnn_hdf_driver_request.c",
|
||||
]
|
||||
include_dirs += [
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"//drivers/framework/core/shared/include",
|
||||
"//drivers/framework/include",
|
||||
"//drivers/framework/include/core",
|
||||
"//drivers/ability/sbuf/include",
|
||||
"//drivers/adapter/uhdf/posix/include",
|
||||
]
|
||||
deps += [
|
||||
"//drivers/adapter/uhdf/manager:hdf_core",
|
||||
"//drivers/adapter/uhdf/platform:hdf_platform",
|
||||
"//drivers/adapter/uhdf/posix:hdf_posix_osal",
|
||||
]
|
||||
} else {
|
||||
sources += [
|
||||
"driver/lnn_driver_monitor_virtual.c",
|
||||
"driver/lnn_driver_request_virtual.c",
|
||||
]
|
||||
}
|
||||
}
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_monitor_interface" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_bus_center_monitor") {
|
||||
sources = [
|
||||
"network/lnn_lwip_monitor_virtual.c",
|
||||
"network/lnn_netlink_monitor.c",
|
||||
"platform/lnn_product_monitor_virtual.c",
|
||||
"wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
]
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//utils/native/base/include",
|
||||
"//foundation/communication/wifi/interfaces/innerkits/native_cpp/wifi_standard/interfaces",
|
||||
"//foundation/communication/wifi/services/wifi_standard/wifi_framework/common/net_helper",
|
||||
]
|
||||
public_configs = [ ":bus_center_monitor_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want:want",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
if (enable_dsoftbus_driver) {
|
||||
sources += [
|
||||
"driver/lnn_hdf_driver_monitor.c",
|
||||
"driver/lnn_hdf_driver_request.c",
|
||||
]
|
||||
deps += [ "//drivers/adapter/uhdf2/utils:libhdf_utils" ]
|
||||
} else {
|
||||
sources += [
|
||||
"driver/lnn_driver_monitor_virtual.c",
|
||||
"driver/lnn_driver_request_virtual.c",
|
||||
]
|
||||
}
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"ces_standard:cesfwk_innerkits",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
107
adapter/common/bus_center/common_bus_center.gni
Executable file
107
adapter/common/bus_center/common_bus_center.gni
Executable file
@ -0,0 +1,107 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
bus_center_monitor_inc = [ "$softbus_adapter_common/bus_center/include" ]
|
||||
bus_center_monitor_deps = []
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
bus_center_monitor_src = [
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_request_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/network/lnn_lwip_monitor.c",
|
||||
"$softbus_adapter_common/bus_center/network/lnn_netlink_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/platform/lnn_product_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
]
|
||||
} else if (ohos_kernel_type == "linux") {
|
||||
bus_center_monitor_src = [
|
||||
"$softbus_adapter_common/bus_center/network/lnn_lwip_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_request_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/network/lnn_netlink_monitor.c",
|
||||
"$softbus_adapter_common/bus_center/platform/lnn_product_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
]
|
||||
} else if (ohos_kernel_type == "liteos_a") {
|
||||
bus_center_monitor_inc += [
|
||||
"//drivers/adapter/uhdf/posix/include",
|
||||
"//drivers/framework/include/utils",
|
||||
"//drivers/framework/include/core",
|
||||
"//drivers/framework/ability/sbuf/include",
|
||||
]
|
||||
if (enable_dsoftbus_driver) {
|
||||
bus_center_monitor_src = [
|
||||
"$softbus_adapter_common/bus_center/network/lnn_lwip_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/network/lnn_netlink_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/platform/lnn_product_monitor.c",
|
||||
"$softbus_adapter_common/bus_center/wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_hdf_driver_monitor.c",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_hdf_driver_request.c",
|
||||
]
|
||||
bus_center_monitor_inc += [
|
||||
"//drivers/framework/core/shared/include",
|
||||
"//drivers/framework/include",
|
||||
"//drivers/framework/include/core",
|
||||
"//drivers/ability/sbuf/include",
|
||||
"//drivers/adapter/uhdf/posix/include",
|
||||
]
|
||||
|
||||
bus_center_monitor_deps += [
|
||||
"//drivers/adapter/uhdf/manager:hdf_core",
|
||||
"//drivers/adapter/uhdf/platform:hdf_platform",
|
||||
"//drivers/adapter/uhdf/posix:hdf_posix_osal",
|
||||
]
|
||||
} else {
|
||||
bus_center_monitor_src = [
|
||||
"$softbus_adapter_common/bus_center/network/lnn_lwip_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/network/lnn_netlink_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/platform/lnn_product_monitor.c",
|
||||
"$softbus_adapter_common/bus_center/wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_request_virtual.c",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
bus_center_monitor_src = [
|
||||
"$softbus_adapter_common/bus_center/network/lnn_lwip_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/network/lnn_netlink_monitor.c",
|
||||
"$softbus_adapter_common/bus_center/platform/lnn_product_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/wlan/lnn_wifiservice_monitor_virtual.cpp",
|
||||
]
|
||||
bus_center_monitor_inc += [
|
||||
"//utils/native/base/include",
|
||||
"//foundation/communication/wifi/interfaces/innerkits/native_cpp/wifi_standard/interfaces",
|
||||
"//foundation/communication/wifi/services/wifi_standard/wifi_framework/common/net_helper",
|
||||
]
|
||||
bus_center_monitor_deps = [
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want:want",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
|
||||
if (enable_dsoftbus_driver) {
|
||||
bus_center_monitor_src += [
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_hdf_driver_monitor.c",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_hdf_driver_request.c",
|
||||
]
|
||||
bus_center_monitor_deps += [ "//drivers/adapter/uhdf2/utils:libhdf_utils" ]
|
||||
} else {
|
||||
bus_center_monitor_src += [
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_monitor_virtual.c",
|
||||
"$softbus_adapter_common/bus_center/driver/lnn_driver_request_virtual.c",
|
||||
]
|
||||
}
|
||||
|
||||
bus_center_monitor_external_deps = [ "ces_standard:cesfwk_innerkits" ]
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "lnn_event_monitor_impl.h"
|
||||
|
||||
#include "netif.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_log.h"
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
ohos_shared_library("softbus_adapter_ble") {
|
||||
sources = [
|
||||
"ble/softbus_adapter_ble_gatt.c",
|
||||
"ble/softbus_adapter_ble_gatt_server.c",
|
||||
"common/adapter_bt_utils.c",
|
||||
"common/softbus_adapter_bt_common.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/adapter/common/include",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/include",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//foundation/communication/bluetooth/interfaces/innerkits/native_c/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//foundation/communication/bluetooth/interfaces/innerkits/native_cpp/framework:btframework",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
28
adapter/common/net/bluetooth/net_bluetooth.gni
Executable file
28
adapter/common/net/bluetooth/net_bluetooth.gni
Executable file
@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
adapter_ble_external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
|
||||
adapter_ble_inc = [
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/include",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/common",
|
||||
"//foundation/communication/bluetooth/interfaces/innerkits/native_c/include",
|
||||
]
|
||||
adapter_ble_src = [
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/ble/softbus_adapter_ble_gatt.c",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/ble/softbus_adapter_ble_gatt_server.c",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/common/adapter_bt_utils.c",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/common/softbus_adapter_bt_common.c",
|
||||
]
|
||||
adapter_ble_deps = [ "//foundation/communication/bluetooth/interfaces/innerkits/native_cpp/framework:btframework" ]
|
@ -1,88 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_adapter_wifi") {
|
||||
sources = [ "common/softbus_wifi_api_adapter_virtual.c" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$softbus_adapter_common/net/wifi/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_adapter_wifi") {
|
||||
sources = [ "common/softbus_wifi_api_adapter_virtual.c" ]
|
||||
include_dirs = [
|
||||
"ipc/small_system/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$softbus_adapter_common/net/wifi/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_adapter_wifi") {
|
||||
sources = [ "common/softbus_wifi_api_adapter.c" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/adapter/common/include",
|
||||
"//foundation/communication/wifi/interfaces/innerkits/native_c",
|
||||
"//foundation/communication/wifi/interfaces/innerkits/native_cpp/wifi_standard/interfaces",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//foundation/communication/wifi/interfaces/innerkits/native_cpp/wifi_standard:wifi_sdk",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
29
adapter/common/net/wifi/net_wifi.gni
Executable file
29
adapter/common/net/wifi/net_wifi.gni
Executable file
@ -0,0 +1,29 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
adapter_wifi_deps = []
|
||||
if (defined(ohos_lite)) {
|
||||
adapter_wifi_src = [ "$softbus_adapter_common/net/wifi/common/softbus_wifi_api_adapter_virtual.c" ]
|
||||
adapter_wifi_inc = [ "$softbus_adapter_common/net/wifi/include" ]
|
||||
} else {
|
||||
adapter_wifi_src =
|
||||
[ "$softbus_adapter_common/net/wifi/common/softbus_wifi_api_adapter.c" ]
|
||||
adapter_wifi_inc = [
|
||||
"$softbus_adapter_common/net/wifi/include",
|
||||
"//foundation/communication/wifi/interfaces/innerkits/native_c",
|
||||
"//foundation/communication/wifi/interfaces/innerkits/native_cpp/wifi_standard/interfaces",
|
||||
]
|
||||
adapter_wifi_deps += [ "//foundation/communication/wifi/interfaces/innerkits/native_cpp/wifi_standard:wifi_sdk" ]
|
||||
}
|
@ -26,4 +26,6 @@ declare_args() {
|
||||
|
||||
enable_auto_networking = true
|
||||
enable_dsoftbus_driver = false
|
||||
|
||||
enable_build_shared_sdk = false
|
||||
}
|
||||
|
@ -27,4 +27,6 @@ declare_args() {
|
||||
enable_auto_networking = true
|
||||
enable_time_sync = true
|
||||
enable_dsoftbus_driver = true
|
||||
|
||||
enable_build_shared_sdk = true
|
||||
}
|
||||
|
@ -27,4 +27,6 @@ declare_args() {
|
||||
enable_auto_networking = true
|
||||
enable_time_sync = true
|
||||
enable_dsoftbus_driver = true
|
||||
|
||||
enable_build_shared_sdk = true
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ if (defined(ohos_lite)) {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//foundation/communication/dsoftbus/components/mbedtls:mbedtls_shared",
|
||||
"//third_party/mbedtls:mbedtls_shared",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
public_configs = [ ":nstackx_util_header" ]
|
||||
|
@ -11,12 +11,22 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
lite_component("softbus_server") {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
features = [ "frame:softbus_server_frame" ]
|
||||
} else {
|
||||
features = [ "frame:softbus_server" ]
|
||||
if (defined(ohos_lite)) {
|
||||
lite_component("softbus_server") {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
features = [
|
||||
"frame:softbus_server_frame",
|
||||
"$dsoftbus_root_path/core/common:softbus_utils",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
]
|
||||
} else {
|
||||
features = [ "frame:softbus_server" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
group("softbus_server") {
|
||||
deps = [ "frame:softbus_server" ]
|
||||
}
|
||||
}
|
||||
|
@ -150,4 +150,4 @@ SppSocketDriver *InitSppSocketDriver()
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_INFO, "[InitSppSocketDriver]");
|
||||
Init(&g_sppSocketDriver);
|
||||
return &g_sppSocketDriver;
|
||||
}
|
||||
}
|
||||
|
@ -10,10 +10,8 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
br_adapter_src =
|
||||
[ "$dsoftbus_root_path/core/adapter/br/mock/wrapper_br_interface.c" ]
|
||||
|
||||
lite_component("softbus_server_transmission") {
|
||||
features = [ "session:dsoftbus_trans_session" ]
|
||||
}
|
||||
br_adapter_inc = [ "$dsoftbus_root_path/core/adapter/br/include" ]
|
@ -1,158 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("auth_server_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"interface",
|
||||
]
|
||||
}
|
||||
|
||||
common_src = [
|
||||
"src/auth_common.c",
|
||||
"src/auth_connection.c",
|
||||
"src/auth_manager.c",
|
||||
"src/auth_sessionkey.c",
|
||||
"src/auth_socket.c",
|
||||
]
|
||||
|
||||
if (enable_auth_account == true) {
|
||||
defines = [ "AUTH_ACCOUNT" ]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_auth_server") {
|
||||
sources = common_src
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/adapter/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"$hilog_lite_include_path",
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
public_configs = [ ":auth_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/tcp:tcp_connection",
|
||||
"$hilog_lite_deps_path",
|
||||
"//base/security/deviceauth:deviceauth_lite",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_auth_server") {
|
||||
sources = common_src
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"$hilog_lite_include_path",
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
public_configs = [ ":auth_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/tcp:tcp_connection",
|
||||
"$hilog_lite_deps_path",
|
||||
"//base/security/deviceauth/services:deviceauth_sdk",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_auth_server") {
|
||||
sources = common_src
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
public_configs = [ ":auth_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/common:conn_common",
|
||||
"$dsoftbus_root_path/core/connection/manager:conn_manager",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"deviceauth_standard:deviceauth_sdk",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
45
core/authentication/authentication.gni
Normal file
45
core/authentication/authentication.gni
Normal file
@ -0,0 +1,45 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
AUTH_SERVER_DEFINES = []
|
||||
if (enable_auth_account == true) {
|
||||
AUTH_SERVER_DEFINES += [ "AUTH_ACCOUNT" ]
|
||||
}
|
||||
|
||||
auth_server_src = [
|
||||
"$dsoftbus_root_path/core/authentication/src/auth_common.c",
|
||||
"$dsoftbus_root_path/core/authentication/src/auth_connection.c",
|
||||
"$dsoftbus_root_path/core/authentication/src/auth_manager.c",
|
||||
"$dsoftbus_root_path/core/authentication/src/auth_sessionkey.c",
|
||||
"$dsoftbus_root_path/core/authentication/src/auth_socket.c",
|
||||
]
|
||||
auth_server_inc = [
|
||||
"$dsoftbus_root_path/core/authentication/include",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
]
|
||||
auth_server_deps = []
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
auth_server_inc += [ "//base/security/deviceauth/interfaces/innerkits" ]
|
||||
auth_server_deps += [ "//base/security/deviceauth:deviceauth_lite" ]
|
||||
} else {
|
||||
auth_server_inc += [ "//third_party/cJSON" ]
|
||||
auth_server_deps += [ "//base/security/deviceauth/services:deviceauth_sdk" ]
|
||||
}
|
||||
} else {
|
||||
auth_server_inc += [
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
}
|
@ -1,279 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("bus_center_server_interface") {
|
||||
include_dirs = [
|
||||
"ipc/include",
|
||||
"service/include",
|
||||
"lnn/net_buscenter/include",
|
||||
"interface",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
]
|
||||
}
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_bus_center_server") {
|
||||
sources = [
|
||||
"ipc/mini_system/lnn_bus_center_ipc.c",
|
||||
"lnn/net_builder/src/lnn_connection_fsm.c",
|
||||
"lnn/net_builder/src/lnn_discovery_manager.c",
|
||||
"lnn/net_builder/src/lnn_net_builder.c",
|
||||
"lnn/net_builder/src/lnn_network_id.c",
|
||||
"lnn/net_builder/src/lnn_node_weight.c",
|
||||
"lnn/net_builder/src/lnn_state_machine.c",
|
||||
"lnn/net_builder/sync_info/src/lnn_exchange_device_info.c",
|
||||
"lnn/net_builder/sync_info/src/lnn_sync_item_info.c",
|
||||
"lnn/net_buscenter/src/lnn_ip_network_impl.c",
|
||||
"lnn/net_buscenter/src/lnn_network_manager.c",
|
||||
"monitor/src/lnn_event_monitor.c",
|
||||
"service/src/bus_center_event.c",
|
||||
"service/src/bus_center_manager.c",
|
||||
]
|
||||
if (enable_auto_networking == true) {
|
||||
sources += [ "lnn/net_builder/src/lnn_coap_discovery_impl.c" ]
|
||||
}
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/mini_system/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include",
|
||||
"$dsoftbus_root_path/core/adapter/kernel/include",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/inner_communication",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/transmission/interface",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"$softbus_adapter_common/net/wifi/include",
|
||||
"$hilog_lite_include_path",
|
||||
"$dsoftbus_root_path/sdk/bus_center/manager/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
|
||||
"lnn/lane_hub/time_sync/include",
|
||||
"$dsoftbus_root_path/sdk/bus_center/manager/include",
|
||||
"//third_party/cJSON",
|
||||
"monitor/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/adapter/common/bus_center:dsoftbus_bus_center_monitor",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub:dsoftbus_bus_center_hub",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/manager:conn_manager",
|
||||
"$dsoftbus_root_path/core/discovery:dsoftbus_disc_server",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/proxy:dsoftbus_trans_proxy_channel",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct:dsoftbus_trans_direct_channel",
|
||||
"$hilog_lite_deps_path",
|
||||
"$softbus_adapter_common/net/wifi:softbus_adapter_wifi",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_bus_center_server") {
|
||||
sources = [
|
||||
"ipc/small_system/src/bus_center_client_proxy.c",
|
||||
"ipc/small_system/src/lnn_bus_center_ipc.c",
|
||||
"lnn/net_builder/src/lnn_connection_fsm.c",
|
||||
"lnn/net_builder/src/lnn_discovery_manager.c",
|
||||
"lnn/net_builder/src/lnn_net_builder.c",
|
||||
"lnn/net_builder/src/lnn_network_id.c",
|
||||
"lnn/net_builder/src/lnn_node_weight.c",
|
||||
"lnn/net_builder/src/lnn_state_machine.c",
|
||||
"lnn/net_builder/sync_info/src/lnn_exchange_device_info.c",
|
||||
"lnn/net_builder/sync_info/src/lnn_sync_item_info.c",
|
||||
"lnn/net_buscenter/src/lnn_ip_network_impl.c",
|
||||
"lnn/net_buscenter/src/lnn_network_manager.c",
|
||||
"monitor/src/lnn_event_monitor.c",
|
||||
"service/src/bus_center_event.c",
|
||||
"service/src/bus_center_manager.c",
|
||||
]
|
||||
if (enable_auto_networking == true) {
|
||||
sources += [ "lnn/net_builder/src/lnn_coap_discovery_impl.c" ]
|
||||
}
|
||||
include_dirs = [
|
||||
"ipc/small_system/include",
|
||||
"lnn/lane_hub/lane_manager/include",
|
||||
"lnn/lane_hub/time_sync/include",
|
||||
"lnn/net_builder/include",
|
||||
"lnn/net_builder/sync_info/include",
|
||||
"lnn/net_ledger/common/include",
|
||||
"lnn/net_ledger/distributed_ledger/include",
|
||||
"lnn/net_ledger/local_ledger/include",
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$softbus_adapter_common/net/wifi/include",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/inner_communication",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/transmission/interface",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
"lnn/net_buscenter/include",
|
||||
"monitor/include",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/adapter/common/bus_center:dsoftbus_bus_center_monitor",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection:softbus_connection",
|
||||
"$dsoftbus_root_path/core/discovery:dsoftbus_disc_server",
|
||||
"$dsoftbus_root_path/core/frame/small/client_manager:client_manager",
|
||||
"$hilog_lite_deps_path",
|
||||
"$softbus_adapter_common/net/wifi:softbus_adapter_wifi",
|
||||
"lnn/lane_hub:dsoftbus_bus_center_hub",
|
||||
"lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"utils:dsoftbus_bus_center_utils",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_bus_center_server") {
|
||||
sources = [
|
||||
"ipc/standard_system/src/bus_center_client_proxy.cpp",
|
||||
"ipc/standard_system/src/bus_center_client_proxy_standard.cpp",
|
||||
"ipc/standard_system/src/lnn_bus_center_ipc.cpp",
|
||||
"lnn/net_builder/src/lnn_connection_fsm.c",
|
||||
"lnn/net_builder/src/lnn_discovery_manager.c",
|
||||
"lnn/net_builder/src/lnn_net_builder.c",
|
||||
"lnn/net_builder/src/lnn_network_id.c",
|
||||
"lnn/net_builder/src/lnn_node_weight.c",
|
||||
"lnn/net_builder/src/lnn_state_machine.c",
|
||||
"lnn/net_builder/sync_info/src/lnn_exchange_device_info.c",
|
||||
"lnn/net_builder/sync_info/src/lnn_sync_item_info.c",
|
||||
"lnn/net_buscenter/src/lnn_ip_network_impl.c",
|
||||
"lnn/net_buscenter/src/lnn_network_manager.c",
|
||||
"monitor/src/lnn_event_monitor.c",
|
||||
"service/src/bus_center_event.c",
|
||||
"service/src/bus_center_manager.c",
|
||||
]
|
||||
if (enable_auto_networking == true) {
|
||||
sources += [ "lnn/net_builder/src/lnn_coap_discovery_impl.c" ]
|
||||
}
|
||||
include_dirs = [
|
||||
"ipc/standard_system/include",
|
||||
"lnn/lane_hub/lane_manager/include",
|
||||
"lnn/lane_hub/time_sync/include",
|
||||
"lnn/net_builder/include",
|
||||
"lnn/net_builder/sync_info/include",
|
||||
"lnn/net_ledger/common/include",
|
||||
"lnn/net_ledger/distributed_ledger/include",
|
||||
"lnn/net_ledger/local_ledger/include",
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$softbus_adapter_common/net/wifi/include",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/transmission/interface",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/core/frame/standard/client/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//utils/system/safwk/native/include",
|
||||
"lnn/net_buscenter/include",
|
||||
"monitor/include",
|
||||
]
|
||||
|
||||
public_configs = [ ":bus_center_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/adapter/common/bus_center:dsoftbus_bus_center_monitor",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/manager:conn_manager",
|
||||
"$dsoftbus_root_path/core/discovery:dsoftbus_disc_server",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata:softbus_server_data",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/proxy:dsoftbus_trans_proxy_channel",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct:dsoftbus_trans_direct_channel",
|
||||
"$softbus_adapter_common/net/wifi:softbus_adapter_wifi",
|
||||
"lnn/lane_hub:dsoftbus_bus_center_hub",
|
||||
"lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"utils:dsoftbus_bus_center_utils",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
95
core/bus_center/bus_center_server.gni
Executable file
95
core/bus_center/bus_center_server.gni
Executable file
@ -0,0 +1,95 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/adapter/common/bus_center/common_bus_center.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/adapter/common/net/wifi/net_wifi.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/lane_hub.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/net_ledger.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/bus_center/utils/bus_center_utils.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
bus_center_server_src =
|
||||
bus_center_monitor_src + bus_center_hub_src + bus_center_ledger_src +
|
||||
bus_center_utils_src + adapter_wifi_src
|
||||
bus_center_server_inc =
|
||||
bus_center_monitor_inc + bus_center_hub_inc + bus_center_ledger_inc +
|
||||
bus_center_utils_inc + adapter_wifi_inc
|
||||
bus_center_server_deps =
|
||||
bus_center_monitor_deps + bus_center_hub_deps + bus_center_ledger_deps +
|
||||
bus_center_utils_deps + adapter_wifi_deps
|
||||
|
||||
bus_center_server_src += [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connection_fsm.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_discovery_manager.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_id.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_state_machine.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/src/lnn_exchange_device_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/src/lnn_sync_item_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src/lnn_ip_network_impl.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src/lnn_network_manager.c",
|
||||
"$dsoftbus_root_path/core/bus_center/monitor/src/lnn_event_monitor.c",
|
||||
"$dsoftbus_root_path/core/bus_center/service/src/bus_center_event.c",
|
||||
"$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
|
||||
]
|
||||
bus_center_server_inc += [
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
|
||||
"$dsoftbus_root_path/core/bus_center/monitor/include",
|
||||
"$dsoftbus_root_path/core/bus_center/service/include",
|
||||
"$dsoftbus_root_path/sdk/bus_center/manager/include",
|
||||
]
|
||||
|
||||
if (enable_auto_networking == true) {
|
||||
bus_center_server_src += [ "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_coap_discovery_impl.c" ]
|
||||
}
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
bus_center_server_src += [ "$dsoftbus_root_path/core/bus_center/ipc/mini_system/lnn_bus_center_ipc.c" ]
|
||||
} else {
|
||||
bus_center_server_src += [
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/small_system/src/bus_center_client_proxy.c",
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/small_system/src/lnn_bus_center_ipc.c",
|
||||
]
|
||||
|
||||
bus_center_server_inc +=
|
||||
[ "$dsoftbus_root_path/core/bus_center/ipc/small_system/include" ]
|
||||
bus_center_server_deps += [
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
bus_center_server_src += [
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/standard_system/src/bus_center_client_proxy.cpp",
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/standard_system/src/bus_center_client_proxy_standard.cpp",
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/standard_system/src/lnn_bus_center_ipc.cpp",
|
||||
]
|
||||
|
||||
bus_center_server_inc += [
|
||||
"$dsoftbus_root_path/core/bus_center/ipc/standard_system/include",
|
||||
"$dsoftbus_root_path/sdk/frame/standard/include",
|
||||
"//utils/system/safwk/native/include",
|
||||
]
|
||||
bus_center_server_deps += [ "//utils/native/base:utils" ]
|
||||
bus_center_server_external_deps = bus_center_monitor_external_deps
|
||||
}
|
@ -16,16 +16,16 @@
|
||||
#include "bus_center_client_proxy.h"
|
||||
|
||||
#include "bus_center_client_proxy_standard.h"
|
||||
#include "softbus_client_info_manager.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_log.h"
|
||||
#include "softbus_permission.h"
|
||||
#include "softbus_server_data.h"
|
||||
|
||||
using namespace OHOS;
|
||||
|
||||
static sptr<BusCenterClientProxy> GetClientProxy(const char *pkgName)
|
||||
{
|
||||
sptr<IRemoteObject> clientObject = SoftBusServerData::GetInstance().GetSoftbusClientProxy(pkgName);
|
||||
sptr<IRemoteObject> clientObject = SoftbusClientInfoManager::GetInstance().GetSoftbusClientProxy(pkgName);
|
||||
sptr<BusCenterClientProxy> clientProxy = new (std::nothrow) BusCenterClientProxy(clientObject);
|
||||
return clientProxy;
|
||||
}
|
||||
@ -62,7 +62,7 @@ int32_t ClientOnLeaveLNNResult(const char *pkgName, const char *networkId, int32
|
||||
int32_t ClinetOnNodeOnlineStateChanged(bool isOnline, void *info, uint32_t infoTypeLen)
|
||||
{
|
||||
std::map<std::string, sptr<IRemoteObject>> proxyMap;
|
||||
SoftBusServerData::GetInstance().GetSoftbusClientProxyMap(proxyMap);
|
||||
SoftbusClientInfoManager::GetInstance().GetSoftbusClientProxyMap(proxyMap);
|
||||
for (auto proxy : proxyMap) {
|
||||
sptr<BusCenterClientProxy> clientProxy = new (std::nothrow) BusCenterClientProxy(proxy.second);
|
||||
clientProxy->OnNodeOnlineStateChanged(isOnline, info, infoTypeLen);
|
||||
@ -73,7 +73,7 @@ int32_t ClinetOnNodeOnlineStateChanged(bool isOnline, void *info, uint32_t infoT
|
||||
int32_t ClinetOnNodeBasicInfoChanged(void *info, uint32_t infoTypeLen, int32_t type)
|
||||
{
|
||||
std::map<std::string, sptr<IRemoteObject>> proxyMap;
|
||||
SoftBusServerData::GetInstance().GetSoftbusClientProxyMap(proxyMap);
|
||||
SoftbusClientInfoManager::GetInstance().GetSoftbusClientProxyMap(proxyMap);
|
||||
for (auto proxy : proxyMap) {
|
||||
sptr<BusCenterClientProxy> clientProxy = new (std::nothrow) BusCenterClientProxy(proxy.second);
|
||||
clientProxy->OnNodeBasicInfoChanged(info, infoTypeLen, type);
|
||||
|
@ -1,174 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("bus_center_hub_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_bus_center_hub") {
|
||||
sources = [
|
||||
"lane_manager/src/lnn_lane_info.c",
|
||||
"lane_manager/src/lnn_lane_manager.c",
|
||||
"lane_manager/src/lnn_smart_communication.c",
|
||||
"time_sync/src/lnn_time_sync_manager_stub.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"lane_manager/include",
|
||||
"time_sync/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
|
||||
"$dsoftbus_root_path/core/bus_center/service/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_hub_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_bus_center_hub") {
|
||||
sources = [
|
||||
"lane_manager/src/lnn_lane_info.c",
|
||||
"lane_manager/src/lnn_lane_manager.c",
|
||||
"lane_manager/src/lnn_smart_communication.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"lane_manager/include",
|
||||
"time_sync/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/service/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//utils/native/base/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_hub_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
if (enable_time_sync == true) {
|
||||
sources += [ "time_sync/src/lnn_time_sync_manager.c" ]
|
||||
native_source_path = rebase_path("$dsoftbus_root_path")
|
||||
dep_file =
|
||||
"dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync/BUILD.gn"
|
||||
enhanced = exec_script(
|
||||
"$dsoftbus_root_path/run_shell_cmd.py",
|
||||
[ "cd $native_source_path; if [ -f $dep_file ]; then echo true; else echo false; fi" ],
|
||||
"value")
|
||||
if (enhanced) {
|
||||
deps += [ "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync:dsoftbus_time_sync_impl" ]
|
||||
} else {
|
||||
sources += [ "time_sync/src/lnn_time_sync_impl_stub.c" ]
|
||||
}
|
||||
include_dirs += [
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include/",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
]
|
||||
deps += [
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
]
|
||||
} else {
|
||||
sources += [ "time_sync/src/lnn_time_sync_manager_stub.c" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_bus_center_hub") {
|
||||
sources = [
|
||||
"lane_manager/src/lnn_lane_info.c",
|
||||
"lane_manager/src/lnn_lane_manager.c",
|
||||
"lane_manager/src/lnn_smart_communication.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"lane_manager/include",
|
||||
"time_sync/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/service/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//utils/native/base/include",
|
||||
]
|
||||
public_configs = [ ":bus_center_hub_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
if (enable_time_sync == true) {
|
||||
sources += [ "time_sync/src/lnn_time_sync_manager.c" ]
|
||||
native_source_path = rebase_path("$dsoftbus_root_path")
|
||||
dep_file =
|
||||
"dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync/BUILD.gn"
|
||||
enhanced = exec_script(
|
||||
"$dsoftbus_root_path/run_shell_cmd.py",
|
||||
[ "cd $native_source_path; if [ -f $dep_file ]; then echo true; else echo false; fi" ],
|
||||
"value")
|
||||
if (enhanced) {
|
||||
deps += [ "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync:dsoftbus_time_sync_impl" ]
|
||||
} else {
|
||||
sources += [ "time_sync/src/lnn_time_sync_impl_stub.c" ]
|
||||
}
|
||||
include_dirs += [
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include/",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
]
|
||||
deps +=
|
||||
[ "$dsoftbus_root_path/core/common/message_handler:message_handler" ]
|
||||
} else {
|
||||
sources += [ "time_sync/src/lnn_time_sync_manager_stub.c" ]
|
||||
}
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
83
core/bus_center/lnn/lane_hub/lane_hub.gni
Normal file
83
core/bus_center/lnn/lane_hub/lane_hub.gni
Normal file
@ -0,0 +1,83 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
core_lane_hub_path = "$dsoftbus_root_path/core/bus_center/lnn/lane_hub"
|
||||
|
||||
bus_center_hub_inc = [
|
||||
"$core_lane_hub_path/lane_manager/include",
|
||||
"$core_lane_hub_path/time_sync/include",
|
||||
]
|
||||
bus_center_hub_src = [
|
||||
"$core_lane_hub_path/lane_manager/src/lnn_lane_info.c",
|
||||
"$core_lane_hub_path/lane_manager/src/lnn_lane_manager.c",
|
||||
"$core_lane_hub_path/lane_manager/src/lnn_smart_communication.c",
|
||||
]
|
||||
bus_center_hub_deps = []
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
bus_center_hub_src +=
|
||||
[ "$core_lane_hub_path/time_sync/src/lnn_time_sync_manager_stub.c" ]
|
||||
} else {
|
||||
bus_center_hub_inc += [ "//utils/native/base/include" ]
|
||||
if (enable_time_sync == true) {
|
||||
bus_center_hub_src +=
|
||||
[ "$core_lane_hub_path/time_sync/src/lnn_time_sync_manager.c" ]
|
||||
native_source_path = rebase_path("$dsoftbus_root_path")
|
||||
dep_file =
|
||||
"dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync/BUILD.gn"
|
||||
enhanced = exec_script(
|
||||
"$dsoftbus_root_path/run_shell_cmd.py",
|
||||
[ "cd $native_source_path; if [ -f $dep_file ]; then echo true; else echo false; fi" ],
|
||||
"value")
|
||||
if (enhanced) {
|
||||
bus_center_hub_deps += [ "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync:dsoftbus_time_sync_impl" ]
|
||||
} else {
|
||||
bus_center_hub_src +=
|
||||
[ "$core_lane_hub_path/time_sync/src/lnn_time_sync_impl_stub.c" ]
|
||||
}
|
||||
} else {
|
||||
bus_center_hub_src +=
|
||||
[ "$core_lane_hub_path/time_sync/src/lnn_time_sync_manager_stub.c" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
bus_center_hub_inc += [ "//utils/native/base/include" ]
|
||||
bus_center_hub_deps += [ "//utils/native/base:utils" ]
|
||||
if (enable_time_sync == true) {
|
||||
bus_center_hub_src +=
|
||||
[ "$core_lane_hub_path/time_sync/src/lnn_time_sync_manager.c" ]
|
||||
native_source_path = rebase_path("$dsoftbus_root_path")
|
||||
dep_file =
|
||||
"dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync/BUILD.gn"
|
||||
enhanced = exec_script(
|
||||
"$dsoftbus_root_path/run_shell_cmd.py",
|
||||
[ "cd $native_source_path; if [ -f $dep_file ]; then echo true; else echo false; fi" ],
|
||||
"value")
|
||||
if (enhanced) {
|
||||
bus_center_hub_deps += [ "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/time_sync:dsoftbus_time_sync_impl" ]
|
||||
} else {
|
||||
bus_center_hub_src +=
|
||||
[ "$core_lane_hub_path/time_sync/src/lnn_time_sync_impl_stub.c" ]
|
||||
}
|
||||
bus_center_hub_inc += [
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include/",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
|
||||
]
|
||||
} else {
|
||||
bus_center_hub_src +=
|
||||
[ "$core_lane_hub_path/time_sync/src/lnn_time_sync_manager_stub.c" ]
|
||||
}
|
||||
}
|
@ -1,146 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("bus_center_ledger_interface") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_bus_center_ledger") {
|
||||
sources = [
|
||||
"common/src/lnn_device_info.c",
|
||||
"common/src/lnn_map.c",
|
||||
"common/src/lnn_net_capability.c",
|
||||
"common/src/lnn_node_info.c",
|
||||
"distributed_ledger/src/lnn_distributed_net_ledger.c",
|
||||
"local_ledger/src/lnn_local_net_ledger.c",
|
||||
"net_ledger.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_ledger_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_bus_center_ledger") {
|
||||
sources = [
|
||||
"common/src/lnn_device_info.c",
|
||||
"common/src/lnn_map.c",
|
||||
"common/src/lnn_net_capability.c",
|
||||
"common/src/lnn_node_info.c",
|
||||
"distributed_ledger/src/lnn_distributed_net_ledger.c",
|
||||
"local_ledger/src/lnn_local_net_ledger.c",
|
||||
"net_ledger.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"common/include",
|
||||
"distributed_ledger/include",
|
||||
"local_ledger/include",
|
||||
"sync_ledger/include",
|
||||
"utils/include",
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_ledger_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_bus_center_ledger") {
|
||||
sources = [
|
||||
"common/src/lnn_device_info.c",
|
||||
"common/src/lnn_map.c",
|
||||
"common/src/lnn_net_capability.c",
|
||||
"common/src/lnn_node_info.c",
|
||||
"distributed_ledger/src/lnn_distributed_net_ledger.c",
|
||||
"local_ledger/src/lnn_local_net_ledger.c",
|
||||
"net_ledger.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"common/include",
|
||||
"distributed_ledger/include",
|
||||
"local_ledger/include",
|
||||
"sync_ledger/include",
|
||||
"utils/include",
|
||||
"$dsoftbus_root_path/core/adapter/bus_center/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
]
|
||||
public_configs = [ ":bus_center_ledger_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
63
core/bus_center/lnn/net_ledger/net_ledger.gni
Normal file
63
core/bus_center/lnn/net_ledger/net_ledger.gni
Normal file
@ -0,0 +1,63 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
bus_center_ledger_inc = [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
|
||||
]
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
bus_center_ledger_src = [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_map.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_net_capability.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/net_ledger.c",
|
||||
]
|
||||
bus_center_ledger_deps = []
|
||||
} else {
|
||||
bus_center_ledger_src = [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_map.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_net_capability.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/net_ledger.c",
|
||||
]
|
||||
bus_center_ledger_inc += [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/sync_ledger/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/utils/include",
|
||||
]
|
||||
bus_center_ledger_deps = []
|
||||
}
|
||||
} else {
|
||||
bus_center_ledger_src = [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_map.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_net_capability.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/net_ledger.c",
|
||||
]
|
||||
bus_center_ledger_inc += [
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/sync_ledger/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/utils/include",
|
||||
]
|
||||
bus_center_ledger_deps = [ "//utils/native/base:utils" ]
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("bus_center_utils_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_bus_center_utils") {
|
||||
sources = [
|
||||
"src/lnn_async_callback_utils.c",
|
||||
"src/lnn_connection_addr_utils.c",
|
||||
"src/lnn_file_utils.c",
|
||||
"src/lnn_ip_utils_lite.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
"$hispark_pegasus_sdk_path/third_party/lwip_sack/include/lwip",
|
||||
]
|
||||
if (ohos_third_party_dir == "$hispark_pegasus_sdk_path/third_party") {
|
||||
include_dirs += []
|
||||
}
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_utils_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_bus_center_utils") {
|
||||
sources = [
|
||||
"src/lnn_async_callback_utils.c",
|
||||
"src/lnn_connection_addr_utils.c",
|
||||
"src/lnn_file_utils.c",
|
||||
"src/lnn_ip_utils.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
public_configs = [ ":bus_center_utils_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$hilog_lite_deps_path",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_bus_center_utils") {
|
||||
sources = [
|
||||
"src/lnn_async_callback_utils.c",
|
||||
"src/lnn_connection_addr_utils.c",
|
||||
"src/lnn_file_utils.c",
|
||||
"src/lnn_ip_utils.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//utils/native/base/include",
|
||||
]
|
||||
public_configs = [ ":bus_center_utils_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
41
core/bus_center/utils/bus_center_utils.gni
Normal file
41
core/bus_center/utils/bus_center_utils.gni
Normal file
@ -0,0 +1,41 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
bus_center_utils_src = [
|
||||
"$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/src/lnn_connection_addr_utils.c",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/src/lnn_file_utils.c",
|
||||
]
|
||||
bus_center_utils_inc = [ "$dsoftbus_root_path/core/bus_center/utils/include" ]
|
||||
bus_center_utils_deps = []
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
bus_center_utils_inc +=
|
||||
[ "$hispark_pegasus_sdk_path/third_party/lwip_sack/include" ]
|
||||
if (ohos_third_party_dir == "$hispark_pegasus_sdk_path/third_party") {
|
||||
#bus_center_utils_inc += []
|
||||
}
|
||||
bus_center_utils_src +=
|
||||
[ "$dsoftbus_root_path/core/bus_center/utils/src/lnn_ip_utils_lite.c" ]
|
||||
} else {
|
||||
bus_center_utils_src +=
|
||||
[ "$dsoftbus_root_path/core/bus_center/utils/src/lnn_ip_utils.c" ]
|
||||
}
|
||||
} else {
|
||||
bus_center_utils_inc += [ "//utils/native/base/include" ]
|
||||
bus_center_utils_deps += [ "//utils/native/base:utils" ]
|
||||
bus_center_utils_src +=
|
||||
[ "$dsoftbus_root_path/core/bus_center/utils/src/lnn_ip_utils.c" ]
|
||||
}
|
@ -31,7 +31,7 @@
|
||||
#include "common_list.h"
|
||||
#include "softbus_adapter_mem.h"
|
||||
#include "softbus_def.h"
|
||||
#include "netif.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_feature_config.h"
|
||||
#include "softbus_log.h"
|
||||
|
@ -11,15 +11,106 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/connection/common/conn_common.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/transmission/common/trans_common.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
lite_component("softbus_core_common") {
|
||||
features = [
|
||||
"json_utils:json_utils",
|
||||
"utils:softbus_utils",
|
||||
"softbus_property:softbus_property",
|
||||
"message_handler:message_handler",
|
||||
"log:softbus_log",
|
||||
"network:softbus_network_utils",
|
||||
]
|
||||
common_utils_src = [
|
||||
"network/softbus_network_utils.c",
|
||||
"json_utils/softbus_json_utils.c",
|
||||
"log/softbus_log.c",
|
||||
"message_handler/message_handler.c",
|
||||
"queue/softbus_queue.c",
|
||||
"security/sequence_verification/softbus_sequence_verification.c",
|
||||
"softbus_property/softbus_feature_config.c",
|
||||
"utils/softbus_utils.c",
|
||||
]
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
hilog_lite_include_path =
|
||||
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite"
|
||||
diff_deps = [
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite",
|
||||
"//build/lite/config/component/cJSON:cjson_static",
|
||||
]
|
||||
build_type = "static_library"
|
||||
} else {
|
||||
hilog_lite_include_path =
|
||||
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits"
|
||||
diff_deps = [
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
build_type = "shared_library"
|
||||
}
|
||||
config("dsoftbus_utils_interface") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
include_dirs += conn_common_inc + trans_common_inc
|
||||
cflags = [
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-Os",
|
||||
]
|
||||
cflags_cc = cflags
|
||||
}
|
||||
|
||||
target(build_type, "softbus_utils") {
|
||||
include_dirs = [ "$dsoftbus_root_path/interfaces/kits/common" ]
|
||||
include_dirs += conn_common_inc + trans_common_inc
|
||||
sources = common_utils_src
|
||||
sources += conn_common_src + trans_common_src
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-std=c99",
|
||||
]
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
defines = [ "SOFTBUS_MINI_SYSTEM" ]
|
||||
} else {
|
||||
defines = [ "DEFAULT_STORAGE_PATH=\"/usr\"" ]
|
||||
defines += [ "SOFTBUS_SMALL_SYSTEM" ]
|
||||
}
|
||||
deps = [ "$dsoftbus_root_path/adapter:softbus_adapter" ]
|
||||
deps += diff_deps
|
||||
public_configs = [ ":dsoftbus_utils_interface" ]
|
||||
}
|
||||
} else {
|
||||
config("dsoftbus_utils_interface_L2") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
]
|
||||
include_dirs += conn_common_inc + trans_common_inc
|
||||
}
|
||||
ohos_shared_library("softbus_utils") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
include_dirs += conn_common_inc + trans_common_inc
|
||||
sources = common_utils_src
|
||||
sources += conn_common_src + trans_common_src
|
||||
defines = [ "DEFAULT_STORAGE_PATH=\"/data/data\"" ]
|
||||
defines += [ "SOFTBUS_STANDARD_SYSTEM" ]
|
||||
public_configs = [ ":dsoftbus_utils_interface_L2" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
"//utils/native/base:utils",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
||||
|
@ -1,69 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$libsec_include_path",
|
||||
"//third_party/cJSON",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("json_utils") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_json_utils.c" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//build/lite/config/component/cJSON:cjson_static",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("json_utils") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_json_utils.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("json_utils") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
sources = [ "softbus_json_utils.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("dsoftbus_log_interface") {
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$libsec_include_path",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_log") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_log.c" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
]
|
||||
public_configs = [ ":dsoftbus_log_interface" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_log") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = [ "softbus_log.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
public_configs = [ ":dsoftbus_log_interface" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_log") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"//utils/native/base/include",
|
||||
"include",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
public_configs = [ ":dsoftbus_log_interface" ]
|
||||
sources = [ "softbus_log.c" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("message_handler_interface") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$libsec_include_path",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
common_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("message_handler") {
|
||||
include_dirs = common_include
|
||||
sources = [ "message_handler.c" ]
|
||||
deps = common_deps
|
||||
public_configs = [ ":message_handler_interface" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("message_handler") {
|
||||
include_dirs = common_include
|
||||
sources = [ "message_handler.c" ]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
deps = common_deps
|
||||
deps += [
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
public_configs = [ ":message_handler_interface" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("message_handler") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"//utils/native/base/include",
|
||||
]
|
||||
sources = [ "message_handler.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
public_configs = [ ":message_handler_interface" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [ "$dsoftbus_root_path/core/common/include" ]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_network_utils") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_network_utils.c" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_network_utils") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_network_utils.c" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_network_utils") {
|
||||
include_dirs = [ "$dsoftbus_root_path/core/common/include" ]
|
||||
sources = [ "softbus_network_utils.c" ]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/adapter/common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$libsec_include_path",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_queue") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_queue.c" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_queue") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_queue.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_queue") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/adapter/common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
sources = [ "softbus_queue.c" ]
|
||||
deps = [ "$dsoftbus_root_path/adapter:softbus_adapter" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
copy("permission_json") {
|
||||
sources = [ "softbus_trans_permission.json" ]
|
||||
outputs = [ "$root_out_dir/etc/softbus_trans_permission.json" ]
|
||||
}
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_core_path/common/include",
|
||||
"$dsoftbus_core_path/common/security/permission/include",
|
||||
"//foundation/communication/ipc_lite/interfaces/kits",
|
||||
"//base/security/permission/interfaces/kits/permission_lite",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_permission") {
|
||||
include_dirs = common_include
|
||||
sources = [ "mini_system/softbus_permission.c" ]
|
||||
deps = []
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_permission") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = [
|
||||
"common/permission_entry.c",
|
||||
"small_system/permission_utils.c",
|
||||
"small_system/softbus_permission.c",
|
||||
]
|
||||
deps = [
|
||||
":permission_json",
|
||||
"$dsoftbus_core_path/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
"//base/security/permission/services/permission_lite/pms_client:pms_client",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
ohos_prebuilt_etc("softbus_permission_json") {
|
||||
source = "softbus_trans_permission.json"
|
||||
install_enable = true
|
||||
relative_install_dir = "communication/softbus"
|
||||
part_name = "dsoftbus_standard"
|
||||
}
|
||||
|
||||
ohos_shared_library("softbus_permission") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_core_path/common/include",
|
||||
"$dsoftbus_core_path/common/security/permission/include",
|
||||
"//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core/include/bundlemgr",
|
||||
"//foundation/appexecfwk/standard/kits/appkit/native/app/include",
|
||||
"//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base/include",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want/include",
|
||||
"//utils/system/safwk/native/include",
|
||||
]
|
||||
sources = [
|
||||
"common/permission_entry.c",
|
||||
"standard_system/permission_utils.cpp",
|
||||
"standard_system/softbus_permission.cpp",
|
||||
]
|
||||
deps = [
|
||||
":softbus_permission_json",
|
||||
"$dsoftbus_core_path/common/json_utils:json_utils",
|
||||
"$dsoftbus_core_path/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//foundation/appexecfwk/standard/kits:appkit_native",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
external_deps = [
|
||||
"aafwk_standard:want",
|
||||
"appexecfwk_standard:appexecfwk_core",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"permission_standard:libpermissionsdk_standard",
|
||||
"samgr_standard:samgr_proxy",
|
||||
]
|
||||
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
55
core/common/security/permission/permission.gni
Normal file
55
core/common/security/permission/permission.gni
Normal file
@ -0,0 +1,55 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
softbus_permission_inc = [
|
||||
"$dsoftbus_core_path/common/security/permission/include",
|
||||
"//foundation/communication/ipc_lite/interfaces/kits",
|
||||
"//base/security/permission/interfaces/kits/permission_lite",
|
||||
]
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
softbus_permission_src = [ "$dsoftbus_core_path/common/security/permission/mini_system/softbus_permission.c" ]
|
||||
softbus_permission_deps = []
|
||||
} else {
|
||||
softbus_permission_src = [
|
||||
"$dsoftbus_core_path/common/security/permission/common/permission_entry.c",
|
||||
"$dsoftbus_core_path/common/security/permission/small_system/permission_utils.c",
|
||||
"$dsoftbus_core_path/common/security/permission/small_system/softbus_permission.c",
|
||||
]
|
||||
softbus_permission_deps = [
|
||||
"//base/security/permission/services/permission_lite/pms_client:pms_client",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
softbus_permission_inc = [
|
||||
"$dsoftbus_core_path/common/security/permission/include",
|
||||
"//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core/include/bundlemgr",
|
||||
"//foundation/appexecfwk/standard/kits/appkit/native/app/include",
|
||||
"//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base/include",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want/include",
|
||||
"//utils/system/safwk/native/include",
|
||||
]
|
||||
softbus_permission_src = [
|
||||
"$dsoftbus_core_path/common/security/permission/common/permission_entry.c",
|
||||
"$dsoftbus_core_path/common/security/permission/standard_system/permission_utils.cpp",
|
||||
"$dsoftbus_core_path/common/security/permission/standard_system/softbus_permission.cpp",
|
||||
]
|
||||
softbus_permission_deps = [
|
||||
"//foundation/appexecfwk/standard/kits:appkit_native",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_seq_verification") {
|
||||
sources = [ "src/softbus_sequence_verification.c" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-std=c99",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_seq_verification") {
|
||||
sources = [ "src/softbus_sequence_verification.c" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-std=c99",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_seq_verification") {
|
||||
sources = [ "src/softbus_sequence_verification.c" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
deps = [ "$dsoftbus_root_path/core/common/log:softbus_log" ]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
common_include = [
|
||||
"$dsoftbus_core_path/common/include",
|
||||
"include",
|
||||
"//third_party/cJSON",
|
||||
"$libsec_include_path",
|
||||
"$hilog_lite_include_path",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//utils/native/base/include",
|
||||
]
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_property") {
|
||||
defines = [ "SOFTBUS_MINI_SYSTEM" ]
|
||||
include_dirs = common_include
|
||||
sources = [ "src/softbus_feature_config.c" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"//build/lite/config/component/cJSON:cjson_static",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_property") {
|
||||
defines = [ "SOFTBUS_SMALL_SYSTEM" ]
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-DDEFAULT_STORAGE_PATH=\"/usr\"",
|
||||
]
|
||||
sources = [ "src/softbus_feature_config.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_property") {
|
||||
defines = [ "SOFTBUS_STANDARD_SYSTEM" ]
|
||||
sources = [ "src/softbus_feature_config.c" ]
|
||||
include_dirs = [
|
||||
"$dsoftbus_core_path/common/include",
|
||||
"include",
|
||||
"//third_party/cJSON",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//utils/native/base/include",
|
||||
]
|
||||
cflags = [ "-DDEFAULT_STORAGE_PATH=\"/data/data\"" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$softbus_adapter_common/include",
|
||||
"$libsec_include_path",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_utils") {
|
||||
include_dirs = common_include
|
||||
cflags = [ "-Wall" ]
|
||||
sources = [ "softbus_utils.c" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_utils") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = [ "softbus_utils.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_utils") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$softbus_adapter_common/include",
|
||||
]
|
||||
sources = [ "softbus_utils.c" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (enable_connection_ble == false) {
|
||||
sources_ble = [ "src/softbus_ble_connection_virtual.c" ]
|
||||
deps_ble = []
|
||||
} else {
|
||||
sources_ble = [
|
||||
"src/softbus_ble_connection.c",
|
||||
"src/softbus_ble_trans_manager.c",
|
||||
]
|
||||
deps_ble = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth:softbus_adapter_ble",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/queue:softbus_queue",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("ble_connection") {
|
||||
sources = sources_ble
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
]
|
||||
deps = deps_ble
|
||||
}
|
||||
} else {
|
||||
shared_library("ble_connection") {
|
||||
sources = sources_ble
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
]
|
||||
deps = deps_ble
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("ble_connection") {
|
||||
sources = sources_ble
|
||||
include_dirs = [
|
||||
"include",
|
||||
"src",
|
||||
"$dsoftbus_root_path/adapter/common/include",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/ble/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
deps = deps_ble
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
29
core/connection/ble/conn_ble.gni
Normal file
29
core/connection/ble/conn_ble.gni
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
ble_connection_deps = []
|
||||
if (enable_connection_ble == false) {
|
||||
ble_connection_src = [ "$dsoftbus_root_path/core/connection/ble/src/softbus_ble_connection_virtual.c" ]
|
||||
ble_connection_inc = [ "$dsoftbus_root_path/core/connection/ble/include" ]
|
||||
} else {
|
||||
ble_connection_src = [
|
||||
"$dsoftbus_root_path/core/connection/ble/src/softbus_ble_connection.c",
|
||||
"$dsoftbus_root_path/core/connection/ble/src/softbus_ble_trans_manager.c",
|
||||
]
|
||||
ble_connection_inc = [
|
||||
"$dsoftbus_root_path/core/connection/ble/include",
|
||||
"$dsoftbus_root_path/core/connection/ble/src",
|
||||
]
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (enable_connection_br == false) {
|
||||
sources_br = [ "src/br_connection_virtual.c" ]
|
||||
deps_br = []
|
||||
} else {
|
||||
sources_br = [ "src/br_connection.c" ]
|
||||
deps_br = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/adapter/br/mock:br_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("br_connection") {
|
||||
sources = sources_br
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/adapter/br/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
deps = deps_br
|
||||
}
|
||||
} else {
|
||||
shared_library("br_connection") {
|
||||
sources = sources_br
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/adapter/br/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
deps = deps_br
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("br_connection") {
|
||||
sources = sources_br
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/adapter/br/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
deps = deps_br
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
34
core/connection/br/conn_br.gni
Normal file
34
core/connection/br/conn_br.gni
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/core/adapter/core_adapter.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
br_connection_deps = []
|
||||
if (enable_connection_br == false) {
|
||||
br_connection_src =
|
||||
[ "$dsoftbus_root_path/core/connection/br/src/br_connection_virtual.c" ]
|
||||
br_connection_inc = [
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
} else {
|
||||
br_connection_src = br_adapter_src
|
||||
br_connection_inc = br_adapter_inc
|
||||
br_connection_src +=
|
||||
[ "$dsoftbus_root_path/core/connection/br/src/br_connection.c" ]
|
||||
br_connection_inc += [
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("conn_common") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/connection/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$softbus_adapter_common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
sources = [
|
||||
"src/softbus_base_listener.c",
|
||||
"src/softbus_tcp_socket.c",
|
||||
"src/softbus_thread_pool.c",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("conn_common") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/connection/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$softbus_adapter_common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
sources = [
|
||||
"src/softbus_base_listener.c",
|
||||
"src/softbus_tcp_socket.c",
|
||||
"src/softbus_thread_pool.c",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("conn_common") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/connection/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$softbus_adapter_common/include",
|
||||
]
|
||||
sources = [
|
||||
"src/softbus_base_listener.c",
|
||||
"src/softbus_tcp_socket.c",
|
||||
"src/softbus_thread_pool.c",
|
||||
]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
23
core/connection/common/conn_common.gni
Normal file
23
core/connection/common/conn_common.gni
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
conn_common_src = [
|
||||
"$dsoftbus_root_path/core/connection/common/src/softbus_base_listener.c",
|
||||
"$dsoftbus_root_path/core/connection/common/src/softbus_tcp_socket.c",
|
||||
"$dsoftbus_root_path/core/connection/common/src/softbus_thread_pool.c",
|
||||
]
|
||||
conn_common_inc = [
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/common/include",
|
||||
]
|
28
core/connection/conn.gni
Normal file
28
core/connection/conn.gni
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/core/connection/ble/conn_ble.gni")
|
||||
import("//foundation/communication/dsoftbus/core/connection/br/conn_br.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
#import("//foundation/communication/dsoftbus/core/connection/common/conn_common.gni")
|
||||
import("//foundation/communication/dsoftbus/core/connection/tcp/conn_tcp.gni")
|
||||
conn_manager_src = ble_connection_src + br_connection_src + tcp_connection_src
|
||||
conn_manager_inc = ble_connection_inc + br_connection_inc + tcp_connection_inc
|
||||
conn_manager_deps = ble_connection_deps + br_connection_deps
|
||||
conn_manager_src +=
|
||||
[ "$dsoftbus_root_path/core/connection/manager/softbus_conn_manager.c" ]
|
||||
conn_manager_inc += [
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
]
|
@ -1,102 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("conn_manager") {
|
||||
sources = [ "softbus_conn_manager.c" ]
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/connection/ble/include",
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"$dsoftbus_root_path/core/connection/tcp/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/ble:ble_connection",
|
||||
"$dsoftbus_root_path/core/connection/br:br_connection",
|
||||
"$dsoftbus_root_path/core/connection/tcp:tcp_connection",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("conn_manager") {
|
||||
sources = [ "softbus_conn_manager.c" ]
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/connection/ble/include",
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"$dsoftbus_root_path/core/connection/tcp/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/ble:ble_connection",
|
||||
"$dsoftbus_root_path/core/connection/br:br_connection",
|
||||
"$dsoftbus_root_path/core/connection/tcp:tcp_connection",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("conn_manager") {
|
||||
sources = [ "softbus_conn_manager.c" ]
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/ble/include",
|
||||
"$dsoftbus_root_path/core/connection/br/include",
|
||||
"$dsoftbus_root_path/core/connection/tcp/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/ble:ble_connection",
|
||||
"$dsoftbus_root_path/core/connection/br:br_connection",
|
||||
"$dsoftbus_root_path/core/connection/tcp:tcp_connection",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("tcp_connection") {
|
||||
if (enable_connection_tcp == true) {
|
||||
sources = [ "src/softbus_tcp_connect_manager.c" ]
|
||||
} else {
|
||||
sources = [ "src/softbus_tcp_connect_virtual.c" ]
|
||||
}
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/connection/common:conn_common",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("tcp_connection") {
|
||||
if (enable_connection_tcp == true) {
|
||||
sources = [ "src/softbus_tcp_connect_manager.c" ]
|
||||
} else {
|
||||
sources = [ "src/softbus_tcp_connect_virtual.c" ]
|
||||
}
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/common:conn_common",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("tcp_connection") {
|
||||
if (enable_connection_tcp == true) {
|
||||
sources = [ "src/softbus_tcp_connect_manager.c" ]
|
||||
} else {
|
||||
sources = [ "src/softbus_tcp_connect_virtual.c" ]
|
||||
}
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/common:conn_common",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -11,32 +11,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("softbus_data_interface") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
ohos_shared_library("softbus_server_data") {
|
||||
sources = [ "src/softbus_server_data.cpp" ]
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
if (enable_connection_tcp == true) {
|
||||
tcp_connection_src = [
|
||||
"$dsoftbus_root_path/core/connection/tcp/src/softbus_tcp_connect_manager.c",
|
||||
]
|
||||
} else {
|
||||
tcp_connection_src = [
|
||||
"$dsoftbus_root_path/core/connection/tcp/src/softbus_tcp_connect_virtual.c",
|
||||
]
|
||||
public_configs = [ ":softbus_data_interface" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
part_name = "dsoftbus_standard"
|
||||
}
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
|
||||
tcp_connection_inc = [ "$dsoftbus_root_path/core/connection/tcp/include" ]
|
@ -1,142 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("disc_server_interface") {
|
||||
include_dirs = [
|
||||
"service/include",
|
||||
"interface",
|
||||
"manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_disc_server") {
|
||||
sources = [
|
||||
"ipc/mini/disc_client_proxy.c",
|
||||
"manager/src/disc_manager.c",
|
||||
"manager/src/softbus_disc_server.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"ble/include",
|
||||
"coap/include",
|
||||
"ipc/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/interfaces/innerkits/discovery",
|
||||
"$dsoftbus_root_path/sdk/discovery/manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$softbus_adapter_common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
public_configs = [ ":disc_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
"ble:ble_discovery",
|
||||
"coap:dsoftbus_disc_coap",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_disc_server") {
|
||||
sources = [
|
||||
"ipc/small/disc_client_proxy.c",
|
||||
"manager/src/disc_manager.c",
|
||||
"manager/src/softbus_disc_server.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"ble/include",
|
||||
"coap/include",
|
||||
"ipc/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/inner_communication",
|
||||
"$dsoftbus_root_path/interfaces/innerkits/discovery",
|
||||
"$softbus_adapter_common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
public_configs = [ ":disc_server_interface" ]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/frame/small/client_manager:client_manager",
|
||||
"$hilog_lite_deps_path",
|
||||
"ble:ble_discovery",
|
||||
"coap:dsoftbus_disc_coap",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_disc_server") {
|
||||
include_dirs = [
|
||||
"ble/include",
|
||||
"coap/include",
|
||||
"ipc/include",
|
||||
"ipc/standard/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/client/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata/include",
|
||||
"//utils/system/safwk/native/include",
|
||||
]
|
||||
|
||||
sources = [
|
||||
"ipc/standard/src/disc_client_proxy.cpp",
|
||||
"ipc/standard/src/disc_client_proxy_standard.cpp",
|
||||
"manager/src/disc_manager.c",
|
||||
"manager/src/softbus_disc_server.c",
|
||||
]
|
||||
|
||||
public_configs = [ ":disc_server_interface" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
}
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata:softbus_server_data",
|
||||
"ble:ble_discovery",
|
||||
"coap:dsoftbus_disc_coap",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (enable_discovery_ble == false) {
|
||||
sources_ble = [ "src/disc_ble_virtual.c" ]
|
||||
deps_ble = []
|
||||
} else {
|
||||
sources_ble = [
|
||||
"src/disc_ble_utils.c",
|
||||
"src/disc_ble.c",
|
||||
]
|
||||
deps_ble = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth:softbus_adapter_ble",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common:softbus_core_common",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
]
|
||||
}
|
||||
|
||||
common_include = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/adapter/common/include",
|
||||
"$dsoftbus_root_path/adapter/common/net/bluetooth/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/core/discovery/manager/include",
|
||||
"$dsoftbus_root_path/core/discovery/ble/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("ble_discovery") {
|
||||
sources = sources_ble
|
||||
include_dirs = common_include
|
||||
deps = deps_ble
|
||||
}
|
||||
} else {
|
||||
shared_library("ble_discovery") {
|
||||
sources = sources_ble
|
||||
include_dirs = common_include
|
||||
deps = deps_ble
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("ble_discovery") {
|
||||
sources = sources_ble
|
||||
include_dirs = common_include
|
||||
deps = deps_ble
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
26
core/discovery/ble/disc_ble.gni
Executable file
26
core/discovery/ble/disc_ble.gni
Executable file
@ -0,0 +1,26 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
ble_discovery_inc = [ "$dsoftbus_root_path/core/discovery/ble/include" ]
|
||||
ble_discovery_deps = []
|
||||
if (enable_discovery_ble == false) {
|
||||
ble_discovery_src =
|
||||
[ "$dsoftbus_root_path/core/discovery/ble/src/disc_ble_virtual.c" ]
|
||||
} else {
|
||||
ble_discovery_src = [
|
||||
"$dsoftbus_root_path/core/discovery/ble/src/disc_ble_utils.c",
|
||||
"$dsoftbus_root_path/core/discovery/ble/src/disc_ble.c",
|
||||
]
|
||||
}
|
@ -1,138 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("discovery_coap_config") {
|
||||
cflags = [ "-Wno-error" ]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (enable_discovery_coap == true) {
|
||||
sources_coap = [
|
||||
"src/disc_coap.c",
|
||||
"src/disc_nstackx_adapter.c",
|
||||
]
|
||||
deps_coap = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
} else {
|
||||
sources_coap = [ "src/disc_coap_virtual.c" ]
|
||||
deps_coap = []
|
||||
}
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_disc_coap") {
|
||||
sources = sources_coap
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/core/discovery/manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//third_party/cJSON",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-std=c99",
|
||||
]
|
||||
deps = deps_coap
|
||||
deps += [
|
||||
"$dsoftbus_root_path/components/nstackx_mini/nstackx_ctrl:nstackx_ctrl",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_disc_coap") {
|
||||
sources = sources_coap
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/core/discovery/manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//third_party/cJSON",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-std=c99",
|
||||
]
|
||||
|
||||
deps = deps_coap
|
||||
deps += [
|
||||
"$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
if (enable_discovery_coap == true) {
|
||||
sources_coap = [
|
||||
"src/disc_coap.c",
|
||||
"src/disc_nstackx_adapter.c",
|
||||
]
|
||||
} else {
|
||||
sources_coap = [ "src/disc_coap_virtual.c" ]
|
||||
}
|
||||
|
||||
ohos_shared_library("dsoftbus_disc_coap") {
|
||||
sources = sources_coap
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/core/discovery/manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
]
|
||||
configs = [ ":discovery_coap_config" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
46
core/discovery/coap/disc_coap.gni
Normal file
46
core/discovery/coap/disc_coap.gni
Normal file
@ -0,0 +1,46 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (enable_discovery_coap == true) {
|
||||
disc_coap_src = [
|
||||
"$dsoftbus_root_path/core/discovery/coap/src/disc_coap.c",
|
||||
"$dsoftbus_root_path/core/discovery/coap/src/disc_nstackx_adapter.c",
|
||||
]
|
||||
} else {
|
||||
disc_coap_src =
|
||||
[ "$dsoftbus_root_path/core/discovery/coap/src/disc_coap_virtual.c" ]
|
||||
}
|
||||
disc_coap_inc = [
|
||||
"$dsoftbus_root_path/core/discovery/coap/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
disc_coap_deps = []
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
disc_coap_deps += [
|
||||
"$dsoftbus_root_path/components/nstackx_mini/nstackx_ctrl:nstackx_ctrl",
|
||||
]
|
||||
} else {
|
||||
disc_coap_deps +=
|
||||
[ "$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl" ]
|
||||
}
|
||||
} else {
|
||||
disc_coap_deps +=
|
||||
[ "$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl" ]
|
||||
}
|
52
core/discovery/disc.gni
Executable file
52
core/discovery/disc.gni
Executable file
@ -0,0 +1,52 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/core/discovery/ble/disc_ble.gni")
|
||||
import("//foundation/communication/dsoftbus/core/discovery/coap/disc_coap.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
disc_server_src = ble_discovery_src + disc_coap_src
|
||||
disc_server_inc = ble_discovery_inc + disc_coap_inc
|
||||
disc_server_deps = ble_discovery_deps + disc_coap_deps
|
||||
disc_server_src += [
|
||||
"$dsoftbus_root_path/core/discovery/manager/src/disc_manager.c",
|
||||
"$dsoftbus_root_path/core/discovery/manager/src/softbus_disc_server.c",
|
||||
]
|
||||
disc_server_inc += [
|
||||
"$dsoftbus_root_path/core/discovery/ipc/include",
|
||||
"$dsoftbus_root_path/core/discovery/ipc/include",
|
||||
"$dsoftbus_root_path/core/discovery/manager/include",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
]
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
disc_server_src +=
|
||||
[ "$dsoftbus_root_path/core/discovery/ipc/mini/disc_client_proxy.c" ]
|
||||
disc_server_inc += [ "$dsoftbus_root_path/sdk/discovery/manager/include" ]
|
||||
} else {
|
||||
disc_server_src +=
|
||||
[ "$dsoftbus_root_path/core/discovery/ipc/small/disc_client_proxy.c" ]
|
||||
disc_server_deps +=
|
||||
[ "//foundation/communication/ipc_lite:liteipc_adapter" ]
|
||||
}
|
||||
} else {
|
||||
disc_server_src += [
|
||||
"$dsoftbus_root_path/core/discovery/ipc/standard/src/disc_client_proxy.cpp",
|
||||
"$dsoftbus_root_path/core/discovery/ipc/standard/src/disc_client_proxy_standard.cpp",
|
||||
]
|
||||
disc_server_inc += [
|
||||
"$dsoftbus_root_path/core/discovery/ipc/standard/include",
|
||||
"//utils/system/safwk/native/include",
|
||||
]
|
||||
disc_server_deps += [ "//utils/native/base:utils" ]
|
||||
}
|
@ -16,15 +16,15 @@
|
||||
#include "disc_client_proxy.h"
|
||||
|
||||
#include "disc_client_proxy_standard.h"
|
||||
#include "softbus_client_info_manager.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_log.h"
|
||||
#include "softbus_server_data.h"
|
||||
|
||||
using namespace OHOS;
|
||||
|
||||
static sptr<DiscClientProxy> GetClientProxy(const char *pkgName)
|
||||
{
|
||||
sptr<IRemoteObject> clientObject = SoftBusServerData::GetInstance().GetSoftbusClientProxy(pkgName);
|
||||
sptr<IRemoteObject> clientObject = SoftbusClientInfoManager::GetInstance().GetSoftbusClientProxy(pkgName);
|
||||
sptr<DiscClientProxy> clientProxy = new (std::nothrow) DiscClientProxy(clientObject);
|
||||
return clientProxy;
|
||||
}
|
||||
|
@ -11,115 +11,178 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//foundation/communication/dsoftbus/core/adapter/core_adapter.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/authentication/authentication.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/bus_center/bus_center_server.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/common/security/permission/permission.gni")
|
||||
import("//foundation/communication/dsoftbus/core/connection/conn.gni")
|
||||
import("//foundation/communication/dsoftbus/core/discovery/disc.gni")
|
||||
import("//foundation/communication/dsoftbus/core/transmission/trans.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_server_frame") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/inner_communication",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/core/transmission/session/include",
|
||||
"$dsoftbus_root_path/core/frame/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
"$dsoftbus_root_path/sdk/bus_center/include",
|
||||
"$dsoftbus_root_path/sdk/transmission/trans_channel/manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$hilog_lite_include_path",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"$dsoftbus_root_path/core/authentication/include",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/frame/common/include",
|
||||
"$dsoftbus_root_path/core/discovery/manager/include",
|
||||
"$dsoftbus_root_path/core/discovery/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
]
|
||||
dsoftbus_server_common_src =
|
||||
auth_server_src + bus_center_server_src + conn_manager_src +
|
||||
disc_server_src + trans_session_src + softbus_permission_src
|
||||
dsoftbus_server_common_inc =
|
||||
auth_server_inc + bus_center_server_inc + conn_manager_inc +
|
||||
disc_server_inc + trans_session_inc + softbus_permission_inc
|
||||
dsoftbus_server_common_deps =
|
||||
auth_server_deps + bus_center_server_deps + conn_manager_deps +
|
||||
disc_server_deps + trans_session_deps + softbus_permission_deps
|
||||
|
||||
sources = [
|
||||
"common/src/softbus_server_frame.c",
|
||||
"mini/src/softbus_server_stub.c",
|
||||
]
|
||||
if (defined(ohos_lite)) {
|
||||
copy("permission_json") {
|
||||
sources = [ "$dsoftbus_core_path/common/security/permission/softbus_trans_permission.json" ]
|
||||
outputs = [ "$root_out_dir/etc/softbus_trans_permission.json" ]
|
||||
}
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_server_frame") {
|
||||
defines = AUTH_SERVER_DEFINES
|
||||
include_dirs = dsoftbus_server_common_inc
|
||||
include_dirs += [
|
||||
"$dsoftbus_root_path/core/frame/common/include",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
]
|
||||
sources = dsoftbus_server_common_src
|
||||
sources += [
|
||||
"common/src/softbus_server_frame.c",
|
||||
"mini/src/softbus_server_stub.c",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-std=c99",
|
||||
]
|
||||
cflags_cc = cflags
|
||||
deps = dsoftbus_server_common_deps
|
||||
deps += [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common:softbus_utils",
|
||||
"//build/lite/config/component/cJSON:cjson_static",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_server_frame") {
|
||||
defines = AUTH_SERVER_DEFINES
|
||||
include_dirs = dsoftbus_server_common_inc
|
||||
include_dirs += [
|
||||
"common/include",
|
||||
"small/init/include",
|
||||
"small/client_manager/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
"//utils/native/lite/include",
|
||||
]
|
||||
sources = dsoftbus_server_common_src
|
||||
sources += [
|
||||
"common/src/softbus_server_frame.c",
|
||||
"small/client_manager/src/softbus_client_info_manager.c",
|
||||
"small/init/src/bus_center_server_stub.c",
|
||||
"small/init/src/disc_server_stub.c",
|
||||
"small/init/src/softbus_server_stub.c",
|
||||
"small/init/src/trans_server_stub.c",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center:dsoftbus_bus_center_server",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/security/permission:softbus_permission",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection:softbus_connection",
|
||||
"$dsoftbus_root_path/core/discovery:dsoftbus_disc_server",
|
||||
"$dsoftbus_root_path/core/transmission/session:dsoftbus_trans_session",
|
||||
]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-fno-builtin",
|
||||
"-std=c99",
|
||||
]
|
||||
cflags_cc = cflags
|
||||
deps = dsoftbus_server_common_deps
|
||||
deps += [
|
||||
":permission_json",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common:softbus_utils",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
executable("softbus_server") {
|
||||
sources = [ "small/init/src/softbus_server_main.c" ]
|
||||
include_dirs = [ "common/include" ]
|
||||
deps = [ ":softbus_server_frame" ]
|
||||
cflags = [ "-fPIC" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_server_frame") {
|
||||
include_dirs = [
|
||||
"common/include",
|
||||
"small/init/include",
|
||||
"small/client_manager/include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/include",
|
||||
"$dsoftbus_root_path/core/common/message_handler/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/inner_communication",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/proxy/include",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"//base/security/deviceauth/interfaces/innerkits",
|
||||
"//utils/native/lite/include",
|
||||
"$hilog_lite_include_path",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
]
|
||||
|
||||
sources = [
|
||||
"common/src/softbus_server_frame.c",
|
||||
"small/init/src/bus_center_server_stub.c",
|
||||
"small/init/src/disc_server_stub.c",
|
||||
"small/init/src/softbus_server_stub.c",
|
||||
"small/init/src/trans_server_stub.c",
|
||||
]
|
||||
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
"-std=c99",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center:dsoftbus_bus_center_server",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/security/permission:softbus_permission",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection:softbus_connection",
|
||||
"$dsoftbus_root_path/core/discovery:dsoftbus_disc_server",
|
||||
"$dsoftbus_root_path/core/frame/small/client_manager:client_manager",
|
||||
"$dsoftbus_root_path/core/transmission/session:dsoftbus_trans_session",
|
||||
"$hilog_lite_deps_path",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
|
||||
]
|
||||
ohos_prebuilt_etc("softbus_server.rc") {
|
||||
relative_install_dir = "init"
|
||||
if (use_musl) {
|
||||
source =
|
||||
"$dsoftbus_root_path/core/frame/standard/init/src/softbus_server.cfg"
|
||||
} else {
|
||||
source =
|
||||
"$dsoftbus_root_path/core/frame/standard/init/src/softbus_server.rc"
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
executable("softbus_server") {
|
||||
sources = [ "small/init/src/softbus_server_main.c" ]
|
||||
include_dirs = [ "common/include" ]
|
||||
deps = [ ":softbus_server_frame" ]
|
||||
ohos_prebuilt_etc("softbus_permission_json") {
|
||||
source = "$dsoftbus_root_path/core/common/security/permission/softbus_trans_permission.json"
|
||||
install_enable = true
|
||||
relative_install_dir = "communication/softbus"
|
||||
part_name = "dsoftbus_standard"
|
||||
}
|
||||
ohos_shared_library("softbus_server") {
|
||||
defines = AUTH_SERVER_DEFINES
|
||||
include_dirs = dsoftbus_server_common_inc
|
||||
include_dirs += [
|
||||
"$dsoftbus_root_path/core/frame/common/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/client_manager/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/init/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//utils/native/lite/include",
|
||||
]
|
||||
sources = dsoftbus_server_common_src
|
||||
sources += [
|
||||
"common/src/softbus_server_frame.c",
|
||||
"standard/client_manager/src/softbus_client_info_manager.cpp",
|
||||
"standard/init/src/if_softbus_server.cpp",
|
||||
"standard/init/src/softbus_server.cpp",
|
||||
"standard/init/src/softbus_server_death_recipient.cpp",
|
||||
"standard/init/src/softbus_server_stub.cpp",
|
||||
]
|
||||
deps = dsoftbus_server_common_deps
|
||||
deps += [
|
||||
":softbus_permission_json",
|
||||
":softbus_server.rc",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common:softbus_utils",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = bus_center_server_external_deps
|
||||
external_deps += [
|
||||
"aafwk_standard:want",
|
||||
"appexecfwk_standard:appexecfwk_core",
|
||||
"deviceauth_standard:deviceauth_sdk",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"permission_standard:libpermissionsdk_standard",
|
||||
"safwk:system_ability_fwk",
|
||||
"samgr_standard:samgr_proxy",
|
||||
]
|
||||
}
|
||||
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void InitSoftBusServer();
|
||||
bool GetServerIsInit();
|
||||
void InitSoftBusServer(void);
|
||||
bool GetServerIsInit(void);
|
||||
void ClientDeathCallback(const char *pkgName);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -17,16 +17,26 @@
|
||||
|
||||
#include "auth_interface.h"
|
||||
#include "bus_center_manager.h"
|
||||
#include "lnn_bus_center_ipc.h"
|
||||
#include "message_handler.h"
|
||||
#include "softbus_conn_interface.h"
|
||||
#include "ohos_init.h"
|
||||
#include "softbus_disc_server.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_feature_config.h"
|
||||
#include "softbus_log.h"
|
||||
#include "softbus_utils.h"
|
||||
#include "trans_session_manager.h"
|
||||
#include "trans_session_service.h"
|
||||
|
||||
static bool g_isInit = false;
|
||||
|
||||
int32_t __attribute__((weak)) ServerStubInit(void)
|
||||
{
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_WARN, "softbus server stub init(weak function).");
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
|
||||
static void ServerModuleDeinit(void)
|
||||
{
|
||||
DiscServerDeinit();
|
||||
@ -38,7 +48,7 @@ static void ServerModuleDeinit(void)
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
bool GetServerIsInit()
|
||||
bool GetServerIsInit(void)
|
||||
{
|
||||
return g_isInit;
|
||||
}
|
||||
@ -93,3 +103,10 @@ ERR_EXIT:
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus framework init failed.");
|
||||
return;
|
||||
}
|
||||
|
||||
void ClientDeathCallback(const char *pkgName)
|
||||
{
|
||||
DiscServerDeathCallback(pkgName);
|
||||
TransServerDeathCallback(pkgName);
|
||||
BusCenterServerDeathCallback(pkgName);
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("client_manager_interface") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
shared_library("client_manager") {
|
||||
sources = [ "src/softbus_client_info_manager.c" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
public_configs = [ ":client_manager_interface" ]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
@ -16,12 +16,14 @@
|
||||
#ifndef SOFTBUS_SERVER_STUB_H
|
||||
#define SOFTBUS_SERVER_STUB_H
|
||||
|
||||
#include "softbus_server_stub_interface.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t ServerStubInit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,59 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("softbus_proxy_config") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/sdk/transmission/session/cpp/include",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_shared_library("softbus_client") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/sdk/transmission/trans_channel/manager/include",
|
||||
]
|
||||
sources = [
|
||||
"src/if_softbus_client.cpp",
|
||||
"src/softbus_client_stub.cpp",
|
||||
]
|
||||
public_configs = [ ":softbus_proxy_config" ]
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/sdk/bus_center:dsoftbus_bus_center_manager_sdk",
|
||||
"$dsoftbus_root_path/sdk/bus_center/service:dsoftbus_bus_center_service_sdk",
|
||||
"$dsoftbus_root_path/sdk/discovery:dsoftbus_disc_manager_sdk",
|
||||
"$dsoftbus_root_path/sdk/discovery/service:dsoftbus_disc_service_sdk",
|
||||
"$dsoftbus_root_path/sdk/frame:softbus_client_frame",
|
||||
"$dsoftbus_root_path/sdk/transmission:dsoftbus_trans_session_manager_sdk",
|
||||
"$dsoftbus_root_path/sdk/transmission/session:dsoftbus_trans_session_sdk",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
@ -25,9 +25,9 @@
|
||||
#include "iremote_proxy.h"
|
||||
|
||||
namespace OHOS {
|
||||
class SoftBusServerData {
|
||||
class SoftbusClientInfoManager {
|
||||
public:
|
||||
static SoftBusServerData &GetInstance();
|
||||
static SoftbusClientInfoManager &GetInstance();
|
||||
int32_t SoftbusAddService(const std::string &pkgName, const sptr<IRemoteObject> &object,
|
||||
const sptr<IRemoteObject::DeathRecipient> &abilityDeath);
|
||||
int32_t SoftbusRemoveService(const sptr<IRemoteObject> &object, std::string &pkgName);
|
||||
@ -36,12 +36,12 @@ public:
|
||||
bool SoftbusClientIsExist(const std::string &pkgName);
|
||||
|
||||
private:
|
||||
~SoftBusServerData() = default;
|
||||
SoftBusServerData() = default;
|
||||
~SoftbusClientInfoManager() = default;
|
||||
SoftbusClientInfoManager() = default;
|
||||
std::recursive_mutex clientObjectMapLock_;
|
||||
std::unordered_map<std::string, std::pair<sptr<IRemoteObject>,
|
||||
sptr<IRemoteObject::DeathRecipient>>> clientObjectMap_;
|
||||
DISALLOW_COPY_AND_MOVE(SoftBusServerData);
|
||||
DISALLOW_COPY_AND_MOVE(SoftbusClientInfoManager);
|
||||
};
|
||||
} // namespace OHOS
|
||||
#endif
|
@ -13,19 +13,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "softbus_server_data.h"
|
||||
#include "softbus_client_info_manager.h"
|
||||
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_log.h"
|
||||
|
||||
namespace OHOS {
|
||||
SoftBusServerData &SoftBusServerData::GetInstance()
|
||||
SoftbusClientInfoManager &SoftbusClientInfoManager::GetInstance()
|
||||
{
|
||||
static SoftBusServerData instance;
|
||||
static SoftbusClientInfoManager instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
int32_t SoftBusServerData::SoftbusAddService(const std::string &pkgName, const sptr<IRemoteObject> &object,
|
||||
int32_t SoftbusClientInfoManager::SoftbusAddService(const std::string &pkgName, const sptr<IRemoteObject> &object,
|
||||
const sptr<IRemoteObject::DeathRecipient> &abilityDeath)
|
||||
{
|
||||
if (pkgName.empty() || object == nullptr || abilityDeath == nullptr) {
|
||||
@ -38,7 +38,7 @@ int32_t SoftBusServerData::SoftbusAddService(const std::string &pkgName, const s
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
|
||||
int32_t SoftBusServerData::SoftbusRemoveService(const sptr<IRemoteObject> &object, std::string &pkgName)
|
||||
int32_t SoftbusClientInfoManager::SoftbusRemoveService(const sptr<IRemoteObject> &object, std::string &pkgName)
|
||||
{
|
||||
if (object == nullptr) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "RemoveService object is nullptr\n");
|
||||
@ -56,7 +56,7 @@ int32_t SoftBusServerData::SoftbusRemoveService(const sptr<IRemoteObject> &objec
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
|
||||
sptr<IRemoteObject> SoftBusServerData::GetSoftbusClientProxy(const std::string &pkgName)
|
||||
sptr<IRemoteObject> SoftbusClientInfoManager::GetSoftbusClientProxy(const std::string &pkgName)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> autoLock(clientObjectMapLock_);
|
||||
auto iter = clientObjectMap_.find(pkgName);
|
||||
@ -67,7 +67,7 @@ sptr<IRemoteObject> SoftBusServerData::GetSoftbusClientProxy(const std::string &
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SoftBusServerData::GetSoftbusClientProxyMap(std::map<std::string, sptr<IRemoteObject>> &softbusClientMap)
|
||||
void SoftbusClientInfoManager::GetSoftbusClientProxyMap(std::map<std::string, sptr<IRemoteObject>> &softbusClientMap)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> autoLock(clientObjectMapLock_);
|
||||
for (auto iter = clientObjectMap_.begin(); iter != clientObjectMap_.end(); ++iter) {
|
||||
@ -75,7 +75,7 @@ void SoftBusServerData::GetSoftbusClientProxyMap(std::map<std::string, sptr<IRem
|
||||
}
|
||||
}
|
||||
|
||||
bool SoftBusServerData::SoftbusClientIsExist(const std::string &pkgName)
|
||||
bool SoftbusClientInfoManager::SoftbusClientIsExist(const std::string &pkgName)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> autoLock(clientObjectMapLock_);
|
||||
auto iter = clientObjectMap_.find(pkgName);
|
@ -19,11 +19,11 @@
|
||||
#include "ipc_types.h"
|
||||
#include "lnn_bus_center_ipc.h"
|
||||
#include "securec.h"
|
||||
#include "softbus_client_info_manager.h"
|
||||
#include "softbus_conn_interface.h"
|
||||
#include "softbus_disc_server.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_log.h"
|
||||
#include "softbus_server_data.h"
|
||||
#include "softbus_server_death_recipient.h"
|
||||
#include "softbus_server_frame.h"
|
||||
#include "system_ability_definition.h"
|
||||
@ -83,7 +83,7 @@ int32_t SoftBusServer::SoftbusRegisterService(const char *clientPkgName, const s
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "package name or object is nullptr\n");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
if (SoftBusServerData::GetInstance().SoftbusClientIsExist(clientPkgName)) {
|
||||
if (SoftbusClientInfoManager::GetInstance().SoftbusClientIsExist(clientPkgName)) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus client is exist.\n");
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
@ -97,7 +97,7 @@ int32_t SoftBusServer::SoftbusRegisterService(const char *clientPkgName, const s
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "AddDeathRecipient failed\n");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
if (SoftBusServerData::GetInstance().SoftbusAddService(clientPkgName, object, abilityDeath) != SOFTBUS_OK) {
|
||||
if (SoftbusClientInfoManager::GetInstance().SoftbusAddService(clientPkgName, object, abilityDeath) != SOFTBUS_OK) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus add client service failed\n");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
@ -15,15 +15,15 @@
|
||||
|
||||
#include "softbus_server_death_recipient.h"
|
||||
|
||||
#include "softbus_client_info_manager.h"
|
||||
#include "softbus_log.h"
|
||||
#include "softbus_server_data.h"
|
||||
#include "softbus_server_frame.h"
|
||||
|
||||
namespace OHOS {
|
||||
void SoftBusDeathRecipient::OnRemoteDied(const wptr<IRemoteObject> &remote)
|
||||
{
|
||||
std::string pkgName;
|
||||
SoftBusServerData::GetInstance().SoftbusRemoveService(remote.promote(), pkgName);
|
||||
SoftbusClientInfoManager::GetInstance().SoftbusRemoveService(remote.promote(), pkgName);
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_INFO,
|
||||
"client service %s died, remove it from softbus server", pkgName.c_str());
|
||||
ClientDeathCallback(pkgName.c_str());
|
@ -1,79 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
ohos_prebuilt_etc("softbus_server.rc") {
|
||||
relative_install_dir = "init"
|
||||
if (use_musl) {
|
||||
source =
|
||||
"$dsoftbus_root_path/core/frame/standard/server/src/softbus_server.cfg"
|
||||
} else {
|
||||
source =
|
||||
"$dsoftbus_root_path/core/frame/standard/server/src/softbus_server.rc"
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
|
||||
ohos_shared_library("softbus_server") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/core/frame/standard/server/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/frame/common/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata/include",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/common/softbus_property/include",
|
||||
"$softbus_adapter_config/spec_config",
|
||||
]
|
||||
sources = [
|
||||
"$dsoftbus_root_path/core/frame/standard/server/src/softbus_server_death_recipient.cpp",
|
||||
"$dsoftbus_root_path/core/frame/standard/server/src/softbus_server_frame.c",
|
||||
"src/if_softbus_server.cpp",
|
||||
"src/softbus_server.cpp",
|
||||
"src/softbus_server_stub.cpp",
|
||||
]
|
||||
deps = [
|
||||
":softbus_server.rc",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center:dsoftbus_bus_center_server",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/message_handler:message_handler",
|
||||
"$dsoftbus_root_path/core/common/network:softbus_network_utils",
|
||||
"$dsoftbus_root_path/core/common/security/permission:softbus_permission",
|
||||
"$dsoftbus_root_path/core/common/softbus_property:softbus_property",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/connection/manager:conn_manager",
|
||||
"$dsoftbus_root_path/core/discovery:dsoftbus_disc_server",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata:softbus_server_data",
|
||||
"$dsoftbus_root_path/core/transmission/session:dsoftbus_trans_session",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"safwk:system_ability_fwk",
|
||||
]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "softbus_server_frame.h"
|
||||
|
||||
#include "auth_interface.h"
|
||||
#include "bus_center_manager.h"
|
||||
#include "lnn_bus_center_ipc.h"
|
||||
#include "message_handler.h"
|
||||
#include "softbus_conn_interface.h"
|
||||
#include "softbus_disc_server.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_feature_config.h"
|
||||
#include "softbus_log.h"
|
||||
#include "softbus_utils.h"
|
||||
#include "trans_session_manager.h"
|
||||
#include "trans_session_service.h"
|
||||
|
||||
static void ServerModuleDeinit(void)
|
||||
{
|
||||
DiscServerDeinit();
|
||||
ConnServerDeinit();
|
||||
TransServerDeinit();
|
||||
BusCenterServerDeinit();
|
||||
AuthDeinit();
|
||||
SoftBusTimerDeInit();
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
void InitSoftBusServer(void)
|
||||
{
|
||||
SoftbusConfigInit();
|
||||
|
||||
if (SoftBusTimerInit() == SOFTBUS_ERR) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (LooperInit() == -1) {
|
||||
return;
|
||||
}
|
||||
if (ConnServerInit() == SOFTBUS_ERR) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus conn server init failed.");
|
||||
goto ERR_EXIT;
|
||||
}
|
||||
|
||||
if (TransServerInit() == SOFTBUS_ERR) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus trans server init failed.");
|
||||
goto ERR_EXIT;
|
||||
}
|
||||
|
||||
if (AuthInit() == SOFTBUS_ERR) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus auth init failed.");
|
||||
goto ERR_EXIT;
|
||||
}
|
||||
|
||||
if (DiscServerInit() == SOFTBUS_ERR) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus disc server init failed.");
|
||||
goto ERR_EXIT;
|
||||
}
|
||||
|
||||
if (BusCenterServerInit() == SOFTBUS_ERR) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus buscenter server init failed.");
|
||||
goto ERR_EXIT;
|
||||
}
|
||||
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_INFO, "softbus framework init success.");
|
||||
return;
|
||||
|
||||
ERR_EXIT:
|
||||
ServerModuleDeinit();
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "softbus framework init failed.");
|
||||
return;
|
||||
}
|
||||
|
||||
void ClientDeathCallback(const char *pkgName)
|
||||
{
|
||||
DiscServerDeathCallback(pkgName);
|
||||
TransServerDeathCallback(pkgName);
|
||||
BusCenterServerDeathCallback(pkgName);
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("trans_common_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/cJSON",
|
||||
"$softbus_adapter_common/include",
|
||||
"$hilog_lite_include_path",
|
||||
"$libsec_include_path",
|
||||
]
|
||||
|
||||
common_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_trans_common") {
|
||||
include_dirs = common_include
|
||||
sources = [ "src/softbus_message_open_channel.c" ]
|
||||
public_configs = [ ":trans_common_interface" ]
|
||||
deps = common_deps
|
||||
deps += [ "//build/lite/config/component/cJSON:cjson_static" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_trans_common") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = [ "src/softbus_message_open_channel.c" ]
|
||||
deps = common_deps
|
||||
deps += [
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
]
|
||||
public_configs = [ ":trans_common_interface" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_trans_common") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"//third_party/cJSON",
|
||||
"$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct",
|
||||
"$softbus_adapter_common/include",
|
||||
]
|
||||
sources = [ "src/softbus_message_open_channel.c" ]
|
||||
public_configs = [ ":trans_common_interface" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
public_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
23
core/transmission/common/trans_common.gni
Normal file
23
core/transmission/common/trans_common.gni
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
trans_common_inc = [
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
]
|
||||
trans_common_src = [
|
||||
"$dsoftbus_root_path/core/transmission/common/src/softbus_message_open_channel.c",
|
||||
"$dsoftbus_root_path/core/transmission/common/src/trans_pending_pkt.c",
|
||||
]
|
||||
trans_common_deps = []
|
@ -1,100 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("trans_ipc_proxy_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$hilog_lite_include_path",
|
||||
"$libsec_include_path",
|
||||
]
|
||||
|
||||
common_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/connection/common:conn_common",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_trans_ipc_proxy") {
|
||||
include_dirs = common_include
|
||||
include_dirs += [
|
||||
"$dsoftbus_root_path/sdk/transmission/trans_channel/manager/include",
|
||||
]
|
||||
deps = common_deps
|
||||
sources = [ "mini/trans_client_proxy.c" ]
|
||||
public_configs = [ ":trans_ipc_proxy_interface" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_trans_ipc_proxy") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = [ "small/trans_client_proxy.c" ]
|
||||
public_configs = [ ":trans_ipc_proxy_interface" ]
|
||||
deps = common_deps
|
||||
deps += [
|
||||
"$dsoftbus_root_path/core/frame/small/client_manager:client_manager",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_trans_ipc_proxy") {
|
||||
include_dirs = [
|
||||
"standard/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/client/include",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
sources = [
|
||||
"standard/src/trans_client_proxy.cpp",
|
||||
"standard/src/trans_client_proxy_standard.cpp",
|
||||
]
|
||||
public_configs = [ ":trans_ipc_proxy_interface" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
}
|
||||
deps = [
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/frame/standard/softbusdata:softbus_server_data",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -15,16 +15,16 @@
|
||||
|
||||
#include "trans_client_proxy.h"
|
||||
|
||||
#include "softbus_client_info_manager.h"
|
||||
#include "softbus_errcode.h"
|
||||
#include "softbus_log.h"
|
||||
#include "softbus_server_data.h"
|
||||
#include "trans_client_proxy_standard.h"
|
||||
|
||||
using namespace OHOS;
|
||||
|
||||
static sptr<TransClientProxy> GetClientProxy(const char *pkgName)
|
||||
{
|
||||
sptr<IRemoteObject> clientObject = SoftBusServerData::GetInstance().GetSoftbusClientProxy(pkgName);
|
||||
sptr<IRemoteObject> clientObject = SoftbusClientInfoManager::GetInstance().GetSoftbusClientProxy(pkgName);
|
||||
sptr<TransClientProxy> clientProxy = new (std::nothrow) TransClientProxy(clientObject);
|
||||
return clientProxy;
|
||||
}
|
||||
|
@ -1,73 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("softbus_trans_pending_interface") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$hilog_lite_include_path",
|
||||
"$softbus_adapter_common/include",
|
||||
]
|
||||
common_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
]
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("softbus_trans_pending") {
|
||||
include_dirs = common_include
|
||||
public_configs = [ ":softbus_trans_pending_interface" ]
|
||||
sources = [ "src/trans_pending_pkt.c" ]
|
||||
deps = common_deps
|
||||
}
|
||||
} else {
|
||||
shared_library("softbus_trans_pending") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
public_configs = [ ":softbus_trans_pending_interface" ]
|
||||
sources = [ "src/trans_pending_pkt.c" ]
|
||||
deps = common_deps
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("softbus_trans_pending") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$softbus_adapter_common/include",
|
||||
]
|
||||
public_configs = [ ":softbus_trans_pending_interface" ]
|
||||
sources = [ "src/trans_pending_pkt.c" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -1,161 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("trans_session_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/security/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/proxy/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
|
||||
"//third_party/cJSON",
|
||||
"$libsec_include_path",
|
||||
"$hilog_lite_include_path",
|
||||
]
|
||||
|
||||
common_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center:dsoftbus_bus_center_server",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub:dsoftbus_bus_center_hub",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/transmission/ipc:dsoftbus_trans_ipc_proxy",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/proxy:dsoftbus_trans_proxy_channel",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct:dsoftbus_trans_direct_channel",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation:dsoftbus_trans_udp_channel",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_trans_session") {
|
||||
include_dirs = common_include
|
||||
include_dirs += [ "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include" ]
|
||||
sources = [
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_message.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_callback.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_lane_manager.c",
|
||||
"src/trans_session_manager.c",
|
||||
"src/trans_session_service.c",
|
||||
]
|
||||
|
||||
public_configs = [ ":trans_session_interface" ]
|
||||
deps = common_deps
|
||||
deps += [ "//build/lite/config/component/cJSON:cjson_static" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_trans_session") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = [
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_message.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_callback.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_lane_manager.c",
|
||||
"src/trans_session_manager.c",
|
||||
"src/trans_session_service.c",
|
||||
]
|
||||
|
||||
public_configs = [ ":trans_session_interface" ]
|
||||
deps = common_deps
|
||||
deps += [
|
||||
"$hilog_lite_deps_path",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_trans_session") {
|
||||
include_dirs = [
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/common/security/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/transmission/ipc/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
|
||||
"$dsoftbus_root_path/core/bus_center/utils/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
sources = [
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_message.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_callback.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_lane_manager.c",
|
||||
"src/trans_session_manager.c",
|
||||
"src/trans_session_service.c",
|
||||
]
|
||||
public_configs = [ ":trans_session_interface" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
deps = [
|
||||
"$dsoftbus_core_path/common/security/permission:softbus_permission",
|
||||
"$dsoftbus_core_path/transmission/ipc:dsoftbus_trans_ipc_proxy",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center:dsoftbus_bus_center_server",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub:dsoftbus_bus_center_hub",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/bus_center/utils:dsoftbus_bus_center_utils",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/log:softbus_log",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/transmission/ipc:dsoftbus_trans_ipc_proxy",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/proxy:dsoftbus_trans_proxy_channel",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct:dsoftbus_trans_direct_channel",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation:dsoftbus_trans_udp_channel",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
64
core/transmission/trans.gni
Normal file
64
core/transmission/trans.gni
Normal file
@ -0,0 +1,64 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/transmission/trans_channel/trans_channel.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
trans_session_src = trans_channel_src
|
||||
trans_session_inc = trans_channel_inc
|
||||
trans_session_deps = trans_channel_deps
|
||||
|
||||
trans_session_src += [
|
||||
"$dsoftbus_root_path/core/transmission/session/src/trans_session_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/session/src/trans_session_service.c",
|
||||
]
|
||||
trans_session_inc += [
|
||||
"$dsoftbus_root_path/core/transmission/ipc/include",
|
||||
"$dsoftbus_root_path/core/transmission/session/include",
|
||||
"$dsoftbus_root_path/core/transmission/interface",
|
||||
]
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
trans_session_src += [
|
||||
"$dsoftbus_root_path/core/transmission/ipc/mini/trans_client_proxy.c",
|
||||
]
|
||||
trans_session_inc +=
|
||||
[ "$dsoftbus_root_path/sdk/transmission/trans_channel/manager/include" ]
|
||||
trans_session_deps += [ "//build/lite/config/component/cJSON:cjson_static" ]
|
||||
} else {
|
||||
trans_session_src += [
|
||||
"$dsoftbus_root_path/core/transmission/ipc/small/trans_client_proxy.c",
|
||||
]
|
||||
trans_session_deps += [
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
trans_session_inc += [
|
||||
"$dsoftbus_root_path/core/transmission/ipc/standard/include",
|
||||
"$dsoftbus_root_path/sdk/frame/standard/include",
|
||||
"$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
trans_session_src += [
|
||||
"$dsoftbus_root_path/core/transmission/ipc/standard/src/trans_client_proxy.cpp",
|
||||
"$dsoftbus_root_path/core/transmission/ipc/standard/src/trans_client_proxy_standard.cpp",
|
||||
]
|
||||
trans_session_deps += [
|
||||
"//utils/native/base:utils",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
}
|
@ -1,121 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("trans_proxy_channel_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
}
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/interface",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/connection/manager",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$softbus_adapter_common/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
|
||||
common_src = [
|
||||
"src/softbus_proxychannel_callback.c",
|
||||
"src/softbus_proxychannel_control.c",
|
||||
"src/softbus_proxychannel_listener.c",
|
||||
"src/softbus_proxychannel_manager.c",
|
||||
"src/softbus_proxychannel_message.c",
|
||||
"src/softbus_proxychannel_network.c",
|
||||
"src/softbus_proxychannel_session.c",
|
||||
"src/softbus_proxychannel_transceiver.c",
|
||||
]
|
||||
|
||||
common_deps = [
|
||||
"$dsoftbus_core_path/common/json_utils:json_utils",
|
||||
"$dsoftbus_core_path/common/message_handler:message_handler",
|
||||
"$dsoftbus_core_path/transmission/common:dsoftbus_trans_common",
|
||||
"$dsoftbus_core_path/transmission/ipc:dsoftbus_trans_ipc_proxy",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub:dsoftbus_bus_center_hub",
|
||||
"$dsoftbus_root_path/core/transmission/pending_packet:softbus_trans_pending",
|
||||
]
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_include += [
|
||||
"$hilog_lite_include_path",
|
||||
"$libsec_include_path",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_trans_proxy_channel") {
|
||||
include_dirs = common_include
|
||||
include_dirs +=
|
||||
[ "$dsoftbus_root_path/core/common/message_handler/include" ]
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_proxy_channel_interface" ]
|
||||
deps = common_deps
|
||||
deps += [ "//build/lite/config/component/cJSON:cjson_static" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_trans_proxy_channel") {
|
||||
include_dirs = common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_proxy_channel_interface" ]
|
||||
deps = common_deps
|
||||
deps += [
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_trans_proxy_channel") {
|
||||
include_dirs = common_include
|
||||
include_dirs += [
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
]
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_proxy_channel_interface" ]
|
||||
deps = common_deps
|
||||
deps += [
|
||||
"$dsoftbus_core_path/common/utils:softbus_utils",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/message_handler",
|
||||
"$dsoftbus_root_path/core/connection/manager:conn_manager",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
29
core/transmission/trans_channel/proxy/proxy.gni
Normal file
29
core/transmission/trans_channel/proxy/proxy.gni
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
dsoftbus_trans_proxy_channel_path =
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/proxy"
|
||||
trans_proxy_channel_src = [
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_callback.c",
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_control.c",
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_listener.c",
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_manager.c",
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_message.c",
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_network.c",
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_session.c",
|
||||
"$dsoftbus_trans_proxy_channel_path/src/softbus_proxychannel_transceiver.c",
|
||||
]
|
||||
trans_proxy_channel_inc = [ "$dsoftbus_trans_proxy_channel_path/include" ]
|
||||
trans_proxy_channel_deps = []
|
@ -1,120 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("trans_direct_channel_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
}
|
||||
|
||||
common_src = [
|
||||
"src/trans_tcp_direct_callback.c",
|
||||
"src/trans_tcp_direct_listener.c",
|
||||
"src/trans_tcp_direct_manager.c",
|
||||
"src/trans_tcp_direct_message.c",
|
||||
]
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
common_deps = [
|
||||
"$dsoftbus_core_path/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_core_path/common:softbus_core_common",
|
||||
"$dsoftbus_core_path/connection/common:conn_common",
|
||||
"$dsoftbus_core_path/transmission/common:dsoftbus_trans_common",
|
||||
"$dsoftbus_core_path/transmission/ipc:dsoftbus_trans_ipc_proxy",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
]
|
||||
|
||||
common_include = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$libsec_include_path",
|
||||
"//third_party/cJSON",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_trans_direct_channel") {
|
||||
include_dirs =
|
||||
[ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite" ]
|
||||
include_dirs += common_include
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_direct_channel_interface" ]
|
||||
deps = common_deps
|
||||
deps += [ "//build/lite/config/component/cJSON:cjson_static" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_trans_direct_channel") {
|
||||
include_dirs = [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits" ]
|
||||
include_dirs += common_include
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-fPIC",
|
||||
]
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_direct_channel_interface" ]
|
||||
deps = common_deps
|
||||
deps += [
|
||||
"$libsec_deps_path",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_trans_direct_channel") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"//third_party/cJSON",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/wifi_common/base_listener/include",
|
||||
"$dsoftbus_root_path/core/common/wifi_common/tcp_socket/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/transmission/session/include",
|
||||
]
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_direct_channel_interface" ]
|
||||
|
||||
deps = [
|
||||
"$dsoftbus_core_path/common/utils:softbus_utils",
|
||||
"$dsoftbus_core_path/connection/common:conn_common",
|
||||
"$dsoftbus_core_path/transmission/common:dsoftbus_trans_common",
|
||||
"$dsoftbus_core_path/transmission/ipc:dsoftbus_trans_ipc_proxy",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
23
core/transmission/trans_channel/tcp_direct/tcp_direct.gni
Normal file
23
core/transmission/trans_channel/tcp_direct/tcp_direct.gni
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
tcp_direct_channel_path =
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct"
|
||||
trans_direct_channel_src = [
|
||||
"$tcp_direct_channel_path/src/trans_tcp_direct_callback.c",
|
||||
"$tcp_direct_channel_path/src/trans_tcp_direct_listener.c",
|
||||
"$tcp_direct_channel_path/src/trans_tcp_direct_manager.c",
|
||||
"$tcp_direct_channel_path/src/trans_tcp_direct_message.c",
|
||||
]
|
||||
trans_direct_channel_inc = [ "$tcp_direct_channel_path/include" ]
|
39
core/transmission/trans_channel/trans_channel.gni
Normal file
39
core/transmission/trans_channel/trans_channel.gni
Normal file
@ -0,0 +1,39 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/proxy.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/tcp_direct.gni")
|
||||
import(
|
||||
"//foundation/communication/dsoftbus/core/transmission/trans_channel/udp_negotiation/udp_negotiation.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
trans_channel_src =
|
||||
trans_proxy_channel_src + trans_direct_channel_src + trans_udp_channel_src
|
||||
trans_channel_inc =
|
||||
trans_proxy_channel_inc + trans_direct_channel_inc + trans_udp_channel_inc
|
||||
trans_channel_deps = trans_proxy_channel_deps
|
||||
|
||||
trans_channel_src += [
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_message.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_callback.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_manager.c",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_lane_manager.c",
|
||||
]
|
||||
trans_channel_inc += [
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
"//third_party/cJSON",
|
||||
]
|
@ -1,127 +0,0 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
config("trans_udp_channel_interface") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
|
||||
"$dsoftbus_root_path/core/transmission/common",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_trans_udp == true) {
|
||||
common_src = [
|
||||
"src/trans_udp_channel_manager.c",
|
||||
"src/trans_udp_negotiation.c",
|
||||
"src/trans_udp_negotiation_exchange.c",
|
||||
]
|
||||
} else {
|
||||
common_src = [ "src/trans_udp_virtual.c" ]
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
|
||||
if (enable_trans_udp == true) {
|
||||
common_deps = [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"$dsoftbus_root_path/core/common/json_utils:json_utils",
|
||||
"$dsoftbus_root_path/core/common/utils:softbus_utils",
|
||||
"$hilog_lite_deps_path",
|
||||
"$libsec_deps_path",
|
||||
]
|
||||
} else {
|
||||
common_deps = []
|
||||
}
|
||||
|
||||
common_include = [
|
||||
"include",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/ipc/include",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"//third_party/cJSON",
|
||||
"$hilog_lite_include_path",
|
||||
"$libsec_include_path",
|
||||
]
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
static_library("dsoftbus_trans_udp_channel") {
|
||||
include_dirs = common_include
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_udp_channel_interface" ]
|
||||
deps = common_deps
|
||||
deps += [ "//build/lite/config/component/cJSON:cjson_static" ]
|
||||
}
|
||||
} else {
|
||||
shared_library("dsoftbus_trans_udp_channel") {
|
||||
sources = common_src
|
||||
include_dirs = common_include
|
||||
public_configs = [ ":trans_udp_channel_interface" ]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-std=c99",
|
||||
]
|
||||
deps = common_deps
|
||||
}
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("dsoftbus_trans_udp_channel") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
||||
"$dsoftbus_root_path/core/transmission/common/include",
|
||||
"//third_party/cJSON",
|
||||
"$softbus_adapter_common/include",
|
||||
"$dsoftbus_root_path/core/connection/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/core/common/wifi_common/base_listener/include",
|
||||
"$dsoftbus_root_path/core/common/wifi_common/tcp_socket/include",
|
||||
"$dsoftbus_root_path/core/bus_center/interface",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/core/authentication/interface",
|
||||
"$dsoftbus_root_path/core/transmission/session/include",
|
||||
]
|
||||
sources = common_src
|
||||
public_configs = [ ":trans_udp_channel_interface" ]
|
||||
|
||||
deps = [
|
||||
"$dsoftbus_core_path/common/utils:softbus_utils",
|
||||
"$dsoftbus_core_path/connection/common:conn_common",
|
||||
"$dsoftbus_core_path/transmission/common:dsoftbus_trans_common",
|
||||
"$dsoftbus_core_path/transmission/ipc:dsoftbus_trans_ipc_proxy",
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/authentication:dsoftbus_auth_server",
|
||||
"$dsoftbus_root_path/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger",
|
||||
"//third_party/cJSON:cjson_static",
|
||||
]
|
||||
if (is_standard_system) {
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
udp_channel_path =
|
||||
"$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation"
|
||||
if (enable_trans_udp == true) {
|
||||
trans_udp_channel_src = [
|
||||
"$udp_channel_path/src/trans_udp_channel_manager.c",
|
||||
"$udp_channel_path/src/trans_udp_negotiation.c",
|
||||
"$udp_channel_path/src/trans_udp_negotiation_exchange.c",
|
||||
]
|
||||
} else {
|
||||
trans_udp_channel_src = [ "$udp_channel_path/src/trans_udp_virtual.c" ]
|
||||
}
|
||||
trans_udp_channel_inc = [ "$udp_channel_path/include" ]
|
@ -23,23 +23,21 @@ declare_args() {
|
||||
}
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
libsec_include_path = "//third_party/bounds_checking_function/include"
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
import("$softbus_adapter_config/feature_config/mini/config.gni")
|
||||
hilog_lite_include_path =
|
||||
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite"
|
||||
hilog_lite_deps_path =
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite"
|
||||
|
||||
libsec_deps_path = "//third_party/bounds_checking_function:libsec_static"
|
||||
} else {
|
||||
import("$softbus_adapter_config/feature_config/small/config.gni")
|
||||
hilog_lite_include_path =
|
||||
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits"
|
||||
hilog_lite_deps_path =
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared"
|
||||
libsec_deps_path = "//third_party/bounds_checking_function:libsec_shared"
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
import("$softbus_adapter_config/feature_config/standard/config.gni")
|
||||
}
|
||||
|
@ -7,8 +7,8 @@
|
||||
"inter-device-interface": "1.0"
|
||||
},
|
||||
"module_list": [
|
||||
"//foundation/communication/dsoftbus/core/frame/standard/server:softbus_server",
|
||||
"//foundation/communication/dsoftbus/core/frame/standard/client:softbus_client",
|
||||
"//foundation/communication/dsoftbus/core:softbus_server",
|
||||
"//foundation/communication/dsoftbus/sdk:softbus_client",
|
||||
"//foundation/communication/dsoftbus/core/frame/standard/sa_profile:softbus_sa_profile"
|
||||
],
|
||||
"test_list": [
|
||||
@ -18,7 +18,7 @@
|
||||
"inner_kits": [
|
||||
{
|
||||
"type": "so",
|
||||
"name": "//foundation/communication/dsoftbus/core/frame/standard/client:softbus_client",
|
||||
"name": "//foundation/communication/dsoftbus/sdk:softbus_client",
|
||||
"header": {
|
||||
"header_files": [
|
||||
"bus_center/softbus_bus_center.h",
|
||||
|
85
sdk/BUILD.gn
85
sdk/BUILD.gn
@ -11,13 +11,86 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
||||
|
||||
lite_component("softbus_client") {
|
||||
features = [
|
||||
"discovery/service:dsoftbus_disc_service_sdk",
|
||||
"transmission/session:dsoftbus_trans_session_sdk",
|
||||
"bus_center/service:dsoftbus_bus_center_service_sdk",
|
||||
import("//foundation/communication/dsoftbus/sdk/bus_center/bus_center_sdk.gni")
|
||||
import("//foundation/communication/dsoftbus/sdk/discovery/disc_sdk.gni")
|
||||
import("//foundation/communication/dsoftbus/sdk/frame/frame_sdk.gni")
|
||||
import("//foundation/communication/dsoftbus/sdk/transmission/trans_sdk.gni")
|
||||
|
||||
common_client_src = bus_center_sdk_src + disc_sdk_src +
|
||||
softbus_client_frame_src + trans_session_manager_sdk_src
|
||||
common_client_inc = bus_center_sdk_inc + disc_sdk_inc +
|
||||
softbus_client_frame_inc + trans_session_manager_sdk_inc
|
||||
common_client_deps = bus_center_sdk_deps + trans_session_manager_sdk_deps
|
||||
|
||||
common_client_deps += [
|
||||
"$dsoftbus_root_path/adapter:softbus_adapter",
|
||||
"$dsoftbus_root_path/core/common:softbus_utils",
|
||||
]
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
if (enable_build_shared_sdk == true) {
|
||||
build_type = "shared_library"
|
||||
} else {
|
||||
build_type = "static_library"
|
||||
}
|
||||
if (ohos_kernel_type != "liteos_m") {
|
||||
common_client_deps += [
|
||||
"//foundation/communication/ipc_lite:liteipc_adapter",
|
||||
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
if (enable_build_shared_sdk == true) {
|
||||
build_type = "ohos_shared_library"
|
||||
} else {
|
||||
build_type = "ohos_static_library"
|
||||
}
|
||||
common_client_deps += [
|
||||
"//utils/native/base:utils",
|
||||
"//utils/native/base:utilsecurec_shared",
|
||||
]
|
||||
}
|
||||
|
||||
config("dsoftbus_sdk_interface") {
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/interfaces/kits",
|
||||
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
||||
"$dsoftbus_root_path/interfaces/kits/common",
|
||||
"$dsoftbus_root_path/interfaces/kits/discovery",
|
||||
"$dsoftbus_root_path/interfaces/kits/transport",
|
||||
"$dsoftbus_root_path/sdk/transmission/session/cpp/include",
|
||||
"$dsoftbus_root_path/interfaces/inner_kits/transport",
|
||||
]
|
||||
}
|
||||
|
||||
target(build_type, "softbus_client") {
|
||||
sources = common_client_src
|
||||
include_dirs = common_client_inc
|
||||
deps = common_client_deps
|
||||
public_configs = [ ":dsoftbus_sdk_interface" ]
|
||||
defines = TRANS_SDK_DEFINES
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
configs -= [ "//build/lite/config:language_cpp" ]
|
||||
cflags = [ "-fPIC" ]
|
||||
cflags_cc = [
|
||||
"-std=c++14",
|
||||
"-fPIC",
|
||||
]
|
||||
ldflags = [ "-lstdc++" ]
|
||||
} else {
|
||||
cflags = [ "-fPIC" ]
|
||||
cflags_cc = [ "-std=c++14" ]
|
||||
if (is_standard_system) {
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
}
|
||||
part_name = "dsoftbus_standard"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user