| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // of, by decoding the bluetooth class information for Classic devices or | 270 // of, by decoding the bluetooth class information for Classic devices or |
| 271 // by decoding the device's appearance for LE devices. For example, | 271 // by decoding the device's appearance for LE devices. For example, |
| 272 // Microsoft Universal Foldable Keyboard only advertises the appearance. | 272 // Microsoft Universal Foldable Keyboard only advertises the appearance. |
| 273 DeviceType GetDeviceType() const; | 273 DeviceType GetDeviceType() const; |
| 274 | 274 |
| 275 // Indicates whether the device is known to support pairing based on its | 275 // Indicates whether the device is known to support pairing based on its |
| 276 // device class and address. | 276 // device class and address. |
| 277 bool IsPairable() const; | 277 bool IsPairable() const; |
| 278 | 278 |
| 279 // Indicates whether the device is paired with the adapter. | 279 // Indicates whether the device is paired with the adapter. |
| 280 // On Chrome OS this function also returns true if the user has connected |
| 281 // to the device in the past. |
| 282 // TODO(crbug.com/649651): Change Chrome OS to only return true if the |
| 283 // device is actually paired. |
| 280 virtual bool IsPaired() const = 0; | 284 virtual bool IsPaired() const = 0; |
| 281 | 285 |
| 282 // Indicates whether the device is currently connected to the adapter. | 286 // Indicates whether the device is currently connected to the adapter. |
| 283 // Note that if IsConnected() is true, does not imply that the device is | 287 // Note that if IsConnected() is true, does not imply that the device is |
| 284 // connected to any application or service. If the device is not paired, it | 288 // connected to any application or service. If the device is not paired, it |
| 285 // could be still connected to the adapter for other reason, for example, to | 289 // could be still connected to the adapter for other reason, for example, to |
| 286 // request the adapter's SDP records. The same holds for paired devices, since | 290 // request the adapter's SDP records. The same holds for paired devices, since |
| 287 // they could be connected to the adapter but not to an application. | 291 // they could be connected to the adapter but not to an application. |
| 288 virtual bool IsConnected() const = 0; | 292 virtual bool IsConnected() const = 0; |
| 289 | 293 |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 | 646 |
| 643 private: | 647 private: |
| 644 // Returns a localized string containing the device's bluetooth address and | 648 // Returns a localized string containing the device's bluetooth address and |
| 645 // a device type for display when |name_| is empty. | 649 // a device type for display when |name_| is empty. |
| 646 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 650 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
| 647 }; | 651 }; |
| 648 | 652 |
| 649 } // namespace device | 653 } // namespace device |
| 650 | 654 |
| 651 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 655 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |