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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_win.h

Issue 424093004: Improve processing of Bluetooth device discovery on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review feedback (nits and memory leak). Created 6 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Enumerates the list of known (i.e. already paired) Bluetooth LE devices on 95 // Enumerates the list of known (i.e. already paired) Bluetooth LE devices on
96 // this machine. In case of error, returns false and sets |error| with an error 96 // this machine. In case of error, returns false and sets |error| with an error
97 // message describing the problem. 97 // message describing the problem.
98 // Note: This function returns an error if Bluetooth Low Energy is not supported 98 // Note: This function returns an error if Bluetooth Low Energy is not supported
99 // on this Windows platform. 99 // on this Windows platform.
100 bool EnumerateKnownBluetoothLowEnergyDevices( 100 bool EnumerateKnownBluetoothLowEnergyDevices(
101 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, 101 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices,
102 std::string* error); 102 std::string* error);
103 103
104 // Enumerates the list of known (i.e. cached) GATT services for a given 104 // Enumerates the list of known (i.e. cached) GATT services for a given
105 // Bluetooth LE device |device_info| into |services|. In case of error, returns 105 // Bluetooth LE device |device_path| into |services|. In case of error, returns
106 // false and sets |error| with an error message describing the problem. Note: 106 // false and sets |error| with an error message describing the problem. Note:
107 // This function returns an error if Bluetooth Low Energy is not supported on 107 // This function returns an error if Bluetooth Low Energy is not supported on
108 // this Windows platform. 108 // this Windows platform.
109 bool EnumerateKnownBluetoothLowEnergyServices( 109 bool EnumerateKnownBluetoothLowEnergyServices(
110 BluetoothLowEnergyDeviceInfo* device_info, 110 const base::FilePath& device_path,
111 ScopedVector<BluetoothLowEnergyServiceInfo>* services, 111 ScopedVector<BluetoothLowEnergyServiceInfo>* services,
112 std::string* error); 112 std::string* error);
113 113
114 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting( 114 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting(
115 const std::string& instance_id, 115 const std::string& instance_id,
116 BLUETOOTH_ADDRESS* btha, 116 BLUETOOTH_ADDRESS* btha,
117 std::string* error); 117 std::string* error);
118 118
119 } // namespace win 119 } // namespace win
120 } // namespace device 120 } // namespace device
121 121
122 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ 122 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_win_unittest.cc ('k') | device/bluetooth/bluetooth_low_energy_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698