Chromium Code Reviews| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 int max_transmit_power; | 82 int max_transmit_power; |
| 83 | 83 |
| 84 ConnectionInfo(); | 84 ConnectionInfo(); |
| 85 ConnectionInfo(int rssi, int transmit_power, int max_transmit_power); | 85 ConnectionInfo(int rssi, int transmit_power, int max_transmit_power); |
| 86 ~ConnectionInfo(); | 86 ~ConnectionInfo(); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 // Possible errors passed back to an error callback function in case of a | 89 // Possible errors passed back to an error callback function in case of a |
| 90 // failed call to Connect(). | 90 // failed call to Connect(). |
| 91 enum ConnectErrorCode { | 91 enum ConnectErrorCode { |
| 92 ERROR_UNKNOWN, | 92 ERROR_ATTRIBUTE_LENGTH_INVALID, |
| 93 ERROR_INPROGRESS, | 93 ERROR_AUTH_CANCELED, |
| 94 ERROR_FAILED, | |
| 95 ERROR_AUTH_FAILED, | 94 ERROR_AUTH_FAILED, |
| 96 ERROR_AUTH_CANCELED, | |
| 97 ERROR_AUTH_REJECTED, | 95 ERROR_AUTH_REJECTED, |
| 98 ERROR_AUTH_TIMEOUT, | 96 ERROR_AUTH_TIMEOUT, |
| 99 ERROR_UNSUPPORTED_DEVICE | 97 ERROR_CONNECTION_CONGESTED, |
| 98 ERROR_FAILED, | |
| 99 ERROR_INPROGRESS, | |
| 100 ERROR_INSUFFICIENT_ENCRYPTION, | |
| 101 ERROR_OFFSET_INVALID, | |
| 102 ERROR_READ_FAILED, | |
|
scheib
2015/11/26 00:02:51
ERROR_READ_NOT_PERMITTED
| |
| 103 ERROR_REQUEST_NOT_SUPPORTED, | |
| 104 ERROR_UNKNOWN, | |
| 105 ERROR_UNSUPPORTED_DEVICE, | |
| 106 ERROR_WRITE_FAILED | |
|
scheib
2015/11/26 00:02:51
ERROR_WRITE_NOT_PERMITTED
Kai Jiang
2015/11/29 10:40:51
Done.
| |
| 100 }; | 107 }; |
| 101 | 108 |
| 102 typedef std::vector<BluetoothUUID> UUIDList; | 109 typedef std::vector<BluetoothUUID> UUIDList; |
| 103 | 110 |
| 104 // Interface for negotiating pairing of bluetooth devices. | 111 // Interface for negotiating pairing of bluetooth devices. |
| 105 class PairingDelegate { | 112 class PairingDelegate { |
| 106 public: | 113 public: |
| 107 virtual ~PairingDelegate() {} | 114 virtual ~PairingDelegate() {} |
| 108 | 115 |
| 109 // This method will be called when the Bluetooth daemon requires a | 116 // This method will be called when the Bluetooth daemon requires a |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 | 526 |
| 520 private: | 527 private: |
| 521 // Returns a localized string containing the device's bluetooth address and | 528 // Returns a localized string containing the device's bluetooth address and |
| 522 // a device type for display when |name_| is empty. | 529 // a device type for display when |name_| is empty. |
| 523 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 530 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
| 524 }; | 531 }; |
| 525 | 532 |
| 526 } // namespace device | 533 } // namespace device |
| 527 | 534 |
| 528 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 535 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |