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 // !defined(OS_IOS) | 10 #else // !defined(OS_IOS) |
11 #import <IOBluetooth/IOBluetooth.h> | 11 #import <IOBluetooth/IOBluetooth.h> |
12 #endif // defined(OS_IOS) | 12 #endif // defined(OS_IOS) |
13 | 13 |
14 #include <set> | 14 #include <set> |
15 | 15 |
16 #include "base/mac/scoped_nsobject.h" | 16 #include "base/mac/scoped_nsobject.h" |
17 #include "base/mac/sdk_forward_declarations.h" | 17 #include "base/mac/sdk_forward_declarations.h" |
18 #include "crypto/sha2.h" | 18 #include "crypto/sha2.h" |
19 #include "device/bluetooth/bluetooth_device_mac.h" | 19 #include "device/bluetooth/bluetooth_device_mac.h" |
20 | 20 |
21 namespace device { | 21 namespace device { |
22 | 22 |
| 23 class BluetoothAdapterMac; |
23 class BluetoothLowEnergyDiscoverManagerMac; | 24 class BluetoothLowEnergyDiscoverManagerMac; |
24 | 25 |
25 class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac | 26 class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac |
26 : public BluetoothDeviceMac { | 27 : public BluetoothDeviceMac { |
27 public: | 28 public: |
28 BluetoothLowEnergyDeviceMac(CBPeripheral* peripheral, | 29 BluetoothLowEnergyDeviceMac(BluetoothAdapterMac* adapter, |
| 30 CBPeripheral* peripheral, |
29 NSDictionary* advertisement_data, | 31 NSDictionary* advertisement_data, |
30 int rssi); | 32 int rssi); |
31 ~BluetoothLowEnergyDeviceMac() override; | 33 ~BluetoothLowEnergyDeviceMac() override; |
32 | 34 |
33 int GetRSSI() const; | 35 int GetRSSI() const; |
34 | 36 |
35 // BluetoothDevice overrides. | 37 // BluetoothDevice overrides. |
36 std::string GetIdentifier() const override; | 38 std::string GetIdentifier() const override; |
37 uint32 GetBluetoothClass() const override; | 39 uint32 GetBluetoothClass() const override; |
38 std::string GetAddress() const override; | 40 std::string GetAddress() const override; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 124 |
123 // The services (identified by UUIDs) that this device provides. | 125 // The services (identified by UUIDs) that this device provides. |
124 std::set<BluetoothUUID> advertised_uuids_; | 126 std::set<BluetoothUUID> advertised_uuids_; |
125 | 127 |
126 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); | 128 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); |
127 }; | 129 }; |
128 | 130 |
129 } // namespace device | 131 } // namespace device |
130 | 132 |
131 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ | 133 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ |
OLD | NEW |