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 #include "device/bluetooth/bluetooth_low_energy_device_mac.h" | 5 #include "device/bluetooth/bluetooth_low_energy_device_mac.h" |
6 | 6 |
7 #import <CoreFoundation/CoreFoundation.h> | 7 #import <CoreFoundation/CoreFoundation.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 96 } |
97 | 97 |
98 bool BluetoothLowEnergyDeviceMac::IsConnectable() const { | 98 bool BluetoothLowEnergyDeviceMac::IsConnectable() const { |
99 return connectable_; | 99 return connectable_; |
100 } | 100 } |
101 | 101 |
102 bool BluetoothLowEnergyDeviceMac::IsConnecting() const { | 102 bool BluetoothLowEnergyDeviceMac::IsConnecting() const { |
103 return ([peripheral_ state] == CBPeripheralStateConnecting); | 103 return ([peripheral_ state] == CBPeripheralStateConnecting); |
104 } | 104 } |
105 | 105 |
106 base::Optional<int8_t> BluetoothLowEnergyDeviceMac::GetInquiryRSSI() const { | |
107 NOTIMPLEMENTED(); | |
108 return base::nullopt; | |
109 } | |
110 | |
111 base::Optional<int8_t> BluetoothLowEnergyDeviceMac::GetInquiryTxPower() const { | |
112 NOTIMPLEMENTED(); | |
113 return base::nullopt; | |
114 } | |
115 | |
116 bool BluetoothLowEnergyDeviceMac::ExpectingPinCode() const { | 106 bool BluetoothLowEnergyDeviceMac::ExpectingPinCode() const { |
117 return false; | 107 return false; |
118 } | 108 } |
119 | 109 |
120 bool BluetoothLowEnergyDeviceMac::ExpectingPasskey() const { | 110 bool BluetoothLowEnergyDeviceMac::ExpectingPasskey() const { |
121 return false; | 111 return false; |
122 } | 112 } |
123 | 113 |
124 bool BluetoothLowEnergyDeviceMac::ExpectingConfirmation() const { | 114 bool BluetoothLowEnergyDeviceMac::ExpectingConfirmation() const { |
125 return false; | 115 return false; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 gatt_services_swapped.swap(gatt_services_); | 352 gatt_services_swapped.swap(gatt_services_); |
363 gatt_services_swapped.clear(); | 353 gatt_services_swapped.clear(); |
364 device_uuids_.ClearServiceUUIDs(); | 354 device_uuids_.ClearServiceUUIDs(); |
365 if (create_gatt_connection_error_callbacks_.empty()) { | 355 if (create_gatt_connection_error_callbacks_.empty()) { |
366 // TODO(http://crbug.com/585897): Need to pass the error. | 356 // TODO(http://crbug.com/585897): Need to pass the error. |
367 DidDisconnectGatt(); | 357 DidDisconnectGatt(); |
368 } else { | 358 } else { |
369 DidFailToConnectGatt(error_code); | 359 DidFailToConnectGatt(error_code); |
370 } | 360 } |
371 } | 361 } |
OLD | NEW |