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

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

Issue 1133173002: Expose TxPower for bluetooth devices during discovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added unittests Created 5 years, 7 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 (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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // devices this data is collected from both the EIR data and SDP tables, 256 // devices this data is collected from both the EIR data and SDP tables,
257 // for Low Energy devices this data is collected from AD and GATT primary 257 // for Low Energy devices this data is collected from AD and GATT primary
258 // services, for dual mode devices this may be collected from both./ 258 // services, for dual mode devices this may be collected from both./
259 virtual UUIDList GetUUIDs() const = 0; 259 virtual UUIDList GetUUIDs() const = 0;
260 260
261 // The received signal strength, in dBm. This field is avaliable and valid 261 // The received signal strength, in dBm. This field is avaliable and valid
262 // only during discovery. If not during discovery, or RSSI wasn't reported, 262 // only during discovery. If not during discovery, or RSSI wasn't reported,
263 // this method will return |kUnknownPower|. 263 // this method will return |kUnknownPower|.
264 virtual int16 GetInquiryRSSI() const = 0; 264 virtual int16 GetInquiryRSSI() const = 0;
265 265
266 // The transmitted power level. This field is avaliable only for LE devices
267 // that include this field in AD. It is avaliable and valid only during
268 // discovery. If not during discovery, or TxPower wasn't reported, this
269 // method will return |kUnknownPower|.
270 virtual int16 GetInquiryTxPower() const = 0;
271
266 // The ErrorCallback is used for methods that can fail in which case it 272 // The ErrorCallback is used for methods that can fail in which case it
267 // is called, in the success case the callback is simply not called. 273 // is called, in the success case the callback is simply not called.
268 typedef base::Callback<void()> ErrorCallback; 274 typedef base::Callback<void()> ErrorCallback;
269 275
270 // The ConnectErrorCallback is used for methods that can fail with an error, 276 // The ConnectErrorCallback is used for methods that can fail with an error,
271 // passed back as an error code argument to this callback. 277 // passed back as an error code argument to this callback.
272 // In the success case this callback is not called. 278 // In the success case this callback is not called.
273 typedef base::Callback<void(enum ConnectErrorCode)> ConnectErrorCallback; 279 typedef base::Callback<void(enum ConnectErrorCode)> ConnectErrorCallback;
274 280
275 typedef base::Callback<void(const ConnectionInfo&)> ConnectionInfoCallback; 281 typedef base::Callback<void(const ConnectionInfo&)> ConnectionInfoCallback;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 454
449 private: 455 private:
450 // Returns a localized string containing the device's bluetooth address and 456 // Returns a localized string containing the device's bluetooth address and
451 // a device type for display when |name_| is empty. 457 // a device type for display when |name_| is empty.
452 base::string16 GetAddressWithLocalizedDeviceTypeName() const; 458 base::string16 GetAddressWithLocalizedDeviceTypeName() const;
453 }; 459 };
454 460
455 } // namespace device 461 } // namespace device
456 462
457 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 463 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698