blob: dd69a5101169ab4e0dfb2d0ac227415f7cd3d557 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/tether/ble_scanner.h"
namespace chromeos {
namespace tether {
BleScanner::BleScanner() = default;
BleScanner::~BleScanner() = default;
void BleScanner::AddObserver(Observer* observer) {
observer_list_.AddObserver(observer);
}
void BleScanner::RemoveObserver(Observer* observer) {
observer_list_.RemoveObserver(observer);
}
void BleScanner::NotifyReceivedAdvertisementFromDevice(
const cryptauth::RemoteDevice& remote_device,
device::BluetoothDevice* bluetooth_device) {
for (auto& observer : observer_list_)
observer.OnReceivedAdvertisementFromDevice(remote_device, bluetooth_device);
}
void BleScanner::NotifyDiscoverySessionStateChanged(
bool discovery_session_active) {
for (auto& observer : observer_list_)
observer.OnDiscoverySessionStateChanged(discovery_session_active);
}
} // namespace tether
} // namespace chromeos