mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
1062 lines
34 KiB
Python
1062 lines
34 KiB
Python
# Copyright 2024 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.
|
|
|
|
load("@rules_cc//cc:cc_library.bzl", "cc_library")
|
|
load("@rules_cc//cc:cc_test.bzl", "cc_test")
|
|
|
|
licenses(["notice"])
|
|
|
|
cc_library(
|
|
name = "connection_types",
|
|
hdrs = ["nearby_connections_types.h"],
|
|
deps = [
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/crypto_cros", # buildcleaner: keep
|
|
"//internal/interop:authentication_status",
|
|
"@com_google_absl//absl/random",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "attachments",
|
|
srcs = [
|
|
"attachment.cc",
|
|
"attachment_container.cc",
|
|
"file_attachment.cc",
|
|
"text_attachment.cc",
|
|
"wifi_credentials_attachment.cc",
|
|
],
|
|
hdrs = [
|
|
"attachment.h",
|
|
"attachment_container.h",
|
|
"file_attachment.h",
|
|
"text_attachment.h",
|
|
"wifi_credentials_attachment.h",
|
|
],
|
|
visibility = [
|
|
"//location/nearby/apps/better_together/windows/nearby_share:__subpackages__",
|
|
"//location/nearby/cpp/sharing:__subpackages__",
|
|
"//location/nearby/sharing/lib:__subpackages__",
|
|
"//location/nearby/sharing/sdk/quick_share_server:__pkg__",
|
|
"//location/nearby/testing/nearby_native:__subpackages__",
|
|
"//sharing:__subpackages__",
|
|
],
|
|
deps = [
|
|
"//internal/base:file_path",
|
|
"//internal/network:url",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/common:enum",
|
|
"//sharing/internal/base",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
|
"@com_google_absl//absl/memory",
|
|
"@com_google_absl//absl/random",
|
|
"@com_google_absl//absl/status:statusor",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "types",
|
|
srcs = [
|
|
"advertisement.cc",
|
|
"advertisement_capabilities.cc",
|
|
"share_target.cc",
|
|
],
|
|
hdrs = [
|
|
"advertisement.h",
|
|
"advertisement_capabilities.h",
|
|
"constants.h",
|
|
"nearby_connection.h",
|
|
"nearby_connections_manager.h",
|
|
"share_target.h",
|
|
],
|
|
visibility = [
|
|
"//location/nearby/apps/better_together/windows/nearby_share:__subpackages__",
|
|
"//location/nearby/cpp/sharing:__subpackages__",
|
|
"//location/nearby/sharing/lib:__subpackages__",
|
|
"//location/nearby/sharing/sdk/quick_share_server:__pkg__",
|
|
"//location/nearby/testing/nearby_native:__subpackages__",
|
|
"//sharing:__subpackages__",
|
|
],
|
|
deps = [
|
|
":connection_types",
|
|
"//internal/base:file_path",
|
|
"//internal/network:url",
|
|
"//sharing/common:enum",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"@com_google_absl//absl/container:flat_hash_set",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:str_format",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_absl//absl/types:span",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "share_session_usage",
|
|
hdrs = ["share_session_usage.h"],
|
|
visibility = [
|
|
"//location/nearby/cpp/sharing:__subpackages__",
|
|
"//location/nearby/sharing/lib:__subpackages__",
|
|
"//sharing:__subpackages__",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "transfer_metadata",
|
|
srcs = [
|
|
"transfer_metadata.cc",
|
|
"transfer_metadata_builder.cc",
|
|
],
|
|
hdrs = [
|
|
"transfer_metadata.h",
|
|
"transfer_metadata_builder.h",
|
|
],
|
|
visibility = [
|
|
"//location/nearby/apps/better_together/windows/nearby_share:__subpackages__",
|
|
"//location/nearby/cpp/sharing:__subpackages__",
|
|
"//location/nearby/sharing/lib:__subpackages__",
|
|
"//location/nearby/sharing/sdk/quick_share_server:__pkg__",
|
|
"//location/nearby/testing/nearby_native:__subpackages__",
|
|
"//sharing:__subpackages__",
|
|
],
|
|
deps = [
|
|
":share_session_usage",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:str_format",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "nearby_sharing_decoder",
|
|
hdrs = ["nearby_sharing_decoder.h"],
|
|
visibility = [
|
|
"//sharing/fuzzing:__pkg__",
|
|
],
|
|
deps = [
|
|
":types",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_google_absl//absl/types:span",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "worker_queue",
|
|
hdrs = ["worker_queue.h"],
|
|
deps = [
|
|
"//internal/platform:types",
|
|
"//sharing/internal/public:logging",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@com_google_absl//absl/functional:any_invocable",
|
|
"@com_google_absl//absl/synchronization",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "incoming_frame_reader",
|
|
srcs = ["incoming_frames_reader.cc"],
|
|
hdrs = ["incoming_frames_reader.h"],
|
|
deps = [
|
|
":thread_timer",
|
|
":types",
|
|
"//internal/platform:types",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@com_google_absl//absl/functional:any_invocable",
|
|
"@com_google_absl//absl/memory",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "paired_key_verification_runner",
|
|
srcs = ["paired_key_verification_runner.cc"],
|
|
hdrs = ["paired_key_verification_runner.h"],
|
|
deps = [
|
|
":incoming_frame_reader",
|
|
"//internal/platform:types",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/certificates",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"//sharing/proto:share_cc_proto",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_google_absl//absl/base:nullability",
|
|
"@com_google_absl//absl/functional:any_invocable",
|
|
"@com_google_absl//absl/time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "thread_timer",
|
|
srcs = ["thread_timer.cc"],
|
|
hdrs = ["thread_timer.h"],
|
|
deps = [
|
|
"//internal/platform:types",
|
|
"//sharing/internal/public:logging",
|
|
"@com_google_absl//absl/debugging:leak_check",
|
|
"@com_google_absl//absl/functional:any_invocable",
|
|
"@com_google_absl//absl/time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "share_session",
|
|
srcs = [
|
|
"incoming_share_session.cc",
|
|
"nearby_file_handler.cc",
|
|
"outgoing_share_session.cc",
|
|
"payload_tracker.cc",
|
|
"share_session.cc",
|
|
],
|
|
hdrs = [
|
|
"incoming_share_session.h",
|
|
"nearby_file_handler.h",
|
|
"outgoing_share_session.h",
|
|
"payload_tracker.h",
|
|
"share_session.h",
|
|
],
|
|
deps = [
|
|
":attachments",
|
|
":connection_types",
|
|
":incoming_frame_reader",
|
|
":nearby_sharing_util",
|
|
":paired_key_verification_runner",
|
|
":share_session_usage",
|
|
":thread_timer",
|
|
":transfer_metadata",
|
|
":types",
|
|
":worker_queue",
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/platform:types",
|
|
"//location/nearby/sharing/lib/sync:sync_manager",
|
|
"//location/nearby/cpp/sharing/clients/cpp/common",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/analytics",
|
|
"//sharing/certificates",
|
|
"//sharing/internal/api:platform",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
|
"@com_google_absl//absl/functional:any_invocable",
|
|
"@com_google_absl//absl/functional:bind_front",
|
|
"@com_google_absl//absl/strings:str_format",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_absl//absl/types:span",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "nearby_connection_impl",
|
|
srcs = ["nearby_connection_impl.cc"],
|
|
hdrs = ["nearby_connection_impl.h"],
|
|
deps = [
|
|
":types",
|
|
"//internal/platform/implementation:types",
|
|
"//sharing/internal/public:logging",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@com_google_absl//absl/synchronization",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "outgoing_targets_manager",
|
|
srcs = ["outgoing_targets_manager.cc"],
|
|
hdrs = ["outgoing_targets_manager.h"],
|
|
visibility = [
|
|
"//location/nearby/sharing/lib:__subpackages__",
|
|
],
|
|
deps = [
|
|
":share_session",
|
|
":thread_timer",
|
|
":transfer_metadata",
|
|
":types",
|
|
"//internal/platform:types",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/analytics",
|
|
"//sharing/certificates",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"//sharing/proto:share_cc_proto",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_google_absl//absl/base:nullability",
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
|
"@com_google_absl//absl/functional:any_invocable",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "nearby_sharing_util",
|
|
srcs = ["nearby_sharing_util.cc"],
|
|
hdrs = ["nearby_sharing_util.h"],
|
|
deps = [
|
|
":types",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/certificates",
|
|
"//sharing/common:enum",
|
|
"//sharing/internal/base",
|
|
"//sharing/internal/public:logging",
|
|
"@com_google_absl//absl/hash",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "nearby_sharing_service",
|
|
srcs = [
|
|
"nearby_connections_manager.cc",
|
|
"nearby_connections_manager_factory.cc",
|
|
"nearby_connections_manager_impl.cc",
|
|
"nearby_connections_service.cc",
|
|
"nearby_connections_service_impl.cc",
|
|
"nearby_connections_stream_buffer_manager.cc",
|
|
"nearby_sharing_service.cc",
|
|
"nearby_sharing_service_factory.cc",
|
|
"nearby_sharing_service_impl.cc",
|
|
"nearby_sharing_settings.cc",
|
|
"service_observers.cc",
|
|
"service_observers.h",
|
|
"transfer_manager.cc",
|
|
"wrapped_share_target_discovered_callback.cc",
|
|
],
|
|
hdrs = [
|
|
"connection_lifecycle_listener.h",
|
|
"endpoint_discovery_listener.h",
|
|
"nearby_connections_manager_factory.h",
|
|
"nearby_connections_manager_impl.h",
|
|
"nearby_connections_service.h",
|
|
"nearby_connections_service_impl.h",
|
|
"nearby_connections_stream_buffer_manager.h",
|
|
"nearby_sharing_service.h",
|
|
"nearby_sharing_service_extension.h",
|
|
"nearby_sharing_service_factory.h",
|
|
"nearby_sharing_service_impl.h",
|
|
"nearby_sharing_settings.h",
|
|
"payload_listener.h",
|
|
"share_target_discovered_callback.h",
|
|
"transfer_manager.h",
|
|
"transfer_update_callback.h",
|
|
"wrapped_share_target_discovered_callback.h",
|
|
],
|
|
copts = [
|
|
"-DNEARBY_SHARING_DLL",
|
|
"-DGLOOP_I_ACKNOWLEDGE_THAT_GLOOP_DOES_NOT_SUPPORT_LIBSTDCXX=1",
|
|
"-fno-exceptions",
|
|
"-funsigned-char",
|
|
],
|
|
visibility = [
|
|
"//location/nearby/cpp/sharing:__subpackages__",
|
|
"//location/nearby/sharing/lib:__subpackages__",
|
|
"//location/nearby/sharing/sdk/quick_share_server:__pkg__",
|
|
"//location/nearby/testing/nearby_native:__subpackages__",
|
|
"//sharing:__subpackages__",
|
|
],
|
|
deps = [
|
|
":attachments",
|
|
":connection_types",
|
|
":incoming_frame_reader",
|
|
":nearby_connection_impl",
|
|
":nearby_sharing_decoder",
|
|
":nearby_sharing_util",
|
|
":outgoing_targets_manager",
|
|
":paired_key_verification_runner",
|
|
":share_session",
|
|
":share_session_usage",
|
|
":thread_timer",
|
|
":transfer_metadata",
|
|
":types",
|
|
"//connections:core",
|
|
"//connections:core_types",
|
|
"//connections/implementation:internal",
|
|
"//connections/implementation/analytics:analytics_recorder_impl",
|
|
"//internal/base",
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/flags:nearby_flags",
|
|
"//internal/network:url",
|
|
"//internal/platform:base",
|
|
"//internal/platform:comm",
|
|
"//internal/platform:logging",
|
|
"//internal/platform:mac_address",
|
|
"//internal/platform:types",
|
|
"//internal/platform/implementation:types",
|
|
#"//location/nearby/analytics/cpp/logging:event_logger",
|
|
"//location/nearby/cpp/sharing/clients/cpp/common",
|
|
"//location/nearby/sharing/lib/account:account_manager",
|
|
"//location/nearby/sharing/lib/rpc:grpc_async_client_factory",
|
|
"//location/nearby/sharing/lib/rpc:sharing_rpc_client",
|
|
"//location/nearby/sharing/lib/sync:sync_binding_prefs_cc_proto",
|
|
"//location/nearby/sharing/lib/sync:sync_manager",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/analytics",
|
|
"//sharing/certificates",
|
|
"//sharing/common",
|
|
"//sharing/common:enum",
|
|
"//sharing/fast_initiation:nearby_fast_initiation",
|
|
"//sharing/flags/generated:generated_flags",
|
|
"//sharing/internal/api:platform",
|
|
"//sharing/internal/base",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/internal/public:nearby_context",
|
|
"//sharing/internal/public:pref_names",
|
|
"//sharing/internal/public:types",
|
|
"//sharing/local_device_data",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"//sharing/proto:share_cc_proto",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"//sharing/scheduling",
|
|
"@gloop//gloop/util/time:protoutil",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@com_google_absl//absl/base:nullability",
|
|
"@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/meta:type_traits",
|
|
"@com_google_absl//absl/random",
|
|
"@com_google_absl//absl/status:statusor",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:str_format",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_absl//absl/types:span",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "test_support",
|
|
testonly = True,
|
|
srcs = [
|
|
"fake_nearby_connections_manager.cc",
|
|
"fake_nearby_sharing_service.cc",
|
|
],
|
|
hdrs = [
|
|
"fake_nearby_connections_manager.h",
|
|
"fake_nearby_sharing_service.h",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":attachments",
|
|
":connection_types",
|
|
":nearby_sharing_service",
|
|
":outgoing_targets_manager",
|
|
":share_session",
|
|
":transfer_metadata",
|
|
":types",
|
|
"//internal/base",
|
|
"//internal/base:file_path",
|
|
"//internal/platform:types",
|
|
"//internal/test",
|
|
"//location/nearby/sharing/lib/analytics",
|
|
"//location/nearby/sharing/lib/rpc:fake_nearby_share_client",
|
|
"//location/nearby/sharing/lib/rpc:sharing_rpc_client",
|
|
"//location/nearby/sharing/lib/sync:sync_manager",
|
|
"//sharing/certificates",
|
|
"//sharing/common:enum",
|
|
"//sharing/internal/api:platform",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/internal/test:nearby_test",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"@com_google_absl//absl/algorithm:container",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@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/status:statusor",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "attachment_compare",
|
|
testonly = True,
|
|
srcs = ["attachment_compare.cc"],
|
|
hdrs = ["attachment_compare.h"],
|
|
deps = [
|
|
":attachments",
|
|
"@com_google_absl//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "transfer_metadata_matchers",
|
|
testonly = True,
|
|
hdrs = ["transfer_metadata_matchers.h"],
|
|
deps = [
|
|
":transfer_metadata",
|
|
"@com_google_googletest//:gtest_for_library_testonly",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "advertisement_test",
|
|
srcs = ["advertisement_test.cc"],
|
|
deps = [
|
|
":types",
|
|
"//sharing/common:enum",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/types:span",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_connections_types_payload_test",
|
|
srcs = ["nearby_connections_types_payload_test.cc"],
|
|
deps = [
|
|
":connection_types",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "paired_key_verification_runner_test",
|
|
size = "small",
|
|
srcs = ["paired_key_verification_runner_test.cc"],
|
|
deps = [
|
|
":connection_types",
|
|
":incoming_frame_reader",
|
|
":nearby_connection_impl",
|
|
":paired_key_verification_runner",
|
|
":test_support",
|
|
":types",
|
|
"//internal/platform:types",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/certificates",
|
|
"//sharing/certificates:test_support",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"//sharing/proto:share_cc_proto",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/functional:any_invocable",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_sharing_service_test",
|
|
srcs = [
|
|
"nearby_sharing_service_test.cc",
|
|
],
|
|
deps = [
|
|
":nearby_sharing_service",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "incoming_frames_reader_test",
|
|
srcs = ["incoming_frames_reader_test.cc"],
|
|
deps = [
|
|
":incoming_frame_reader",
|
|
":nearby_connection_impl",
|
|
":test_support",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_connection_impl_test",
|
|
srcs = ["nearby_connection_impl_test.cc"],
|
|
deps = [
|
|
":incoming_frame_reader",
|
|
":nearby_connection_impl",
|
|
":test_support",
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_connections_manager_impl_test",
|
|
srcs = [
|
|
"fake_nearby_connections_service.h",
|
|
"nearby_connections_manager_impl_test.cc",
|
|
],
|
|
deps = [
|
|
":connection_types",
|
|
":nearby_sharing_service",
|
|
":types",
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/flags:nearby_flags",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/common:enum",
|
|
"//sharing/flags/generated:generated_flags",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/internal/test:nearby_test",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/container:flat_hash_set",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_absl//absl/types:span",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_sharing_service_impl_test",
|
|
srcs = ["nearby_sharing_service_impl_test.cc"],
|
|
shard_count = 10,
|
|
deps = [
|
|
":attachments",
|
|
":connection_types",
|
|
":nearby_connection_impl",
|
|
":nearby_sharing_service",
|
|
":share_session",
|
|
":share_session_usage",
|
|
":test_support",
|
|
":transfer_metadata",
|
|
":transfer_metadata_matchers",
|
|
":types",
|
|
"//google/protobuf:timestamp_cc_proto",
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/flags:nearby_flags",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//location/nearby/analytics/cpp/logging:mock_event_logger",
|
|
"//location/nearby/sharing/lib/account:fake_account_manager",
|
|
"//location/nearby/sharing/lib/account:mock_account_manager",
|
|
"//location/nearby/sharing/lib/account:signin_attempt",
|
|
"//location/nearby/sharing/lib/analytics",
|
|
"//location/nearby/sharing/lib/rpc:fake_nearby_share_client",
|
|
"//sharing/certificates",
|
|
"//sharing/certificates:test_support",
|
|
"//sharing/common",
|
|
"//sharing/common:enum",
|
|
"//sharing/fast_initiation:nearby_fast_initiation",
|
|
"//sharing/fast_initiation:test_support",
|
|
"//sharing/flags/generated:generated_flags",
|
|
"//sharing/internal/api:mock_sharing_platform",
|
|
"//sharing/internal/api:platform",
|
|
"//sharing/internal/public:pref_names",
|
|
"//sharing/internal/test:nearby_test",
|
|
"//sharing/local_device_data",
|
|
"//sharing/local_device_data:test_support",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"//sharing/proto:share_cc_proto",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@com_google_absl//absl/memory",
|
|
"@com_google_absl//absl/status",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_absl//absl/types:span",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_connections_stream_buffer_manager_test",
|
|
srcs = ["nearby_connections_stream_buffer_manager_test.cc"],
|
|
deps = [
|
|
":nearby_sharing_service",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_connections_types_test",
|
|
srcs = ["nearby_connections_types_test.cc"],
|
|
deps = [
|
|
":connection_types",
|
|
":nearby_sharing_service",
|
|
":types",
|
|
"//connections:core_types",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_file_handler_test",
|
|
srcs = ["nearby_file_handler_test.cc"],
|
|
deps = [
|
|
":share_session",
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/internal/api:mock_sharing_platform",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_sharing_service_extension_test",
|
|
srcs = ["nearby_sharing_service_extension_test.cc"],
|
|
deps = [
|
|
":attachments",
|
|
":nearby_sharing_service",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/internal/test:nearby_test",
|
|
"//sharing/local_device_data:test_support",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_sharing_settings_test",
|
|
srcs = ["nearby_sharing_settings_test.cc"],
|
|
deps = [
|
|
":nearby_sharing_service",
|
|
"//internal/base:files",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/common",
|
|
"//sharing/common:enum",
|
|
"//sharing/internal/public:pref_names",
|
|
"//sharing/internal/test:nearby_test",
|
|
"//sharing/local_device_data:test_support",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_sharing_util_test",
|
|
srcs = ["nearby_sharing_util_test.cc"],
|
|
deps = [
|
|
":nearby_sharing_util",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//sharing/certificates",
|
|
"//sharing/proto:enums_cc_proto",
|
|
"//sharing/proto:share_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "payload_tracker_test",
|
|
srcs = ["payload_tracker_test.cc"],
|
|
deps = [
|
|
":attachments",
|
|
":connection_types",
|
|
":share_session",
|
|
":transfer_metadata",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "share_target_test",
|
|
srcs = ["share_target_test.cc"],
|
|
deps = [
|
|
":types",
|
|
"//internal/network:url",
|
|
"//sharing/common:enum",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "text_attachment_test",
|
|
srcs = ["text_attachment_test.cc"],
|
|
deps = [
|
|
":attachments",
|
|
"//sharing/proto:wire_format_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "transfer_manager_test",
|
|
srcs = ["transfer_manager_test.cc"],
|
|
deps = [
|
|
":connection_types",
|
|
":nearby_sharing_service",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//sharing/internal/test:nearby_test",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "transfer_metadata_test",
|
|
srcs = ["transfer_metadata_test.cc"],
|
|
deps = [
|
|
":share_session_usage",
|
|
":transfer_metadata",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "share_session_test",
|
|
srcs = ["share_session_test.cc"],
|
|
deps = [
|
|
":connection_types",
|
|
":nearby_connection_impl",
|
|
":paired_key_verification_runner",
|
|
":share_session",
|
|
":test_support",
|
|
":transfer_metadata",
|
|
":transfer_metadata_matchers",
|
|
":types",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//location/nearby/analytics/cpp/logging:mock_event_logger",
|
|
"//location/nearby/sharing/lib/analytics",
|
|
"//sharing/certificates:test_support",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "attachment_container_test",
|
|
srcs = ["attachment_container_test.cc"],
|
|
deps = [
|
|
":attachment_compare",
|
|
":attachments",
|
|
"//internal/base:file_path",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "wrapped_share_target_discovered_callback_test",
|
|
srcs = ["wrapped_share_target_discovered_callback_test.cc"],
|
|
deps = [
|
|
":nearby_sharing_service",
|
|
":types",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "outgoing_share_session_test",
|
|
srcs = ["outgoing_share_session_test.cc"],
|
|
deps = [
|
|
":attachments",
|
|
":connection_types",
|
|
":nearby_connection_impl",
|
|
":share_session",
|
|
":share_session_usage",
|
|
":test_support",
|
|
":transfer_metadata",
|
|
":transfer_metadata_matchers",
|
|
":types",
|
|
"//internal/base:file_path",
|
|
"//internal/base:files",
|
|
"//internal/network:url",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//location/nearby/analytics/cpp/logging:mock_event_logger",
|
|
"//location/nearby/analytics/cpp/proto:sharing_log_cc_proto",
|
|
"//location/nearby/sharing/lib/analytics",
|
|
"//net/proto2/contrib/parse_proto:parse_text_proto",
|
|
"//sharing/certificates:test_support",
|
|
"//sharing/common:enum",
|
|
"//sharing/proto:wire_format_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 = "incoming_share_session_test",
|
|
srcs = ["incoming_share_session_test.cc"],
|
|
deps = [
|
|
":attachment_compare",
|
|
":attachments",
|
|
":connection_types",
|
|
":nearby_connection_impl",
|
|
":share_session",
|
|
":share_session_usage",
|
|
":test_support",
|
|
":transfer_metadata",
|
|
":transfer_metadata_matchers",
|
|
":types",
|
|
"//internal/base:file_path",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//location/nearby/analytics/cpp/logging:mock_event_logger",
|
|
"//location/nearby/analytics/cpp/proto:sharing_log_cc_proto",
|
|
"//location/nearby/sharing/lib/analytics",
|
|
"//proto:sharing_enums_cc_proto",
|
|
"//sharing/internal/public:logging",
|
|
"//sharing/proto:wire_format_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",
|
|
"@com_google_protobuf//:protobuf",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "thread_timer_test",
|
|
srcs = ["thread_timer_test.cc"],
|
|
deps = [
|
|
":thread_timer",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "nearby_connections_service_test",
|
|
srcs = ["nearby_connections_service_test.cc"],
|
|
deps = [
|
|
":connection_types",
|
|
":nearby_sharing_service",
|
|
"//connections:core_types",
|
|
"//internal/platform:base",
|
|
"//internal/platform:comm",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "worker_queue_test",
|
|
srcs = ["worker_queue_test.cc"],
|
|
deps = [
|
|
":worker_queue",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/synchronization",
|
|
"@com_google_absl//absl/time",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "outgoing_targets_manager_test",
|
|
srcs = ["outgoing_targets_manager_test.cc"],
|
|
deps = [
|
|
":attachments",
|
|
":connection_types",
|
|
":nearby_connection_impl",
|
|
":outgoing_targets_manager",
|
|
":share_session",
|
|
":test_support",
|
|
":transfer_metadata",
|
|
":types",
|
|
"//internal/platform/implementation:platform_impl",
|
|
"//internal/test",
|
|
"//location/nearby/sharing/lib/analytics",
|
|
"//sharing/certificates",
|
|
"//sharing/certificates:test_support",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "advertisement_capabilities_test",
|
|
srcs = ["advertisement_capabilities_test.cc"],
|
|
deps = [
|
|
":types",
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|