| OLD | NEW |
| 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_DEVICE_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 std::string GetDeviceName() const override; | 75 std::string GetDeviceName() const override; |
| 76 | 76 |
| 77 // Updates information about the device. | 77 // Updates information about the device. |
| 78 virtual void Update(CBPeripheral* peripheral, | 78 virtual void Update(CBPeripheral* peripheral, |
| 79 NSDictionary* advertisementData, | 79 NSDictionary* advertisementData, |
| 80 int rssi); | 80 int rssi); |
| 81 | 81 |
| 82 static std::string GetPeripheralIdentifier(CBPeripheral* peripheral); | 82 static std::string GetPeripheralIdentifier(CBPeripheral* peripheral); |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 friend class BluetoothLowEnergyDiscoveryManagerMac; | 85 friend class BluetoothAdapterMac; |
| 86 | 86 |
| 87 // CoreBluetooth data structure. | 87 // CoreBluetooth data structure. |
| 88 base::scoped_nsobject<CBPeripheral> peripheral_; | 88 base::scoped_nsobject<CBPeripheral> peripheral_; |
| 89 | 89 |
| 90 // RSSI value. | 90 // RSSI value. |
| 91 int rssi_; | 91 int rssi_; |
| 92 | 92 |
| 93 // Whether the device is connectable. | 93 // Whether the device is connectable. |
| 94 bool connectable_; | 94 bool connectable_; |
| 95 | 95 |
| 96 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); | 96 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace device | 99 } // namespace device |
| 100 | 100 |
| 101 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ | 101 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ |
| OLD | NEW |