Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_MANAGER_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_MANAGER_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_MANAGER_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_MANAGER_MAC_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 @class IOBluetoothDevice; | 10 @class IOBluetoothDevice; |
| 11 | 11 |
| 12 namespace device { | 12 namespace device { |
| 13 | 13 |
| 14 // Class used by BluetoothAdapterMac to manage classic and LE device discovery. | 14 // Class used by BluetoothAdapterMac to manage classic and LE device discovery. |
| 15 // For Bluetooth Classic, this class is responsible for keeping device inquiry | 15 // For Bluetooth Classic, this class is responsible for keeping device inquiry |
| 16 // running if device discovery is initiated. | 16 // running if device discovery is initiated. |
| 17 class BluetoothDiscoveryManagerMac { | 17 class BluetoothDiscoveryManagerMac { |
| 18 public: | 18 public: |
| 19 // Interface for being notified of events during a device discovery session. | 19 // Interface for being notified of events during a device discovery session. |
| 20 class Observer { | 20 class Observer { |
| 21 public: | 21 public: |
| 22 virtual ~Observer() {} | |
|
Avi (use Gerrit)
2015/01/31 02:22:38
nit: put this in a protected section
dvh
2015/02/05 22:26:08
Done.
| |
| 23 | |
| 22 // Called when |this| manager has found a device through classic device | 24 // Called when |this| manager has found a device through classic device |
| 23 // inquiry in the form of an IOBluetoothDevice. | 25 // inquiry in the form of an IOBluetoothDevice. |
| 24 virtual void DeviceFound(IOBluetoothDevice* device) = 0; | 26 virtual void DeviceFound(IOBluetoothDevice* device) = 0; |
| 25 | 27 |
| 26 // Called when device discovery is no longer running, due to either a call | 28 // Called when device discovery is no longer running, due to either a call |
| 27 // to BluetoothDiscoveryManagerMac::StopDiscovery or an unexpected reason, | 29 // to BluetoothDiscoveryManagerMac::StopDiscovery or an unexpected reason, |
| 28 // such as when a user disables the controller, in which case the value of | 30 // such as when a user disables the controller, in which case the value of |
| 29 // |unexpected| will be true. | 31 // |unexpected| will be true. |
| 30 virtual void DiscoveryStopped(bool unexpected) = 0; | 32 virtual void DiscoveryStopped(bool unexpected) = 0; |
| 31 }; | 33 }; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 55 // Observer interested in notifications from us. | 57 // Observer interested in notifications from us. |
| 56 Observer* observer_; | 58 Observer* observer_; |
| 57 | 59 |
| 58 private: | 60 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryManagerMac); | 61 DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryManagerMac); |
| 60 }; | 62 }; |
| 61 | 63 |
| 62 } // namespace device | 64 } // namespace device |
| 63 | 65 |
| 64 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_MANAGER_MAC_H_ | 66 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_MANAGER_MAC_H_ |
| OLD | NEW |