blob: 308fb5256e18dcee187f431570ccbb553d278de2 [file] [log] [blame]
# Copyright 2020 Google LLC
#
# 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
#
# https://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.
licenses(["notice"])
cc_library(
name = "internal",
srcs = [
"base_endpoint_channel.cc",
"base_pcp_handler.cc",
"ble_advertisement.cc",
"ble_endpoint_channel.cc",
"bluetooth_bwu_handler.cc",
"bluetooth_device_name.cc",
"bluetooth_endpoint_channel.cc",
"bwu_manager.cc",
"client_proxy.cc",
"encryption_runner.cc",
"endpoint_channel_manager.cc",
"endpoint_manager.cc",
"injected_bluetooth_device_store.cc",
"internal_payload.cc",
"internal_payload_factory.cc",
"offline_frames.cc",
"offline_frames_validator.cc",
"offline_service_controller.cc",
"p2p_cluster_pcp_handler.cc",
"p2p_point_to_point_pcp_handler.cc",
"p2p_star_pcp_handler.cc",
"payload_manager.cc",
"pcp_manager.cc",
"service_controller_router.cc",
"webrtc_bwu_handler.cc",
"webrtc_endpoint_channel.cc",
"wifi_lan_bwu_handler.cc",
"wifi_lan_endpoint_channel.cc",
"wifi_lan_service_info.cc",
],
hdrs = [
"base_bwu_handler.h",
"base_endpoint_channel.h",
"base_pcp_handler.h",
"ble_advertisement.h",
"ble_endpoint_channel.h",
"bluetooth_bwu_handler.h",
"bluetooth_device_name.h",
"bluetooth_endpoint_channel.h",
"bwu_handler.h",
"bwu_manager.h",
"client_proxy.h",
"encryption_runner.h",
"endpoint_channel.h",
"endpoint_channel_manager.h",
"endpoint_manager.h",
"injected_bluetooth_device_store.h",
"internal_payload.h",
"internal_payload_factory.h",
"offline_frames.h",
"offline_frames_validator.h",
"offline_service_controller.h",
"p2p_cluster_pcp_handler.h",
"p2p_point_to_point_pcp_handler.h",
"p2p_star_pcp_handler.h",
"payload_manager.h",
"pcp.h",
"pcp_handler.h",
"pcp_manager.h",
"service_controller.h",
"service_controller_router.h",
"webrtc_bwu_handler.h",
"webrtc_endpoint_channel.h",
"wifi_lan_bwu_handler.h",
"wifi_lan_endpoint_channel.h",
"wifi_lan_service_info.h",
],
compatible_with = ["//buildenv/target:non_prod"],
copts = ["-DCORE_ADAPTER_DLL"],
defines = ["NO_WEBRTC"],
visibility = [
"//third_party/nearby/cpp/core:__pkg__",
"//third_party/nearby/cpp/core/internal/fuzzers:__pkg__",
],
deps = [
":message_lite",
"//third_party/absl/base:core_headers",
"//third_party/absl/container:btree",
"//third_party/absl/container:flat_hash_map",
"//third_party/absl/container:flat_hash_set",
"//third_party/absl/functional:bind_front",
"//third_party/absl/memory",
"//third_party/absl/strings",
"//third_party/absl/time",
"//third_party/absl/types:span",
"//third_party/nearby/connections/implementation/proto:offline_wire_formats_portable_proto",
"//third_party/nearby/cpp/core:core_types",
"//third_party/nearby/cpp/core/internal/mediums",
"//third_party/nearby/cpp/core/internal/mediums:utils",
"//third_party/nearby/cpp/platform/api:comm",
"//third_party/nearby/cpp/platform/base",
"//third_party/nearby/cpp/platform/base:cancellation_flag",
"//third_party/nearby/cpp/platform/base:error_code_recorder",
"//third_party/nearby/cpp/platform/base:util",
"//third_party/nearby/cpp/platform/public:comm",
"//third_party/nearby/cpp/platform/public:logging",
"//third_party/nearby/cpp/platform/public:types",
"//third_party/nearby/internal/analytics",
"//third_party/nearby/proto:connections_enums_portable_proto",
"//third_party/ukey2",
],
)
cc_library(
name = "message_lite",
hdrs = [
"message_lite.h",
],
compatible_with = ["//buildenv/target:non_prod"],
visibility = [
"//third_party/nearby/cpp/core:__subpackages__",
],
deps = [
"//net/proto2/public:proto2_lite",
],
)
cc_library(
name = "internal_test",
testonly = True,
srcs = [
"offline_simulation_user.cc",
"simulation_user.cc",
],
hdrs = [
"mock_service_controller.h",
"mock_service_controller_router.h",
"offline_simulation_user.h",
"simulation_user.h",
],
defines = ["NO_WEBRTC"],
visibility = [
"//third_party/nearby/cpp/core:__subpackages__",
],
deps = [
":internal",
"//testing/base/public:gunit_for_library_testonly",
"//third_party/absl/functional:bind_front",
"//third_party/absl/strings",
"//third_party/nearby/cpp/core:core_types",
"//third_party/nearby/cpp/platform/base",
"//third_party/nearby/cpp/platform/base:test_util",
"//third_party/nearby/cpp/platform/public:types",
],
)
cc_test(
name = "core_internal_test",
size = "small",
timeout = "moderate",
srcs = [
"base_endpoint_channel_test.cc",
"base_pcp_handler_test.cc",
"ble_advertisement_test.cc",
"bluetooth_device_name_test.cc",
"bwu_manager_test.cc",
"client_proxy_test.cc",
"encryption_runner_test.cc",
"endpoint_channel_manager_test.cc",
"endpoint_manager_test.cc",
"injected_bluetooth_device_store_test.cc",
"internal_payload_factory_test.cc",
"offline_frames_test.cc",
"offline_frames_validator_test.cc",
"offline_service_controller_test.cc",
"p2p_cluster_pcp_handler_test.cc",
"payload_manager_test.cc",
"pcp_manager_test.cc",
"service_controller_router_test.cc",
"wifi_lan_service_info_test.cc",
],
defines = ["NO_WEBRTC"],
shard_count = 16,
deps = [
":internal",
":internal_test",
"//testing/base/public:gunit",
"//testing/base/public:gunit_main",
"//third_party/absl/container:flat_hash_set",
"//third_party/absl/strings",
"//third_party/absl/synchronization",
"//third_party/absl/time",
"//third_party/absl/types:span",
"//third_party/nearby/connections/implementation/proto:offline_wire_formats_portable_proto",
"//third_party/nearby/cpp/core:core_types",
"//third_party/nearby/cpp/core/internal/mediums",
"//third_party/nearby/cpp/core/internal/mediums:utils",
"//third_party/nearby/cpp/platform/base",
"//third_party/nearby/cpp/platform/base:test_util",
"//third_party/nearby/cpp/platform/impl/g3", # build_cleaner: keep
"//third_party/nearby/cpp/platform/public:comm",
"//third_party/nearby/cpp/platform/public:logging",
"//third_party/nearby/cpp/platform/public:types",
"//third_party/nearby/internal/analytics",
"//third_party/nearby/proto:connections_enums_portable_proto",
"//third_party/ukey2",
],
)