| 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/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 error_callback.Run(kApiUnavailable); | 225 error_callback.Run(kApiUnavailable); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void BluetoothClassicDeviceMac::CreateGattConnection( | 228 void BluetoothClassicDeviceMac::CreateGattConnection( |
| 229 const GattConnectionCallback& callback, | 229 const GattConnectionCallback& callback, |
| 230 const ConnectErrorCallback& error_callback) { | 230 const ConnectErrorCallback& error_callback) { |
| 231 // TODO(armansito): Implement. | 231 // TODO(armansito): Implement. |
| 232 error_callback.Run(ERROR_UNSUPPORTED_DEVICE); | 232 error_callback.Run(ERROR_UNSUPPORTED_DEVICE); |
| 233 } | 233 } |
| 234 | 234 |
| 235 NSDate* BluetoothClassicDeviceMac::GetLastInquiryUpdate() { | 235 NSDate* BluetoothClassicDeviceMac::GetLastUpdateTime() const { |
| 236 return [device_ getLastInquiryUpdate]; | 236 return [device_ getLastInquiryUpdate]; |
| 237 } | 237 } |
| 238 | 238 |
| 239 int BluetoothClassicDeviceMac::GetHostTransmitPower( | 239 int BluetoothClassicDeviceMac::GetHostTransmitPower( |
| 240 BluetoothHCITransmitPowerLevelType power_level_type) const { | 240 BluetoothHCITransmitPowerLevelType power_level_type) const { |
| 241 IOBluetoothHostController* controller = | 241 IOBluetoothHostController* controller = |
| 242 [IOBluetoothHostController defaultController]; | 242 [IOBluetoothHostController defaultController]; |
| 243 | 243 |
| 244 // Bail if the undocumented API is unavailable on this machine. | 244 // Bail if the undocumented API is unavailable on this machine. |
| 245 SEL selector = @selector(BluetoothHCIReadTransmitPowerLevel: | 245 SEL selector = @selector(BluetoothHCIReadTransmitPowerLevel: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 259 return power_level; | 259 return power_level; |
| 260 } | 260 } |
| 261 | 261 |
| 262 // static | 262 // static |
| 263 std::string BluetoothClassicDeviceMac::GetDeviceAddress( | 263 std::string BluetoothClassicDeviceMac::GetDeviceAddress( |
| 264 IOBluetoothDevice* device) { | 264 IOBluetoothDevice* device) { |
| 265 return CanonicalizeAddress(base::SysNSStringToUTF8([device addressString])); | 265 return CanonicalizeAddress(base::SysNSStringToUTF8([device addressString])); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace device | 268 } // namespace device |
| OLD | NEW |