| 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_device_mac.h" | 5 #include "device/bluetooth/bluetooth_device_mac.h" |
| 6 | 6 |
| 7 #include <IOBluetooth/Bluetooth.h> | 7 #include <IOBluetooth/Bluetooth.h> |
| 8 #import <IOBluetooth/objc/IOBluetoothDevice.h> | 8 #import <IOBluetooth/objc/IOBluetoothDevice.h> |
| 9 #import <IOBluetooth/objc/IOBluetoothSDPServiceRecord.h> | 9 #import <IOBluetooth/objc/IOBluetoothSDPServiceRecord.h> |
| 10 #import <IOBluetooth/objc/IOBluetoothSDPUUID.h> | 10 #import <IOBluetooth/objc/IOBluetoothSDPUUID.h> |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 const base::Closure& callback, | 172 const base::Closure& callback, |
| 173 const ErrorCallback& error_callback) { | 173 const ErrorCallback& error_callback) { |
| 174 NOTIMPLEMENTED(); | 174 NOTIMPLEMENTED(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void BluetoothDeviceMac::Forget(const ErrorCallback& error_callback) { | 177 void BluetoothDeviceMac::Forget(const ErrorCallback& error_callback) { |
| 178 NOTIMPLEMENTED(); | 178 NOTIMPLEMENTED(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void BluetoothDeviceMac::ConnectToService( | 181 void BluetoothDeviceMac::ConnectToService( |
| 182 const std::string& service_uuid, | 182 const device::BluetoothUUID& service_uuid, |
| 183 const SocketCallback& callback) { | 183 const SocketCallback& callback) { |
| 184 IOBluetoothSDPServiceRecord* record = | 184 IOBluetoothSDPServiceRecord* record = |
| 185 [device_ getServiceRecordForUUID:GetIOBluetoothSDPUUID(service_uuid)]; | 185 [device_ getServiceRecordForUUID:GetIOBluetoothSDPUUID( |
| 186 service_uuid.canonical_value())]; |
| 186 if (record != nil) { | 187 if (record != nil) { |
| 187 BluetoothServiceRecordMac service_record(record); | 188 BluetoothServiceRecordMac service_record(record); |
| 188 scoped_refptr<BluetoothSocket> socket( | 189 scoped_refptr<BluetoothSocket> socket( |
| 189 BluetoothSocketMac::CreateBluetoothSocket(service_record)); | 190 BluetoothSocketMac::CreateBluetoothSocket(service_record)); |
| 190 if (socket.get() != NULL) | 191 if (socket.get() != NULL) |
| 191 callback.Run(socket); | 192 callback.Run(socket); |
| 192 } | 193 } |
| 193 } | 194 } |
| 194 | 195 |
| 195 void BluetoothDeviceMac::ConnectToProfile( | 196 void BluetoothDeviceMac::ConnectToProfile( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 209 NOTIMPLEMENTED(); | 210 NOTIMPLEMENTED(); |
| 210 } | 211 } |
| 211 | 212 |
| 212 void BluetoothDeviceMac::ClearOutOfBandPairingData( | 213 void BluetoothDeviceMac::ClearOutOfBandPairingData( |
| 213 const base::Closure& callback, | 214 const base::Closure& callback, |
| 214 const ErrorCallback& error_callback) { | 215 const ErrorCallback& error_callback) { |
| 215 NOTIMPLEMENTED(); | 216 NOTIMPLEMENTED(); |
| 216 } | 217 } |
| 217 | 218 |
| 218 } // namespace device | 219 } // namespace device |
| OLD | NEW |