Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_LOW_ENERGY_DISCOVERY_MANAGER_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DISCOVERY_MANAGER_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DISCOVERY_MANAGER_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DISCOVERY_MANAGER_MAC_H_
7 7
8 #if defined(OS_IOS) 8 #if defined(OS_IOS)
9 #import <CoreBluetooth/CoreBluetooth.h> 9 #import <CoreBluetooth/CoreBluetooth.h>
10 #else 10 #else
11 #import <IOBluetooth/IOBluetooth.h> 11 #import <IOBluetooth/IOBluetooth.h>
12 #endif 12 #endif
13 13
14 #include "base/mac/scoped_nsobject.h" 14 #include "base/mac/scoped_nsobject.h"
15 #include "base/mac/sdk_forward_declarations.h" 15 #include "base/mac/sdk_forward_declarations.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "device/bluetooth/bluetooth_device.h" 18 #include "device/bluetooth/bluetooth_device.h"
19 19
20 namespace device { 20 namespace device {
21 21
22 // This class will scan for Bluetooth LE device on Mac. 22 // This class will scan for Bluetooth LE device on Mac.
23 class BluetoothLowEnergyDiscoveryManagerMac { 23 class BluetoothLowEnergyDiscoveryManagerMac {
24 public: 24 public:
25 // Interface for being notified of events during a device discovery session. 25 // Interface for being notified of events during a device discovery session.
26 class Observer { 26 class Observer {
27 public: 27 public:
28 // Called when |this| manager has found a device or an update on a device. 28 // Called when |this| manager has found a device or an update on a device.
29 // |advertisementData| can be nil if the peripheral is already connected.
29 virtual void LowEnergyDeviceUpdated(CBPeripheral* peripheral, 30 virtual void LowEnergyDeviceUpdated(CBPeripheral* peripheral,
30 NSDictionary* advertisementData, 31 NSDictionary* advertisementData,
31 int rssi) = 0; 32 int rssi) = 0;
32 33
33 protected: 34 protected:
34 virtual ~Observer() {} 35 virtual ~Observer() {}
35 }; 36 };
36 37
37 virtual ~BluetoothLowEnergyDiscoveryManagerMac(); 38 virtual ~BluetoothLowEnergyDiscoveryManagerMac();
38 39
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 87
87 // List of service UUIDs to scan. 88 // List of service UUIDs to scan.
88 BluetoothDevice::UUIDList services_uuids_; 89 BluetoothDevice::UUIDList services_uuids_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDiscoveryManagerMac); 91 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDiscoveryManagerMac);
91 }; 92 };
92 93
93 } // namespace device 94 } // namespace device
94 95
95 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DISCOVERY_MANAGER_MAC_H_ 96 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DISCOVERY_MANAGER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698