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 #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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 // be a synthesized string containing the address and localized type name | 220 // be a synthesized string containing the address and localized type name |
221 // if the device has no obtained name. | 221 // if the device has no obtained name. |
222 virtual base::string16 GetName() const; | 222 virtual base::string16 GetName() const; |
223 | 223 |
224 // Returns the type of the device, limited to those we support or are | 224 // Returns the type of the device, limited to those we support or are |
225 // aware of, by decoding the bluetooth class information. The returned | 225 // aware of, by decoding the bluetooth class information. The returned |
226 // values are unique, and do not overlap, so DEVICE_KEYBOARD is not also | 226 // values are unique, and do not overlap, so DEVICE_KEYBOARD is not also |
227 // DEVICE_PERIPHERAL. | 227 // DEVICE_PERIPHERAL. |
228 DeviceType GetDeviceType() const; | 228 DeviceType GetDeviceType() const; |
229 | 229 |
230 // Returns the "received signal strength indication" (RSSI) of the device. | |
231 // The RSSI is a measurement of the power present in a received radio signal. | |
232 // Larger (typically, less negative) values indicate a stronger signal. | |
233 virtual int GetRSSI() const = 0; | |
keybuk
2014/04/23 08:59:19
Is this the RSSI of inquiry/AD packets - or is thi
Ilya Sherman
2014/04/24 06:45:16
It's the latter. Do you want me to include a pair
keybuk
2014/04/24 11:25:52
If synchronous then there should definitely be a c
| |
234 | |
230 // Indicates whether the device is known to support pairing based on its | 235 // Indicates whether the device is known to support pairing based on its |
231 // device class and address. | 236 // device class and address. |
232 bool IsPairable() const; | 237 bool IsPairable() const; |
233 | 238 |
234 // Indicates whether the device is paired with the adapter. | 239 // Indicates whether the device is paired with the adapter. |
235 virtual bool IsPaired() const = 0; | 240 virtual bool IsPaired() const = 0; |
236 | 241 |
237 // Indicates whether the device is currently connected to the adapter. | 242 // Indicates whether the device is currently connected to the adapter. |
238 // Note that if IsConnected() is true, does not imply that the device is | 243 // Note that if IsConnected() is true, does not imply that the device is |
239 // connected to any application or service. If the device is not paired, it | 244 // connected to any application or service. If the device is not paired, it |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
388 | 393 |
389 private: | 394 private: |
390 // Returns a localized string containing the device's bluetooth address and | 395 // Returns a localized string containing the device's bluetooth address and |
391 // a device type for display when |name_| is empty. | 396 // a device type for display when |name_| is empty. |
392 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 397 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
393 }; | 398 }; |
394 | 399 |
395 } // namespace device | 400 } // namespace device |
396 | 401 |
397 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 402 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
OLD | NEW |