From bc4cb39dc583d3a190da25e34aad13b182c13f61 Mon Sep 17 00:00:00 2001 From: Francis Tsui Date: Wed, 20 May 2026 18:22:45 -0700 Subject: [PATCH] Move BwuHandler impls into mediums. PiperOrigin-RevId: 918751107 --- Package.swift | 30 +-- connections/BUILD | 2 + connections/implementation/BUILD | 250 +++++++++++------- connections/implementation/bwu_manager.cc | 14 +- connections/implementation/fuzzers/BUILD | 2 +- connections/implementation/mediums/BUILD | 81 +++++- .../{ => mediums}/awdl_bwu_handler.cc | 4 +- .../{ => mediums}/awdl_bwu_handler.h | 7 +- .../{ => mediums}/awdl_bwu_handler_test.cc | 4 +- .../{ => mediums}/awdl_endpoint_channel.cc | 2 +- .../{ => mediums}/awdl_endpoint_channel.h | 7 +- .../{ => mediums}/ble_endpoint_channel.cc | 2 +- .../{ => mediums}/ble_endpoint_channel.h | 6 +- .../ble_l2cap_endpoint_channel.cc | 4 +- .../ble_l2cap_endpoint_channel.h | 6 +- .../{ => mediums}/bluetooth_bwu_handler.cc | 4 +- .../{ => mediums}/bluetooth_bwu_handler.h | 6 +- .../bluetooth_bwu_handler_test.cc} | 3 +- .../bluetooth_endpoint_channel.cc | 2 +- .../bluetooth_endpoint_channel.h | 6 +- .../{ => mediums}/webrtc_bwu_handler.cc | 4 +- .../{ => mediums}/webrtc_bwu_handler.h | 6 +- .../{ => mediums}/webrtc_bwu_handler_stub.cc | 12 +- .../{ => mediums}/webrtc_bwu_handler_stub.h | 6 +- .../{ => mediums}/webrtc_endpoint_channel.cc | 2 +- .../{ => mediums}/webrtc_endpoint_channel.h | 6 +- .../{ => mediums}/wifi_direct_bwu_handler.cc | 4 +- .../{ => mediums}/wifi_direct_bwu_handler.h | 6 +- .../wifi_direct_bwu_handler_test.cc} | 3 +- .../wifi_direct_endpoint_channel.cc | 2 +- .../wifi_direct_endpoint_channel.h | 7 +- .../{ => mediums}/wifi_hotspot_bwu_handler.cc | 4 +- .../{ => mediums}/wifi_hotspot_bwu_handler.h | 6 +- .../wifi_hotspot_bwu_handler_test.cc} | 3 +- .../wifi_hotspot_endpoint_channel.cc | 2 +- .../wifi_hotspot_endpoint_channel.h | 7 +- .../{ => mediums}/wifi_lan_bwu_handler.cc | 4 +- .../{ => mediums}/wifi_lan_bwu_handler.h | 6 +- .../wifi_lan_bwu_handler_test.cc | 2 +- .../wifi_lan_endpoint_channel.cc | 2 +- .../{ => mediums}/wifi_lan_endpoint_channel.h | 6 +- .../implementation/p2p_cluster_pcp_handler.cc | 10 +- 42 files changed, 352 insertions(+), 200 deletions(-) rename connections/implementation/{ => mediums}/awdl_bwu_handler.cc (98%) rename connections/implementation/{ => mediums}/awdl_bwu_handler.h (95%) rename connections/implementation/{ => mediums}/awdl_bwu_handler_test.cc (99%) rename connections/implementation/{ => mediums}/awdl_endpoint_channel.cc (97%) rename connections/implementation/{ => mediums}/awdl_endpoint_channel.h (88%) rename connections/implementation/{ => mediums}/ble_endpoint_channel.cc (98%) rename connections/implementation/{ => mediums}/ble_endpoint_channel.h (91%) rename connections/implementation/{ => mediums}/ble_l2cap_endpoint_channel.cc (98%) rename connections/implementation/{ => mediums}/ble_l2cap_endpoint_channel.h (91%) rename connections/implementation/{ => mediums}/bluetooth_bwu_handler.cc (98%) rename connections/implementation/{ => mediums}/bluetooth_bwu_handler.h (94%) rename connections/implementation/{bluetooth_bwu_test.cc => mediums/bluetooth_bwu_handler_test.cc} (98%) rename connections/implementation/{ => mediums}/bluetooth_endpoint_channel.cc (97%) rename connections/implementation/{ => mediums}/bluetooth_endpoint_channel.h (88%) rename connections/implementation/{ => mediums}/webrtc_bwu_handler.cc (98%) rename connections/implementation/{ => mediums}/webrtc_bwu_handler.h (94%) rename connections/implementation/{ => mediums}/webrtc_bwu_handler_stub.cc (89%) rename connections/implementation/{ => mediums}/webrtc_bwu_handler_stub.h (94%) rename connections/implementation/{ => mediums}/webrtc_endpoint_channel.cc (95%) rename connections/implementation/{ => mediums}/webrtc_endpoint_channel.h (88%) rename connections/implementation/{ => mediums}/wifi_direct_bwu_handler.cc (98%) rename connections/implementation/{ => mediums}/wifi_direct_bwu_handler.h (95%) rename connections/implementation/{wifi_direct_bwu_test.cc => mediums/wifi_direct_bwu_handler_test.cc} (98%) rename connections/implementation/{ => mediums}/wifi_direct_endpoint_channel.cc (95%) rename connections/implementation/{ => mediums}/wifi_direct_endpoint_channel.h (89%) rename connections/implementation/{ => mediums}/wifi_hotspot_bwu_handler.cc (98%) rename connections/implementation/{ => mediums}/wifi_hotspot_bwu_handler.h (94%) rename connections/implementation/{wifi_hotspot_bwu_test.cc => mediums/wifi_hotspot_bwu_handler_test.cc} (98%) rename connections/implementation/{ => mediums}/wifi_hotspot_endpoint_channel.cc (95%) rename connections/implementation/{ => mediums}/wifi_hotspot_endpoint_channel.h (89%) rename connections/implementation/{ => mediums}/wifi_lan_bwu_handler.cc (98%) rename connections/implementation/{ => mediums}/wifi_lan_bwu_handler.h (94%) rename connections/implementation/{ => mediums}/wifi_lan_bwu_handler_test.cc (99%) rename connections/implementation/{ => mediums}/wifi_lan_endpoint_channel.cc (96%) rename connections/implementation/{ => mediums}/wifi_lan_endpoint_channel.h (87%) diff --git a/Package.swift b/Package.swift index 54d62c41..973d26c5 100644 --- a/Package.swift +++ b/Package.swift @@ -92,7 +92,7 @@ let package = Package( .target( name: "protobuf-utf8", dependencies: [ - .product(name: "abseil", package: "abseil-cpp-SwiftPM"), + .product(name: "abseil", package: "abseil-cpp-SwiftPM") ], path: "third_party/protobuf/third_party/utf8_range", sources: [ @@ -102,13 +102,13 @@ let package = Package( ], publicHeadersPath: ".", cSettings: [ - .headerSearchPath("./"), + .headerSearchPath("./") ], ), .target( name: "protobuf", dependencies: [ - "protobuf-utf8", + "protobuf-utf8" ], path: "third_party/protobuf/src", exclude: [ @@ -282,11 +282,11 @@ let package = Package( "google/protobuf/io/zero_copy_sink_test.cc", ], sources: [ - "google/protobuf", + "google/protobuf" ], publicHeadersPath: ".", cSettings: [ - .headerSearchPath("./"), + .headerSearchPath("./") ] ), .target( @@ -368,17 +368,13 @@ let package = Package( "connections/implementation/payload_manager_test.cc", "connections/implementation/offline_frames_validator_test.cc", "connections/implementation/service_controller_router_test.cc", - "connections/implementation/awdl_bwu_handler_test.cc", - "connections/implementation/bluetooth_bwu_test.cc", - "connections/implementation/wifi_direct_bwu_test.cc", - "connections/implementation/wifi_hotspot_bwu_test.cc", - "connections/implementation/wifi_lan_bwu_handler_test.cc", "connections/implementation/analytics/analytics_recorder_test.cc", "connections/implementation/analytics/throughput_recorder_test.cc", "connections/implementation/mediums/advertisements/data_element_test.cc", "connections/implementation/mediums/advertisements/dct_advertisement_test.cc", "connections/implementation/mediums/advertisements/advertisement_util_test.cc", "connections/implementation/mediums/awdl_test.cc", + "connections/implementation/mediums/awdl_bwu_handler_test.cc", "connections/implementation/mediums/ble_test.cc", "connections/implementation/mediums/ble/bloom_filter_test.cc", "connections/implementation/mediums/ble/ble_l2cap_packet_test.cc", @@ -391,15 +387,19 @@ let package = Package( "connections/implementation/mediums/ble/discovered_peripheral_tracker_test.cc", "connections/implementation/mediums/ble/instant_on_lost_advertisement_test.cc", "connections/implementation/mediums/ble/instant_on_lost_manager_test.cc", - "connections/implementation/mediums/webrtc_peer_id_test.cc", - "connections/implementation/mediums/wifi_lan_test.cc", - "connections/implementation/mediums/bluetooth_classic_test.cc", "connections/implementation/mediums/ble_test.cc", - "connections/implementation/mediums/webrtc_test.cc", - "connections/implementation/mediums/lost_entity_tracker_test.cc", + "connections/implementation/mediums/bluetooth_bwu_handler_test.cc", + "connections/implementation/mediums/bluetooth_classic_test.cc", "connections/implementation/mediums/bluetooth_radio_test.cc", + "connections/implementation/mediums/lost_entity_tracker_test.cc", + "connections/implementation/mediums/webrtc_peer_id_test.cc", + "connections/implementation/mediums/webrtc_test.cc", + "connections/implementation/mediums/wifi_direct_bwu_handler_test.cc", "connections/implementation/mediums/wifi_direct_test.cc", + "connections/implementation/mediums/wifi_hotspot_bwu_handler_test.cc", "connections/implementation/mediums/wifi_hotspot_test.cc", + "connections/implementation/mediums/wifi_lan_bwu_handler_test.cc", + "connections/implementation/mediums/wifi_lan_test.cc", "connections/implementation/mediums/wifi_test.cc", "connections/implementation/endpoint_channel_manager_test.cc", "connections/implementation/bwu_manager_test.cc", diff --git a/connections/BUILD b/connections/BUILD index c759b732..78928b9e 100644 --- a/connections/BUILD +++ b/connections/BUILD @@ -43,7 +43,9 @@ cc_library( ], deps = [ ":core_types", + "//connections/implementation:client_proxy", "//connections/implementation:internal", + "//connections/implementation:service_id_constants", "//connections/v3:v3_types", "//internal/analytics:event_logger", "//internal/interop:device", diff --git a/connections/implementation/BUILD b/connections/implementation/BUILD index 92038756..9f820647 100644 --- a/connections/implementation/BUILD +++ b/connections/implementation/BUILD @@ -49,30 +49,147 @@ cc_library( ], ) +cc_library( + name = "service_id_constants", + hdrs = ["service_id_constants.h"], + visibility = ["//connections:__subpackages__"], + deps = [ + "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", + ], +) + +cc_library( + name = "bwu_handler", + srcs = ["base_bwu_handler.cc"], + hdrs = [ + "base_bwu_handler.h", + "bwu_handler.h", + ], + visibility = ["//connections:__subpackages__"], + deps = [ + ":client_proxy", + ":endpoint_channel", + ":service_id_constants", + "//internal/platform:base", + "//internal/platform:logging", + "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/container:flat_hash_set", + "@com_google_absl//absl/functional:any_invocable", + ], +) + +cc_library( + name = "offline_frames", + srcs = [ + "offline_frames.cc", + "offline_frames_validator.cc", + ], + hdrs = [ + "internal_payload.h", + "offline_frames.h", + "offline_frames_validator.h", + ], + visibility = ["//connections:__subpackages__"], + deps = [ + "//connections:core_types", + "//connections/implementation/flags:connections_flags", + "//connections/implementation/proto:offline_wire_formats_cc_proto", + "//internal/flags:nearby_flags", + "//internal/platform:base", + "//internal/platform:logging", + "//internal/platform:mac_address", + "@com_google_absl//absl/strings:string_view", + "@com_google_absl//absl/time", + ], +) + +cc_library( + name = "client_proxy", + srcs = ["client_proxy.cc"], + hdrs = ["client_proxy.h"], + visibility = ["//connections:__subpackages__"], + deps = [ + "//connections:core_types", + "//connections/implementation/analytics", + "//connections/implementation/flags:connections_flags", + "//connections/implementation/mediums/advertisements:dct_advertisement", + "//connections/implementation/proto:offline_wire_formats_cc_proto", + "//connections/v3:v3_types", + "//internal/analytics:event_logger", + "//internal/base:file_path", + "//internal/base:files", + "//internal/flags:nearby_flags", + "//internal/interop:device", + "//internal/platform:base", + "//internal/platform:cancellation_flag", + "//internal/platform:error_code_recorder", + "//internal/platform:logging", + "//internal/platform:mac_address", + "//internal/platform:types", + "//internal/platform/implementation:comm", + "//internal/platform/implementation:platform", + "//internal/platform/implementation:types", + "//internal/proto/analytics:connections_log_cc_proto", + "//proto:connections_enums_cc_proto", + "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/container:flat_hash_set", + "@com_google_absl//absl/functional:any_invocable", + "@com_google_absl//absl/random", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", + "@com_google_absl//absl/time", + "@com_google_absl//absl/types:span", + ], +) + +cc_library( + name = "endpoint_channel", + srcs = [ + "base_endpoint_channel.cc", + "endpoint_channel_manager.cc", + ], + hdrs = [ + "base_endpoint_channel.h", + "endpoint_channel.h", + "endpoint_channel_manager.h", + ], + visibility = ["//connections:__subpackages__"], + deps = [ + ":client_proxy", + ":offline_frames", + ":types", + "//connections:core_types", + "//connections/implementation/analytics", + "//connections/implementation/flags:connections_flags", + "//internal/flags:nearby_flags", + "//internal/platform:base", + "//internal/platform:logging", + "//internal/platform:types", + "//internal/platform/implementation:types", + "//internal/proto/analytics:connections_log_cc_proto", + "//proto:connections_enums_cc_proto", + "@com_google_absl//absl/base:core_headers", + "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", + "@com_google_absl//absl/time", + "@com_google_ukey2//:ukey2", + ], +) + cc_library( name = "internal", srcs = [ - "awdl_bwu_handler.cc", - "awdl_endpoint_channel.cc", - "base_bwu_handler.cc", - "base_endpoint_channel.cc", "base_pcp_handler.cc", - "ble_endpoint_channel.cc", - "ble_l2cap_endpoint_channel.cc", - "bluetooth_bwu_handler.cc", "bluetooth_device_name.cc", - "bluetooth_endpoint_channel.cc", "bwu_manager.cc", - "client_proxy.cc", "connections_authentication_transport.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", @@ -80,41 +197,17 @@ cc_library( "payload_manager.cc", "pcp_manager.cc", "service_controller_router.cc", - "webrtc_bwu_handler.cc", - "webrtc_bwu_handler_stub.cc", - "webrtc_endpoint_channel.cc", - "wifi_direct_bwu_handler.cc", - "wifi_direct_endpoint_channel.cc", - "wifi_hotspot_bwu_handler.cc", - "wifi_hotspot_endpoint_channel.cc", - "wifi_lan_bwu_handler.cc", - "wifi_lan_endpoint_channel.cc", "wifi_lan_service_info.cc", ], hdrs = [ - "awdl_bwu_handler.h", - "awdl_endpoint_channel.h", - "base_bwu_handler.h", - "base_endpoint_channel.h", "base_pcp_handler.h", - "ble_endpoint_channel.h", - "ble_l2cap_endpoint_channel.h", - "bluetooth_bwu_handler.h", "bluetooth_device_name.h", - "bluetooth_endpoint_channel.h", - "bwu_handler.h", "bwu_manager.h", - "client_proxy.h", "connections_authentication_transport.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", @@ -124,16 +217,6 @@ cc_library( "pcp_manager.h", "service_controller.h", "service_controller_router.h", - "service_id_constants.h", - "webrtc_bwu_handler.h", - "webrtc_bwu_handler_stub.h", - "webrtc_endpoint_channel.h", - "wifi_direct_bwu_handler.h", - "wifi_direct_endpoint_channel.h", - "wifi_hotspot_bwu_handler.h", - "wifi_hotspot_endpoint_channel.h", - "wifi_lan_bwu_handler.h", - "wifi_lan_endpoint_channel.h", "wifi_lan_service_info.h", ], copts = [ @@ -149,6 +232,11 @@ cc_library( ], deps = [ ":ble_advertisement", + ":bwu_handler", + ":client_proxy", + ":endpoint_channel", + ":offline_frames", + ":service_id_constants", ":types", "//connections:core_types", "//connections/implementation/analytics", @@ -157,26 +245,19 @@ cc_library( "//connections/implementation/mediums:utils", "//connections/implementation/mediums:webrtc", "//connections/implementation/mediums:webrtc_peer_id", - "//connections/implementation/mediums:webrtc_socket", "//connections/implementation/mediums/advertisements:dct_advertisement", "//connections/implementation/mediums/advertisements:util", "//connections/implementation/mediums/ble:ble_advertisement_header", "//connections/implementation/mediums/ble:ble_socket", "//connections/implementation/proto:offline_wire_formats_cc_proto", "//connections/v3:v3_types", - "//internal/analytics:event_logger", - "//internal/base:file_path", - "//internal/base:files", - "//internal/base:masker", "//internal/flags:nearby_flags", "//internal/interop:authentication_status", "//internal/interop:authentication_transport_interface", "//internal/interop:device", "//internal/platform:base", - "//internal/platform:cancellation_flag", "//internal/platform:comm", "//internal/platform:connection_info", - "//internal/platform:error_code_recorder", "//internal/platform:logging", "//internal/platform:mac_address", "//internal/platform:types", @@ -193,7 +274,6 @@ cc_library( "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/functional:any_invocable", "@com_google_absl//absl/functional:bind_front", - "@com_google_absl//absl/random", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", @@ -225,7 +305,11 @@ cc_library( "//connections:__subpackages__", ], deps = [ + ":bwu_handler", + ":client_proxy", + ":endpoint_channel", ":internal", + ":offline_frames", "//connections:core_types", "//connections/implementation/analytics", "//connections/implementation/flags:connections_flags", @@ -248,30 +332,26 @@ cc_library( cc_test( name = "bwu_test", srcs = [ - "awdl_bwu_handler_test.cc", "base_bwu_handler_test.cc", - "bluetooth_bwu_test.cc", "bwu_manager_test.cc", - "wifi_direct_bwu_test.cc", - "wifi_hotspot_bwu_test.cc", ], deps = [ + ":bwu_handler", + ":client_proxy", + ":endpoint_channel", ":internal", ":internal_test", + ":offline_frames", + ":service_id_constants", "//connections:core_types", "//connections/implementation/flags:connections_flags", "//connections/implementation/mediums", - "//internal/analytics:mock_event_logger", "//internal/flags:nearby_flags", "//internal/platform:base", - "//internal/platform:cancellation_flag", - "//internal/platform:comm", "//internal/platform:logging", - "//internal/platform:mock_platform", "//internal/platform:test_util", "//internal/platform:types", "//internal/platform/flags:platform_flags", - "//internal/platform/implementation:comm", "//internal/platform/implementation:platform", # build_cleaner: keep "//internal/platform/implementation/g3", # build_cleaner: keep "//internal/proto/analytics:connections_log_cc_proto", @@ -288,6 +368,7 @@ cc_test( name = "pcp_manager_test", srcs = ["pcp_manager_test.cc"], deps = [ + ":endpoint_channel", ":internal", ":internal_test", "//connections:core_types", @@ -313,8 +394,11 @@ cc_test( ], shard_count = 8, deps = [ + ":client_proxy", + ":endpoint_channel", ":internal", ":internal_test", + ":offline_frames", ":types", "//connections:core_types", "//connections/implementation/flags:connections_flags", @@ -370,7 +454,7 @@ cc_test( name = "offline_frames_test", srcs = ["offline_frames_validator_test.cc"], deps = [ - ":internal", + ":offline_frames", "//connections:core_types", "//connections/implementation/flags:connections_flags", "//connections/implementation/proto:offline_wire_formats_cc_proto", @@ -390,8 +474,7 @@ cc_test( "client_proxy_test.cc", ], deps = [ - ":internal", - "//base:casts", + ":client_proxy", "//connections:core_types", "//connections/implementation/flags:connections_flags", "//connections/v3:v3_types", @@ -419,6 +502,8 @@ cc_test( "encryption_runner_test.cc", ], deps = [ + ":client_proxy", + ":endpoint_channel", ":internal", "//connections/implementation/analytics", "//internal/platform:base", @@ -440,8 +525,11 @@ cc_test( "endpoint_manager_test.cc", ], deps = [ + ":client_proxy", + ":endpoint_channel", ":internal", ":internal_test", + ":offline_frames", "//connections:core_types", "//connections/implementation/flags:connections_flags", "//internal/flags:nearby_flags", @@ -467,7 +555,10 @@ cc_test( "endpoint_channel_manager_test.cc", ], deps = [ + ":client_proxy", + ":endpoint_channel", ":internal", + ":offline_frames", "//connections/implementation/flags:connections_flags", "//internal/flags:nearby_flags", "//internal/platform:base", @@ -509,8 +600,8 @@ cc_test( deps = [ ":internal", ":internal_test", + ":offline_frames", "//connections:core_types", - "//connections/implementation/analytics", "//internal/platform:base", "//internal/platform:logging", "//internal/platform:test_util", @@ -531,6 +622,7 @@ cc_test( "service_controller_router_test.cc", ], deps = [ + ":client_proxy", ":internal", ":internal_test", "//connections:core_types", @@ -581,6 +673,7 @@ cc_test( ], deps = [ ":internal", + ":offline_frames", "//connections:core_types", "//connections/implementation/proto:offline_wire_formats_cc_proto", "//internal/platform:base", @@ -593,26 +686,3 @@ cc_test( "@com_google_googletest//:gtest_main", ], ) - -cc_test( - name = "wifi_lan_bwu_handler_test", - srcs = [ - "wifi_lan_bwu_handler_test.cc", - ], - deps = [ - ":internal", - "//connections:core_types", - "//connections/implementation/mediums", - "//internal/analytics:mock_event_logger", - "//internal/platform:base", - "//internal/platform:mock_platform", - "//internal/platform:test_util", - "//internal/platform/implementation:comm", - "//internal/platform/implementation:platform", - "//internal/platform/implementation:platform_impl", - "//internal/proto/analytics:connections_log_cc_proto", - "@com_github_protobuf_matchers//protobuf-matchers", - "@com_google_absl//absl/strings:string_view", - "@com_google_googletest//:gtest_main", - ], -) diff --git a/connections/implementation/bwu_manager.cc b/connections/implementation/bwu_manager.cc index d43a2329..a1082763 100644 --- a/connections/implementation/bwu_manager.cc +++ b/connections/implementation/bwu_manager.cc @@ -26,26 +26,26 @@ #include "absl/strings/str_cat.h" #include "absl/time/time.h" #include "connections/implementation/analytics/connection_attempt_metadata_params.h" -#include "connections/implementation/awdl_bwu_handler.h" -#include "connections/implementation/bluetooth_bwu_handler.h" #include "connections/implementation/bwu_handler.h" #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" #include "connections/implementation/endpoint_channel_manager.h" #include "connections/implementation/endpoint_manager.h" #include "connections/implementation/flags/nearby_connections_feature_flags.h" +#include "connections/implementation/mediums/awdl_bwu_handler.h" +#include "connections/implementation/mediums/bluetooth_bwu_handler.h" #include "connections/implementation/mediums/mediums.h" +#include "connections/implementation/mediums/wifi_lan_bwu_handler.h" #include "connections/implementation/offline_frames.h" #include "connections/implementation/service_id_constants.h" #include "internal/flags/nearby_flags.h" #ifdef NO_WEBRTC -#include "connections/implementation/webrtc_bwu_handler_stub.h" +#include "connections/implementation/mediums/webrtc_bwu_handler_stub.h" #else -#include "connections/implementation/webrtc_bwu_handler.h" +#include "connections/implementation/mediums/webrtc_bwu_handler.h" #endif -#include "connections/implementation/wifi_direct_bwu_handler.h" -#include "connections/implementation/wifi_hotspot_bwu_handler.h" -#include "connections/implementation/wifi_lan_bwu_handler.h" +#include "connections/implementation/mediums/wifi_direct_bwu_handler.h" +#include "connections/implementation/mediums/wifi_hotspot_bwu_handler.h" #include "connections/medium_selector.h" #include "internal/platform/cancelable_alarm.h" #include "internal/platform/count_down_latch.h" diff --git a/connections/implementation/fuzzers/BUILD b/connections/implementation/fuzzers/BUILD index 2d0c0629..490dac2f 100644 --- a/connections/implementation/fuzzers/BUILD +++ b/connections/implementation/fuzzers/BUILD @@ -24,7 +24,7 @@ cc_test( ], tags = ["componentid:148515"], deps = [ - "//connections/implementation:internal", + "//connections/implementation:offline_frames", "//internal/platform/implementation/g3", "@com_github_protobuf_matchers//protobuf-matchers", "@com_google_absl//absl/strings:string_view", diff --git a/connections/implementation/mediums/BUILD b/connections/implementation/mediums/BUILD index d5c8189f..e10be0fe 100644 --- a/connections/implementation/mediums/BUILD +++ b/connections/implementation/mediums/BUILD @@ -21,24 +21,54 @@ cc_library( name = "mediums", srcs = [ "awdl.cc", + "awdl_bwu_handler.cc", + "awdl_endpoint_channel.cc", "ble.cc", + "ble_endpoint_channel.cc", + "ble_l2cap_endpoint_channel.cc", + "bluetooth_bwu_handler.cc", "bluetooth_classic.cc", + "bluetooth_endpoint_channel.cc", "bluetooth_radio.cc", "mediums.cc", + "webrtc_bwu_handler.cc", + "webrtc_bwu_handler_stub.cc", + "webrtc_endpoint_channel.cc", "wifi_direct.cc", + "wifi_direct_bwu_handler.cc", + "wifi_direct_endpoint_channel.cc", "wifi_hotspot.cc", + "wifi_hotspot_bwu_handler.cc", + "wifi_hotspot_endpoint_channel.cc", "wifi_lan.cc", + "wifi_lan_bwu_handler.cc", + "wifi_lan_endpoint_channel.cc", ], hdrs = [ "awdl.h", + "awdl_bwu_handler.h", + "awdl_endpoint_channel.h", "ble.h", + "ble_endpoint_channel.h", + "ble_l2cap_endpoint_channel.h", + "bluetooth_bwu_handler.h", "bluetooth_classic.h", + "bluetooth_endpoint_channel.h", "bluetooth_radio.h", "mediums.h", + "webrtc_bwu_handler.h", + "webrtc_bwu_handler_stub.h", + "webrtc_endpoint_channel.h", "wifi.h", "wifi_direct.h", + "wifi_direct_bwu_handler.h", + "wifi_direct_endpoint_channel.h", "wifi_hotspot.h", + "wifi_hotspot_bwu_handler.h", + "wifi_hotspot_endpoint_channel.h", "wifi_lan.h", + "wifi_lan_bwu_handler.h", + "wifi_lan_endpoint_channel.h", ], copts = ["-DNO_WEBRTC"], local_defines = select({ @@ -51,13 +81,22 @@ cc_library( deps = [ ":utils", ":webrtc", + ":webrtc_peer_id", + ":webrtc_socket", "//connections:core_types", + "//connections/implementation:bwu_handler", + "//connections/implementation:client_proxy", + "//connections/implementation:endpoint_channel", + "//connections/implementation:offline_frames", + "//connections/implementation:service_id_constants", "//connections/implementation:types", "//connections/implementation/flags:connections_flags", "//connections/implementation/mediums/ble", "//connections/implementation/mediums/ble:ble_advertisement_header", "//connections/implementation/mediums/ble:ble_socket", "//connections/implementation/mediums/ble:bloom_filter", + "//connections/implementation/proto:offline_wire_formats_cc_proto", + "//internal/base:masker", "//internal/flags:nearby_flags", "//internal/platform:base", "//internal/platform:cancellation_flag", @@ -69,11 +108,13 @@ cc_library( "//internal/platform/flags:platform_flags", "//internal/platform/implementation:comm", "//internal/platform/implementation:platform", + "//internal/platform/implementation:wifi_utils", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/container:btree", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/functional:any_invocable", + "@com_google_absl//absl/functional:bind_front", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", @@ -191,13 +232,51 @@ cc_test( "//internal/platform/implementation:types", "//internal/platform/implementation/g3", # build_cleaner: keep "@com_github_protobuf_matchers//protobuf-matchers", - "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/strings", "@com_google_absl//absl/time", "@com_google_googletest//:gtest_main", ], ) +cc_test( + name = "bwu_handler_test", + size = "small", + srcs = [ + "awdl_bwu_handler_test.cc", + "bluetooth_bwu_handler_test.cc", + "wifi_direct_bwu_handler_test.cc", + "wifi_hotspot_bwu_handler_test.cc", + "wifi_lan_bwu_handler_test.cc", + ], + deps = [ + ":mediums", + "//connections:core_types", + "//connections/implementation:bwu_handler", + "//connections/implementation:client_proxy", + "//connections/implementation:endpoint_channel", + "//connections/implementation:offline_frames", + "//connections/implementation/flags:connections_flags", + "//internal/analytics:mock_event_logger", + "//internal/flags:nearby_flags", + "//internal/platform:base", + "//internal/platform:cancellation_flag", + "//internal/platform:comm", + "//internal/platform:logging", + "//internal/platform:mock_platform", + "//internal/platform:test_util", + "//internal/platform:types", + "//internal/platform/flags:platform_flags", + "//internal/platform/implementation:comm", + "//internal/platform/implementation:platform", + "//internal/platform/implementation/g3", # build_cleaner: keep + "//internal/proto/analytics:connections_log_cc_proto", + "@com_github_protobuf_matchers//protobuf-matchers", + "@com_google_absl//absl/strings:string_view", + "@com_google_absl//absl/time", + "@com_google_googletest//:gtest_main", + ], +) + cc_test( name = "core_internal_mediums_webrtc_test", size = "small", diff --git a/connections/implementation/awdl_bwu_handler.cc b/connections/implementation/mediums/awdl_bwu_handler.cc similarity index 98% rename from connections/implementation/awdl_bwu_handler.cc rename to connections/implementation/mediums/awdl_bwu_handler.cc index da96bc0c..6aa9bca5 100644 --- a/connections/implementation/awdl_bwu_handler.cc +++ b/connections/implementation/mediums/awdl_bwu_handler.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/awdl_bwu_handler.h" +#include "connections/implementation/mediums/awdl_bwu_handler.h" #include #include @@ -23,11 +23,11 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "absl/time/time.h" -#include "connections/implementation/awdl_endpoint_channel.h" #include "connections/implementation/base_bwu_handler.h" #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" #include "connections/implementation/mediums/awdl.h" +#include "connections/implementation/mediums/awdl_endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" #include "connections/implementation/mediums/utils.h" #include "connections/implementation/offline_frames.h" diff --git a/connections/implementation/awdl_bwu_handler.h b/connections/implementation/mediums/awdl_bwu_handler.h similarity index 95% rename from connections/implementation/awdl_bwu_handler.h rename to connections/implementation/mediums/awdl_bwu_handler.h index 1a42a844..c3c27985 100644 --- a/connections/implementation/awdl_bwu_handler.h +++ b/connections/implementation/mediums/awdl_bwu_handler.h @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_AWDL_BWU_HANDLER_H_ -#define CORE_INTERNAL_AWDL_BWU_HANDLER_H_ +#ifndef CORE_INTERNAL_MEDIUMS_AWDL_BWU_HANDLER_H_ +#define CORE_INTERNAL_MEDIUMS_AWDL_BWU_HANDLER_H_ #include #include -#include #include "connections/implementation/base_bwu_handler.h" #include "connections/implementation/bwu_handler.h" @@ -89,4 +88,4 @@ class AwdlBwuHandler : public BaseBwuHandler { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_AWDL_BWU_HANDLER_H_ +#endif // CORE_INTERNAL_MEDIUMS_AWDL_BWU_HANDLER_H_ diff --git a/connections/implementation/awdl_bwu_handler_test.cc b/connections/implementation/mediums/awdl_bwu_handler_test.cc similarity index 99% rename from connections/implementation/awdl_bwu_handler_test.cc rename to connections/implementation/mediums/awdl_bwu_handler_test.cc index 3fdba73a..2908cf25 100644 --- a/connections/implementation/awdl_bwu_handler_test.cc +++ b/connections/implementation/mediums/awdl_bwu_handler_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/awdl_bwu_handler.h" +#include "connections/implementation/mediums/awdl_bwu_handler.h" #include #include @@ -26,10 +26,10 @@ #include "absl/strings/string_view.h" #include "absl/time/clock.h" #include "absl/time/time.h" -#include "connections/implementation/awdl_endpoint_channel.h" #include "connections/implementation/bwu_handler.h" #include "connections/implementation/client_proxy.h" #include "connections/implementation/mediums/awdl.h" +#include "connections/implementation/mediums/awdl_endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" #include "connections/strategy.h" #include "internal/analytics/mock_event_logger.h" diff --git a/connections/implementation/awdl_endpoint_channel.cc b/connections/implementation/mediums/awdl_endpoint_channel.cc similarity index 97% rename from connections/implementation/awdl_endpoint_channel.cc rename to connections/implementation/mediums/awdl_endpoint_channel.cc index 74ac3564..46cac068 100644 --- a/connections/implementation/awdl_endpoint_channel.cc +++ b/connections/implementation/mediums/awdl_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/awdl_endpoint_channel.h" +#include "connections/implementation/mediums/awdl_endpoint_channel.h" #include #include diff --git a/connections/implementation/awdl_endpoint_channel.h b/connections/implementation/mediums/awdl_endpoint_channel.h similarity index 88% rename from connections/implementation/awdl_endpoint_channel.h rename to connections/implementation/mediums/awdl_endpoint_channel.h index 1cd8da5b..ff22735a 100644 --- a/connections/implementation/awdl_endpoint_channel.h +++ b/connections/implementation/mediums/awdl_endpoint_channel.h @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_AWDL_ENDPOINT_CHANNEL_H_ -#define CORE_INTERNAL_AWDL_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_AWDL_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_AWDL_ENDPOINT_CHANNEL_H_ #include #include "connections/implementation/base_endpoint_channel.h" #include "connections/implementation/mediums/awdl.h" +#include "internal/platform/awdl.h" namespace nearby { namespace connections { @@ -48,4 +49,4 @@ class AwdlEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_AWDL_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_AWDL_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/ble_endpoint_channel.cc b/connections/implementation/mediums/ble_endpoint_channel.cc similarity index 98% rename from connections/implementation/ble_endpoint_channel.cc rename to connections/implementation/mediums/ble_endpoint_channel.cc index 4146b7ac..a261ab89 100644 --- a/connections/implementation/ble_endpoint_channel.cc +++ b/connections/implementation/mediums/ble_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/ble_endpoint_channel.h" +#include "connections/implementation/mediums/ble_endpoint_channel.h" #include #include diff --git a/connections/implementation/ble_endpoint_channel.h b/connections/implementation/mediums/ble_endpoint_channel.h similarity index 91% rename from connections/implementation/ble_endpoint_channel.h rename to connections/implementation/mediums/ble_endpoint_channel.h index 7ad7fc4e..82805a98 100644 --- a/connections/implementation/ble_endpoint_channel.h +++ b/connections/implementation/mediums/ble_endpoint_channel.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CONNECTIONS_IMPLEMENTATION_BLE_ENDPOINT_CHANNEL_H_ -#define CONNECTIONS_IMPLEMENTATION_BLE_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_BLE_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_BLE_ENDPOINT_CHANNEL_H_ #include #include @@ -57,4 +57,4 @@ class BleEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CONNECTIONS_IMPLEMENTATION_BLE_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_BLE_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/ble_l2cap_endpoint_channel.cc b/connections/implementation/mediums/ble_l2cap_endpoint_channel.cc similarity index 98% rename from connections/implementation/ble_l2cap_endpoint_channel.cc rename to connections/implementation/mediums/ble_l2cap_endpoint_channel.cc index 33056d69..6f92010e 100644 --- a/connections/implementation/ble_l2cap_endpoint_channel.cc +++ b/connections/implementation/mediums/ble_l2cap_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/ble_l2cap_endpoint_channel.h" +#include "connections/implementation/mediums/ble_l2cap_endpoint_channel.h" #include #include @@ -22,11 +22,11 @@ #include "connections/implementation/base_endpoint_channel.h" #include "connections/implementation/mediums/ble/ble_socket.h" #include "internal/platform/ble.h" +#include "internal/platform/byte_array.h" #include "internal/platform/exception.h" #include "internal/platform/input_stream.h" #include "internal/platform/logging.h" #include "internal/platform/output_stream.h" -#include "internal/platform/byte_array.h" namespace nearby { namespace connections { diff --git a/connections/implementation/ble_l2cap_endpoint_channel.h b/connections/implementation/mediums/ble_l2cap_endpoint_channel.h similarity index 91% rename from connections/implementation/ble_l2cap_endpoint_channel.h rename to connections/implementation/mediums/ble_l2cap_endpoint_channel.h index 292d67ea..00b84c8b 100644 --- a/connections/implementation/ble_l2cap_endpoint_channel.h +++ b/connections/implementation/mediums/ble_l2cap_endpoint_channel.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_BLE_L2CAP_ENDPOINT_CHANNEL_H_ -#define CORE_INTERNAL_BLE_L2CAP_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_BLE_L2CAP_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_BLE_L2CAP_ENDPOINT_CHANNEL_H_ #include #include @@ -60,4 +60,4 @@ class BleL2capEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_BLE_L2CAP_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_BLE_L2CAP_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/bluetooth_bwu_handler.cc b/connections/implementation/mediums/bluetooth_bwu_handler.cc similarity index 98% rename from connections/implementation/bluetooth_bwu_handler.cc rename to connections/implementation/mediums/bluetooth_bwu_handler.cc index 00c059a9..f2643049 100644 --- a/connections/implementation/bluetooth_bwu_handler.cc +++ b/connections/implementation/mediums/bluetooth_bwu_handler.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/bluetooth_bwu_handler.h" +#include "connections/implementation/mediums/bluetooth_bwu_handler.h" #include #include @@ -20,9 +20,9 @@ #include "absl/functional/bind_front.h" #include "connections/implementation/base_bwu_handler.h" -#include "connections/implementation/bluetooth_endpoint_channel.h" #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" +#include "connections/implementation/mediums/bluetooth_endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" #include "connections/implementation/offline_frames.h" #include "internal/platform/bluetooth_adapter.h" diff --git a/connections/implementation/bluetooth_bwu_handler.h b/connections/implementation/mediums/bluetooth_bwu_handler.h similarity index 94% rename from connections/implementation/bluetooth_bwu_handler.h rename to connections/implementation/mediums/bluetooth_bwu_handler.h index b468a54a..3c1a7b10 100644 --- a/connections/implementation/bluetooth_bwu_handler.h +++ b/connections/implementation/mediums/bluetooth_bwu_handler.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_BLUETOOTH_BWU_HANDLER_H_ -#define CORE_INTERNAL_BLUETOOTH_BWU_HANDLER_H_ +#ifndef CORE_INTERNAL_MEDIUMS_BLUETOOTH_BWU_HANDLER_H_ +#define CORE_INTERNAL_MEDIUMS_BLUETOOTH_BWU_HANDLER_H_ #include #include @@ -83,4 +83,4 @@ class BluetoothBwuHandler : public BaseBwuHandler { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_BLUETOOTH_BWU_HANDLER_H_ +#endif // CORE_INTERNAL_MEDIUMS_BLUETOOTH_BWU_HANDLER_H_ diff --git a/connections/implementation/bluetooth_bwu_test.cc b/connections/implementation/mediums/bluetooth_bwu_handler_test.cc similarity index 98% rename from connections/implementation/bluetooth_bwu_test.cc rename to connections/implementation/mediums/bluetooth_bwu_handler_test.cc index 52ad5fe5..2144ed9d 100644 --- a/connections/implementation/bluetooth_bwu_test.cc +++ b/connections/implementation/mediums/bluetooth_bwu_handler_test.cc @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "connections/implementation/mediums/bluetooth_bwu_handler.h" + #include #include #include #include "gtest/gtest.h" #include "absl/time/time.h" -#include "connections/implementation/bluetooth_bwu_handler.h" #include "connections/implementation/bwu_handler.h" #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" diff --git a/connections/implementation/bluetooth_endpoint_channel.cc b/connections/implementation/mediums/bluetooth_endpoint_channel.cc similarity index 97% rename from connections/implementation/bluetooth_endpoint_channel.cc rename to connections/implementation/mediums/bluetooth_endpoint_channel.cc index 73d09d9c..643a65c7 100644 --- a/connections/implementation/bluetooth_endpoint_channel.cc +++ b/connections/implementation/mediums/bluetooth_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/bluetooth_endpoint_channel.h" +#include "connections/implementation/mediums/bluetooth_endpoint_channel.h" #include #include diff --git a/connections/implementation/bluetooth_endpoint_channel.h b/connections/implementation/mediums/bluetooth_endpoint_channel.h similarity index 88% rename from connections/implementation/bluetooth_endpoint_channel.h rename to connections/implementation/mediums/bluetooth_endpoint_channel.h index b2176388..a28a7cdf 100644 --- a/connections/implementation/bluetooth_endpoint_channel.h +++ b/connections/implementation/mediums/bluetooth_endpoint_channel.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_BLUETOOTH_ENDPOINT_CHANNEL_H_ -#define CORE_INTERNAL_BLUETOOTH_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_BLUETOOTH_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_BLUETOOTH_ENDPOINT_CHANNEL_H_ #include @@ -46,4 +46,4 @@ class BluetoothEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_BLUETOOTH_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_BLUETOOTH_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/webrtc_bwu_handler.cc b/connections/implementation/mediums/webrtc_bwu_handler.cc similarity index 98% rename from connections/implementation/webrtc_bwu_handler.cc rename to connections/implementation/mediums/webrtc_bwu_handler.cc index 5ec2c1c0..31605073 100644 --- a/connections/implementation/webrtc_bwu_handler.cc +++ b/connections/implementation/mediums/webrtc_bwu_handler.cc @@ -14,7 +14,7 @@ #ifndef NO_WEBRTC -#include "connections/implementation/webrtc_bwu_handler.h" +#include "connections/implementation/mediums/webrtc_bwu_handler.h" #include #include @@ -25,11 +25,11 @@ #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" +#include "connections/implementation/mediums/webrtc_endpoint_channel.h" #include "connections/implementation/mediums/webrtc_peer_id.h" #include "connections/implementation/mediums/webrtc_socket.h" #include "connections/implementation/offline_frames.h" #include "connections/implementation/proto/offline_wire_formats.pb.h" -#include "connections/implementation/webrtc_endpoint_channel.h" #include "internal/platform/expected.h" #include "internal/platform/logging.h" diff --git a/connections/implementation/webrtc_bwu_handler.h b/connections/implementation/mediums/webrtc_bwu_handler.h similarity index 94% rename from connections/implementation/webrtc_bwu_handler.h rename to connections/implementation/mediums/webrtc_bwu_handler.h index c4918ad2..725486ff 100644 --- a/connections/implementation/webrtc_bwu_handler.h +++ b/connections/implementation/mediums/webrtc_bwu_handler.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_WEBRTC_BWU_HANDLER_H_ -#define CORE_INTERNAL_WEBRTC_BWU_HANDLER_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_BWU_HANDLER_H_ +#define CORE_INTERNAL_MEDIUMS_WEBRTC_BWU_HANDLER_H_ #ifndef NO_WEBRTC @@ -87,4 +87,4 @@ class WebrtcBwuHandler : public BaseBwuHandler { #endif -#endif // CORE_INTERNAL_WEBRTC_BWU_HANDLER_H_ +#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_BWU_HANDLER_H_ diff --git a/connections/implementation/webrtc_bwu_handler_stub.cc b/connections/implementation/mediums/webrtc_bwu_handler_stub.cc similarity index 89% rename from connections/implementation/webrtc_bwu_handler_stub.cc rename to connections/implementation/mediums/webrtc_bwu_handler_stub.cc index d116d100..5c3e4c57 100644 --- a/connections/implementation/webrtc_bwu_handler_stub.cc +++ b/connections/implementation/mediums/webrtc_bwu_handler_stub.cc @@ -14,17 +14,17 @@ #ifdef NO_WEBRTC -#include "connections/implementation/webrtc_bwu_handler_stub.h" +#include "connections/implementation/mediums/webrtc_bwu_handler_stub.h" +#include #include #include -#include "absl/functional/bind_front.h" +#include "connections/implementation/base_bwu_handler.h" #include "connections/implementation/client_proxy.h" -#include "connections/implementation/mediums/utils.h" -#include "connections/implementation/mediums/webrtc_peer_id.h" -#include "connections/implementation/offline_frames.h" -#include "connections/implementation/webrtc_endpoint_channel.h" +#include "connections/implementation/endpoint_channel.h" +#include "connections/implementation/mediums/mediums.h" +#include "connections/implementation/mediums/webrtc_socket.h" #include "internal/platform/expected.h" namespace nearby { diff --git a/connections/implementation/webrtc_bwu_handler_stub.h b/connections/implementation/mediums/webrtc_bwu_handler_stub.h similarity index 94% rename from connections/implementation/webrtc_bwu_handler_stub.h rename to connections/implementation/mediums/webrtc_bwu_handler_stub.h index 7c959cd9..859eb6c6 100644 --- a/connections/implementation/webrtc_bwu_handler_stub.h +++ b/connections/implementation/mediums/webrtc_bwu_handler_stub.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_WEBRTC_BWU_HANDLER_STUB_H_ -#define CORE_INTERNAL_WEBRTC_BWU_HANDLER_STUB_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_BWU_HANDLER_STUB_H_ +#define CORE_INTERNAL_MEDIUMS_WEBRTC_BWU_HANDLER_STUB_H_ #ifdef NO_WEBRTC @@ -83,4 +83,4 @@ class WebrtcBwuHandler : public BaseBwuHandler { #endif -#endif // CORE_INTERNAL_WEBRTC_BWU_HANDLER_STUB_H_ +#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_BWU_HANDLER_STUB_H_ diff --git a/connections/implementation/webrtc_endpoint_channel.cc b/connections/implementation/mediums/webrtc_endpoint_channel.cc similarity index 95% rename from connections/implementation/webrtc_endpoint_channel.cc rename to connections/implementation/mediums/webrtc_endpoint_channel.cc index a95c4027..e054c416 100644 --- a/connections/implementation/webrtc_endpoint_channel.cc +++ b/connections/implementation/mediums/webrtc_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/webrtc_endpoint_channel.h" +#include "connections/implementation/mediums/webrtc_endpoint_channel.h" #include #include diff --git a/connections/implementation/webrtc_endpoint_channel.h b/connections/implementation/mediums/webrtc_endpoint_channel.h similarity index 88% rename from connections/implementation/webrtc_endpoint_channel.h rename to connections/implementation/mediums/webrtc_endpoint_channel.h index dd11bdf6..e7d396d5 100644 --- a/connections/implementation/webrtc_endpoint_channel.h +++ b/connections/implementation/mediums/webrtc_endpoint_channel.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_WEBRTC_ENDPOINT_CHANNEL_H_ -#define CORE_INTERNAL_WEBRTC_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_WEBRTC_ENDPOINT_CHANNEL_H_ #include #include @@ -41,4 +41,4 @@ class WebRtcEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_WEBRTC_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/wifi_direct_bwu_handler.cc b/connections/implementation/mediums/wifi_direct_bwu_handler.cc similarity index 98% rename from connections/implementation/wifi_direct_bwu_handler.cc rename to connections/implementation/mediums/wifi_direct_bwu_handler.cc index ce314b09..ad501815 100644 --- a/connections/implementation/wifi_direct_bwu_handler.cc +++ b/connections/implementation/mediums/wifi_direct_bwu_handler.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/wifi_direct_bwu_handler.h" +#include "connections/implementation/mediums/wifi_direct_bwu_handler.h" #include #include @@ -24,8 +24,8 @@ #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" +#include "connections/implementation/mediums/wifi_direct_endpoint_channel.h" #include "connections/implementation/offline_frames.h" -#include "connections/implementation/wifi_direct_endpoint_channel.h" #include "connections/strategy.h" #include "internal/base/masker.h" #include "internal/platform/expected.h" diff --git a/connections/implementation/wifi_direct_bwu_handler.h b/connections/implementation/mediums/wifi_direct_bwu_handler.h similarity index 95% rename from connections/implementation/wifi_direct_bwu_handler.h rename to connections/implementation/mediums/wifi_direct_bwu_handler.h index 823edc12..2f6b86b9 100644 --- a/connections/implementation/wifi_direct_bwu_handler.h +++ b/connections/implementation/mediums/wifi_direct_bwu_handler.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_WIFI_DIRECT_BWU_HANDLER_H_ -#define CORE_INTERNAL_WIFI_DIRECT_BWU_HANDLER_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WIFI_DIRECT_BWU_HANDLER_H_ +#define CORE_INTERNAL_MEDIUMS_WIFI_DIRECT_BWU_HANDLER_H_ #include #include @@ -92,4 +92,4 @@ class WifiDirectBwuHandler : public BaseBwuHandler { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_WIFI_DIRECT_BWU_HANDLER_H_ +#endif // CORE_INTERNAL_MEDIUMS_WIFI_DIRECT_BWU_HANDLER_H_ diff --git a/connections/implementation/wifi_direct_bwu_test.cc b/connections/implementation/mediums/wifi_direct_bwu_handler_test.cc similarity index 98% rename from connections/implementation/wifi_direct_bwu_test.cc rename to connections/implementation/mediums/wifi_direct_bwu_handler_test.cc index e125c418..00689ac9 100644 --- a/connections/implementation/wifi_direct_bwu_test.cc +++ b/connections/implementation/mediums/wifi_direct_bwu_handler_test.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "connections/implementation/mediums/wifi_direct_bwu_handler.h" + #include #include #include @@ -26,7 +28,6 @@ #include "connections/implementation/flags/nearby_connections_feature_flags.h" #include "connections/implementation/mediums/mediums.h" #include "connections/implementation/offline_frames.h" -#include "connections/implementation/wifi_direct_bwu_handler.h" #include "internal/flags/nearby_flags.h" #include "internal/platform/count_down_latch.h" #include "internal/platform/exception.h" diff --git a/connections/implementation/wifi_direct_endpoint_channel.cc b/connections/implementation/mediums/wifi_direct_endpoint_channel.cc similarity index 95% rename from connections/implementation/wifi_direct_endpoint_channel.cc rename to connections/implementation/mediums/wifi_direct_endpoint_channel.cc index 379112b8..b271d475 100644 --- a/connections/implementation/wifi_direct_endpoint_channel.cc +++ b/connections/implementation/mediums/wifi_direct_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/wifi_direct_endpoint_channel.h" +#include "connections/implementation/mediums/wifi_direct_endpoint_channel.h" #include #include diff --git a/connections/implementation/wifi_direct_endpoint_channel.h b/connections/implementation/mediums/wifi_direct_endpoint_channel.h similarity index 89% rename from connections/implementation/wifi_direct_endpoint_channel.h rename to connections/implementation/mediums/wifi_direct_endpoint_channel.h index 9cf735b6..45d4d6f9 100644 --- a/connections/implementation/wifi_direct_endpoint_channel.h +++ b/connections/implementation/mediums/wifi_direct_endpoint_channel.h @@ -12,9 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. - -#ifndef CORE_INTERNAL_WIFI_DIRECT_ENDPOINT_CHANNEL_H_ -#define CORE_INTERNAL_WIFI_DIRECT_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WIFI_DIRECT_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_WIFI_DIRECT_ENDPOINT_CHANNEL_H_ #include @@ -48,4 +47,4 @@ class WifiDirectEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_WIFI_DIRECT_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_WIFI_DIRECT_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/wifi_hotspot_bwu_handler.cc b/connections/implementation/mediums/wifi_hotspot_bwu_handler.cc similarity index 98% rename from connections/implementation/wifi_hotspot_bwu_handler.cc rename to connections/implementation/mediums/wifi_hotspot_bwu_handler.cc index 9d2da68d..95b457a7 100644 --- a/connections/implementation/wifi_hotspot_bwu_handler.cc +++ b/connections/implementation/mediums/wifi_hotspot_bwu_handler.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/wifi_hotspot_bwu_handler.h" +#include "connections/implementation/mediums/wifi_hotspot_bwu_handler.h" #if !defined(_WIN32) #include @@ -32,9 +32,9 @@ #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" +#include "connections/implementation/mediums/wifi_hotspot_endpoint_channel.h" #include "connections/implementation/offline_frames.h" #include "connections/implementation/proto/offline_wire_formats.pb.h" -#include "connections/implementation/wifi_hotspot_endpoint_channel.h" #include "connections/strategy.h" #include "internal/base/masker.h" #include "internal/platform/expected.h" diff --git a/connections/implementation/wifi_hotspot_bwu_handler.h b/connections/implementation/mediums/wifi_hotspot_bwu_handler.h similarity index 94% rename from connections/implementation/wifi_hotspot_bwu_handler.h rename to connections/implementation/mediums/wifi_hotspot_bwu_handler.h index 9af42e93..134c5cc2 100644 --- a/connections/implementation/wifi_hotspot_bwu_handler.h +++ b/connections/implementation/mediums/wifi_hotspot_bwu_handler.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_WIFI_HOTSPOT_BWU_HANDLER_H_ -#define CORE_INTERNAL_WIFI_HOTSPOT_BWU_HANDLER_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WIFI_HOTSPOT_BWU_HANDLER_H_ +#define CORE_INTERNAL_MEDIUMS_WIFI_HOTSPOT_BWU_HANDLER_H_ #include #include @@ -84,4 +84,4 @@ class WifiHotspotBwuHandler : public BaseBwuHandler { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_WIFI_HOTSPOT_BWU_HANDLER_H_ +#endif // CORE_INTERNAL_MEDIUMS_WIFI_HOTSPOT_BWU_HANDLER_H_ diff --git a/connections/implementation/wifi_hotspot_bwu_test.cc b/connections/implementation/mediums/wifi_hotspot_bwu_handler_test.cc similarity index 98% rename from connections/implementation/wifi_hotspot_bwu_test.cc rename to connections/implementation/mediums/wifi_hotspot_bwu_handler_test.cc index f1d300d6..03978050 100644 --- a/connections/implementation/wifi_hotspot_bwu_test.cc +++ b/connections/implementation/mediums/wifi_hotspot_bwu_handler_test.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "connections/implementation/mediums/wifi_hotspot_bwu_handler.h" + #include #include #include @@ -25,7 +27,6 @@ #include "connections/implementation/endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" #include "connections/implementation/offline_frames.h" -#include "connections/implementation/wifi_hotspot_bwu_handler.h" #include "internal/flags/nearby_flags.h" #include "internal/platform/count_down_latch.h" #include "internal/platform/exception.h" diff --git a/connections/implementation/wifi_hotspot_endpoint_channel.cc b/connections/implementation/mediums/wifi_hotspot_endpoint_channel.cc similarity index 95% rename from connections/implementation/wifi_hotspot_endpoint_channel.cc rename to connections/implementation/mediums/wifi_hotspot_endpoint_channel.cc index 53e99fbe..0b355d36 100644 --- a/connections/implementation/wifi_hotspot_endpoint_channel.cc +++ b/connections/implementation/mediums/wifi_hotspot_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/wifi_hotspot_endpoint_channel.h" +#include "connections/implementation/mediums/wifi_hotspot_endpoint_channel.h" #include #include diff --git a/connections/implementation/wifi_hotspot_endpoint_channel.h b/connections/implementation/mediums/wifi_hotspot_endpoint_channel.h similarity index 89% rename from connections/implementation/wifi_hotspot_endpoint_channel.h rename to connections/implementation/mediums/wifi_hotspot_endpoint_channel.h index b44da4de..2cb2b67f 100644 --- a/connections/implementation/wifi_hotspot_endpoint_channel.h +++ b/connections/implementation/mediums/wifi_hotspot_endpoint_channel.h @@ -12,9 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. - -#ifndef CORE_INTERNAL_WIFI_HOTSPOT_ENDPOINT_CHANNEL_H_ -#define CORE_INTERNAL_WIFI_HOTSPOT_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WIFI_HOTSPOT_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_WIFI_HOTSPOT_ENDPOINT_CHANNEL_H_ #include @@ -48,4 +47,4 @@ class WifiHotspotEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_WIFI_HOTSPOT_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_WIFI_HOTSPOT_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/wifi_lan_bwu_handler.cc b/connections/implementation/mediums/wifi_lan_bwu_handler.cc similarity index 98% rename from connections/implementation/wifi_lan_bwu_handler.cc rename to connections/implementation/mediums/wifi_lan_bwu_handler.cc index bedac087..7b6e5604 100644 --- a/connections/implementation/wifi_lan_bwu_handler.cc +++ b/connections/implementation/mediums/wifi_lan_bwu_handler.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/wifi_lan_bwu_handler.h" +#include "connections/implementation/mediums/wifi_lan_bwu_handler.h" #include #include @@ -25,8 +25,8 @@ #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" +#include "connections/implementation/mediums/wifi_lan_endpoint_channel.h" #include "connections/implementation/offline_frames.h" -#include "connections/implementation/wifi_lan_endpoint_channel.h" #include "internal/platform/expected.h" #include "internal/platform/implementation/upgrade_address_info.h" #include "internal/platform/logging.h" diff --git a/connections/implementation/wifi_lan_bwu_handler.h b/connections/implementation/mediums/wifi_lan_bwu_handler.h similarity index 94% rename from connections/implementation/wifi_lan_bwu_handler.h rename to connections/implementation/mediums/wifi_lan_bwu_handler.h index abf0f26d..a94a0554 100644 --- a/connections/implementation/wifi_lan_bwu_handler.h +++ b/connections/implementation/mediums/wifi_lan_bwu_handler.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_WIFI_LAN_BWU_HANDLER_H_ -#define CORE_INTERNAL_WIFI_LAN_BWU_HANDLER_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WIFI_LAN_BWU_HANDLER_H_ +#define CORE_INTERNAL_MEDIUMS_WIFI_LAN_BWU_HANDLER_H_ #include #include @@ -84,4 +84,4 @@ class WifiLanBwuHandler : public BaseBwuHandler { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_WIFI_LAN_BWU_HANDLER_H_ +#endif // CORE_INTERNAL_MEDIUMS_WIFI_LAN_BWU_HANDLER_H_ diff --git a/connections/implementation/wifi_lan_bwu_handler_test.cc b/connections/implementation/mediums/wifi_lan_bwu_handler_test.cc similarity index 99% rename from connections/implementation/wifi_lan_bwu_handler_test.cc rename to connections/implementation/mediums/wifi_lan_bwu_handler_test.cc index 27d31a22..ad03cd54 100644 --- a/connections/implementation/wifi_lan_bwu_handler_test.cc +++ b/connections/implementation/mediums/wifi_lan_bwu_handler_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/wifi_lan_bwu_handler.h" +#include "connections/implementation/mediums/wifi_lan_bwu_handler.h" #include #include diff --git a/connections/implementation/wifi_lan_endpoint_channel.cc b/connections/implementation/mediums/wifi_lan_endpoint_channel.cc similarity index 96% rename from connections/implementation/wifi_lan_endpoint_channel.cc rename to connections/implementation/mediums/wifi_lan_endpoint_channel.cc index ec3e02b1..94fb69e4 100644 --- a/connections/implementation/wifi_lan_endpoint_channel.cc +++ b/connections/implementation/mediums/wifi_lan_endpoint_channel.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "connections/implementation/wifi_lan_endpoint_channel.h" +#include "connections/implementation/mediums/wifi_lan_endpoint_channel.h" #include diff --git a/connections/implementation/wifi_lan_endpoint_channel.h b/connections/implementation/mediums/wifi_lan_endpoint_channel.h similarity index 87% rename from connections/implementation/wifi_lan_endpoint_channel.h rename to connections/implementation/mediums/wifi_lan_endpoint_channel.h index 587f5002..59d5d9e3 100644 --- a/connections/implementation/wifi_lan_endpoint_channel.h +++ b/connections/implementation/mediums/wifi_lan_endpoint_channel.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CORE_INTERNAL_WIFI_LAN_ENDPOINT_CHANNEL_H_ -#define CORE_INTERNAL_WIFI_LAN_ENDPOINT_CHANNEL_H_ +#ifndef CORE_INTERNAL_MEDIUMS_WIFI_LAN_ENDPOINT_CHANNEL_H_ +#define CORE_INTERNAL_MEDIUMS_WIFI_LAN_ENDPOINT_CHANNEL_H_ #include @@ -41,4 +41,4 @@ class WifiLanEndpointChannel final : public BaseEndpointChannel { } // namespace connections } // namespace nearby -#endif // CORE_INTERNAL_WIFI_LAN_ENDPOINT_CHANNEL_H_ +#endif // CORE_INTERNAL_MEDIUMS_WIFI_LAN_ENDPOINT_CHANNEL_H_ diff --git a/connections/implementation/p2p_cluster_pcp_handler.cc b/connections/implementation/p2p_cluster_pcp_handler.cc index 73dc47f4..76bbe1bc 100644 --- a/connections/implementation/p2p_cluster_pcp_handler.cc +++ b/connections/implementation/p2p_cluster_pcp_handler.cc @@ -29,13 +29,9 @@ #include "absl/strings/string_view.h" #include "connections/advertising_options.h" #include "connections/discovery_options.h" -#include "connections/implementation/awdl_endpoint_channel.h" #include "connections/implementation/base_pcp_handler.h" #include "connections/implementation/ble_advertisement.h" -#include "connections/implementation/ble_endpoint_channel.h" -#include "connections/implementation/ble_l2cap_endpoint_channel.h" #include "connections/implementation/bluetooth_device_name.h" -#include "connections/implementation/bluetooth_endpoint_channel.h" #include "connections/implementation/bwu_manager.h" #include "connections/implementation/client_proxy.h" #include "connections/implementation/endpoint_channel_manager.h" @@ -44,16 +40,20 @@ #include "connections/implementation/injected_bluetooth_device_store.h" #include "connections/implementation/mediums/advertisements/advertisement_util.h" #include "connections/implementation/mediums/advertisements/dct_advertisement.h" +#include "connections/implementation/mediums/awdl_endpoint_channel.h" #include "connections/implementation/mediums/ble.h" #include "connections/implementation/mediums/ble/ble_advertisement_header.h" #include "connections/implementation/mediums/ble/ble_socket.h" +#include "connections/implementation/mediums/ble_endpoint_channel.h" +#include "connections/implementation/mediums/ble_l2cap_endpoint_channel.h" #include "connections/implementation/mediums/bluetooth_classic.h" +#include "connections/implementation/mediums/bluetooth_endpoint_channel.h" #include "connections/implementation/mediums/mediums.h" #include "connections/implementation/mediums/utils.h" +#include "connections/implementation/mediums/wifi_lan_endpoint_channel.h" #include "connections/implementation/pcp.h" #include "connections/implementation/pcp_handler.h" #include "connections/implementation/webrtc_state.h" -#include "connections/implementation/wifi_lan_endpoint_channel.h" #include "connections/implementation/wifi_lan_service_info.h" #include "connections/medium_selector.h" #include "connections/out_of_band_connection_metadata.h"