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

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

Issue 1284073002: bluetooth: Add adapter to BluetoothDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-drop-callback-
Patch Set: Merge TOT Created 5 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_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
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_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_win_unittest.cc ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698