| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_win.h" | 5 #include "device/bluetooth/bluetooth_device_win.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" | |
| 15 #include "device/bluetooth/bluetooth_profile_win.h" | 14 #include "device/bluetooth/bluetooth_profile_win.h" |
| 16 #include "device/bluetooth/bluetooth_service_record_win.h" | 15 #include "device/bluetooth/bluetooth_service_record_win.h" |
| 17 #include "device/bluetooth/bluetooth_socket_thread.h" | 16 #include "device/bluetooth/bluetooth_socket_thread.h" |
| 18 #include "device/bluetooth/bluetooth_socket_win.h" | 17 #include "device/bluetooth/bluetooth_socket_win.h" |
| 19 #include "device/bluetooth/bluetooth_task_manager_win.h" | 18 #include "device/bluetooth/bluetooth_task_manager_win.h" |
| 20 #include "device/bluetooth/bluetooth_uuid.h" | 19 #include "device/bluetooth/bluetooth_uuid.h" |
| 21 | 20 |
| 22 namespace { | 21 namespace { |
| 23 | 22 |
| 24 const int kSdpBytesBufferSize = 1024; | 23 const int kSdpBytesBufferSize = 1024; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 } | 213 } |
| 215 | 214 |
| 216 void BluetoothDeviceWin::ConnectToService( | 215 void BluetoothDeviceWin::ConnectToService( |
| 217 const BluetoothUUID& uuid, | 216 const BluetoothUUID& uuid, |
| 218 const ConnectToServiceCallback& callback, | 217 const ConnectToServiceCallback& callback, |
| 219 const ConnectToServiceErrorCallback& error_callback) { | 218 const ConnectToServiceErrorCallback& error_callback) { |
| 220 // TODO(keybuk): implement | 219 // TODO(keybuk): implement |
| 221 NOTIMPLEMENTED(); | 220 NOTIMPLEMENTED(); |
| 222 } | 221 } |
| 223 | 222 |
| 224 void BluetoothDeviceWin::SetOutOfBandPairingData( | |
| 225 const BluetoothOutOfBandPairingData& data, | |
| 226 const base::Closure& callback, | |
| 227 const ErrorCallback& error_callback) { | |
| 228 NOTIMPLEMENTED(); | |
| 229 } | |
| 230 | |
| 231 void BluetoothDeviceWin::ClearOutOfBandPairingData( | |
| 232 const base::Closure& callback, | |
| 233 const ErrorCallback& error_callback) { | |
| 234 NOTIMPLEMENTED(); | |
| 235 } | |
| 236 | |
| 237 void BluetoothDeviceWin::StartConnectionMonitor( | 223 void BluetoothDeviceWin::StartConnectionMonitor( |
| 238 const base::Closure& callback, | 224 const base::Closure& callback, |
| 239 const ErrorCallback& error_callback) { | 225 const ErrorCallback& error_callback) { |
| 240 NOTIMPLEMENTED(); | 226 NOTIMPLEMENTED(); |
| 241 } | 227 } |
| 242 | 228 |
| 243 const BluetoothServiceRecord* BluetoothDeviceWin::GetServiceRecord( | 229 const BluetoothServiceRecord* BluetoothDeviceWin::GetServiceRecord( |
| 244 const device::BluetoothUUID& uuid) const { | 230 const device::BluetoothUUID& uuid) const { |
| 245 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); | 231 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); |
| 246 iter != service_record_list_.end(); | 232 iter != service_record_list_.end(); |
| 247 ++iter) { | 233 ++iter) { |
| 248 if ((*iter)->uuid() == uuid) | 234 if ((*iter)->uuid() == uuid) |
| 249 return *iter; | 235 return *iter; |
| 250 } | 236 } |
| 251 return NULL; | 237 return NULL; |
| 252 } | 238 } |
| 253 | 239 |
| 254 } // namespace device | 240 } // namespace device |
| OLD | NEW |