mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Remove unused BluetoothClassicMedium::Observer.
PiperOrigin-RevId: 953415728
This commit is contained in:
committed by
Copybara-Service
parent
8a1bbd074e
commit
a7f6ed3fa7
@@ -701,9 +701,6 @@ winrt::fire_and_forget BluetoothClassicMedium::DeviceWatcher_Added(
|
||||
if (discovery_callback_.device_discovered_cb != nullptr) {
|
||||
discovery_callback_.device_discovered_cb(*device);
|
||||
}
|
||||
for (auto& observer : observers_.GetObservers()) {
|
||||
observer->DeviceAdded(*device);
|
||||
}
|
||||
return winrt::fire_and_forget();
|
||||
}
|
||||
|
||||
@@ -769,9 +766,6 @@ winrt::fire_and_forget BluetoothClassicMedium::DeviceWatcher_Updated(
|
||||
LOG(INFO) << __func__
|
||||
<< ": Notifying device paired changed: " << std::boolalpha
|
||||
<< new_paired_status;
|
||||
for (auto& observer : observers_.GetObservers()) {
|
||||
observer->DevicePairedChanged(*device, new_paired_status);
|
||||
}
|
||||
}
|
||||
|
||||
return winrt::fire_and_forget();
|
||||
@@ -819,10 +813,6 @@ winrt::fire_and_forget BluetoothClassicMedium::DeviceWatcher_Removed(
|
||||
discovery_callback_.device_lost_cb(*device);
|
||||
}
|
||||
|
||||
for (auto& observer : observers_.GetObservers()) {
|
||||
observer->DeviceRemoved(*device);
|
||||
}
|
||||
|
||||
RemoveRemoteDevice(mac_address);
|
||||
|
||||
return winrt::fire_and_forget();
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "absl/base/thread_annotations.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "internal/base/observer_list.h"
|
||||
#include "internal/platform/cancellation_flag.h"
|
||||
#include "internal/platform/implementation/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/bluetooth_classic.h"
|
||||
@@ -90,15 +89,6 @@ class BluetoothClassicMedium : public api::BluetoothClassicMedium {
|
||||
std::unique_ptr<api::BluetoothPairing> CreatePairing(
|
||||
api::BluetoothDevice& remote_device) override;
|
||||
|
||||
void AddObserver(Observer* observer) override {
|
||||
observers_.AddObserver(observer);
|
||||
}
|
||||
|
||||
// Removes an observer. It's OK to remove an unregistered observer.
|
||||
void RemoveObserver(Observer* observer) override {
|
||||
observers_.RemoveObserver(observer);
|
||||
}
|
||||
|
||||
private:
|
||||
bool StartScanning();
|
||||
bool StopScanning();
|
||||
@@ -191,7 +181,6 @@ class BluetoothClassicMedium : public api::BluetoothClassicMedium {
|
||||
// the shared_ptr.
|
||||
BluetoothServerSocket* raw_server_socket_ = nullptr;
|
||||
bool is_radio_discoverable_ = false;
|
||||
ObserverList<Observer> observers_;
|
||||
};
|
||||
|
||||
} // namespace nearby::windows
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "internal/platform/implementation/mutex.h"
|
||||
#include "internal/platform/condition_variable.h"
|
||||
|
||||
namespace nearby {
|
||||
namespace windows {
|
||||
|
||||
Reference in New Issue
Block a user