Remove unused platform interface method.

PiperOrigin-RevId: 819236789
This commit is contained in:
Francis Tsui
2025-10-14 08:35:31 -07:00
committed by Copybara-Service
parent 956c3db99d
commit 8a88a78f25
6 changed files with 0 additions and 94 deletions
-1
View File
@@ -157,7 +157,6 @@ cc_library(
"credential_storage.h",
"http_loader.h",
"psk_info.h",
"server_sync.h",
"webrtc.h",
"wifi.h",
"wifi_direct.h",
@@ -314,11 +314,6 @@ void GNCEnsureFileAtPath(std::string path) {
XCTAssertNotEqual(ble_medium.get(), nullptr);
}
- (void)testCreateServerSyncMedium {
auto server_sync_medium = nearby::api::ImplementationPlatform::CreateServerSyncMedium();
XCTAssertEqual(server_sync_medium.get(), nullptr);
}
- (void)testCreateWifiDirectMedium {
auto wifi_direct_medium = nearby::api::ImplementationPlatform::CreateWifiDirectMedium();
XCTAssertEqual(wifi_direct_medium.get(), nullptr);
@@ -177,10 +177,6 @@ std::unique_ptr<ble::BleMedium> ImplementationPlatform::CreateBleMedium(
return std::make_unique<apple::BleMedium>();
}
std::unique_ptr<ServerSyncMedium> ImplementationPlatform::CreateServerSyncMedium() {
return nullptr;
}
std::unique_ptr<WifiMedium> ImplementationPlatform::CreateWifiMedium() {
return std::make_unique<apple::WifiMedium>();
}
@@ -44,7 +44,6 @@
#include "internal/platform/implementation/output_file.h"
#include "internal/platform/implementation/preferences_manager.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/timer.h"
@@ -196,11 +195,6 @@ ImplementationPlatform::CreateCredentialStorage() {
return std::make_unique<g3::CredentialStorageImpl>();
}
std::unique_ptr<ServerSyncMedium>
ImplementationPlatform::CreateServerSyncMedium() {
return std::unique_ptr<ServerSyncMedium>(/*new ServerSyncMediumImpl()*/);
}
std::unique_ptr<WifiMedium> ImplementationPlatform::CreateWifiMedium() {
return std::make_unique<g3::WifiMedium>();
}
@@ -30,7 +30,6 @@
#include "internal/platform/implementation/condition_variable.h"
#include "internal/platform/implementation/count_down_latch.h"
#include "internal/platform/implementation/credential_storage.h"
#include "internal/platform/implementation/crypto.h"
#include "internal/platform/implementation/device_info.h"
#include "internal/platform/implementation/http_loader.h"
#include "internal/platform/implementation/input_file.h"
@@ -38,9 +37,7 @@
#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/submittable_executor.h"
#include "internal/platform/implementation/system_clock.h"
#include "internal/platform/implementation/timer.h"
#ifndef NO_WEBRTC
#include "internal/platform/implementation/webrtc.h"
@@ -131,7 +128,6 @@ class ImplementationPlatform {
static std::unique_ptr<api::ble::BleMedium> CreateBleMedium(
api::BluetoothAdapter&);
static std::unique_ptr<api::CredentialStorage> CreateCredentialStorage();
static std::unique_ptr<ServerSyncMedium> CreateServerSyncMedium();
static std::unique_ptr<WifiMedium> CreateWifiMedium();
static std::unique_ptr<WifiLanMedium> CreateWifiLanMedium();
static std::unique_ptr<WifiHotspotMedium> CreateWifiHotspotMedium();
@@ -1,74 +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_API_SERVER_SYNC_H_
#define PLATFORM_API_SERVER_SYNC_H_
#include <string>
#include "absl/strings/string_view.h"
#include "internal/platform/byte_array.h"
namespace nearby {
namespace api {
// Abstraction that represents a Nearby endpoint exchanging data through
// ServerSync Medium.
class ServerSyncDevice {
public:
virtual ~ServerSyncDevice() = default;
virtual std::string GetName() const = 0;
virtual std::string GetGuid() const = 0;
virtual std::string GetOwnGuid() const = 0;
};
// Container of operations that can be performed over the Chrome Sync medium.
class ServerSyncMedium {
public:
virtual ~ServerSyncMedium() = default;
virtual bool StartAdvertising(absl::string_view service_id,
absl::string_view endpoint_id,
const ByteArray& endpoint_info) = 0;
virtual void StopAdvertising(absl::string_view service_id) = 0;
class DiscoveredDeviceCallback {
public:
virtual ~DiscoveredDeviceCallback() = default;
// Called on a new ServerSyncDevice discovery.
virtual void OnDeviceDiscovered(ServerSyncDevice* device,
absl::string_view service_id,
absl::string_view endpoint_id,
const ByteArray& endpoint_info) = 0;
// Called when ServerSyncDevice is no longer reachable.
virtual void OnDeviceLost(ServerSyncDevice* device,
absl::string_view service_id) = 0;
};
// Returns true once the Chrome Sync scan has been initiated.
virtual bool StartDiscovery(
absl::string_view service_id,
const DiscoveredDeviceCallback& discovered_device_callback) = 0;
// 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.
virtual void StopDiscovery(absl::string_view service_id) = 0;
};
} // namespace api
} // namespace nearby
#endif // PLATFORM_API_SERVER_SYNC_H_