| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_classic_device_mac.h" | 5 #include "device/bluetooth/bluetooth_classic_device_mac.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/hash.h" | 10 #include "base/hash.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 if ([service_class_data getTypeDescriptor] == | 141 if ([service_class_data getTypeDescriptor] == |
| 142 kBluetoothSDPDataElementTypeDataElementSequence) { | 142 kBluetoothSDPDataElementTypeDataElementSequence) { |
| 143 BluetoothUUID uuid = ExtractUuid(service_class_data); | 143 BluetoothUUID uuid = ExtractUuid(service_class_data); |
| 144 if (uuid.IsValid()) | 144 if (uuid.IsValid()) |
| 145 uuids.push_back(uuid); | 145 uuids.push_back(uuid); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 return uuids; | 148 return uuids; |
| 149 } | 149 } |
| 150 | 150 |
| 151 int16_t BluetoothClassicDeviceMac::GetInquiryRSSI() const { | 151 base::Optional<int8_t> BluetoothClassicDeviceMac::GetInquiryRSSI() const { |
| 152 return kUnknownPower; | 152 return base::nullopt; |
| 153 } | 153 } |
| 154 | 154 |
| 155 int16_t BluetoothClassicDeviceMac::GetInquiryTxPower() const { | 155 base::Optional<int8_t> BluetoothClassicDeviceMac::GetInquiryTxPower() const { |
| 156 NOTIMPLEMENTED(); | 156 return base::nullopt; |
| 157 return kUnknownPower; | |
| 158 } | 157 } |
| 159 | 158 |
| 160 bool BluetoothClassicDeviceMac::ExpectingPinCode() const { | 159 bool BluetoothClassicDeviceMac::ExpectingPinCode() const { |
| 161 NOTIMPLEMENTED(); | 160 NOTIMPLEMENTED(); |
| 162 return false; | 161 return false; |
| 163 } | 162 } |
| 164 | 163 |
| 165 bool BluetoothClassicDeviceMac::ExpectingPasskey() const { | 164 bool BluetoothClassicDeviceMac::ExpectingPasskey() const { |
| 166 NOTIMPLEMENTED(); | 165 NOTIMPLEMENTED(); |
| 167 return false; | 166 return false; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 return power_level; | 282 return power_level; |
| 284 } | 283 } |
| 285 | 284 |
| 286 // static | 285 // static |
| 287 std::string BluetoothClassicDeviceMac::GetDeviceAddress( | 286 std::string BluetoothClassicDeviceMac::GetDeviceAddress( |
| 288 IOBluetoothDevice* device) { | 287 IOBluetoothDevice* device) { |
| 289 return CanonicalizeAddress(base::SysNSStringToUTF8([device addressString])); | 288 return CanonicalizeAddress(base::SysNSStringToUTF8([device addressString])); |
| 290 } | 289 } |
| 291 | 290 |
| 292 } // namespace device | 291 } // namespace device |
| OLD | NEW |