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 | 10 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 scoped_refptr<BluetoothSocket> socket( | 168 scoped_refptr<BluetoothSocket> socket( |
169 BluetoothSocketMac::CreateBluetoothSocket(**iter)); | 169 BluetoothSocketMac::CreateBluetoothSocket(**iter)); |
170 if (socket.get() != NULL) { | 170 if (socket.get() != NULL) { |
171 callback.Run(socket); | 171 callback.Run(socket); |
172 return; | 172 return; |
173 } | 173 } |
174 } | 174 } |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
| 178 void BluetoothDeviceMac::ConnectToProfile( |
| 179 device::BluetoothProfile* profile, |
| 180 const ErrorCallback& error_callback) { |
| 181 // TODO(keybuk): implement |
| 182 } |
| 183 |
178 void BluetoothDeviceMac::SetOutOfBandPairingData( | 184 void BluetoothDeviceMac::SetOutOfBandPairingData( |
179 const BluetoothOutOfBandPairingData& data, | 185 const BluetoothOutOfBandPairingData& data, |
180 const base::Closure& callback, | 186 const base::Closure& callback, |
181 const ErrorCallback& error_callback) { | 187 const ErrorCallback& error_callback) { |
182 NOTIMPLEMENTED(); | 188 NOTIMPLEMENTED(); |
183 } | 189 } |
184 | 190 |
185 void BluetoothDeviceMac::ClearOutOfBandPairingData( | 191 void BluetoothDeviceMac::ClearOutOfBandPairingData( |
186 const base::Closure& callback, | 192 const base::Closure& callback, |
187 const ErrorCallback& error_callback) { | 193 const ErrorCallback& error_callback) { |
(...skipping 15 matching lines...) Expand all Loading... |
203 &device_string, | 209 &device_string, |
204 "|%s|%lu", | 210 "|%s|%lu", |
205 base::SysNSStringToUTF8([record getServiceName]).c_str(), | 211 base::SysNSStringToUTF8([record getServiceName]).c_str(), |
206 static_cast<unsigned long>([[record attributes] count])); | 212 static_cast<unsigned long>([[record attributes] count])); |
207 } | 213 } |
208 | 214 |
209 return base::Hash(device_string); | 215 return base::Hash(device_string); |
210 } | 216 } |
211 | 217 |
212 } // namespace device | 218 } // namespace device |
OLD | NEW |