Cleanup build files.

PiperOrigin-RevId: 818930588
This commit is contained in:
Francis Tsui
2025-10-13 18:54:44 -07:00
committed by Copybara-Service
parent be9f5b56ff
commit 956c3db99d
4 changed files with 43 additions and 178 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ cc_library(
],
visibility = [
"//internal/account:__subpackages__",
"//internal/platform:__pkg__",
"//internal/platform:__subpackages__",
"//internal/test:__pkg__",
"//sharing:__subpackages__",
],
+42 -81
View File
@@ -47,7 +47,13 @@ cc_library(
name = "types",
srcs = [
"device_info.cc",
"scheduled_executor.cc",
"session_manager.cc",
"submittable_executor.cc",
"task_scheduler.cc",
"thread_pool.cc",
"timer.cc",
"utils.cc",
],
hdrs = [
"atomic_boolean.h",
@@ -57,10 +63,11 @@ cc_library(
"device_info.h",
"executor.h",
"mutex.h",
"preferences_manager.h",
"scheduled_executor.h",
"session_manager.h",
"submittable_executor.h",
"task_scheduler.h",
"thread_pool.h",
"timer.h",
"utils.h",
],
@@ -70,95 +77,27 @@ cc_library(
"//sharing/internal/impl/windows:__pkg__",
],
deps = [
":comm",
":device_paths",
"//internal/base:bluetooth_address",
":string_utils",
"//internal/base:file_path",
"//internal/base:files",
"//internal/flags:nearby_flags",
"//internal/platform:base",
"//internal/platform:logging",
"//internal/platform:mac_address",
"//internal/platform:uuid",
"//internal/platform/implementation:types",
"//internal/platform/implementation/windows:string_utils",
"//internal/platform/implementation/windows/generated:types",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/functional:any_invocable",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
"@nlohmann_json//:json",
],
)
cc_library(
name = "comm",
hdrs = [
"ble.h",
"ble_gatt_client.h",
"ble_gatt_server.h",
"ble_server_socket.h",
"ble_socket.h",
"bluetooth_adapter.h",
"bluetooth_classic.h",
"bluetooth_classic_device.h",
"bluetooth_classic_medium.h",
"bluetooth_classic_server_socket.h",
"bluetooth_classic_socket.h",
"bluetooth_pairing.h",
"condition_variable.h",
"executor.h",
"file.h",
"file_path.h",
"http_loader.h",
"mutex.h",
"nearby_client_socket.h",
"nearby_server_socket.h",
"scheduled_executor.h",
"server_sync.h",
"session_manager.h",
"submittable_executor.h",
"thread_pool.h",
"webrtc.h",
"wifi.h",
"wifi_direct.h",
"wifi_direct_service.h",
"wifi_hotspot.h",
"wifi_hotspot_native.h",
"wifi_intel.h",
"wifi_lan.h",
"wifi_lan_mdns.h",
],
copts = ["-DNO_INTEL_PIE"],
tags = ["windows"],
visibility = ["//visibility:private"],
deps = [
"//connections/implementation/flags:connections_flags",
"//internal/flags:nearby_flags",
"//internal/platform:base",
"//internal/platform:mac_address",
"//internal/platform:types",
"//internal/platform:uuid",
"//internal/platform/flags:platform_flags",
"//internal/platform/implementation:account_manager",
"//internal/platform/implementation:comm",
"//internal/platform/implementation:wifi_utils",
"//internal/platform/implementation/shared:count_down_latch",
"//internal/platform/implementation:types",
"//internal/platform/implementation/windows/generated:types",
"@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/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:optional",
],
)
@@ -245,14 +184,7 @@ cc_library(
"platform.cc",
"preferences_manager.cc",
"preferences_repository.cc",
"preferences_repository.h",
"scheduled_executor.cc",
"session_manager.cc",
"submittable_executor.cc",
"system_clock.cc",
"task_scheduler.cc",
"thread_pool.cc",
"utils.cc",
"webrtc.cc",
"wifi_direct_medium.cc",
"wifi_direct_server_socket.cc",
@@ -269,6 +201,35 @@ cc_library(
"wifi_lan_socket.cc",
"wifi_medium.cc",
],
hdrs = [
"ble.h",
"ble_gatt_client.h",
"ble_gatt_server.h",
"ble_server_socket.h",
"ble_socket.h",
"bluetooth_classic.h",
"bluetooth_classic_device.h",
"bluetooth_classic_medium.h",
"bluetooth_classic_server_socket.h",
"bluetooth_classic_socket.h",
"bluetooth_pairing.h",
"file.h",
"file_path.h",
"http_loader.h",
"nearby_client_socket.h",
"nearby_server_socket.h",
"preferences_manager.h",
"preferences_repository.h",
"webrtc.h",
"wifi.h",
"wifi_direct.h",
"wifi_direct_service.h",
"wifi_hotspot.h",
"wifi_hotspot_native.h",
"wifi_intel.h",
"wifi_lan.h",
"wifi_lan_mdns.h",
],
# This is the temporary solution to solve compilation error of Win32 WFDxxx() related API.
# WFD API is only support after _WIN32_WINNT_WIN8, but the current lexan _WIN32_WINNT is set to _WIN32_WINNT_WIN7
copts = [
@@ -289,7 +250,6 @@ cc_library(
"//sharing:__subpackages__",
],
deps = [
":comm",
":crypto", # build_cleaner: keep
":network_info",
":string_utils",
@@ -299,6 +259,7 @@ cc_library(
"//connections/implementation/mediums/ble:ble_advertisement_header",
"//connections/implementation/mediums/ble:bloom_filter",
"//internal/account",
"//internal/base",
"//internal/base:file_path",
"//internal/base:files",
"//internal/base:masker",
@@ -310,6 +271,7 @@ cc_library(
"//internal/platform:types",
"//internal/platform:uuid",
"//internal/platform/flags:platform_flags",
"//internal/platform/implementation:account_manager",
"//internal/platform/implementation:comm",
"//internal/platform/implementation:platform",
"//internal/platform/implementation:types",
@@ -386,7 +348,6 @@ cc_test(
copts = ["-DCORE_ADAPTER_DLL"],
tags = ["nozapfhahn"],
deps = [
":comm",
":crypto",
":test_utils",
":types",
@@ -52,7 +52,6 @@
#include "internal/platform/implementation/mutex.h"
#include "internal/platform/implementation/output_file.h"
#include "internal/platform/implementation/scheduled_executor.h"
#include "internal/platform/implementation/server_sync.h"
#include "internal/platform/implementation/shared/count_down_latch.h"
#include "internal/platform/implementation/submittable_executor.h"
#include "internal/platform/implementation/wifi.h"
@@ -70,7 +69,6 @@
#include "internal/platform/implementation/windows/mutex.h"
#include "internal/platform/implementation/windows/preferences_manager.h"
#include "internal/platform/implementation/windows/scheduled_executor.h"
#include "internal/platform/implementation/windows/server_sync.h"
#include "internal/platform/implementation/windows/string_utils.h"
#include "internal/platform/implementation/windows/submittable_executor.h"
#include "internal/platform/implementation/windows/timer.h"
@@ -264,12 +262,6 @@ ImplementationPlatform::CreateCredentialStorage() {
return nullptr;
}
// TODO(b/184975123): replace with real implementation.
std::unique_ptr<ServerSyncMedium>
ImplementationPlatform::CreateServerSyncMedium() {
return std::unique_ptr<windows::ServerSyncMedium>();
}
// TODO(b/184975123): replace with real implementation.
std::unique_ptr<WifiMedium> ImplementationPlatform::CreateWifiMedium() {
return std::make_unique<windows::WifiMedium>();
@@ -1,88 +0,0 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef PLATFORM_IMPL_WINDOWS_SERVER_SYNC_H_
#define PLATFORM_IMPL_WINDOWS_SERVER_SYNC_H_
#include "internal/platform/implementation/server_sync.h"
namespace nearby {
namespace windows {
// Abstraction that represents a Nearby endpoint exchanging data through
// ServerSync Medium.
class ServerSyncDevice : public api::ServerSyncDevice {
public:
// TODO(b/184975123): replace with real implementation.
~ServerSyncDevice() override = default;
// TODO(b/184975123): replace with real implementation.
std::string GetName() const override { return "Un-implemented"; }
// TODO(b/184975123): replace with real implementation.
std::string GetGuid() const override { return "Un-implemented"; }
// TODO(b/184975123): replace with real implementation.
std::string GetOwnGuid() const override { return "Un-implemented"; }
};
// Container of operations that can be performed over the Chrome Sync medium.
class ServerSyncMedium : public api::ServerSyncMedium {
public:
// TODO(b/184975123): replace with real implementation.
~ServerSyncMedium() override = default;
// TODO(b/184975123): replace with real implementation.
bool StartAdvertising(absl::string_view service_id,
absl::string_view endpoint_id,
const ByteArray& endpoint_info) override {
return false;
}
// TODO(b/184975123): replace with real implementation.
void StopAdvertising(absl::string_view service_id) override {}
class DiscoveredDeviceCallback
: public api::ServerSyncMedium::DiscoveredDeviceCallback {
public:
// TODO(b/184975123): replace with real implementation.
~DiscoveredDeviceCallback() override = default;
// Called on a new ServerSyncDevice discovery.
// TODO(b/184975123): replace with real implementation.
void OnDeviceDiscovered(api::ServerSyncDevice* device,
absl::string_view service_id,
absl::string_view endpoint_id,
const ByteArray& endpoint_info) override {}
// Called when ServerSyncDevice is no longer reachable.
// TODO(b/184975123): replace with real implementation.
void OnDeviceLost(api::ServerSyncDevice* device,
absl::string_view service_id) override {}
};
// Returns true once the Chrome Sync scan has been initiated.
// TODO(b/184975123): replace with real implementation.
bool StartDiscovery(absl::string_view service_id,
const api::ServerSyncMedium::DiscoveredDeviceCallback&
discovered_device_callback) override {
return false;
}
// Returns true once Chrome Sync scan for service_id is well and truly
// stopped; after this returns, there must be no more invocations of the
// DiscoveredDeviceCallback passed in to startScanning() for service_id.
// TODO(b/184975123): replace with real implementation.
void StopDiscovery(absl::string_view service_id) override {}
};
} // namespace windows
} // namespace nearby
#endif // PLATFORM_IMPL_WINDOWS_SERVER_SYNC_H_