Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Side by Side Diff: device/bluetooth/bluetooth_task_manager_win.cc

Issue 378293007: Expose "visible" and "authenticated" properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth.le.win.part3
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/bluetooth_task_manager_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_task_manager_win.h" 5 #include "device/bluetooth/bluetooth_task_manager_win.h"
6 6
7 #include <winsock2.h> 7 #include <winsock2.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 if (success) { 399 if (success) {
400 for (ScopedVector<win::BluetoothLowEnergyDeviceInfo>::iterator iter = 400 for (ScopedVector<win::BluetoothLowEnergyDeviceInfo>::iterator iter =
401 btle_devices.begin(); 401 btle_devices.begin();
402 iter != btle_devices.end(); 402 iter != btle_devices.end();
403 ++iter) { 403 ++iter) {
404 win::BluetoothLowEnergyDeviceInfo* device_info = (*iter); 404 win::BluetoothLowEnergyDeviceInfo* device_info = (*iter);
405 405
406 DeviceState* device_state = new DeviceState(); 406 DeviceState* device_state = new DeviceState();
407 device_state->name = device_info->friendly_name; 407 device_state->name = device_info->friendly_name;
408 device_state->address = BluetoothAddressToString(device_info->address); 408 device_state->address = BluetoothAddressToString(device_info->address);
409 device_state->visible = device_info->visible;
410 device_state->authenticated = device_info->authenticated;
409 device_state->connected = device_info->connected; 411 device_state->connected = device_info->connected;
412 device_state->path = device_info->path;
410 device_list->push_back(device_state); 413 device_list->push_back(device_state);
411 } 414 }
412 } 415 }
413 } 416 }
414 417
415 if (device_list->empty()) { 418 if (device_list->empty()) {
416 delete device_list; 419 delete device_list;
417 return; 420 return;
418 } 421 }
419 DiscoverServices(device_list); 422 DiscoverServices(device_list);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 const std::string device_address = (*iter)->address; 467 const std::string device_address = (*iter)->address;
465 ScopedVector<ServiceRecordState>* service_record_states = 468 ScopedVector<ServiceRecordState>* service_record_states =
466 &(*iter)->service_record_states; 469 &(*iter)->service_record_states;
467 470
468 DiscoverDeviceServices( 471 DiscoverDeviceServices(
469 device_address, L2CAP_PROTOCOL_UUID, service_record_states); 472 device_address, L2CAP_PROTOCOL_UUID, service_record_states);
470 } 473 }
471 } 474 }
472 475
473 } // namespace device 476 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_task_manager_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698